تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4703 أدوات العرض

<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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
4
مارس 24
3334
1
أكتوبر 23
5304
1
يونيو 22
6526
4
يونيو 21
15816
2
أغسطس 17
12620