Debian Codegraph @

addons/l10n_es/models/template_es_common_mainland.py

raw symbols SCIP
1 # Part of Odoo. See LICENSE file for full copyright and licensing details.
2 from odoo import models, Command
3 from odoo.addons.account.models.chart_template import template
4
5
6 class AccountChartTemplate(models.AbstractModel):
7 _inherit = 'account.chart.template'
8
9 @template('es_common_mainland')
10 def _get_es_common_mainland_template_data(self):
11 return {
12 'name': 'Common Mainland',
13 'visible': 0,
14 'parent': 'es_common',
15 }
16
17 @template('es_common_mainland', 'res.company')
18 def _get_es_common_mainland_res_company(self):
19 return {
20 self.env.company.id: {
21 'account_sale_tax_id': 'account_tax_template_s_iva21b',
22 'account_purchase_tax_id': 'account_tax_template_p_iva21_bc',
23 },
24 }
25 @template('es_common_mainland', model='product.product')
26 def _get_product(self):
27 return {
28 'l10n_es.product_dua_valuation_4': {'supplier_taxes_id': [Command.set(['account_tax_template_p_iva4_ibc_group'])]},
29 'l10n_es.product_dua_valuation_10': {'supplier_taxes_id': [Command.set(['account_tax_template_p_iva10_ibc_group'])]},
30 'l10n_es.product_dua_valuation_21': {'supplier_taxes_id': [Command.set(['account_tax_template_p_iva21_ibc_group'])]},
31 }