Skip to content

Commit

Permalink
[FIX] purchase_order_secondary_unit: Error when user try to select a …
Browse files Browse the repository at this point in the history
…secondary uom without product in sale order line

TT51683
  • Loading branch information
sergio-teruel authored and dalonsod committed Nov 13, 2024
1 parent ae49472 commit ee8f610
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions purchase_order_secondary_unit/views/purchase_order_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<field
name="secondary_uom_id"
class="oe_inline"
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="{'readonly': [('state', 'in', ('purchase', 'done', 'cancel'))], 'required': [('secondary_uom_qty', '!=', 0.0)]}"
/>
Expand All @@ -40,9 +40,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="{'readonly': [('state', 'in', ('purchase','done', 'cancel'))], 'required': [('secondary_uom_qty', '!=', 0.0)]}"
groups="uom.group_uom"
Expand Down

0 comments on commit ee8f610

Please sign in to comment.