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

 hi all, 

How can I hide colom based on payslip structure, this is the code I created


 

I hope you all can help me to find a solution


thanks

     

     

 


Avatar
Verwerfen
Beste Antwort

 HI   Arif Munandar


You want to hide column with conditional view so you should try below code,

In 17 version of odoo the way of writing attrs is changed so you can try like below code.


Here it is your code,





 I hope this is helpful to you.


 Thanks & Regards,

 Email: odoo@devintellecs.com

 Skype: devintelle



Avatar
Verwerfen
Autor

thanks for the answer, I want to call the 'id' of the Structure payroll, is it 'struct_id' correct to call the 'id' of the Structure payroll?

Beste Antwort

Hi,

Try the following code,

<data>
<xpath expr="//field[@name='employee_id']" position="after">
        <field name="x_studio_km_awal_2" attrs="{'invisible': [('struct_id', '!=', 6)]}"/>
        <field name="x_studio_km_akhir_1" attrs="{'invisible': [('struct_id', '!=', 6)]}"/>
    </xpath>
</data>

You can try the same code, if it gets a reference value of id =6, 

update with the value and try to avoid manual entry


Hope it helps

Avatar
Verwerfen
Autor

thanks for the answer, I want to call the 'id' of the Structure payroll, is it 'struct_id' correct to call the 'id' of the Structure payroll?

Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Juli 25
11174
2
Mai 18
4219
3
Juni 15
7965
2
März 15
8520
0
März 15
4085