[FIX] stock_secondary_unit: Error when user try to select a secondary uom without product in sale order line

TT51683
This commit is contained in:
sergio-teruel
2024-11-11 22:05:40 +01:00
parent 413f8fe4ea
commit bf39020eeb
2 changed files with 8 additions and 8 deletions

View File

@@ -17,9 +17,9 @@
/>
<field
name="secondary_uom_id"
domain="['|', ('product_id', '=', product_id),
domain="product_id and ['|', ('product_id', '=', product_id),
'&amp;', ('product_tmpl_id.product_variant_ids', 'in', [product_id]),
('product_id', '=', False)]"
('product_id', '=', False)] or [(0, '=', 1)]"
attrs="{'readonly': [('state', '!=', 'draft'), ('id', '!=', False)]}"
options="{'no_create': True}"
optional="show"
@@ -45,9 +45,9 @@
/>
<field
name="secondary_uom_id"
domain="['|', ('product_id', '=', product_id),
domain="product_id and ['|', ('product_id', '=', product_id),
'&amp;', ('product_tmpl_id.product_variant_ids', 'in', [product_id]),
('product_id', '=', False)]"
('product_id', '=', False)] or [(0, '=', 1)]"
attrs="{'readonly': [('state', '!=', 'draft'), ('id', '!=', False)]}"
options="{'no_create': True}"
optional="show"

View File

@@ -19,9 +19,9 @@
/>
<field
name="secondary_uom_id"
domain="['|', ('product_id', '=', product_id),
domain="product_id and ['|', ('product_id', '=', product_id),
'&amp;', ('product_tmpl_id.product_variant_ids', 'in', [product_id]),
('product_id', '=', False)]"
('product_id', '=', False)] or [(0, '=', 1)]"
options="{'no_create': True}"
attrs="{'column_invisible': [('parent.immediate_transfer', '=', True)], 'readonly': ['|', ('is_initial_demand_editable', '=', False), '&amp;', '&amp;', ('show_operations', '=', True), ('is_locked', '=', True), ('is_initial_demand_editable', '=', False)]}"
optional="show"
@@ -37,9 +37,9 @@
/>
<field
name="secondary_uom_id"
domain="['|', ('product_id', '=', product_id),
domain="product_id and ['|', ('product_id', '=', product_id),
'&amp;', ('product_tmpl_id.product_variant_ids', 'in', [product_id]),
('product_id', '=', False)]"
('product_id', '=', False)] or [(0, '=', 1)]"
options="{'no_create': True}"
attrs="{'invisible': [('parent.immediate_transfer', '=', True)], 'readonly': [('is_initial_demand_editable', '=', False)]}"
/>