Skip to content

Commit

Permalink
[IMP] Remove domain from onchange method and put it in field view
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-dacosta committed Nov 28, 2023
1 parent 334b86f commit 9bdea31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rma/models/rma_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ def _onchange_product_id(self):
)
if self.lot_id.product_id != self.product_id:
self.lot_id = False
return {"domain": {"lot_id": [("product_id", "=", self.product_id.id)]}}
return result

@api.onchange("operation_id")
def _onchange_operation_id(self):
Expand Down
1 change: 1 addition & 0 deletions rma/views/rma_order_line_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
groups="stock.group_production_lot"
attrs="{'required': [('product_tracking', 'in', ('serial', 'lot'))]}"
context="{'default_product_id': product_id,}"
domain="[('product_id', '=', product_id)]"
/>
<field name="under_warranty" />
</group>
Expand Down

0 comments on commit 9bdea31

Please sign in to comment.