Commit Graph
114 Commits
Author SHA1 Message Date
Julien Van Roy ad4af37b96 [FIX] l10n_mx: remove useless tags after l10n_mx_tax_type
The iva, ieps, isr tags are useless since there is the selection field
`l10n_mx_tax_type` on the taxes.

task-3388347

closes odoo/odoo#136948

Related: odoo/enterprise#48088
Related: odoo/upgrade#5204
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-20 19:12:47 +00:00
Julien Van Roy 412fded185 [FIX] l10n_mx: the IEPS taxes should be include_base_amount
Set `include_base_amount` to True for the IEPS taxes.

task-3100679

closes odoo/odoo#137940

X-original-commit: ceacccdc34f80ed5969b1d49bbcdf9adbd2ce76c
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-10-09 19:18:42 +00:00
Julien Van Roy 331642d7ee [FIX] l10n_mx: set the sales IEPS taxes as inactive
To avoid having to many IEPS taxes, set the sales one as inactive.

task-3100679

X-original-commit: d134258f18c8569f1684e7681cfc905d974444f5
Part-of: odoo/odoo#137940
2023-10-09 19:18:42 +00:00
Julien Van Roy cdd29dfe98 [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>
2023-09-20 13:03:07 +00:00
Julien Van Roy 1798eb71d1 [IMP] l10n_mx: add IEPS taxes & review existing
Add IEPS taxes and tax groups. Make sure the IEPS taxes are
`include_base_amount` and have a lower sequence than the IVA taxes.

Unify the names of the taxes and their labels on invoice.

Resequence the taxes to group them by nature.

task-3100679

closes odoo/odoo#135795

X-original-commit: d4785e5895c9befaeb1ff7d77b02f5ed7b250790
Related: odoo/enterprise#47545
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-09-18 22:17:15 +00:00
casp-odoo 917f9e916f [IMP] account_reports/l10n : harmonize hierarchy_level
Added the improvements brought by https://github.com/odoo/enterprise/pull/43885 to localisations financial report when thet don't follow the usual section distribution.

task-3452382

closes odoo/odoo#131550

Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-08-11 09:16:56 +02:00
Antoine (aboo) 3527520d83 [IMP] l10n_mx: Addition of 3 default UoM.
Problem
---------

Some Unit of Measures need to be configured when using the Mexican
Localisation to be used in their electronic invoicing system. As of now
they are not installed by default but many businesses will need to add
and configure them manually. Let's make those included in the l10n_mx
localisation.

Objective
---------
Addition of the Service UoM category and the 3 UoMs in the UoM data file:
 - Service Unit
 - Activity
 - Job

Solution
---------
UOM category and units were added in an XML file in the data folder.
Translation added to the uom.pot file to be translated later;
translation already added in es_MX since the task is targeted at Mexican
localisation.

task-3392056

closes odoo/odoo#129672

X-original-commit: 0f88914a4618aa1abd250b6cf701a5f7b381f41e
Related: odoo/enterprise#44590
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Antoine Boonen (aboo) <aboo@odoo.com>
2023-07-27 14:47:07 +02:00
Maximilien (malb) 6ef8808d4d [IMP] l10n_mx: invoice label translate
In the translation PR (odoo#108725), we translated the tax group and invoice label
but for the invoice label we didn't added to translation it needed to have.
This commit fix that.

Task: 3369579
Part-of: odoo/odoo#125017
2023-07-10 15:32:25 +02:00
oco-odoo 0aeeb5374e [FIX] account: computation of tax_tag_invert
Two issues solved in 1 commit; as their solutions depend on one another.

** ISSUE 1 **

To reproduce the issue, on a l10n with a tax report:
- Create a misc operation with a tax on it in the same form as a sales invoice ; post it.
- Reverse that move, and post the reverse.

=> Open the tax report: the amounts of the original move (for both tax lines and base lines) are doubled.
That's not what we want ; instead, the reverse should have entirely canceled the original move.

This is due to the fact the is_refund field of account.move.line is badly computed on the reverse: both tax and base lines are considered refund. Because of that, tax_tag_invert gets inverted, and ends up doubling the amount in the report instead of cancelling it. While made on a reverse move, those lines should not be considered as refunds, since they must both use the original repartition of the reversed move , unlike invoices, which would make use of the refund repartition in this case.

** ISSUE 2 **

To reproduce, on a l10n with a tax report:
- Create a cash basis tax, and set tags on its repartition lines so that it should be taken into account by the report. Make sure the refund repartition cancels the invoice repartition.
- Create an invoice using that tax, post it
- Click the "Add Credit Note" button, select "partial refund", and post the generated refund (which will cover the full amount of the original invoice)
- Reconcile the refund with the invoice

=> Because it's a partial refund, cash basis entries will still be generated. Open the tax report to ensure they sum up to 0... And the tax lines don't !

This happens because the computation of tax_tag_invert field inverts the sign of tag on cash basis entry tax lines when they have a negative tax_base_amount. In our case, when going through the "reverse" button and making a partial refund, we actually do get a negative amount in the credit note's tax_base_amount. This is inconsistent with what a refund generated from scratch does (then, you'll get a positive tax_base_amount in our case), and should only be legit when the document contains a negative line explicitly (so, a line with a negative quantity, hence inverting the meaning of debit/credit).

The root of the issue is that the tax_base_amount of the tax line uses the tax_tag_invert of the base line to define its sign. And tax_tag_invert was omitting to set copy=False. When reversing a move, the first step is to copy it. Because of the missing copy=False, tax_tag_invert was copied, and never recomputed (since it's a computed editable field) on the base line, giving it an inconsistent value, and ending up inverting the sign of tax_base_amount on the tax line. In turn, the tax line got a wrong tax_tag_invert because of that, and would propagate that to the cash basis entry when generating it.

This commit adds the missing copy=False to tax_tag_invert, but also fixes the computation of tax_tag_invert so that in does not rely on tax_base_amount anymore. This way, existing data will also benefit from the fix without having to recompute the field. Additionnally, there are currently plans to remove tax_base_amount in master, so this would have had to be done eventually anyway.

======

Forward-port note:

In 16.2, https://github.com/odoo/odoo/commit/84d7aab94e2984a81923f0546e24caf54cd53033 actually wrongly inverted the sign of the Mexican withholding tag in repartition lines. Those taxes are negative, so a tag needing to get the retention amount in positive must be negative itself. The bugs fixed in this commit shadowed the problem, and this fix reveals it. A fix of the tags's signs was added into this forward-port.

OPW 3255511

closes odoo/odoo#123187

X-original-commit: 688ab4d6688ccd2377ea9702c00b1ec16f99527a
Related: odoo/enterprise#41748
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-06-01 11:44:05 +02:00
Maximilien (malb) 13dbc79065 [IMP] l10n_mx: taxes
We want to invigorate a Tax Name Taxonomy so that tax names are as codified as possible. This allow for a better display on Invoice Description, and allowed us to implement a smart name_search.

In this PR, we change the taxes names so that it's more clear for users

closes odoo/odoo#114571

Task-id: 3052677
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-05-10 18:16:06 +02:00
Nshimiyimana Séna b65e7a4a10 [FIX] l10n_mx: fix refund column in DIOT report
# Steps to reproduce
- install l10n_mx_reports
- switch to a mexican company
- create a Vendor Bill, confirm it and register a payment for it
- create a Credit Note for that bill, confirm it and register a payment
  too
- go to the DIOT report (called `Transactions with third parties
  [ DIOT ]` in the menu )

The amount in the column "Refunds" should be the tax amount, and not the
base amount.

opw-3107102

Enterprise PR: odoo/enterprise#39628

closes odoo/odoo#118887

X-original-commit: 8c9cde34ac1fb74a42997b0a1d847ae1c9bb1312
Related: odoo/enterprise#39929
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2023-04-25 02:42:05 +02:00
Claire Bretton (clbr) 82e1a2b1cb [IMP] account, l10n_*: add field invoice_label, field description back to initial purpose
Taxes have a `description` field that has been hijacked to
represent tax label on invoices. We want the description field
to be used for its original purpose, thus created a dedicated field
`invoice_label` in which we transferred `description` content.
We also make description translatable.
This is part of the Tax Taxonomy 2 rework.

Task: 3052677
Part-of: odoo/odoo#113236
2023-03-07 10:06:13 +01:00
Yannick Tivisse 3a10ef856d [IMP] l10n_mx: Add additional accounts to manage payroll
closes odoo/odoo#112916

Taskid: 3062275
Related: odoo/enterprise#36833
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-02-23 16:08:26 +01:00
william-andre d782b8b925 [IMP] l10n_*: convert CoA in new format
Converted using https://github.com/william-andre/transform_coa

closes odoo/odoo#110016

Related: odoo/enterprise#35836
Related: odoo/documentation#3336
Related: odoo/upgrade#4276
Signed-off-by: William André (wan) <wan@odoo.com>
2023-02-17 19:30:40 +01:00
det 84d7aab94e [REF] l10n_mx: DIOT report as tax report
1/ The mexican DIOT report is now a tax report.

This in order to enjoy more Reportalypse' features (less menuitems,
tax_tags engine). The export functinality will remain in enterprise
version.

2/ Add missing tax "RET IVA RESICO 1.25%" tax.

3/ Add migration script for taxes.

As a new tax (RET 1.25%) has been added and the DIOT refactoring updated
many invoice_repartition_line_ids and refund_repartition_line_ids with
tags, the migration script will be run on module update.

task-id: 2925736
[community](https://github.com/odoo/odoo/pull/109300)
[enterprise](https://github.com/odoo/enterprise/pull/35515)

closes odoo/odoo#109300

Related: odoo/upgrade#4224
Related: odoo/enterprise#35515
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-02-10 16:49:07 +01:00
Andrea Grazioso (agr-odoo) a4331a7c62 [FIX] l10n_mx: add missing account tags
Install MX CoA
"Cash" and "Bank Suspense Account" are missing the tag
"Transferencias bancarias moneda extranjera" account is using the wrong
tag

opw-3033611

closes odoo/odoo#111273

X-original-commit: 4860a77a51f72bbb51b435766733b3c0a74c9a32
Related: odoo/enterprise#36422
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-01-30 09:39:37 +01:00
Julien Van Roy b5c0c48ad9 [FIX] l10n_mx: revert the account.tag names in Spanish
Since the account.tags names have been converted from Spanish to English
(see
https://github.com/odoo/odoo/commit/84be7372de41ba8bf9075f34cbd0b812eadbc2b3),
the function `get_tax_cfdi_name` is no longer able to deduce the tax
code (the 'Impuesto' field with possible values: 001, 002 or 003)
Revert the 3 important account.tags names in Spanish.

closes odoo/odoo#110322

X-original-commit: 1705f785091e8b80ea57da439befce4a041744e4
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-01-19 09:13:03 +01:00
maximilien(malb) 84be7372de [IMP] l10n_mx: Translation
All the localisation should be written in english and then translated to the native language of the country. In this case, the mexican localisation was written is spanish, this PR translate all the module in english and add the corresponding PO file in spanish.

closes odoo/odoo#108725

Task-id: 3089239
Related: odoo/enterprise#35247
Signed-off-by: Laurent Smet <las@odoo.com>
2023-01-05 15:37:18 +01:00
Camille Spiritus 78dfa2a07d [IMP] account : cash discount: set up default accounts and configs
The early payment cash discount functionality was merged in 16.0.

This PR allows for the behavior to be as localization specific as possible.

This concerns :

The tax computation (some countries leave it untouched after the discount, some countries discount it, and Belgium has a mixed behaviour)
The account in which the cash difference resulting of the cash discount should be put.
task- 2983913
related to #99572

closes odoo/odoo#102032

X-original-commit: 591757902dcdf1e3609d9c5ae23e2b134ee8e4da
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2022-10-04 13:29:08 +02:00
Laurent Smet bedf191134 [IMP] account,l10n_*: Set 100 as default value for factor_percent in tax repartition lines
closes odoo/odoo#94125

Related: odoo/enterprise#28648
Related: odoo/upgrade#3695
Related: odoo/documentation#2557
Signed-off-by: Laurent Smet <las@odoo.com>
2022-08-25 19:56:56 +02:00
oco-odoo b7232b14b7 [IMP] account, l10n_*: Introduce unified reporting engine
This commit adapts account's model to the new report engine introduced for v16, and updates the data files accordingly.

account.report model is now declared in community, together with the other models used by the reporting. This is done so that the tax tags can properly be created by the tax report and used on tax templates. All the actual computation logic stays in enterprise.

See enterprise commit for full details.

Task 2524389

Part-of: odoo/odoo#94125
2022-08-25 19:56:55 +02:00
aliya 26b2472f49 [IMP] account: refactor account types
Task: 2856281

- Remove user_type_id, account.account.type model, internal_type
- Add account_type that is a simple selection field
- Move internal_group and include_initial_balance to account.account
- Because of these changes, type_control_ids on account.journal is also removed

closes odoo/odoo#93212

Related: odoo/documentation#2223
Related: odoo/upgrade#3595
Related: odoo/enterprise#28205
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-07-08 19:52:15 +02:00
Merlin (megu) 3801818150 [FIX] l10n_mx: correct repartition for credit notes account
The account used in the Repartition for Credit Notes is wrong for taxes
`IVA(8%) COMPRAS`, `IVA(16%) COMPRAS`, `IVA(8%) VENTAS`, `RETENCION IVA
ARRENDAMIENTO 10.67%`, `RETENCION IVA HONORARIOS 10.67%` and `IVA(0%)
COMPRAS`

Steps to reproduce:
1. Install Accounting app and l10n_mx module
2. Go to Accounting > Configuration > Invoicing > Taxes
3. Open any one of the taxes mentioned above
4. The account in Repartition for Invoices should be the same as the
account in Repartition for Credit Notes

Solution:
Change the default account used in Repartion for Credit Notes

opw-2806228

closes odoo/odoo#88359

X-original-commit: e8dbd07f160dee59117b855ff54d6fb428bf9778
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-04-11 12:42:32 +02:00
Paolo (pgi) bcb1bd2212 [FIX] l10n_*: Localization tax group localization data normalization
"account_tax_group.xml" and "account_data.xml" data files
have been renamed to "account_tax_group_data.xml"
when containing only tax groups, for compliance with the standard.

AE, AR, AT, BE, BO, BR, CA, CN, CR, CZ,
DE SKR03, DE SKR04, DO, ES, FI, FR, GR,
GT, HN, IL, IN, LT, MA, MX, NL, NO, PA,
PL, PT, RO, SG, SY, TH, TR, UA, UY, VE,
VN.

Part-of: odoo/odoo#77295
2021-10-01 12:40:54 +00:00
Nicolas (vin) adfb20537b [IMP] account: add country_id on tax groups
In order to not show unnecessary tax groups when configuring a tax,
we'll now filter them to only shows the tax groups that are either
linked to no country, or that are linked to the same country as the tax.

Task id #2206280
2021-05-26 10:51:29 +00:00
oco-odoo 7922e5d102 [IMP] l10n_*: set newly-introduced country_id field on chart templates 2021-04-01 12:09:20 +00:00
Humberto Arocha 076952189c [FIX] l10n_mx: Fixing Repartition account for refund
Main
-

[FIX] l10n_mx: Repartition account for refund must be the same
than invoice's one.

Explanation
-

Current Behavior
=

Purchase Tax (16%)
-

|field|value
|-|-
|Transition Account|Transtion Tax
|Invoice Repartition|Paid Tax
|Refund Repartition|Transtion Tax
|CABA Base|Base Account

Invoice
-

|account|debit|credit|
|-|-:|-:|
|Expense|1000||
|Transtion Tax|160||
|Payables||1160|

Payment
-

|account|debit|credit|
|-|-:|-:|
|Payables|580||
|Bank||580|

CABA on Payment
-

|account|debit|credit|
|-|-:|-:|
|Base Account|500||
|Base Account||500|
|Paid Tax|80||
|Transtion Tax||80|

Refund
-

|account|debit|credit|
|-|-:|-:|
|Payables|290||
|Discounts||250|
|Transtion Tax||40|

CABA on Refund
-

|account|debit|credit|
|-|-:|-:|
|Base Account|250||
|Base Account||250|
|Paid Tax|40||
|Transtion Tax||40|
|Base Account|250||
|Base Account||250|
|Transtion Tax|40||
|Transtion Tax (*)||40|

(*)Wrong Entry Line

Trail Balance
-

|account|debit|credit|balance|
|-|-:|-:|-:|
|Bank|0|580|-580|
|Base Account|1000|1000|0|
|Discounts|0|250|-250|
|Expense|1000|0|1000|
|Paid Tax|120|0|120|
|Payables|870|1160|-290|
|Transtion Tax|200|200|0|
|Total Sum|3190|3190|0|

Expected Behavior
=

Purchase Tax (16%)
-

|field|value
|-|-
|Transition Account|Transtion Tax
|Invoice Repartition|Paid Tax
|Refund Repartition|Paid Tax
|CABA Base|Base Account

Invoice
-

|account|debit|credit|
|-|-:|-:|
|Expense|1000||
|Transtion Tax|160||
|Payables||1160|

Payment
-

|account|debit|credit|
|-|-:|-:|
|Payables|580||
|Bank||580|

CABA on Payment
-

|account|debit|credit|
|-|-:|-:|
|Base Account|500||
|Base Account||500|
|Paid Tax|80||
|Transtion Tax||80|

Refund
-

|account|debit|credit|
|-|-:|-:|
|Payables|290||
|Discounts||250|
|Transtion Tax||40|

CABA on Refund
-

|account|debit|credit|
|-|-:|-:|
|Base Account|250||
|Base Account||250|
|Paid Tax|40||
|Transtion Tax||40|
|Base Account|250||
|Base Account||250|
|Transtion Tax|40||
|Paid Tax (*)||40|

(*)Right Entry Line

Trail Balance
-

|account|debit|credit|balance|
|-|-:|-:|-:|
|Bank|0|580|-580|
|Base Account|1000|1000|0|
|Discounts|0|250|-250|
|Expense|1000|0|1000|
|Paid Tax|120|40|80|
|Payables|870|1160|-290|
|Transtion Tax|200|160|40|
|Total Sum|3190|3190|0|

Tax Review
=

It is expected that Payables for 290 divided by 1.16 (100% + tax) yields the tax base equal to 250
Given that tax base of 250 multiplied by 0.16 (tax) should yield the Outstanding Transition Tax.
Transition Tax must be 40. Currently it is 0.
Paid Tax must be 80. Currently is it 120.
Refund must cancel out 40 in Paid Tax because Refund is not an actual Cash Flow.

closes odoo/odoo#67348

X-original-commit: 18f9cbea59b4a9bcacb5eee237c531a666b1dc46
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-03-05 12:06:17 +00:00
qsb-odoo 3b0f30fa53 [FIX] l10n_mx: load all account tags using CSV file
Since record creation is faster when done from a CSV file,
hence, we move account tags definitions into CSV file.
Also, there was a tag with XMLid 'account_tag_174' defined
twice in XML file, which has been removed.
Total 1082 records of account.account.tag will be created
after removing one duplicated tag.

closes odoo/odoo#56153

Task: 2150637
X-original-commit: 5eef487f194b10ec2a1c0eb452eb22eac6098fc7
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-08-19 14:32:13 +00:00
Benjamin Frantzen (bfr) e2c6a37d32 [REF] l10n_mx_edi: Refactoring of l10n_mx_edi depending account_edi
closes odoo/odoo#52407

Task: 2247368
Related: odoo/enterprise#12226
Related: odoo/upgrade#1571
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-08-17 10:22:02 +00:00
Laurent Smet beccf82e09 [REF] account: journal items reconciliation (part 1/2)
This commits refactors the code of the reconciliation, in order to facilitate the process of complex use cases, namely multi-currencies or cash-basis-taxes related (see details below). It also prepares the code for a second refactoring where we will save on each journal items the amount_currency and currency_id field (even in case of operation made in company currency), also in the sake of simplification.

1) Multi-currencies:
- the account.partial.reconcile model now will have dedicated columns to specify the amount of the partial reconciliation in the debit_line_id currency and the credit_line_id currency. That comes in handy when dealing with journal items having different secondary currencies, but also allows some simplification.
- residual_amount_currency computation changed accordingly
- moved models account.full.reconcile and account.partial.reconcile in their dedicated .py file

2) Cash basis taxes
- cash basis entries now handle correctly rounding errors to make sure the exact amount of gets reported when the reconciliation becomes full.
- the account for the base amount of cash basis entries has to be set, now, on the company instead of on each cash basis tax.
- that new 'property' field can be set at the CoA installation via the field property_cash_basis_base_account_id of account.chart.template, or going through the accounting settings.

Was task task: 2243420
Was PR #50308

Related: odoo/upgrade#1121
Related: odoo/enterprise#10252
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-06-15 08:36:04 +00:00
Denis Ledoux 0f966196fb [FIX] l10n_*: no chart template should be set to noupdate
In a general manner,
the chart templates should not be set to noupdate,
that way, if a new company starts in an existing database,
it starts with an up-to-date chart of accounts.

For instance,
if the chart of template is not updated from
12.0 to 13.0, the `default_pos_receivable_account_id`
is not added in the chart template,
and when a new company is created,
the default pos receivable account is not set on the company.
Besides, the field `res.company``account_default_pos_receivable_account_id`
is not displayed on any form view,
whether or not the full accounting is installed,
so we must especially pay attention this default account is well set
from start, as the user as no opportunity to correct this by himself.

In addition,
in upgrade scripts,
the default pos receivable account on the chart template
is used to correctly set the pos receivable account on the company
and on the pos payment methods,
so it must be well set for the upgrade script to do its job correctly.

Technically, it means, without this revision, the fields:
- `account.chart.template``default_pos_receivable_account_id`,
- `res.company``account_default_pos_receivable_account_id`,
- `pos.payment.method``receivable_account_id`
were not filled properly on upgrade,
causing critical issues in the accounting entries on pos session closing.

Related to #52786
Related to odoo/upgrade@ccfd2371ef

closes odoo/odoo#52870

X-original-commit: 3258ba015ff75b7c176d83a44261d24ebfcc26de
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-06-11 15:13:19 +00:00
Luis Torres e53faee0ea [FIX] l10n_mx: Correct account type in MX chart template
Fix account type on 108.01.01 & 108.02.01

According to the SAT catalog must be an account of Current Assets

Fix the account type and the tag on 811.01.01
According to the SAT catalog must be an account of Expenses, and the tag
must be 811.01

The correct account for unaffected earnings in the SAT catalog is 305.01,
then, was added the account and assigned the correct type.

closes odoo/odoo#46046

X-original-commit: 632cc5417796ff375d47767fd7cdb358a5d4ce94
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-24 09:59:07 +00:00
fw-bot 436876c680 [FIX] l10n_mx: add new changes on COA according with the SAT
These changes were announced in the new Annex 24 RFM 2019 [1] and define
the new code for  accounts for the northern border zone. This change affects a
part of the CoA because these accounts were changed from the middile to the
end of the group.

[1] https://www.sat.gob.mx/cs/Satellite?blobcol=urldata&blobkey=id&blobtable=MungoBlobs&blobwhere=1461173776384&ssbinary=true

closes odoo/odoo#39556

X-original-commit: cb163992ff5aea0d5e0dff7d31c38fc50ec52ab6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-30 09:03:34 +00:00
fw-bot 04ada1ddae [FIX] l10n_mx: Transition Tax Accounts must be reconcilable
This issue is relevant for MX Localization because Cash Basis is created
with the rate of the payment, and not with the rate of the invoice as is
done for odoo core.

closes odoo/odoo#38399

X-original-commit: 10bb81c837c0d88ac4ec396442bd86a654c78646
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-10-10 13:11:35 +00:00
Humberto Arocha 1deca4917a [FIX] l10n_mx: Sequencing Template Taxes in order promote them.
Before this commit when installing l10n_mx chart of accounts taxes for
0% and 4% were the ones assigned by default in products or in invoices
for sales and purchase, respectively.

Reason was wrong sequence in the Template of Taxes, combined with order
of creation, ids.

now the two ones with lowest sequence are the 16% Taxes.

closes odoo/odoo#37642

X-original-commit: 357943e9440683f2bff01dc2f1ef074e5104769a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-30 20:41:00 +00:00
Luis Torres e7bbe5dc0e [FIX] l10n_mx: Country in tags is required for domain
The domain for the tags in the taxes indicates that the country must be
the same that the tax country:
domain="[('applicability', '=', 'taxes'), ('country_id', '=', country_id)]"

For this reason is necessary assign the country in the tags, to allow
register new taxes or change the tag in the records created.

closes odoo/odoo#37482

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-26 19:10:09 +00:00
Luis Torres f266eff7c4 [FIX] l10n_mx: Revert change that remove tax data
The tags in the tax are created for the Mexican taxes (IVA, ISR & IEPS)

This was assigned in the taxes on 3efefd2171,
but in the commit 333c22edd9
was removed from the tax 0%.

Now was returned that data, to be consistent with the tax for 16%

closes odoo/odoo#36206

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-03 15:08:33 +00:00
Luis Torres b050712afd [IMP] l10n_mx: completed tags for second level in CoA
When is used the option to get the CoA reports based on groups, is
necessary set the tag in each group, then, is necessary load the tags
for second level in the SAT catalog for accounts.
2019-09-03 15:08:33 +00:00
Luis Torres cb787377b9 [IMP] l10n_mx: Completed data for Mexican banks
This module provide you a data from Mexican Bank data extracted
from `SAT Bank catalog
<http://www.sat.gob.mx/fichas_tematicas/buzon_tributario/Documents/catalogo_bancos.pdf>`_.

Additionally was added the following fields:
- ASM code in Banks: to identify banking institutions by ASM standard
- CLABE code in Bank Accounts: required to the sending and receiving
of domestic inter-bank electronic funds transfer.

closes odoo/odoo#35742

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-15 06:14:03 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Josse Colpaert f8d4bf4499 [IMP] account, l10n_xx: change CoA loading methods
Before, we only had a public method that installed
the CoA for the current active company.

With the multi-company changes, it was not
possible anymore to install a module with a
demo company and then have the CoA installed
in that demo company correctly.

We changed that public method to be able to
put an extra optional parameter and shortened
its name to try_loading instead of
try_loading_for_current_company.  The method that
it calls when there is no chart installed
is made private and renamed to _load.

closes odoo/odoo#35703

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-14 08:42:27 +00:00
Christophe Simonis 7d04dc1c7c [MERGE] forward port branch saas-12.2 up to 9e74730a26 2019-08-06 18:48:24 +02:00
Olivier Colson 333c22edd9 [FIX] l10n_*: fix taxes repartition so that 12.3 matches what is defined in 12.2
[IMP] l10n_*: don't define accounts or tags on tax repartition line templates anymore for 0% taxes

[FIX] account: remove old function used to migrate the former tax model, incompatible with the new one
2019-08-02 23:07:22 +00:00
Laurent Smet 3efefd2171 [FIX] l10n_mx: Reintroduce missing tag for CFDI
closes odoo/odoo#35101

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-08-01 08:50:00 +00:00
Joseph Caburnay 536560bbf5 [IMP] l10n_*: add new receivable account for pos
A new feature[*] in point_of_sale (PoS) which minimizes the
creation of account.move records in closing a pos.session relies
on a receivable account made specifically for PoS.

This commit addresses this feature's requirement by adding a
new receivable account to each localization.

[*] point_of_sale: single AE for a pos.session

TASK-ID: 1862388
2019-08-09 13:57:10 +00:00
Moisés López 9819d20688 [REF] l10n_mx: Remove MX fiscal position after odoo/enterprise#5038
closes odoo/odoo#35505

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-06 15:26:33 +00:00
Moisés López 30a9120346 [FIX] l10n_mx: Set 'reconcile=True' for stock_account
Running the following 12.0 tests: https://github.com/odoo/enterprise/blob/b7768337d88990e403338c39e461ecb1796413ab/l10n_mx_edi_landing/tests/test_landing.py#L126
raise the following error using anglo-saxon:

```bash
File stock_account/models/account_invoice.py, line 60, in invoice_validate
File stock_account/models/account_invoice.py, line 89, in _anglo_saxon_reconcile_valuation
File 10n_mx_edi/models/account_move.py, line 12, in reconcile
File account/models/account_move.py, line 957, in reconcile
File account/models/account_move.py, line 948, in _check_reconcile_validity
odoo.exceptions.UserError: ('Account Mercancías en tránsito (115.05.01) does not allow reconciliation. First change the configuration of this account to allow it.', '')
```

closes odoo/odoo#34463

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-07-01 00:58:51 +00:00
Christophe Simonis 34a8754d4f [MERGE] forward port branch saas-12.2 up to 498b4b4350 2019-06-14 15:20:01 +02:00
Christophe Simonis c8d7ad9a6b [MERGE] forward port branch saas-12.2 up to 995aa1685e 2019-06-03 15:49:31 +02:00
Christophe Simonis 9e9e9acef1 [MERGE] forward port branch saas-11.3 up to a2582c4252 2019-06-07 19:04:43 +02:00