diff options
| author | Ivan Yelizariev <yelizariev@it-projects.info> | 2018-11-19 11:23:33 +0000 |
|---|---|---|
| committer | Ivan Yelizariev <yelizariev@it-projects.info> | 2018-11-20 07:41:48 +0000 |
| commit | a0bda6bcf244dd413f5bf1ab0010a209fe1322bb (patch) | |
| tree | 09bf5089c1da986569e8ad590e46856562830789 | |
| parent | c9229aa9493fe7be9565b65ad0c97d209c1bd856 (diff) | |
[FIX] account: fix code of transfer account
Transfer accounts created for payment acquirers was ignoring the prefix of the main transfer accounts and was always creating accounts with code 000001, 000002, etc.
The reason is because the method was called on an empty recordset
closes odoo/odoo#28789
| -rw-r--r-- | addons/payment/models/payment_acquirer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py index 17e5f26f8fb..b2ab12b1a94 100644 --- a/addons/payment/models/payment_acquirer.py +++ b/addons/payment/models/payment_acquirer.py @@ -229,7 +229,7 @@ class PaymentAcquirer(models.Model): :return: a dictionary to create a account.journal record. ''' self.ensure_one() - account_vals = self.env['account.chart.template']._prepare_transfer_account_for_direct_creation(self.name, self.company_id) + account_vals = self.company_id.chart_template_id._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': |
