Skip to content

Commit

Permalink
Merge PR #1422 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Feb 18, 2025
2 parents 10919c6 + 76319b6 commit 9aaa9b0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions account_payment_sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ class SaleOrder(models.Model):
@api.depends("partner_id", "company_id")
def _compute_payment_mode(self):
for order in self:
if order.partner_id:
order.payment_mode_id = order.with_company(
order.company_id
).partner_id.customer_payment_mode_id
else:
order.payment_mode_id = False
order.payment_mode_id = order.partner_id.with_company(
order.company_id
).customer_payment_mode_id

def _get_payment_mode_vals(self, vals):
if self.payment_mode_id:
Expand Down

0 comments on commit 9aaa9b0

Please sign in to comment.