diff options
| author | Olivier Colson <oco@odoo.com> | 2018-08-07 17:08:08 +0200 |
|---|---|---|
| committer | Olivier Colson <oco@odoo.com> | 2018-08-07 17:11:08 +0200 |
| commit | 87f0d2eefb77bfc6a9a0fa7f7dcd1475c7c34639 (patch) | |
| tree | 22b69cc0b44dcc79558a554beb243a89c3515c00 /addons/payment/models | |
| parent | 8edae4200f5d5af20014e51616b17f59bfddf996 (diff) | |
[REF] account, account_check_printing, payment, l10n_do, l10n_de, l10n_fr, l10n_nl, l10n_mx: chart templates installation: remove old useless wizards and move everything to account.chart.template
Was task 1858974
Was PR https://github.com/odoo/odoo/pull/25243
Diffstat (limited to 'addons/payment/models')
| -rw-r--r-- | addons/payment/models/chart_template.py | 8 | ||||
| -rw-r--r-- | addons/payment/models/payment_acquirer.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/addons/payment/models/chart_template.py b/addons/payment/models/chart_template.py index 515103316be..ddf814d7d93 100644 --- a/addons/payment/models/chart_template.py +++ b/addons/payment/models/chart_template.py @@ -3,12 +3,12 @@ from odoo import api, fields, models, _ -class WizardMultiChartsAccounts(models.TransientModel): - _inherit = 'wizard.multi.charts.accounts' +class AccountChartTemplate(models.Model): + _inherit = 'account.chart.template' @api.multi - def _create_bank_journals_from_o2m(self, company, acc_template_ref): - res = super(WizardMultiChartsAccounts, self)._create_bank_journals_from_o2m(company, acc_template_ref) + def _create_bank_journals(self, company, acc_template_ref): + res = super(AccountChartTemplate, self)._create_bank_journals(company, acc_template_ref) # Try to generate the missing journals return res + self.env['payment.acquirer']._create_missing_journal_for_acquirers(company=company) diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py index 826aeef6620..b864e4873b3 100644 --- a/addons/payment/models/payment_acquirer.py +++ b/addons/payment/models/payment_acquirer.py @@ -224,7 +224,7 @@ class PaymentAcquirer(models.Model): :return: a dictionary to create a account.journal record. ''' self.ensure_one() - account_vals = self.env['wizard.multi.charts.accounts']._prepare_transfer_account(self.name, self.company_id) + account_vals = self.env['account.chart.template']._prepare_transfer_account_for_direct_creation(self.name, self.company_id) account = self.env['account.account'].create(account_vals) inbound_payment_method_ids = [] if self.token_implemented and self.payment_flow == 's2s': |
