[IMP] rma: prevent the creation of zero qty moves

This commit is contained in:
Stefan Rijnhart
2022-06-11 12:09:06 +02:00
committed by Florian da Costa
parent c778c1db67
commit 60a9d6decb
3 changed files with 23 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ class StockRule(models.Model):
)
if "rma_line_id" in values:
line = values.get("rma_line_id")
line = self.env["rma.order.line"].browse([line])
res["rma_line_id"] = line.id
if line.delivery_address_id:
res["partner_id"] = line.delivery_address_id.id