Skip to content

Commit

Permalink
[16.0][IMP] rma_account & rma_sale: fix delivery and invoice addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPForgeFlow committed Aug 20, 2024
1 parent f83a0de commit 868a9e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion rma_account/models/rma_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ def _prepare_rma_line_from_inv_line(self, line):
line.date,
round=False,
),
"delivery_address_id": line.move_id.partner_id.id,
"delivery_address_id": line.move_id.partner_shipping_id.id
if line.move_id.partner_shipping_id
else line.move_id.partner_id.id,
"invoice_address_id": line.move_id.partner_id.id,
"receipt_policy": operation.receipt_policy,
"refund_policy": operation.refund_policy,
Expand Down
4 changes: 3 additions & 1 deletion rma_account/wizards/rma_add_account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ def _prepare_rma_line_from_inv_line(self, line):
line.date,
round=False,
),
"delivery_address_id": line.move_id.partner_id.id,
"delivery_address_id": line.move_id.partner_shipping_id.id
if line.move_id.partner_shipping_id
else line.move_id.partner_id.id,
"invoice_address_id": line.move_id.partner_id.id,
"rma_id": self.rma_id.id,
"receipt_policy": operation.receipt_policy,
Expand Down
4 changes: 2 additions & 2 deletions rma_sale/models/rma_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ def _prepare_rma_line_from_sale_order_line(self, line):
"uom_id": line.product_uom.id,
"operation_id": operation.id,
"product_qty": line.product_uom_qty,
"delivery_address_id": line.order_id.partner_id.id,
"invoice_address_id": line.order_id.partner_id.id,
"delivery_address_id": line.order_id.partner_shipping_id.id,
"invoice_address_id": line.order_id.partner_invoice_id.id,
"price_unit": line.currency_id._convert(
line.price_unit,
line.currency_id,
Expand Down

0 comments on commit 868a9e7

Please sign in to comment.