Skip to content
Snippets Groups Projects
Commit bc9fdfff authored by Simon Lejeune's avatar Simon Lejeune
Browse files

[FIX] product: multi edit barcode field on template


Writing barcode on a template will only write it on the variants if the
variant count is 1. Make the field readonly on the view according to
this condition.

closes odoo/odoo#41489

X-original-commit: a67ad076
Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
parent a8f6b4ce
No related branches found
No related tags found
No related merge requests found
......@@ -5,9 +5,11 @@
<field name="model">product.template</field>
<field name="arch" type="xml">
<tree string="Product" multi_edit="1">
<field name="product_variant_count" invisible="1"/>
<field name="sequence" widget="handle" readonly="1"/>
<field name="default_code" optional="show"/>
<field name="barcode" optional="hide"/>
<field name="barcode" optional="hide" attrs="{'readonly': [('product_variant_count', '>', 1)]}"/>
<field name="name"/>
<field name="company_id" options="{'no_create_edit': True}"
groups="base.group_multi_company" optional="hide"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment