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

I have two kinds of invoice sales journal, I want to hide a field (x_serieDTE) in one of both journal  

อวตาร
ละทิ้ง

Can you screenshot the code relevant to the problem ? 

ผู้เขียน
My issue is more related with the code that I have to use with attrs

Image.jpeg

I have this code, x_serieDTE, and I need it to be visible only in the following conditions: 
1. when a particular journal is used  (journal=Factura cliente)

Image.jpeg

2. It does not appear on supplier invoices.

Thank you in advance for your support.

De: Dennis Kwan <notifications@mail.odoo.com>
Enviado: Thursday, November 10, 2022 9:12:00 PM
Para: Rodolfo Boy <rboy@olomcorp.com>
Asunto: Re: How to hide field in a Form View? in odoo16
 

Can you screenshot the code relevant to the problem ? 

Sent by Odoo S.A. using Odoo.

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

Hi,

If you are using odoo studio, you can add a conditional invisible attribute for the field. Enable studio, click on field then click on condition near the invisible attribute and set your condition.




If you need to do from code, you can achieve it using attrs attribute, see a sample code:

attrs="{'invisible': [('state','!=','paid')]}"


Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 25
1121
1
เม.ย. 25
2436
1
เม.ย. 25
3131
1
เม.ย. 25
802
4
มี.ค. 25
5458