Skip to content

Commit

Permalink
[14.0][IMP] Added onchange to retrieve invoice address from partner s…
Browse files Browse the repository at this point in the history
…election
  • Loading branch information
ChrisOForgeFlow committed Nov 21, 2023
1 parent 2f76541 commit f42f3da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rma_account/models/rma_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down

0 comments on commit f42f3da

Please sign in to comment.