[CLN] payment(_*): clean view hooks and split files per model

When the payment views were updated with commit odoo/odoo@f7b8f075, a
hook was improperly renamed to `code`, which doesn't help to figure out
its purpose. This commit renames it to `provider_credentials` which
better fits its role.

While doing so, the view files are also renamed and/or split by model to
increase their readability.

closes odoo/odoo#102976

X-original-commit: 49d126d4fce18761d0261adac00e115b840b9b47
Related: odoo/enterprise#32662
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Antoine Vandevenne (anv)
2022-10-11 13:16:07 +02:00
parent e4ff2afaec
commit c4b78c203a
37 changed files with 91 additions and 68 deletions
+2 -1
View File
@@ -9,8 +9,9 @@
'description': """Buckaroo Payment Provider""",
'depends': ['payment'],
'data': [
'views/payment_views.xml',
'views/payment_buckaroo_templates.xml',
'views/payment_provider_views.xml',
'data/payment_provider_data.xml',
],
'application': True,
@@ -6,7 +6,7 @@
<field name="model">payment.provider</field>
<field name="inherit_id" ref="payment.payment_provider_form"/>
<field name="arch" type="xml">
<group name="code" position='inside'>
<group name="provider_credentials" position='inside'>
<group attrs="{'invisible': [('code', '!=', 'buckaroo')]}">
<field name="buckaroo_website_key" attrs="{'required':[ ('code', '=', 'buckaroo'), ('state', '!=', 'disabled')]}"/>
<field name="buckaroo_secret_key" string="Secret Key" attrs="{'required':[ ('code', '=', 'buckaroo'), ('state', '!=', 'disabled')]}" password="True"/>