[IMP] l10n_mx: add l10n_mx_tax_type on tax

Add a selection field `l10n_mx_tax_type` on account.tax. This field is
used in the CFDI attachment. This allows to avoid relying on the name of
the repartition line tags to export and import a CFDI.

task-3388347

closes odoo/odoo#135215

Related: odoo/enterprise#47321
Related: odoo/upgrade#5136
Signed-off-by: Laurent Smet (las) <las@odoo.com>
This commit is contained in:
Julien Van Roy
2023-09-20 13:03:07 +00:00
parent 95e31691a7
commit cdd29dfe98
5 changed files with 128 additions and 96 deletions
+3 -1
View File
@@ -210,13 +210,14 @@ class ProductProduct(models.Model):
# EDI
# -------------------------------------------------------------------------
def _retrieve_product(self, name=None, default_code=None, barcode=None, company=None):
def _retrieve_product(self, name=None, default_code=None, barcode=None, company=None, extra_domain=None):
'''Search all products and find one that matches one of the parameters.
:param name: The name of the product.
:param default_code: The default_code of the product.
:param barcode: The barcode of the product.
:param company: The company of the product.
:param extra_domain: Any extra domain to add to the search.
:returns: A product or an empty recordset if not found.
'''
if name and '\n' in name:
@@ -234,5 +235,6 @@ class ProductProduct(models.Model):
domain = expression.AND([
expression.OR(domains),
self.env['product.product']._check_company_domain(company),
extra_domain,
])
return self.env['product.product'].search(domain, limit=1)
+1
View File
@@ -37,6 +37,7 @@ With this module you will have:
'views/res_bank_view.xml',
'views/res_config_settings_views.xml',
'views/account_views.xml',
'views/account_tax_view.xml',
"data/l10n_mx_uom.xml",
],
'demo': [
+93 -93
View File
@@ -1,93 +1,93 @@
"id","sequence","name","description","invoice_label","amount","amount_type","type_tax_use","tax_group_id","tax_exigibility","cash_basis_transition_account_id","l10n_mx_tax_type","active","repartition_line_ids/repartition_type","repartition_line_ids/document_type","repartition_line_ids/account_id","repartition_line_ids/tag_ids","description@es","invoice_label@es"
"ieps_8_sale","0","8% IEPS","","IEPS 8%","8.0","percent","sale","tax_group_ieps_8","on_payment","cuenta209_02","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_8_purchase","1","8% IEPS","","IEPS 8%","8.0","percent","purchase","tax_group_ieps_8","on_payment","cuenta119_03","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"ieps_25_sale","2","25% IEPS","","IEPS 25%","25.0","percent","sale","tax_group_ieps_25","on_payment","cuenta209_02","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_25_purchase","3","25% IEPS","","IEPS 25%","25.0","percent","purchase","tax_group_ieps_25","on_payment","cuenta119_03","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"ieps_26_5_sale","4","26.5% IEPS","","IEPS 26.5%","26.5","percent","sale","tax_group_ieps_26_5","on_payment","cuenta209_02","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_26_5_purchase","5","26.5% IEPS","","IEPS 26.5%","26.5","percent","purchase","tax_group_ieps_26_5","on_payment","cuenta119_03","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"ieps_30_sale","6","30% IEPS","","IEPS 30%","30.0","percent","sale","tax_group_ieps_30","on_payment","cuenta209_02","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_30_purchase","7","30% IEPS","","IEPS 30%","30.0","percent","purchase","tax_group_ieps_30","on_payment","cuenta119_03","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"ieps_53_sale","8","53% IEPS","","IEPS 53%","53.0","percent","sale","tax_group_ieps_53","on_payment","cuenta209_02","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_53_purchase","9","53% IEPS","","IEPS 53%","53.0","percent","purchase","tax_group_ieps_53","on_payment","cuenta119_03","","","base","invoice","","",""
"","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"tax9","10","0%","","VAT(0%)","0.0","percent","sale","tax_group_iva_0","on_payment","cuenta209_01","Tasa","","base","invoice","","","IVA(0%)","IVA(0%)"
"","","","","","","","","","","","","","tax","invoice","cuenta208_01","l10n_mx.tag_iva","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta208_01","l10n_mx.tag_iva","",""
"tax12","11","16%","","VAT(16%)","16.0","percent","sale","tax_group_iva_16","on_payment","cuenta209_01","Tasa","","base","invoice","","","IVA(16%)","IVA(16%)"
"","","","","","","","","","","","","","tax","invoice","cuenta208_01","l10n_mx.tag_iva","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta208_01","l10n_mx.tag_iva","",""
"tax1","12","4% WH","VAT withholding","VAT withholding(-4%)","-4.0","percent","purchase","tax_group_iva_ret_4","on_payment","cuenta216_10","Tasa","","base","invoice","","","Retención del IVA","Retención IVA(-4%)"
"","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax18","13","1.25% WH","VAT witholding RESICO 1.25%","Retención IVA(-1.25%)","-1.25","percent","purchase","tax_group_iva_ret_1_25","on_payment","cuenta216_10","Tasa","0","base","invoice","","","Retención de IVA RESICO 1.25%","Retención IVA(-1.25%)"
"","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax2","14","10% WH L","VAT withholding lease 10%","VAT withholding(-10%)","-10.0","percent","purchase","tax_group_iva_ret_10","on_payment","cuenta216_10","Tasa","","base","invoice","","","Retención IVA arrendamiento 10%","Retención IVA(-10%)"
"","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax3","15","10% WH L I","Withholding of lease income tax 10%","Withholding income(-10%)","-10.0","percent","purchase","tax_group_isr_ret_10","","","Tasa","","base","invoice","","","Retención del impuesto de arrendamiento 10%","Retención ISR(-10%)"
"","","","","","","","","","","","","","tax","invoice","cuenta216_03","","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta216_03","","",""
"tax5","16","10% WH I S","Withholding of income tax on salaries 10%","Withholding income salaries (-10%)","-10.0","percent","purchase","tax_group_isr_ret_10","","","Tasa","","base","invoice","","","Retención del impuesto sobre la renta sobre los salarios 10%","Retención ISR(-10%)"
"","","","","","","","","","","","","","tax","invoice","cuenta216_04","","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta216_04","","",""
"tax7","17","10.67% WH L","Vat withholding tax on leasing 10.67%","Vat withholding(-10.67%)","-10.67","percent","purchase","tax_group_iva_ret_1067","on_payment","cuenta216_10","Tasa","","base","invoice","","","Retención a cuenta del IVA sobre el arrendamiento financiero 10.67%","Retención IVA(-10.67%)"
"","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax8","18","10.67% WH","Vat withholding fees 10.67%","Vat withholding(-10.67%)","-10.67","percent","purchase","tax_group_iva_ret_1067","on_payment","cuenta216_10","Tasa","","base","invoice","","","Retención del IVA 10.67%","Retención IVA(-10.67%)"
"","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax13","19","0%","","VAT(0%)","0.0","percent","purchase","tax_group_iva_0","on_payment","cuenta119_01","Tasa","","base","invoice","","+DIOT: 0%","","IVA(0%)"
"","","","","","","","","","","","","","tax","invoice","cuenta118_01","","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta118_01","+DIOT: Refunds","",""
"tax14","20","16%","","VAT(16%)","16.0","percent","purchase","tax_group_iva_16","on_payment","cuenta119_01","Tasa","","base","invoice","","+DIOT: 16%","IVA(16%) compras","IVA(16%)"
"","","","","","","","","","","","","","tax","invoice","cuenta118_01","","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta118_01","+DIOT: Refunds","",""
"tax16","21","8%","","VAT(8%)","8.0","percent","purchase","tax_group_iva_8","on_payment","cuenta119_01","Tasa","","base","invoice","","+DIOT: 8%","IVA(8%) compras","IVA(8%)"
"","","","","","","","","","","","","","tax","invoice","cuenta118_01","","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta118_01","+DIOT: Refunds","",""
"tax17","22","8%","","VAT(8%)","8.0","percent","sale","tax_group_iva_8","on_payment","cuenta209_01","Tasa","","base","invoice","","","IVA(8%) ventas","IVA(8%)"
"","","","","","","","","","","","","","tax","invoice","cuenta208_01","l10n_mx.tag_iva","",""
"","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","tax","refund","cuenta208_01","l10n_mx.tag_iva","",""
"id","sequence","name","description","invoice_label","amount","amount_type","type_tax_use","tax_group_id","tax_exigibility","cash_basis_transition_account_id","l10n_mx_tax_type","l10n_mx_factor_type","active","repartition_line_ids/repartition_type","repartition_line_ids/document_type","repartition_line_ids/account_id","repartition_line_ids/tag_ids","description@es","invoice_label@es"
"ieps_8_sale","0","8% IEPS","","IEPS 8%","8.0","percent","sale","tax_group_ieps_8","on_payment","cuenta209_02","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_8_purchase","1","8% IEPS","","IEPS 8%","8.0","percent","purchase","tax_group_ieps_8","on_payment","cuenta119_03","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"ieps_25_sale","2","25% IEPS","","IEPS 25%","25.0","percent","sale","tax_group_ieps_25","on_payment","cuenta209_02","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_25_purchase","3","25% IEPS","","IEPS 25%","25.0","percent","purchase","tax_group_ieps_25","on_payment","cuenta119_03","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"ieps_26_5_sale","4","26.5% IEPS","","IEPS 26.5%","26.5","percent","sale","tax_group_ieps_26_5","on_payment","cuenta209_02","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_26_5_purchase","5","26.5% IEPS","","IEPS 26.5%","26.5","percent","purchase","tax_group_ieps_26_5","on_payment","cuenta119_03","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"ieps_30_sale","6","30% IEPS","","IEPS 30%","30.0","percent","sale","tax_group_ieps_30","on_payment","cuenta209_02","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_30_purchase","7","30% IEPS","","IEPS 30%","30.0","percent","purchase","tax_group_ieps_30","on_payment","cuenta119_03","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"ieps_53_sale","8","53% IEPS","","IEPS 53%","53.0","percent","sale","tax_group_ieps_53","on_payment","cuenta209_02","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta208_02","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta208_02","l10n_mx.tag_ieps",""
"ieps_53_purchase","9","53% IEPS","","IEPS 53%","53.0","percent","purchase","tax_group_ieps_53","on_payment","cuenta119_03","ieps","","","base","invoice","","",""
"","","","","","","","","","","","","","","tax","invoice","cuenta118_03","l10n_mx.tag_ieps",""
"","","","","","","","","","","","","","","base","refund","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta118_03","l10n_mx.tag_ieps",""
"tax9","10","0%","","VAT(0%)","0.0","percent","sale","tax_group_iva_0","on_payment","cuenta209_01","iva","Tasa","","base","invoice","","","IVA(0%)","IVA(0%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta208_01","l10n_mx.tag_iva","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta208_01","l10n_mx.tag_iva","",""
"tax12","11","16%","","VAT(16%)","16.0","percent","sale","tax_group_iva_16","on_payment","cuenta209_01","iva","Tasa","","base","invoice","","","IVA(16%)","IVA(16%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta208_01","l10n_mx.tag_iva","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta208_01","l10n_mx.tag_iva","",""
"tax1","12","4% WH","VAT withholding","VAT withholding(-4%)","-4.0","percent","purchase","tax_group_iva_ret_4","on_payment","cuenta216_10","iva","Tasa","","base","invoice","","","Retención del IVA","Retención IVA(-4%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax18","13","1.25% WH","VAT witholding RESICO 1.25%","Retención IVA(-1.25%)","-1.25","percent","purchase","tax_group_iva_ret_1_25","on_payment","cuenta216_10","iva","Tasa","0","base","invoice","","","Retención de IVA RESICO 1.25%","Retención IVA(-1.25%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax2","14","10% WH L","VAT withholding lease 10%","VAT withholding(-10%)","-10.0","percent","purchase","tax_group_iva_ret_10","on_payment","cuenta216_10","iva","Tasa","","base","invoice","","","Retención IVA arrendamiento 10%","Retención IVA(-10%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax3","15","10% WH L I","Withholding of lease income tax 10%","Withholding income(-10%)","-10.0","percent","purchase","tax_group_isr_ret_10","","","isr","Tasa","","base","invoice","","","Retención del impuesto de arrendamiento 10%","Retención ISR(-10%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta216_03","","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta216_03","","",""
"tax5","16","10% WH I S","Withholding of income tax on salaries 10%","Withholding income salaries (-10%)","-10.0","percent","purchase","tax_group_isr_ret_10","","","isr","Tasa","","base","invoice","","","Retención del impuesto sobre la renta sobre los salarios 10%","Retención ISR(-10%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta216_04","","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta216_04","","",""
"tax7","17","10.67% WH L","Vat withholding tax on leasing 10.67%","Vat withholding(-10.67%)","-10.67","percent","purchase","tax_group_iva_ret_1067","on_payment","cuenta216_10","iva","Tasa","","base","invoice","","","Retención a cuenta del IVA sobre el arrendamiento financiero 10.67%","Retención IVA(-10.67%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax8","18","10.67% WH","Vat withholding fees 10.67%","Vat withholding(-10.67%)","-10.67","percent","purchase","tax_group_iva_ret_1067","on_payment","cuenta216_10","iva","Tasa","","base","invoice","","","Retención del IVA 10.67%","Retención IVA(-10.67%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta216_10_20","-DIOT: Retención","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta216_10_20","+DIOT: Retención","",""
"tax13","19","0%","","VAT(0%)","0.0","percent","purchase","tax_group_iva_0","on_payment","cuenta119_01","iva","Tasa","","base","invoice","","+DIOT: 0%","","IVA(0%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta118_01","","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta118_01","+DIOT: Refunds","",""
"tax14","20","16%","","VAT(16%)","16.0","percent","purchase","tax_group_iva_16","on_payment","cuenta119_01","iva","Tasa","","base","invoice","","+DIOT: 16%","IVA(16%) compras","IVA(16%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta118_01","","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta118_01","+DIOT: Refunds","",""
"tax16","21","8%","","VAT(8%)","8.0","percent","purchase","tax_group_iva_8","on_payment","cuenta119_01","iva","Tasa","","base","invoice","","+DIOT: 8%","IVA(8%) compras","IVA(8%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta118_01","","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta118_01","+DIOT: Refunds","",""
"tax17","22","8%","","VAT(8%)","8.0","percent","sale","tax_group_iva_8","on_payment","cuenta209_01","iva","Tasa","","base","invoice","","","IVA(8%) ventas","IVA(8%)"
"","","","","","","","","","","","","","","tax","invoice","cuenta208_01","l10n_mx.tag_iva","",""
"","","","","","","","","","","","","","","base","refund","","","",""
"","","","","","","","","","","","","","","tax","refund","cuenta208_01","l10n_mx.tag_iva","",""
1 id sequence name description invoice_label amount amount_type type_tax_use tax_group_id tax_exigibility cash_basis_transition_account_id l10n_mx_tax_type l10n_mx_factor_type active repartition_line_ids/repartition_type repartition_line_ids/document_type repartition_line_ids/account_id repartition_line_ids/tag_ids description@es invoice_label@es
2 ieps_8_sale 0 8% IEPS IEPS 8% 8.0 percent sale tax_group_ieps_8 on_payment cuenta209_02 ieps base invoice
3 tax invoice cuenta208_02 l10n_mx.tag_ieps
4 base refund
5 tax refund cuenta208_02 l10n_mx.tag_ieps
6 ieps_8_purchase 1 8% IEPS IEPS 8% 8.0 percent purchase tax_group_ieps_8 on_payment cuenta119_03 ieps base invoice
7 tax invoice cuenta118_03 l10n_mx.tag_ieps
8 base refund
9 tax refund cuenta118_03 l10n_mx.tag_ieps
10 ieps_25_sale 2 25% IEPS IEPS 25% 25.0 percent sale tax_group_ieps_25 on_payment cuenta209_02 ieps base invoice
11 tax invoice cuenta208_02 l10n_mx.tag_ieps
12 base refund
13 tax refund cuenta208_02 l10n_mx.tag_ieps
14 ieps_25_purchase 3 25% IEPS IEPS 25% 25.0 percent purchase tax_group_ieps_25 on_payment cuenta119_03 ieps base invoice
15 tax invoice cuenta118_03 l10n_mx.tag_ieps
16 base refund
17 tax refund cuenta118_03 l10n_mx.tag_ieps
18 ieps_26_5_sale 4 26.5% IEPS IEPS 26.5% 26.5 percent sale tax_group_ieps_26_5 on_payment cuenta209_02 ieps base invoice
19 tax invoice cuenta208_02 l10n_mx.tag_ieps
20 base refund
21 tax refund cuenta208_02 l10n_mx.tag_ieps
22 ieps_26_5_purchase 5 26.5% IEPS IEPS 26.5% 26.5 percent purchase tax_group_ieps_26_5 on_payment cuenta119_03 ieps base invoice
23 tax invoice cuenta118_03 l10n_mx.tag_ieps
24 base refund
25 tax refund cuenta118_03 l10n_mx.tag_ieps
26 ieps_30_sale 6 30% IEPS IEPS 30% 30.0 percent sale tax_group_ieps_30 on_payment cuenta209_02 ieps base invoice
27 tax invoice cuenta208_02 l10n_mx.tag_ieps
28 base refund
29 tax refund cuenta208_02 l10n_mx.tag_ieps
30 ieps_30_purchase 7 30% IEPS IEPS 30% 30.0 percent purchase tax_group_ieps_30 on_payment cuenta119_03 ieps base invoice
31 tax invoice cuenta118_03 l10n_mx.tag_ieps
32 base refund
33 tax refund cuenta118_03 l10n_mx.tag_ieps
34 ieps_53_sale 8 53% IEPS IEPS 53% 53.0 percent sale tax_group_ieps_53 on_payment cuenta209_02 ieps base invoice
35 tax invoice cuenta208_02 l10n_mx.tag_ieps
36 base refund
37 tax refund cuenta208_02 l10n_mx.tag_ieps
38 ieps_53_purchase 9 53% IEPS IEPS 53% 53.0 percent purchase tax_group_ieps_53 on_payment cuenta119_03 ieps base invoice
39 tax invoice cuenta118_03 l10n_mx.tag_ieps
40 base refund
41 tax refund cuenta118_03 l10n_mx.tag_ieps
42 tax9 10 0% VAT(0%) 0.0 percent sale tax_group_iva_0 on_payment cuenta209_01 Tasa iva Tasa base invoice IVA(0%) IVA(0%)
43 tax invoice cuenta208_01 l10n_mx.tag_iva
44 base refund
45 tax refund cuenta208_01 l10n_mx.tag_iva
46 tax12 11 16% VAT(16%) 16.0 percent sale tax_group_iva_16 on_payment cuenta209_01 Tasa iva Tasa base invoice IVA(16%) IVA(16%)
47 tax invoice cuenta208_01 l10n_mx.tag_iva
48 base refund
49 tax refund cuenta208_01 l10n_mx.tag_iva
50 tax1 12 4% WH VAT withholding VAT withholding(-4%) -4.0 percent purchase tax_group_iva_ret_4 on_payment cuenta216_10 Tasa iva Tasa base invoice Retención del IVA Retención IVA(-4%)
51 tax invoice cuenta216_10_20 -DIOT: Retención
52 base refund
53 tax refund cuenta216_10_20 +DIOT: Retención
54 tax18 13 1.25% WH VAT witholding RESICO 1.25% Retención IVA(-1.25%) -1.25 percent purchase tax_group_iva_ret_1_25 on_payment cuenta216_10 Tasa iva Tasa 0 base invoice Retención de IVA RESICO 1.25% Retención IVA(-1.25%)
55 tax invoice cuenta216_10_20 -DIOT: Retención
56 base refund
57 tax refund cuenta216_10_20 +DIOT: Retención
58 tax2 14 10% WH L VAT withholding lease 10% VAT withholding(-10%) -10.0 percent purchase tax_group_iva_ret_10 on_payment cuenta216_10 Tasa iva Tasa base invoice Retención IVA arrendamiento 10% Retención IVA(-10%)
59 tax invoice cuenta216_10_20 -DIOT: Retención
60 base refund
61 tax refund cuenta216_10_20 +DIOT: Retención
62 tax3 15 10% WH L I Withholding of lease income tax 10% Withholding income(-10%) -10.0 percent purchase tax_group_isr_ret_10 Tasa isr Tasa base invoice Retención del impuesto de arrendamiento 10% Retención ISR(-10%)
63 tax invoice cuenta216_03
64 base refund
65 tax refund cuenta216_03
66 tax5 16 10% WH I S Withholding of income tax on salaries 10% Withholding income salaries (-10%) -10.0 percent purchase tax_group_isr_ret_10 Tasa isr Tasa base invoice Retención del impuesto sobre la renta sobre los salarios 10% Retención ISR(-10%)
67 tax invoice cuenta216_04
68 base refund
69 tax refund cuenta216_04
70 tax7 17 10.67% WH L Vat withholding tax on leasing 10.67% Vat withholding(-10.67%) -10.67 percent purchase tax_group_iva_ret_1067 on_payment cuenta216_10 Tasa iva Tasa base invoice Retención a cuenta del IVA sobre el arrendamiento financiero 10.67% Retención IVA(-10.67%)
71 tax invoice cuenta216_10_20 -DIOT: Retención
72 base refund
73 tax refund cuenta216_10_20 +DIOT: Retención
74 tax8 18 10.67% WH Vat withholding fees 10.67% Vat withholding(-10.67%) -10.67 percent purchase tax_group_iva_ret_1067 on_payment cuenta216_10 Tasa iva Tasa base invoice Retención del IVA 10.67% Retención IVA(-10.67%)
75 tax invoice cuenta216_10_20 -DIOT: Retención
76 base refund
77 tax refund cuenta216_10_20 +DIOT: Retención
78 tax13 19 0% VAT(0%) 0.0 percent purchase tax_group_iva_0 on_payment cuenta119_01 Tasa iva Tasa base invoice +DIOT: 0% IVA(0%)
79 tax invoice cuenta118_01
80 base refund
81 tax refund cuenta118_01 +DIOT: Refunds
82 tax14 20 16% VAT(16%) 16.0 percent purchase tax_group_iva_16 on_payment cuenta119_01 Tasa iva Tasa base invoice +DIOT: 16% IVA(16%) compras IVA(16%)
83 tax invoice cuenta118_01
84 base refund
85 tax refund cuenta118_01 +DIOT: Refunds
86 tax16 21 8% VAT(8%) 8.0 percent purchase tax_group_iva_8 on_payment cuenta119_01 Tasa iva Tasa base invoice +DIOT: 8% IVA(8%) compras IVA(8%)
87 tax invoice cuenta118_01
88 base refund
89 tax refund cuenta118_01 +DIOT: Refunds
90 tax17 22 8% VAT(8%) 8.0 percent sale tax_group_iva_8 on_payment cuenta209_01 Tasa iva Tasa base invoice IVA(8%) ventas IVA(8%)
91 tax invoice cuenta208_01 l10n_mx.tag_iva
92 base refund
93 tax refund cuenta208_01 l10n_mx.tag_iva
+18 -2
View File
@@ -1,11 +1,11 @@
# coding: utf-8
from odoo import models, fields
from odoo import models, fields, api
class AccountTax(models.Model):
_inherit = 'account.tax'
l10n_mx_tax_type = fields.Selection(
l10n_mx_factor_type = fields.Selection(
selection=[
('Tasa', "Tasa"),
('Cuota', "Cuota"),
@@ -15,3 +15,19 @@ class AccountTax(models.Model):
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.")
l10n_mx_tax_type = fields.Selection(
selection=[
('isr', "ISR"),
('iva', "IVA"),
('ieps', "IEPS"),
],
string="SAT Tax Type",
compute="_compute_l10n_mx_tax_type",
store=True,
readonly=False,
)
@api.depends("country_id")
def _compute_l10n_mx_tax_type(self):
for tax in self:
tax.l10n_mx_tax_type = 'iva' if tax.country_id.code == 'MX' else False
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<odoo>
<record id="account_tax_form_inherit_l10n_mx" model="ir.ui.view">
<field name="name">account.tax.form.inherit.l10n_mx</field>
<field name="model">account.tax</field>
<field name="inherit_id" ref="account.view_tax_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='analytic']" position="before">
<field name="l10n_mx_tax_type" invisible="country_code != 'MX'" required="country_code == 'MX'"/>
</xpath>
</field>
</record>
</odoo>