Merge PR #251 into 13.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2022-01-17 15:13:47 +00:00
2 changed files with 9 additions and 2 deletions

View File

@@ -10,7 +10,7 @@
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["ernestotejeda"],
"license": "AGPL-3",
"depends": ["account", "stock"],
"depends": ["stock_account"],
"data": [
"views/report_rma.xml",
"report/report.xml",

View File

@@ -877,7 +877,14 @@ class Rma(models.Model):
lambda r: r.move_id != self.move_id
).unlink()
return_line = return_wizard.product_return_moves
return_line.quantity = self.product_uom_qty
return_line.update(
{
"quantity": self.product_uom_qty,
# The to_refund field is now True by default, which isn't right in the RMA
# creation context.
"to_refund": False,
}
)
# set_rma_picking_type is to override the copy() method of stock
# picking and change the default picking type to rma picking type.
picking_action = return_wizard.with_context(