콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
3134 화면

Hi everyone. I want to make table under the <page> like order lines in sales. But now, I will add like that in payroll module. When I'm using <notebook>, my new page doesnot show. I used odoo v10. Here my code :

my .py

from openerp import models, fields, api

class PurchaseOrder(models.Model):

_inherit = 'hr.payslip'

     gaji_pokok = fields.Integer(string="Gaji Pokok")

     t_lembur = fields.Integer(string="Tunjangan Lembur")


Here my xml

<?xml version="1.0" encoding="utf-8"?>

<openerp>

<data>

<record id="view_hr_payslip_inherit_form_extended" model="ir.ui.view">

<field name="name">hr.payslip.inherit.form</field>

<field name="model">hr.payslip</field>

<field name="inherit_id" ref="hr_payroll.view_hr_payslip_form" />

<field name="arch" type="xml">

    <xpath expr="//page[1]" position="after">

         <form string="tes_table" colspan="4" nolabel="1">

             <notebook>

                 <page string="Pendapatan Karyawan">

                     <separator string="Tes Hasil"/>

                         <group col="4">

                             <tree colspan="4" nolabel="1" string="Tunjangan Gaji">

                                 <field name="gaji_pokok"/>

                                 <field name="t_lembur"/>

                             </tree>

                         </group>

                     </page>

                 </notebook>

             </form>

         </xpath>

       </field>

     </record>

</data>

</openerp>


Anyone can help me please about this?

아바타
취소
작성자 베스트 답변

Hai mayank, I mean like this. if you see in payroll module, there is page name "Worked Days & Input". Then under the page, there are 5 columns such as description, code, number of days, humber of hours, and contract. Now, I want to make new page beside of Worked Days & Input and the name of my new is "Pendapatan Karyawan". So, under the page "Pendapatan Karyawan", I want to make 5 columns again. Can you help me for creating this columns?

아바타
취소
베스트 답변

Hi Festy,

Replace position="after" to  position="inside".

All the Best,

Regards,

Mayank Gosai

아바타
취소
관련 게시물 답글 화면 활동
Set Default Country 해결 완료
2
6월 20
13411
0
3월 21
6331
3
7월 20
20517
3
7월 20
8592
2
1월 19
6567