|
19 | 19 | />
|
20 | 20 | <field
|
21 | 21 | name="secondary_uom_id"
|
22 |
| - domain="['|', ('product_id', '=', product_id), |
| 22 | + domain="product_id and ['|', ('product_id', '=', product_id), |
23 | 23 | '&', ('product_tmpl_id.product_variant_ids', 'in', [product_id]),
|
24 |
| - ('product_id', '=', False)]" |
| 24 | + ('product_id', '=', False)] or [(0, '=', 1)]" |
25 | 25 | options="{'no_create': True}"
|
26 | 26 | attrs="{'column_invisible': [('parent.immediate_transfer', '=', True)], 'readonly': ['|', ('is_initial_demand_editable', '=', False), '&', '&', ('show_operations', '=', True), ('is_locked', '=', True), ('is_initial_demand_editable', '=', False)]}"
|
27 | 27 | groups="uom.group_uom"
|
|
39 | 39 | />
|
40 | 40 | <field
|
41 | 41 | name="secondary_uom_id"
|
42 |
| - domain="['|', ('product_id', '=', product_id), |
| 42 | + domain="product_id and ['|', ('product_id', '=', product_id), |
43 | 43 | '&', ('product_tmpl_id.product_variant_ids', 'in', [product_id]),
|
44 |
| - ('product_id', '=', False)]" |
| 44 | + ('product_id', '=', False)] or [(0, '=', 1)]" |
45 | 45 | options="{'no_create': True}"
|
46 | 46 | attrs="{'invisible': [('parent.immediate_transfer', '=', True)], 'readonly': [('is_initial_demand_editable', '=', False)]}"
|
47 | 47 | groups="uom.group_uom"
|
|
0 commit comments