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

<record id="customer_ring_name" model="ir.ui.view">

<field name="name">customer.name.inherit.form</field>

<field name="model">sale.order</field>

<field name="inherit_id" ref="sale.view_order_form"/>

<field name="arch" type="xml">

<field name="boolvalue" invisible="1"/>


<t t-if="boolvalue == 'True'">

<xpath expr="/form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='tax_id']" position="after" >

<!-- <field name="boolvalue" invisible="1"/> -->

<field name="string" />

</xpath>

</t>

</field>

</record>


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

Hi,

Rather than trying to inherit based on condition, what you can do is that, inherit and add the field and give condition for the visibility, if the condition is not satisfied keep the field invisible and show only when condition satisfies.

Sample:


<field name='maximum_group' attrs="{'invisible': [('state', 'in', ('finished'))]}"/>


Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
มี.ค. 24
3357
1
ต.ค. 23
5325
1
มิ.ย. 22
6561
How to inherits only one fields แก้ไขแล้ว
4
มิ.ย. 21
15838
2
ส.ค. 17
12628