mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[FIX] rma: return location
The new implementation wasn't getting the value set in the wizard. TT32046
This commit is contained in:
@@ -889,12 +889,6 @@ class Rma(models.Model):
|
||||
# Reception business methods
|
||||
def _create_receptions_from_picking(self):
|
||||
self.ensure_one()
|
||||
create_vals = {}
|
||||
if self.location_id:
|
||||
create_vals.update(
|
||||
location_id=self.location_id.id,
|
||||
picking_id=self.picking_id.id,
|
||||
)
|
||||
stock_return_picking_form = Form(
|
||||
self.env["stock.return.picking"].with_context(
|
||||
active_ids=self.picking_id.ids,
|
||||
@@ -902,6 +896,8 @@ class Rma(models.Model):
|
||||
active_model="stock.picking",
|
||||
)
|
||||
)
|
||||
if self.location_id:
|
||||
stock_return_picking_form.location_id = self.location_id
|
||||
return_wizard = stock_return_picking_form.save()
|
||||
return_wizard.product_return_moves.filtered(
|
||||
lambda r: r.move_id != self.move_id
|
||||
|
||||
Reference in New Issue
Block a user