[REF] account_asset,sale: invisible attr in form view
When the invisible attr doesn't need to be evaluated (e.g. = "1"), it is better not to specify it within the attrs as they are automacally re-evaluted at each field changed. We directly write "invisible=1" instead. The JS framework supports both, but we encourage the later one.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field name="type" attrs="{'invisible': 1}"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group string="Journal Entries">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
attrs="{'invisible': [('count','>',1)]}"/>
|
||||
<field name="product_id"
|
||||
context="{'search_default_services': 1, 'default_type': 'service', 'default_invoice_policy': 'order'}" class="oe_inline"
|
||||
attrs="{'invisible': 1}"/>
|
||||
invisible="1"/>
|
||||
<label for="amount" attrs="{'invisible': [('advance_payment_method', 'not in', ('fixed','percentage'))]}"/>
|
||||
<div attrs="{'invisible': [('advance_payment_method', 'not in', ('fixed','percentage'))]}">
|
||||
<field name="amount"
|
||||
|
||||
Reference in New Issue
Block a user