mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[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:
@@ -17,9 +17,9 @@
|
||||
/>
|
||||
<field
|
||||
name="secondary_uom_id"
|
||||
domain="['|', ('product_id', '=', product_id),
|
||||
domain="product_id and ['|', ('product_id', '=', product_id),
|
||||
'&', ('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),
|
||||
'&', ('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"
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
/>
|
||||
<field
|
||||
name="secondary_uom_id"
|
||||
domain="['|', ('product_id', '=', product_id),
|
||||
domain="product_id and ['|', ('product_id', '=', product_id),
|
||||
'&', ('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), '&', '&', ('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),
|
||||
'&', ('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)]}"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user