跳至内容
菜单
此问题已终结
2 回复
3107 查看

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

形象
丢弃
相关帖文 回复 查看 活动
2
6月 20
13391
0
3月 21
6259
3
7月 20
20455
3
7月 20
8567
2
1月 19
6498