mirror of
https://github.com/OCA/rma.git
synced 2025-02-16 17:11:47 +02:00
[FIX] rma: return wizard to_refund
To create the rma we create the core return wizard, which now sets to_refund to True as default. This isn't right for RMAs anyway. TT33706
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||||
"maintainers": ["ernestotejeda"],
|
"maintainers": ["ernestotejeda"],
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"depends": ["account", "stock"],
|
"depends": ["stock_account"],
|
||||||
"data": [
|
"data": [
|
||||||
"views/report_rma.xml",
|
"views/report_rma.xml",
|
||||||
"report/report.xml",
|
"report/report.xml",
|
||||||
|
|||||||
@@ -912,7 +912,14 @@ class Rma(models.Model):
|
|||||||
lambda r: r.move_id != self.move_id
|
lambda r: r.move_id != self.move_id
|
||||||
).unlink()
|
).unlink()
|
||||||
return_line = return_wizard.product_return_moves
|
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
|
# set_rma_picking_type is to override the copy() method of stock
|
||||||
# picking and change the default picking type to rma picking type.
|
# picking and change the default picking type to rma picking type.
|
||||||
picking_action = return_wizard.with_context(
|
picking_action = return_wizard.with_context(
|
||||||
|
|||||||
Reference in New Issue
Block a user