The SDK of Adyen Checkout is quite large (≲ 1MB) and was always loaded on all frontend pages before this commit, which hurt the loading performances. This commit restricts the loading of the SDK to pages that include one of the payment forms (either 'checkout' or 'manage'). task-2899271 closes odoo/odoo#95121 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
27 lines
897 B
Python
27 lines
897 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
{
|
|
'name': 'Adyen Payment Acquirer',
|
|
'version': '2.0',
|
|
'category': 'Accounting/Payment Acquirers',
|
|
'sequence': 340,
|
|
'summary': 'Payment Acquirer: Adyen Implementation',
|
|
'description': """Adyen Payment Acquirer""",
|
|
'depends': ['payment'],
|
|
'data': [
|
|
'views/payment_adyen_templates.xml',
|
|
'views/payment_views.xml',
|
|
'views/payment_templates.xml', # Only load the SDK on pages with a payment form.
|
|
'data/payment_acquirer_data.xml', # Depends on views/payment_adyen_templates.xml
|
|
],
|
|
'application': True,
|
|
'uninstall_hook': 'uninstall_hook',
|
|
'assets': {
|
|
'web.assets_frontend': [
|
|
'payment_adyen/static/src/js/payment_form.js',
|
|
'payment_adyen/static/src/scss/dropin.scss',
|
|
],
|
|
},
|
|
'license': 'LGPL-3',
|
|
}
|