changes
This commit is contained in:
@@ -448,18 +448,34 @@ class FusionRentalController(http.Controller):
|
||||
{'error': _("This link is invalid or has expired.")},
|
||||
)
|
||||
|
||||
google_api_key = request.env['ir.config_parameter'].sudo().get_param(
|
||||
'fusion_claims.google_maps_api_key', ''
|
||||
)
|
||||
if not google_api_key:
|
||||
google_api_key = request.env['ir.config_parameter'].sudo().get_param(
|
||||
'fusion_rental.google_maps_api_key', ''
|
||||
)
|
||||
|
||||
poynt_business_id = ''
|
||||
poynt_application_id = ''
|
||||
provider = request.env['payment.provider'].sudo().search([
|
||||
('code', '=', 'poynt'),
|
||||
('state', '!=', 'disabled'),
|
||||
], limit=1)
|
||||
if provider:
|
||||
poynt_business_id = provider.poynt_business_id or ''
|
||||
raw_app_id = provider.poynt_application_id or ''
|
||||
from odoo.addons.fusion_poynt.utils import clean_application_id
|
||||
poynt_application_id = clean_application_id(raw_app_id) or raw_app_id
|
||||
|
||||
return request.render(
|
||||
'fusion_rental.card_reauthorization_page',
|
||||
{
|
||||
'order': order,
|
||||
'partner': order.partner_id,
|
||||
'poynt_business_id': provider.poynt_business_id if provider else '',
|
||||
'poynt_application_id': provider.poynt_application_id if provider else '',
|
||||
'google_api_key': google_api_key,
|
||||
'poynt_business_id': poynt_business_id,
|
||||
'poynt_application_id': poynt_application_id,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user