Skip to content

Commit c01af5d

Browse files
committed
[FIX] don't restrict lot if return product is different
1 parent 3a71bc9 commit c01af5d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rma_lot/wizards/stock_return_picking_line.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ class StockReturnPickingLine(models.TransientModel):
1010

1111
def _prepare_rma_vals(self):
1212
vals = super()._prepare_rma_vals()
13-
vals.update({"lot_id": self.lot_id.id})
13+
if not self.rma_operation_id.different_return_product:
14+
vals.update({"lot_id": self.lot_id.id})
1415
return vals

rma_sale_lot/wizards/sale_order_line_rma_wizard.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ def _compute_lots_visible(self):
1919
def _prepare_rma_values(self):
2020
self.ensure_one()
2121
values = super()._prepare_rma_values()
22-
values["lot_id"] = self.lot_id.id
22+
if not self.operation_id.different_return_product:
23+
values["lot_id"] = self.lot_id.id
2324
return values

0 commit comments

Comments
 (0)