summaryrefslogtreecommitdiff
path: root/addons/payment/models/chart_template.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/payment/models/chart_template.py')
-rw-r--r--addons/payment/models/chart_template.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/addons/payment/models/chart_template.py b/addons/payment/models/chart_template.py
new file mode 100644
index 00000000..0e7ef826
--- /dev/null
+++ b/addons/payment/models/chart_template.py
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+
+from odoo import api, fields, models, _
+
+
+class AccountChartTemplate(models.Model):
+ _inherit = 'account.chart.template'
+
+ 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)