This commit adds the auto-creation journal for installed acquirers. This is not easy because: - The acquirers are created on the 'payment' module but are enabled only when the specific module is installed. E.g. Paypal is enabled with 'payment_paypal'. - To create a journal, a chart of accounts is required. However, the post_init_hook on the 'account' module makes the installation order harder. E.g install payment_paypal directly: The module are installed in the order: account -> payment -> payment_paypal -> l10n_generic_coa. To fix the problem, the journals are created at two moments: - During the installation of the chart of accounts. - At the installation of an acquirer module. E.g. payment_paypal. Was PR #23904 Was task: 1831620
19 lines
521 B
Python
19 lines
521 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
{
|
|
'name': 'Transfer Payment Acquirer',
|
|
'category': 'Accounting',
|
|
'summary': 'Payment Acquirer: Transfer Implementation',
|
|
'version': '1.0',
|
|
'description': """Transfer Payment Acquirer""",
|
|
'depends': ['payment'],
|
|
'data': [
|
|
'views/payment_views.xml',
|
|
'views/payment_transfer_templates.xml',
|
|
'data/payment_acquirer_data.xml',
|
|
],
|
|
'installable': True,
|
|
'auto_install': True,
|
|
'post_init_hook': 'create_missing_journal_for_acquirers',
|
|
}
|