diff options
| author | Toufik Ben Jaa <tbe@odoo.com> | 2020-03-16 08:59:48 +0000 |
|---|---|---|
| committer | Toufik Ben Jaa <tbe@odoo.com> | 2020-04-06 09:24:28 +0000 |
| commit | b0cd9c13a0456e22c8dcd3e8f314fa23bf835f81 (patch) | |
| tree | 7f337aca51341de83df675beb9a5b3505899cd9c /addons/payment/controllers/portal.py | |
| parent | 473be989114ebb10c80711e7315c122f74625a4c (diff) | |
[FIX] payment: use order company on payment page
- The payment link generated by using the wizard
`payment.link.wizard` are overriden to generate
URL linked to sale orders.
If so, we want the payment acquirer displayed to
be in the same company as the sale order.
closes odoo/odoo#49018
X-original-commit: 8c299efb6cb4355cec39cdedd8d7c3134f53d199
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Diffstat (limited to 'addons/payment/controllers/portal.py')
| -rw-r--r-- | addons/payment/controllers/portal.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py index 2fc980147f1..cefc8ad6d5e 100644 --- a/addons/payment/controllers/portal.py +++ b/addons/payment/controllers/portal.py @@ -199,6 +199,8 @@ class WebsitePayment(http.Controller): acquirers = None if acquirer_id: acquirers = env['payment.acquirer'].browse(int(acquirer_id)) + if order_id: + acquirers = env['payment.acquirer'].search([('state', 'in', ['enabled', 'test']), ('company_id', '=', order.company_id.id)]) if not acquirers: acquirers = env['payment.acquirer'].search([('state', 'in', ['enabled', 'test']), ('company_id', '=', user.company_id.id)]) |
