コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4716 ビュー

<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
3月 24
3345
1
10月 23
5310
1
6月 22
6552
4
6月 21
15823
2
8月 17
12624