Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4774 Zobrazení

<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>


Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
4
bře 24
3421
1
říj 23
5371
1
čvn 22
6615
4
čvn 21
15924
2
srp 17
12676