diff options
| author | Anh Thao Pham (pta) <pta@odoo.com> | 2021-03-17 10:20:24 +0000 |
|---|---|---|
| committer | Anh Thao Pham (pta) <pta@odoo.com> | 2021-03-17 10:20:24 +0000 |
| commit | b738068be53621b23d9f19befdfdef50534ef434 (patch) | |
| tree | a15e965cf58f1627e6f2566e9358236ace3289f2 /addons/payment | |
| parent | 109b4b1aaac4d76ef273fb88d27e2b648331a266 (diff) | |
[FIX] payment: use commercial partner for payments made from payment acquirers
Payments made on eCommerce via a payment acquirer (i.e. Stripe) generate an
"account.payment" record where connected user's "child" partner is used for
partner_id of the payment, instead of commercial partner, as it is done for
payments registered on invoices.
For consistency, commercial partner should also be used for these payments.
opw-2457390
closes odoo/odoo#68003
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons/payment')
| -rw-r--r-- | addons/payment/models/payment_acquirer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py index 51fed0c043e..0d58b4282b0 100644 --- a/addons/payment/models/payment_acquirer.py +++ b/addons/payment/models/payment_acquirer.py @@ -680,7 +680,7 @@ class PaymentTransaction(models.Model): 'amount': self.amount, 'payment_type': 'inbound' if self.amount > 0 else 'outbound', 'currency_id': self.currency_id.id, - 'partner_id': self.partner_id.id, + 'partner_id': self.partner_id.commercial_partner_id.id, 'partner_type': 'customer', 'journal_id': self.acquirer_id.journal_id.id, 'company_id': self.acquirer_id.company_id.id, |
