Skip to content

Commit

Permalink
[IMP] account_payment_purchase: Add propagation of payment mode from …
Browse files Browse the repository at this point in the history
…purchase to invoice
  • Loading branch information
atorreiro authored and aritzolea committed Jan 31, 2025
1 parent 964745e commit 83b7ff5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion account_payment_purchase/models/purchase_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def _compute_payment_mode(self):

def _prepare_invoice(self):
"""Leave the bank account empty so that account_payment_partner set the
correct value with compute."""
correct value with compute and ropagate payment mode to invoice."""
invoice_vals = super()._prepare_invoice()
invoice_vals.pop("partner_bank_id")
invoice_vals["payment_mode_id"] = self.payment_mode_id.id
return invoice_vals

0 comments on commit 83b7ff5

Please sign in to comment.