summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2019-09-02 15:04:06 +0000
committerGoffin Simon <sig@odoo.com>2019-09-03 08:13:49 +0000
commit82c0e9b620bfbd409914e1941e5c8e9117982bd1 (patch)
tree7164e0c1ed7eac74acf445bfb11c12b3a7b661b0
parenta9bb6694876165aaf5d9a3af0823b2b5e37b866f (diff)
[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) <sig@openerp.com>
-rw-r--r--addons/payment_sips/models/payment.py6
-rw-r--r--addons/payment_sips/views/payment_views.xml6
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 @@
<group attrs="{'invisible': [('provider', '!=', 'sips')]}">
<field name="sips_merchant_id"/>
<field name="sips_secret"/>
- <field name="sips_test_url"/>
- <field name="sips_prod_url"/>
- <field name="sips_version"/>
+ <field name="sips_test_url" groups='base.group_no_one'/>
+ <field name="sips_prod_url" groups='base.group_no_one'/>
+ <field name="sips_version" groups='base.group_no_one'/>
</group>
</xpath>
</field>