Skip to Content
Menu
This question has been flagged
2 Replies
2346 Views

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?

Avatar
Discard
Author Best Answer

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?

Avatar
Discard
Best Answer

Hi Festy,

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

All the Best,

Regards,

Mayank Gosai

Avatar
Discard
Related Posts Replies Views Activity
2
Jun 20
12110
0
Mar 21
5199
3
Jul 20
18538
3
Jul 20
7596
2
Jan 19
5102