[REM] account,l10n_*: delete dead code about transfer account

`_prepare_transfer_account_for_direct_creation` is not used since https://github.com/odoo/odoo/commit/04522f01e6fdbf82a657b32b312449fd7d756f79

closes odoo/odoo#79520

Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
Ivan Yelizariev
2021-11-09 14:46:05 +00:00
parent 85f2ae03d3
commit 2d8a80d574
6 changed files with 0 additions and 68 deletions
-23
View File
@@ -426,29 +426,6 @@ class AccountChartTemplate(models.Model):
"""
return [{'acc_name': _('Cash'), 'account_type': 'cash'}, {'acc_name': _('Bank'), 'account_type': 'bank'}]
@api.model
def _prepare_transfer_account_for_direct_creation(self, name, company):
""" Prepare values to create a transfer account directly, based on the
method _prepare_transfer_account_template().
This is needed when dealing with installation of payment modules
that requires the creation of their own transfer account.
:param name: The transfer account name.
:param company: The company owning this account.
:return: A dictionary of values to create a new account.account.
"""
vals = self._prepare_transfer_account_template()
digits = self.code_digits or 6
prefix = self.transfer_account_code_prefix or ''
vals.update({
'code': self.env['account.account']._search_new_account_code(company, digits, prefix),
'name': name,
'company_id': company.id,
})
del(vals['chart_template_id'])
return vals
@api.model
def generate_journals(self, acc_template_ref, company, journals_dict=None):
"""
-9
View File
@@ -5,15 +5,6 @@ from odoo import api, models
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
@api.model
def _prepare_transfer_account_for_direct_creation(self, name, company):
res = super(AccountChartTemplate, self)._prepare_transfer_account_for_direct_creation(name, company)
if company.account_fiscal_country_id.code == 'DE':
xml_id = self.env.ref('l10n_de.tag_de_asset_bs_B_III_2').id
res.setdefault('tag_ids', [])
res['tag_ids'].append((4, xml_id))
return res
# Write paperformat and report template used on company
def _load(self, sale_tax_rate, purchase_tax_rate, company):
res = super(AccountChartTemplate, self)._load(sale_tax_rate, purchase_tax_rate, company)
-1
View File
@@ -2,4 +2,3 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import account_journal
from . import account_chart_template
@@ -1,17 +0,0 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
@api.model
def _prepare_transfer_account_for_direct_creation(self, name, company):
res = super(AccountChartTemplate, self)._prepare_transfer_account_for_direct_creation(name, company)
if company.account_fiscal_country_id.code == 'DK':
account_tag_liquidity = self.env.ref('l10n_dk.account_tag_liquidity')
res['tag_ids'] = [(6, 0, account_tag_liquidity.ids)]
res['name'] = 'Bank i transfer'
return res
-9
View File
@@ -38,12 +38,3 @@ class AccountChartTemplate(models.Model):
'show_on_dashboard': True,
})
return res
@api.model
def _prepare_transfer_account_for_direct_creation(self, name, company):
res = super(AccountChartTemplate, self)._prepare_transfer_account_for_direct_creation(name, company)
if company.account_fiscal_country_id.code == 'MX':
xml_id = self.env.ref('l10n_mx.account_tag_102_01').id
res.setdefault('tag_ids', [])
res['tag_ids'].append((4, xml_id))
return res
@@ -14,12 +14,3 @@ class AccountChartTemplate(models.Model):
if account:
account.tag_ids = [(4, self.env.ref('l10n_nl.account_tag_12').id)]
return res
@api.model
def _prepare_transfer_account_for_direct_creation(self, name, company):
res = super(AccountChartTemplate, self)._prepare_transfer_account_for_direct_creation(name, company)
if company.account_fiscal_country_id.code == 'NL':
xml_id = self.env.ref('l10n_nl.account_tag_25').id
res.setdefault('tag_ids', [])
res['tag_ids'].append((4, xml_id))
return res