[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>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user