墨西哥

注解

This documentation is written assuming that you follow and know the official documentation regarding Invoicing, Sales and Accounting and that you have experience working with odoo on such areas, we are not intended to put here procedures that are already explained on those documents, just the information necessary to allow you use odoo in a Company with the country “Mexico” set.

介绍

The mexican localization is a group of 3 modules:

  1. l10n_mx: All basic data to manage the accounting, taxes and the chart of account, this proposed chart of account installed is a intended copy of the list of group codes offered by the SAT.

  2. l10n_mx_edi: All regarding to electronic transactions, CFDI 3.2 and 3.3, payment complement, invoice addendum.

  3. l10n_mx_reports: All mandatory electronic reports for electronic accounting are here (Accounting app required).

With the Mexican localization in Odoo you will be able not just to comply with the required features by law in México but to use it as your accounting and invoicing system due to all the set of normal requirements for this market, becoming your Odoo in the perfect solution to administer your company in Mexico.

配置

小技巧

After the configuration we will give you the process to test everything, try to follow step by step in order to allow you to avoid expend time on fix debugging problems. In any step you can recall the step and try again.

Install the Mexican Accounting Localization

To install the module, go to Apps, remove the Apps filter and search for “Mexico”. Then click on Install.

../../../../../_images/mexico01.png

小技巧

When creating a database from www.odoo.com, if you choose Mexico as country when creating your account, the mexican localization will be automatically installed.

Electronic Invoices (CDFI 3.2 and 3.3 format)

To enable this requirement in Mexico go to configuration in accounting Go in Accounting ‣ Settings and enable the option on the image with this you will be able to generate the signed invoice (CFDI 3.2 and 3.3) and generate the payment complement signed as well (3.3 only) all fully integrate with the normal invoicing flow in Odoo.

../../../../../_images/mexico02.png

Set the proper “Fiscal Position” on the partner that represent the company

Go In the same form where you are editing the company save the record in order to set this form as a readonly and on readonly view click on the partner link, then edit it and set in the Invoicing tab the proper Fiscal Information (for the Test Environment this must be 601 - General de Ley Personas Morales, just search it as a normal Odoo field if you can’t see the option).

Enabling CFDI Version 3.3

警告

This steps are only necessary when you will enable the CFDI 3.3 (only available for V11.0 and above) if you do not have Version 11.0 or above on your SaaS instance please ask for an upgrade by submitting a ticket to support in https://www.odoo.com/help.

启用:ref:开发者模式<developer-mode>.

Go and look the following technical parameter, on Settings ‣ Technical ‣ Parameters ‣ System Parameters and set the parameter called l10n_mx_edi_cfdi_version to 3.3 (Create it if the entry with this name does not exist).

警告

The CFDI 3.2 will be legally possible until November 30th 2017 enable the 3.3 version will be a mandatory step to comply with the new SAT resolution in any new database created since v11.0 released CFDI 3.3 is the default behavior.

../../../../../_images/mexico11.png

Important considerations when you enable the CFDI 3.3

Your tax which represent the VAT 16% and 0% must have the “Factor Type” field set to “Tasa”.

../../../../../_images/mx_faq_04.png ../../../../../_images/mx_faq_05.png

You must go to the Fiscal Position configuration and set the proper code (it is the first 3 numbers in the name) for example for the test one you should set 601, it will look like the image.

../../../../../_images/mexico14.png

All products must have for CFDI 3.3 the “SAT code” and the field “Reference” properly set, you can export them and re import them to do it faster.

../../../../../_images/mexico15.png

Configure the PAC in order to sign properly the invoices

To configure the EDI with the PACs, you can go in Accounting ‣ Settings ‣ Electronic Invoicing (MX). You can choose a PAC within the List of supported PACs on the PAC field and then enter your PAC username and PAC password.

警告

Remember you must sign up in the refereed PAC before hand, that process can be done with the PAC itself on this case we will have two (2) availables Finkok and Solución Factible.

You must process your Private Key (CSD) with the SAT institution before follow this steps, if you do not have such information please try all the “Steps for Test” and come back to this process when you finish the process proposed for the SAT in order to set this information for your production environment with real transactions.

../../../../../_images/mexico04.png

小技巧

If you ticked the box MX PAC test environment there is no need to enter a PAC username or password.

../../../../../_images/mexico05.png

小技巧

Here is a SAT certificate you can use if you want to use the Test Environment for the Mexican Accounting Localization.

Configure the tag in sales taxes

This tag is used to set the tax type code, transferred or withhold, applicable to the concept in the CFDI. So, if the tax is a sale tax the “Tag” field should be “IVA”, “ISR” or “IEPS”.

../../../../../_images/mexico33.png

Note that the default taxes already has a tag assigned, but when you create a new tax you should choose a tag.

用法和测试

开票

To use the mexican invoicing you just need to do a normal invoice following the normal Odoo’s behaviour.

Once you validate your first invoice a correctly signed invoice should look like this:

../../../../../_images/mexico07.png

You can generate the PDF just clicking on the Print button on the invoice or sending it by email following the normal process on odoo to send your invoice by email.

../../../../../_images/mexico08.png

Once you send the electronic invoice by email this is the way it should looks like.

../../../../../_images/mexico09.png

取消的发票

The cancellation process is completely linked to the normal cancellation in Odoo.

If the invoice is not paid.

  • Go to to the customer invoice journal where the invoice belong to.

    ../../../../../_images/mexico28.png ../../../../../_images/mexico29.png
  • Check the “Allow cancelling entries” field.

    ../../../../../_images/mexico29.png
  • Go back to your invoice and click on the button “Cancel Invoice”.

    ../../../../../_images/mexico30.png
  • For security reasons it is recommendable return the check on the to allow cancelling to false again, then go to the journal and un check such field.

Legal considerations

  • A cancelled invoice will automatically cancelled on the SAT.

  • If you retry to use the same invoice after cancelled, you will have as much cancelled CFDI as you tried, then all those xml are important to maintain a good control of the cancellation reasons.

  • You must unlink all related payment done to an invoice on odoo before cancel such document, this payments must be cancelled to following the same approach but setting the “Allow Cancel Entries” in the payment itself.

Payments (Just available for CFDI 3.3)

To generate the payment complement you only need to follow the normal payment process in Odoo, this considerations to understand the behavior are important.

  1. To generate payment complement the payment term in the invoice must be PPD, because It is the expected behavior legally required for “Cash payment”.

    1.1. How can I generate an invoice with payment term `PUE`?

    According to the SAT documentation a payment is classified as PUE if it was agreed that the invoice would be fully paid before the 1st of the next calendar month (the month after the one in the CFDI date); any other condition will generate a PPD invoice.

    1.2. How is this done in Odoo?

    The appropriate CFDI payment term (PPD or PUE) is determined by the dates and the Payment Terms that are selected in the invoice.

    • If an invoice is generated without Payment Term the attribute MetodoPago will always be PUE.

    • If this is the first week of the month and an invoice is generated with Payment Term 15 Net Days the calculated Due Date will be before the 1st of the next month, which will result in the attribute MetodoPago being PUE.

    • If this is not the first week of the month and an invoice is generated with Payment Term 30 Net Days, the Due Date will be later higher than the 1st day of the next month and the MetodoPago will be PPD.

    • If the Payment Term are defined with 2 or more lines (for example 30% Advance and End of Following Month), this is an installments term, and the attribute MetodoPago will always be PPD.

  2. To test a normal signed payment just create an invoice with the payment term 30% Advance, End of Following Month and register a payment to it.

  3. You must print the payment in order to retrieve the PDF properly.

  4. Regarding “Payments in Advance” you must create a proper invoice with the advance payment itself as a product line setting the proper SAT code following the procedure in the official documentation given by the SAT in the section Apéndice 2 Procedimiento para la emisión de los CFDI en el caso de anticipos recibidos.

  5. Related to topic 4, creating a Customer Payment without a proper invoice is not allowed.

电子会计

在Odoo中对墨西哥的会计由3份报告组成:

  1. 电子会计科目表(称为 COA 并显示为 COA)。

  2. 电算试平衡。

  3. DIOT report.

1. and 2. are considered electronic accounting, and DIOT is a report only available in the context of accounting.

您可以在:menuselection:’会计 –>报告 –> 墨西哥’ 中找到所有这些报告

MX reports

电子会计科目表(称为 COA 并显示为 COA)。

电子发票从未如此简单,只需转到:menuselection:’会计 ->报告 -> 墨西哥 -> COA’,然后单击按钮 导出为 SAT (XML)

COA for SAT

How to add new accounts ?

如果使用 NNN 添加帐户。是的。ZZ 编码约定,其中 NNN.YY是一个SAT编码组,您的帐户将自动设置。

为新银行帐户添加帐户的示例转到:菜单选择:“会计 –>设置 –>科目表”,然后在“创建”按钮中创建一个新帐户,并尝试创建一个编号为 102.01.99 的帐户,一旦您更改为建立名称,您将看到一个自动配置的标签,配置的标签是选择在 XML 的 COA 中使用的标签。

Create account

标签的含义是什么?

要了解所有可能的标签,您可以在SAT网站上阅读“附件24<http://www.sat.gob.mx/fichas_tematicas/buzon_tributario/Documents/Anexo24_05012015.pdf>”_,该部分名为**Código agrupador de cuentas del SAT**。

小技巧

当您安装l10n_mx模块并且您的会计科目表依赖于它时(当您在数据库中安装墨西哥作为国家/地区的配置时,这会自动发生),默认情况下,它将具有最常用的标签。如果未创建所需的标记,则可以创建它。

试算表

与 COA 完全相同,但使用初始余额的贷方和借方,一旦您正确配置了 COA,您可以转到 :menuselection:’Reports –> 试算表’,这是自动生成的,可以使用顶部的按钮导出为 XML SAT (XML)**,以及之前选择要导出的时间段。

Electronic verification balance

所有正常的分析和列出的功能都可以在这里找到,以及任何正常的Odoo报告。

DIOT Report (Requires Accounting App)

什么是 DIOT 以及展示 SAT 的重要性

当涉及到SAT管理服务的程序时,我们知道我们不应该忽视我们所呈现的内容。

DIOT是第三方运营信息声明(DIOT),这是增值税的一项额外义务,我们必须将我们的运营状态提供给第三方,或者与我们的供应商一起被认为是相同的。

这适用于个人和角色莫拉莱斯,因此,如果我们有增值税要提交给SAT并与供应商打交道,则必须发送DIOT。

When to file the DIOT and in what format ?

展示DIOT很容易,因为像所有格式一样,您可以在SAT页面上获得它,这是您可以在SAT网站上找到的电子表格A-29。

如果您每个月与第三方有业务往来,则有必要像我们对增值税所做的那样出示DIOT,因此,如果在一月份我们与供应商达成协议,那么到2月份,我们必须提供与所述数据相关的信息。

DIOT在哪里展示?

您可以以不同的方式展示DIOT,这取决于您将选择哪一个,哪一个会更适合您,因为您每个月或每次与供应商打交道时都会展示它。

A-29表格是电子的,因此您可以在SAT页面上显示它,但这是在进行了多达500次注册之后。

一旦这500条记录被输入SAT,您必须将它们提交给当地纳税人服务管理局(ALSC),并与您的税务地址通信,这些记录可以在CD或USB等数字存储介质上提交,一旦验证,他们将返回您,所以毫无疑问,您仍然会有这些光盘,当然, 您的 CD 或 USB。

还有一件事要知道:批量装载?

在DIOT中查看官方SAT文件时,您会发现批量加载,当然,我们认为的第一件事是什么?,根据SAT网站,它是:

“批量加载”是将数据库从纳税人在文本文件中与供应商进行的交易记录(.txt)进行转换。这些文件具有必要的结构,可以应用并导入到第三方系统的操作信息声明中,从而避免直接捕获,从而优化了在集成中投入的时间,以便及时和形式地向SAT进行演示。

您可以使用它来呈现DIOT,因为它是允许的,这将促进此操作,因此它不存在,以避免在与第三方操作的信息声明方面与SAT保持一致。

如何在Odoo中生成此报告?
  1. Go to Accounting ‣ Reports ‣ Mexico ‣ Transactions with third partied (DIOT).

    DIOT report
  2. 将显示报告视图,选择上个月以报告上个月,或者如果适合您,则离开当前月份。

    DIOT filter
  3. 单击*导出 (XLSX)* 或 打印 (TXT)

Print DIOT
  1. 将下载的文件保存在安全的地方,转到SAT网站并按照必要的步骤进行声明。

有关 DIOT 的供应商和发票数据的重要注意事项

  • 所有供应商都必须在会计选项卡中配置名为“DIOT信息”的字段,只需在地址中选择适当的国家/地区即可完成L10N MX国籍字段,而无需在那里执行任何其他操作,但必须在所有提供商中配置l10n MX类型的操作。

DIOT configuration
  • 此报告有 3 个增值税选项,16%,0% and 免税,Odoo 中的一个发票行如果没有税收,则被视为免税,其他 2 个税种已正确配置。

  • 请记住,要支付代表预付款的发票,您必须首先请求发票,然后付款并按照标准Odoo程序正确对帐付款。

  • 您不需要填写所有合作伙伴数据来尝试生成供应商发票,您可以在生成报告时更正此信息。

  • 请记住,此报表仅显示实际支付的供应商发票。

如果未考虑其中一些注意事项,则当您在TXT中生成DIOT时,将显示这样的消息,其中包含验证此特定报告所需的所有合作伙伴,这就是我们建议使用此报告的原因,而不仅仅是用于导出您的法律信息。义务,但在月底之前生成它,并将其用作您的听觉过程,以查看您的所有合作伙伴是否都已正确配置。

DIOT Error

Odoo的结束财政期

在进入会计年度结束之前,您通常应采取一些步骤来确保您的会计正确,更新和准确:

  • 确保您在年底之前已完全对账,并确认期末账面余额与银行对账单上的余额匹配。

  • 验证是否已输入并审核所有客户发票。

  • 确认您已输入并审核所有供应商帐单。

  • 验证所有费用,确保其准确性。

  • 检查收到的所有付款是否已准确输入和记录。

年终检查表

  • 运行**税务报告**,并验证您的税务信息是否正确。

  • 核对**资产负债表**上的所有账户

    • 将Odoo中的银行余额与对账单上的当前银行余额进行比较。使用报告**银行对帐**来帮助您完成此操作。

    • 通过运行“旧应收账款”和“**旧应付帐款”报表来核对所有现金和银行帐户交易

    • 审核您的帐户,确保您完全了解影响他们的交易以及交易的性质,确保包括贷款和固定资产。

  • 运行会计仪表板中日记帐选项上的 更多 下拉列表下的可选函数 付款匹配,验证任何供应商帐单和客户发票及其付款。此步骤是可选的,但是,如果所有待处理的付款和发票都已对帐,则它可以帮助年终流程,并且可能导致在系统中查找错误或错误。

  • 您的会计师可能希望检查您在资产负债表中的项目,并为以下各项做一些日记帐分录:

    • 使用**日记帐审计**报告(例如,年度的当前收益**和**留存收益报告)手动进行年终调整。

    • Work in Progress.

    • 折旧日记帐

    • 贷款

    • 税金调整

如果您的会计师正在进行年终审计,他们将希望拥有资产负债表项目(例如贷款,银行帐户,预付款,销售税报告等)的副本进行比较。您在Odoo中的余额。

在此过程中,将非顾问的**关闭日期**设置为会计设置下上一个财政年度的最后一天是一种很好的做法。通过这种方式,会计师可以相信在审计账簿时没有其他人更改前一年的交易。

财政年度

会计结算流程

在Odoo中,无需进行特定的年终条目来关闭报告收入账户。练习的结果在账户类型(当年收入)中自动计算,收入 - 支出之间的差额将被累积以计算它。

这些报告是实时创建的,这意味着**收入报告**直接对应于您在Odoo中指定的年份的截止日期。此外,在您生成**收入报告**的任何时候,开始日期将对应于**会计年度**的开始日期,帐户余额将全部为0。

截至 12 月 31 日,资产负债表显示未确认的当年收益(MX 账户中的科目类型本年度未分配总收益 305.01.01 [‘当前年度收益’类型])

Balance sheet closing

会计师应创建一个日记帐分录,以确认“往年结果”账户(墨西哥为304.01.01)上往年累计收益中的年度结果 - 这是一个股票账户。

简化的会计分录将如下所示:

Closing journal entry

会计师创建日记帐分录以查找当年的**当前收益**后,他们必须将**结束日期**设置为会计年度的最后一天。确保在这样做之前,**资产负债表**中当年的当前收益是否正确报告余额0。

Check BS closing

通讯录应用(免费)

如果您想正确管理您的客户,供应商和地址,这个模块,即使它不是技术需求,也强烈建议安装它。

多币种(需要会计申请)

在墨西哥,几乎所有公司都以不同的货币发送和接收付款。如果要执行此操作,可以启用多币种的使用。您还应该启用与**墨西哥银行服务**的同步,因为这将允许您自动获得SAT的汇率,而无需每天在Odoo中手动创建此信息。

转到设置并启用多币种功能。

Multi currency configuration

Enabling Explicit errors on the CFDI using the XSD local validator (CFDI 3.3)

通常,您希望从xml上错误设置的字段中收到显式错误,如果启用检查,则这些错误会更好地通知用户,以启用与xsd一起检查功能,请按照以下步骤操作(启用:ref:’developer mode <developer-mode>’)。</developer-mode>

  • Go to Settings ‣ Technical ‣ Actions ‣ Server Actions

  • Look for the Action called “Download XSD files to CFDI”

  • Click on button “Create Contextual Action”

  • Go to the company form Settings ‣ UsersCompanies ‣ Companies

  • Open any company you have.

  • Click on “Action” and then on “Download XSD file to CFDI”.

Download XSD files to CFDI from the Companies list view on Odoo

Now you can make an invoice with any error (for example a product without code which is pretty common) and an explicit error will be shown instead a generic one with no explanation.

注解

If you see an error like this:

“生成的 cfdi 无效”
‘’attribute decl. ‘TipoRelacion’, attribute ‘type’: QName 值 ‘{http://www.sat.gob.mx/sitio_internet/cfd/catalogos}c_TipoRelacion’ 不解析为 a(n) 简单类型定义。第 36 行。”

这可能是由在另一台服务器中还原的数据库备份引起的,也可能是由于未正确下载 XSD 文件引起的。请按照与上述相同的步骤操作,但:

  • Go to the company in which the error occurs.

  • 单击*操作*,然后单击*将XSD文件下载到CFDI*。

常见问题和错误

  • Error messages (Only applicable on CFDI 3.3):

    • ‘’9:0:ERROR:SCHEMASV:SCHEMAV_CVC_MINLENGTH_VALID: 元素 ‘{http://www.sat.gob.mx/cfd/3}Concepto’, 属性 ‘NoIdentificacion’: [facet ‘minLength’] 值 ‘’ 的长度为 ‘0’;这低于允许的最小长度’1’。

    • ‘’9:0:ERROR:SCHEMASV:SCHEMAV_CVC_PATTERN_VALID: 元素 ‘{http://www.sat.gob.mx/cfd/3}Concepto’, 属性 ‘NoIdentificacion’: [facet ‘pattern’] 值 ‘’ 不被模式 ‘[^|] 接受{1,100}’.’’

    Solution: You forgot to set the proper “Reference” field in the product, please go to the product form and set your internal reference properly.

  • Error messages:

    • ‘’6:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_4: Element ‘{http://www.sat.gob.mx/cfd/3}RegimenFiscal’: 属性 ‘Regimen’ 是必需的,但缺少。

    • ‘’5:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_4: 元素 ‘{http://www.sat.gob.mx/cfd/3}Emisor’: 属性 ‘RegimenFiscal’ 是必需的,但缺少。

    解决方案:您忘记在公司的合作伙伴上设置适当的“财务状况”。转到客户,删除客户筛选器并查找称为您公司的合作伙伴,并设置适当的财务状况,这是您的公司所做的与SAT可能值列表相关的业务类型,另一种选择可能是您忘记遵循有关财务状况的注意事项。

    您需要转到财政头寸设置并设置正确的代码(它是名称的前3个数字),例如,对于测试,您需要设置601,它将看起来像图片。

    Fiscal position error

    小技巧

    出于测试目的,此值必须设置为“601 - General de Ley Personas Morales”,这是增值税演示所需的值。

  • Error message:

    • ‘’2:0:ERROR:SCHEMASV:SCHEMAV_CVC_ENUMERATION_VALID: 元素 ‘{http://www.sat.gob.mx/cfd/3}Comprobante’, 属性 ‘FormaPago’: [facet ‘enumeration’] 值 ‘’ 不是集合 {‘01’, ‘02’, ‘03’, ‘04’, ‘05’, ‘06’, ‘08’, ‘12’, ‘13’, ‘14’, ‘15’, ‘17’, ‘23’, ‘24’, ‘25’, ‘26’, ‘27’, ‘28’, ‘29’, ‘30’, ‘99’}’’

    Solution: The payment method is required on your invoice.

Payment method error
  • Error messages:

    • ‘’2:0:ERROR:SCHEMASV:SCHEMAV_CVC_ENUMERATION_VALID: Element ‘{http://www.sat.gob.mx/cfd/3}Comprobante’, attribute ‘LugarExpedicion’: [facet ‘enumeration’] 值 ‘’ 不是集合 {‘00’’ 的元素

    • ‘’2:0:ERROR:SCHEMASV:SCHEMAV_CVC_DATATYPE_VALID_1_2_1: 元素 ‘{http://www.sat.gob.mx/cfd/3}Comprobante’, 属性 ‘LugarExpedicion’: ‘’ 不是原子类型 ‘{http://www.sat.gob.mx/sitio_internet/cfd/catalogos}c_CodigoPostal’ 的有效值。

    • ‘’5:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_4: 元素 ‘{http://www.sat.gob.mx/cfd/3}Emisor’:属性 ‘Rfc’ 是必需的,但缺少。

    解决方案:您必须正确配置公司地址,这是一组必填字段,您可以在:menuselection中转到您的公司配置:’设置–>用户和公司–>公司’,然后按照本节中的步骤填写地址的所有必填字段::ref:’mx-legal-info’。

  • Error message:

    解决方案:您的公司地址的邮政编码对墨西哥无效,请更正。

ZIP code error
  • Error messages:

    • ‘’18:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_4: Element ‘{http://www.sat.gob.mx/cfd/3}Traslado’: 属性 ‘TipoFactor’ 是必需的,但缺少。

    • ‘’34:0:ERROR:SCHEMASV:SCHEMAV_CVC_COMPLEX_TYPE_4: Element ‘{http://www.sat.gob.mx/cfd/3}Traslado’: 属性 ‘TipoFactor’ 是必需的,但缺少。

    解决方案:在系统中为 0% and 16% tax 设置墨西哥名称,并在发票上使用它。您的税款(表示 16% 的增值税和 0%)必须将“因子类型”字段设置为 “Tasa”。

    Factor type error Rate error
  • Error messages:

    • “CCE159”
      “如果 cce11: ComercioExterior: TipoOperacion registered 是 ‘1’ 或 ‘2’,则必须注册 XXXX 属性。

    解决方案:有必要指定国际贸易术语解释通则。

  • Error messages:

    • “CCE209”
      ‘’属性 cce11: 外贸: 货物: 货物: 海关单位必须具有目录 catCFDI: c_FraccionArancelaria 列 ‘UMT’ 当属性 cce11: 外贸: 货物: 我 ‘’

    解决方案:关税分数必须具有计量单位01的代码,对应于千克。

词汇表

  • :缩写:’CFDI(Comprobante Fiscal Digital por Internet)’:在线数字税收收据

  • :缩写:’CSD (Certificado de Sello Digital)’: Digital Seal Certificate

  • :abbr:’PAC (Proveedores Autorizados de Certificación)’: Authorized Certification Provider

  • 印花:电子发票的数字签名

  • 附录:可以附加到互联网数字税收收据(CFDI)的信息补充,这些信息通常是墨西哥某些公司(如沃尔玛,Tiendas Sorianas等)所要求的。

  • :abbr:’UUID(通用唯一标识符)’:它是通用唯一标识符的英文首字母缩写。UUID 相当于 Folio Fiscal,它由 32 个十六进制数字组成,以连字符分隔的 5 个组显示。

  • LCO:义务纳税人名单(LCO)是国家税务总局发布的名单,用于核算其授权开具发票和工资单的所有纳税人。这意味着,为了能够以电子方式向您的客户开具账单,您必须在此数据库中。