diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/l10n_mx/models/account_tax.py | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/l10n_mx/models/account_tax.py')
| -rw-r--r-- | addons/l10n_mx/models/account_tax.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/addons/l10n_mx/models/account_tax.py b/addons/l10n_mx/models/account_tax.py new file mode 100644 index 00000000..a435a9ea --- /dev/null +++ b/addons/l10n_mx/models/account_tax.py @@ -0,0 +1,38 @@ +# coding: utf-8 +from odoo import models, fields + + +class AccountTaxTemplate(models.Model): + _inherit = 'account.tax.template' + + l10n_mx_tax_type = fields.Selection( + selection=[ + ('Tasa', "Tasa"), + ('Cuota', "Cuota"), + ('Exento', "Exento"), + ], + string="Factor Type", + default='Tasa', + help="The CFDI version 3.3 have the attribute 'TipoFactor' in the tax lines. In it is indicated the factor " + "type that is applied to the base of the tax.") + + def _get_tax_vals(self, company, tax_template_to_tax): + # OVERRIDE + res = super()._get_tax_vals(company, tax_template_to_tax) + res['l10n_mx_tax_type'] = self.l10n_mx_tax_type + return res + + +class AccountTax(models.Model): + _inherit = 'account.tax' + + l10n_mx_tax_type = fields.Selection( + selection=[ + ('Tasa', "Tasa"), + ('Cuota', "Cuota"), + ('Exento', "Exento"), + ], + string="Factor Type", + default='Tasa', + help="The CFDI version 3.3 have the attribute 'TipoFactor' in the tax lines. In it is indicated the factor " + "type that is applied to the base of the tax.") |
