From 82c0e9b620bfbd409914e1941e5c8e9117982bd1 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 2 Sep 2019 15:04:06 +0000 Subject: [PATCH] [FIX] payment: Publish Sips online payment Steps to reproduce the bug: - When trying to publish the sips payment acquirer not in debug mode Bug: It raised a access rights error because the fields: sips_test_url, sips_prod_url, sips_version were not readable in function _check_required_if_provider and a default value was set for all these fields. opw:2061123 closes odoo/odoo#36346 Signed-off-by: Simon Goffin (sig) --- addons/payment_sips/models/payment.py | 6 +++--- addons/payment_sips/views/payment_views.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/payment_sips/models/payment.py b/addons/payment_sips/models/payment.py index 7d46d56da2b..443efaef6f8 100644 --- a/addons/payment_sips/models/payment.py +++ b/addons/payment_sips/models/payment.py @@ -44,9 +44,9 @@ class AcquirerSips(models.Model): provider = fields.Selection(selection_add=[('sips', 'Sips')]) sips_merchant_id = fields.Char('Merchant ID', help="Used for production only", required_if_provider='sips', groups='base.group_user') sips_secret = fields.Char('Secret Key', size=64, required_if_provider='sips', groups='base.group_user') - sips_test_url = fields.Char("Test url", required_if_provider='sips', groups='base.group_no_one', default='https://payment-webinit.sips-atos.com/paymentInit') - sips_prod_url = fields.Char("Production url", required_if_provider='sips', groups='base.group_no_one', default='https://payment-webinit.simu.sips-atos.com/paymentInit') - sips_version = fields.Char("Interface Version", required_if_provider='sips', groups='base.group_no_one', default='HP_2.3') + sips_test_url = fields.Char("Test url", required_if_provider='sips', default='https://payment-webinit.sips-atos.com/paymentInit') + sips_prod_url = fields.Char("Production url", required_if_provider='sips', default='https://payment-webinit.simu.sips-atos.com/paymentInit') + sips_version = fields.Char("Interface Version", required_if_provider='sips', default='HP_2.3') def _sips_generate_shasign(self, values): """ Generate the shasign for incoming or outgoing communications. diff --git a/addons/payment_sips/views/payment_views.xml b/addons/payment_sips/views/payment_views.xml index aa3b20bd92e..856ba551c45 100644 --- a/addons/payment_sips/views/payment_views.xml +++ b/addons/payment_sips/views/payment_views.xml @@ -11,9 +11,9 @@ - - - + + +