Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet

Hi, I have created a related field on the custom payroll form and I use odoo 10.
I want to make the name in form (gaji_ids) same based on input field. But, when I enter words in input field, the name in the form (gaji_ids) does not same with word that I enter. Anyone can help me about this? Thanks

Here my code

gaji.py

    emp_id = fields.Many2one('karyawan', 'Karyawan')

karyawan.py

    gaji_ids = fields.One2many('gaji', 'emp_id', 'Gaji')

karyawan_view.xml

    <page string="Gaji" name="gaji">
                            <field name="gaji_ids" context="{'default_emp_id':nama}" widget="one2many_list">
                                <tree editable="bottom">
                                    <field name="emp_id" attrs="{'readonly': [('emp_id', '!=', False)]}"/>
                                    <field name="gaji_pokok"/>
                                    <field name="jumlah_hari_kerja"/>                                   
                                    <field name="jumlah_kerja"/> 
                                    <field name="libur"/>                                                                     
                                    <field name="jam_lembur"/>                                   
                                    <field name="t_lembur"/>
                                    <field name="t_transportasi"/>
                                    <field name="total_pendapatan"/>
                                </tree>
                            </field>

    </page>

Avatar
Verwerfen

I didn't understand your question.

Please specify clearly what you want.

Autor

I have solved this problem, thanks

Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Nov. 18
4356
0
Okt. 17
3100
1
Juli 19
5210
1
Sept. 18
239
0
Juni 18
2585