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 Sep 22, 2023
1 parent fb9af9b commit 6946846
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 6946846

Please sign in to comment.