diff --git a/rma_account/models/rma_order_line.py b/rma_account/models/rma_order_line.py index b6c152d66..42fff48b8 100644 --- a/rma_account/models/rma_order_line.py +++ b/rma_account/models/rma_order_line.py @@ -15,6 +15,12 @@ def _default_invoice_address(self): return self.env["res.partner"].browse(partner_id) return self.env["res.partner"] + @api.onchange("partner_id") + def _onchange_invoice_address(self): + self.invoice_address_id = self.env["res.partner"].browse( + self.partner_id.address_get(["invoice"])["invoice"] + ) + @api.depends( "move_line_ids", "move_line_ids.move_id.state", "refund_policy", "type" )