Merge pull request #336 from ForgeFlow/13.0-fp-288

[13.0][FIX] fix empty parter on rma picking
This commit is contained in:
Lois Rilo
2022-12-27 09:23:09 +01:00
committed by GitHub

View File

@@ -34,7 +34,7 @@ class StockRule(models.Model):
res["rma_line_id"] = line.id res["rma_line_id"] = line.id
if line.delivery_address_id: if line.delivery_address_id:
res["partner_id"] = line.delivery_address_id.id res["partner_id"] = line.delivery_address_id.id
else: elif line.rma_id.partner_id:
res["partner_id"] = line.rma_id.partner_id.id res["partner_id"] = line.rma_id.partner_id.id
dest_loc = self.env["stock.location"].browse([res["location_dest_id"]])[0] dest_loc = self.env["stock.location"].browse([res["location_dest_id"]])[0]
if dest_loc.usage == "internal": if dest_loc.usage == "internal":