[ADD] l10n_multilang: translate account.tax.template description

In addition to the tax name
Closes #14737
This commit is contained in:
Akim Juillerat
2016-12-20 12:13:17 +01:00
committed by Martin Trigaux
parent 146aa411e6
commit fa4e76a9c7
2 changed files with 8 additions and 2 deletions
+2
View File
@@ -24,6 +24,7 @@ class account_tax(osv.osv):
_inherit = 'account.tax'
_columns = {
'name': fields.char('Tax Name', required=True, select=True, translate=True),
'description': fields.char('Display on Invoices', translate=True),
}
@@ -31,6 +32,7 @@ class account_tax_template(osv.osv):
_inherit = 'account.tax.template'
_columns = {
'name': fields.char('Tax Name', required=True, select=True, translate=True),
'description': fields.char('Display on Invoices', translate=True)
}
+6 -2
View File
@@ -61,8 +61,10 @@ class AccountChartTemplate(models.Model):
for company in company_ids:
# write account.account translations in the real COA
chart_template_id._process_accounts_translations(company.id, langs, 'name')
# copy account.tax translations
# copy account.tax name translations
chart_template_id._process_taxes_translations(company.id, langs, 'name')
# copy account.tax description translations
chart_template_id._process_taxes_translations(company.id, langs, 'description')
# copy account.fiscal.position translations
chart_template_id._process_fiscal_pos_translations(company.id, langs, 'name')
return True
@@ -108,8 +110,10 @@ class base_language_install(models.TransientModel):
for company in self.env['res.company'].search([('chart_template_id', '=', coa.id)]):
# write account.account translations in the real COA
coa._process_accounts_translations(company.id, [self.lang], 'name')
# copy account.tax translations
# copy account.tax name translations
coa._process_taxes_translations(company.id, [self.lang], 'name')
# copy account.tax description translations
coa._process_taxes_translations(company.id, [self.lang], 'description')
# copy account.fiscal.position translations
coa._process_fiscal_pos_translations(company.id, [self.lang], 'name')
return res