Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
2716 มุมมอง

 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

     

     

 


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

 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



อวตาร
ละทิ้ง
ผู้เขียน

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?

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
ผู้เขียน

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?

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ค. 25
11184
2
พ.ค. 18
4220
3
มิ.ย. 15
7968
2
มี.ค. 15
8525
0
มี.ค. 15
4089