summaryrefslogtreecommitdiff
path: root/addons/payment
diff options
context:
space:
mode:
authorAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-07-01 13:06:12 +0000
committerNicolas Martinelli <nim@odoo.com>2020-07-23 08:04:43 +0000
commitb8df9444162302494d61722af2502139cf5179ce (patch)
tree54892adc522dc8ad87c8c574ef68659d06fc5d55 /addons/payment
parent25d35310d00af3596aff4538a9db2b5a253626c0 (diff)
[FIX] payment: fix payment processing via external link
Select a sales order. Go to action > generate payment link. Open private browser, reach the link. User will receive error message because of access denied to the res.partner data. opw-2287534 closes odoo/odoo#54808 X-original-commit: 3b4f3a8ad2880721cf6de9fb08387412df85d356 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/payment')
-rw-r--r--addons/payment/controllers/portal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py
index d3455abb75b..cd8dae3e6fd 100644
--- a/addons/payment/controllers/portal.py
+++ b/addons/payment/controllers/portal.py
@@ -231,7 +231,7 @@ class WebsitePayment(http.Controller):
partner = request.env['res.partner'].browse([partner_id])
acquirer_domain = expression.AND([
acquirer_domain,
- ['|', ('country_ids', '=', False), ('country_ids', 'in', [partner.country_id.id])]
+ ['|', ('country_ids', '=', False), ('country_ids', 'in', [partner.sudo().country_id.id])]
])
if acquirer_id:
acquirers = env['payment.acquirer'].browse(int(acquirer_id))