[FIX] base: set vat number field as readonly on children partners; as it is a commercial field, it should always have the value defined on the parent partner.
(this is a manual forward port from https://github.com/odoo/odoo/commit/98b1fffd4e99cc8ad2862c56fbd727979c38c48b , as a new view is defined in 11.0, needing this correction too)
This commit is contained in:
@@ -171,7 +171,7 @@
|
||||
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'
|
||||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
</div>
|
||||
<field name="vat" placeholder="e.g. BE0477472701"/>
|
||||
<field name="vat" placeholder="e.g. BE0477472701" attrs="{'readonly': [('parent_id','!=',False)]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="function" placeholder="e.g. Sales Director"
|
||||
@@ -244,7 +244,7 @@
|
||||
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'
|
||||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||||
</div>
|
||||
<field name="vat" placeholder="e.g. BE0477472701"/>
|
||||
<field name="vat" placeholder="e.g. BE0477472701" attrs="{'readonly': [('parent_id','!=',False)]}"/>
|
||||
<field name="category_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" placeholder="Tags..."/>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
Reference in New Issue
Block a user