diff --git a/rma/models/rma_order_line.py b/rma/models/rma_order_line.py index ea90f2e4..6ad55456 100644 --- a/rma/models/rma_order_line.py +++ b/rma/models/rma_order_line.py @@ -730,7 +730,7 @@ class RmaOrderLine(models.Model): ) 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): diff --git a/rma/views/rma_order_line_view.xml b/rma/views/rma_order_line_view.xml index 3b6e0b21..ff71a40e 100644 --- a/rma/views/rma_order_line_view.xml +++ b/rma/views/rma_order_line_view.xml @@ -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)]" />