Commit Graph
334 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
Maximilien (malb) e28a9a74a3 [IMP] l10n_mx: UI clean up
This commit aims at changing a tooltip

Task: 3270458
Part-of: odoo/odoo#134617
2023-10-20 11:22:01 +00:00
Maximilien (malb) 45cb6818f8 [IMP] l10n_{ar,mx,ec,pe}: translation
This commit will contains all the PO and POT for the localisation that needed to
 be improved

Task: 3270458
Part-of: odoo/odoo#134617
2023-10-20 11:22:01 +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
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Daniel Kosky (dako) 084408a9bb [FIX] l10n_*: set default taxes
The default taxes for most localisations have been left undefined by
default. When loading the chart template, the model generally selects
the first sales and purchase taxes, based on the order in which the
taxes appear in the csv, for the default sales and purchase taxes
respectively.

This behaviour can be confusing to those who are not yet familiar with
it. It has been decided that it is preferable instead to specify the
default tax in _get_*_res_company function on the account chart template
model, such that the default taxes are defined explicitly for every
localisation.

task-3453997

closes odoo/odoo#130733

Related: odoo/enterprise#45531
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-17 18:42:46 +02:00
momegahedandfeav-odoo bc44f5cd03 [FIX] l10n_mx: Correct translation of ISR
Steps to reproduce:
1. Install l10n_mx
2. create a sales tax t1 that uses Tax Grid ISR
make sure the fiscal regime is "RESICO"
4. create an invoice with t1
5. try to sign the xml
6. error

Issue:
in `get_tax_cfdi_name` the only valid values for the node "Impuesto"
in the view "cfdiv40" are ISR, IVA and IEPS

Fix:
fix the translation

opw-3438139

closes odoo/odoo#131059

X-original-commit: 30c12d8951e56c628795b7e6e2ba357e433bbf7f
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
Co-authored-by: feav-odoo <feav@odoo.com>
2023-08-14 13:41:42 +02: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
hupo-odoo a4583a1aa6 [IMP] l10n_{mx,ua,in,dz,ma}: activate default setting
For Mexican localization, activate by default the setting display_invoice_amount_total_words for the Mexican localization. As this localization uses its own amount to words function, the related commit enables an override of the generic function to use it correctly with Mexican localization.

For the other mentioned localizations (ua,in,dz,ma), the setting was already activated but overriding the create method was not a proper way of doing.

task - 3367243

closes odoo/odoo#124909

X-original-commit: 6ee9842764e0b1244927cb8ece1f6407ccec20d5
Related: odoo/enterprise#42510
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
2023-06-14 10:54:24 +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
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.

This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +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
william-andre 0611d8311e [IMP] l10n*: apply automatic icon building
task-3166075

closes odoo/odoo#108617

Related: odoo/enterprise#35547
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-05-10 04:14:50 +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
moerradi 56315dd6b9 [IMP] l10n_*: Update manifests to redirect to own documentation
Removing external links from localization manifests and redirect to our own documentation. Ensure that users can learn about our standard localization modules from a source of information that we have authorship on.

closes odoo/odoo#117005

Task-id: 3248632
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-04-12 16:33:11 +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
william-andre 8e6a3d7269 [REF] l10n_*: clean code
A lot of the separate files were kept up to now because it made the
process easier while applying the script to rebase.
The files can now be merged.

Some code is also cleaned by using CSV instead of a python dict.

Part-of: odoo/odoo#114164
2023-03-06 23:34:49 +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
wan 5125748616 [REF] account: remove chart template
Rewrite the whole chart template mechanism, removing the templates
stored in the database. The new format will mainly use CSV.

Speed up install time
---------------------

* About half of the time of installing a localization for the first time is
  taken by creating the template records. This new in code format gets
  completely rid of this.
* Creating the template records could often not be done in batch because
  of parent/children relations.
* The instanciation of the accounts on the company has been entirely
  reworked too, by
  - optimizing the order of creation of records to avoid UPDATE queries
  - using precomputed fields to avoid UPDATE queries
  - updating the translation in batch
  - deactivating logging in the chatter
  - avoiding access rights checks by checking the rights at the start

Overall, when installing a chart template for the first time, it is 4
times faster because half of the time spent on saving the template in
the database is not done at all anymore, and the instanciation on the
company is more than twice as fast.

Reduce technical debt
---------------------

There is no need to synchronize the templates with the real records
anymore. No need to use hooks to copy the data from one to the other.

It is easier to change a template in a stable version, which can often
be necessary due to legal reasons (i.e. a change of tax rates, reporting
tags,...)

Two modules have been removed:
* `l10n_generic_coa`: since there is nothing left datawise in this
  module, it can be integrated in `account` for free. It is just code
  and CSV.
* `l10n_multilang`: the fields that this module modified to be
  translatable are now always translatable:
  - there was an issue when updating modules that deleted all the
    translations because the fields were not translatable at some point
    during the loading of the registry, then they because translatable
    again but lost all translations because of the column type change.
  - most devs are not able to understand all the languages needed for
    all the localization available. Therefore, english has been added in
    the sources in most localization to understand better issues while
    debugging.
  - no need to call post init hooks anymore, doing the sync with the
    templates.
  - more: see "Translations" section

Because most of the data is now in CSV, it is also easier for product
owners to edit, audit, modify files themselves, removing one layer
during trivial development processes when only data should be changed.

More flexibility for declaration
--------------------------------

The data declaration can now be done easily in python or CSV.
A nice feature is that you can declare everything at once, even for some
more complex chart of accounts:
* if you have to set default taxes on accounts, would need to
  - declare the accounts because accounts are required on the taxes
  - declare the taxes
  - declare the taxes to put on the accounts
  This would lead to scatter information in multiple files. Now,
  everything can be declared in the same place and the loading of the
  chart of accounts will do the 3 steps automatically.
* if you have a relation of child/parent, you would first need to
  declare the parents then the children, and the loading would not be
  efficient because done one by one. Now, everything is done in batch
  automatically without having to think about it.

It is also easier to update fields on records where there was no field
for that on the templates, like
* setting a restriction for journals on accounts
* setting specific values on the company
* modifying journals and linking them easily by using the xml_id instead
  of having to compute it manually

Translations
------------

Some countries have multiple languages (i.e. Belgium uses officially
French, Dutch and German, and the CoA also has an official English
version) and we must support the languages in all these countries.
All these translations are known, and hard coded without using out
translation platform (Transifex). We also like to have the English
version (even if an official one doesn't exist) so that support can be
done more easily in databases using chart templates in other languages
(especially using a non roman alphabet).

Because the translations were not on Transifex for these records, it was
really hard to maintain: the translation templates (`.pot` files) were
not easy to extract as the automatic export would give values mixing
both the CoA and the menuitmes, the fields' strings,... But we don't
want to translate the CoA as we already know the value.
Managing the translations in the `.po` files was also annoying:
- it is easy to forget that the translations need an update too
- it requires a special editor, special terminal commands that everyone
  is not familiar with
- it is easy to make mistakes in the source string

The new format is the following: `field@en_US` where `field` is the
translatable field (usually `name`) and `en_US` is the locale code.
This allows to have the whole declaration on one line, everything in one
file. It also makes the process easier when debugging: instead of
searching for the translation in the `.po` files, it directly appears
next to the configuration of the account/tax/... .

Update of the code
------------------

The code can be updated using this script
https://github.com/william-andre/transform_coa
Forward ports can be managed too by stashing/resetting/checkout the new
modules or the changes in the modules updated in the same PR.

task-2687567

Part-of: odoo/odoo#110016
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
Denis Ledoux b4a7996e96 [IMP] base, *: change the API of init hooks to pass env
This is mostly a cleaning/refactoring change.

The current API for init hooks (pre, post, uninstall) is to pass
`cr, registry`.
But the first thing which was done by most
post init and uninstall hooks was to create an env using
the cr passed
e.g.
`env = api.Environment(cr, SUPERUSER_ID, {})`
and the `registry` argument was unused in all these hooks,
completely.

By changing the API of hooks to pass `env` instead
of `cr, registry`, we gain in average two lines in every
hooks:
- the line creating the env `env = api.Environment(cr, SUPERUSER_ID, {})`
- the line importing `api` and `SUPERUSER_ID`

Therefore removing ~250 lines of repeated code lines accross odoo/odoo and
odoo/enterprise.
In addition to these lines removed,
it also ease the API of init hooks for Odoo developers,
who are used to that `env` and not so much how to create an `env`
from a cursor.

Part-of: odoo/odoo#108254
2023-02-01 10:25:01 +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
Jorge Pinna PuissantandMichael Mattiello (mcm) c7c2959449 [IMP] web, *: simplification and standardization of the settings arch
The aim of this commit is to simplify and standardize the settings archs.

To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.

The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.

```xml
    <app string="CRM" name="crm">
    ...
    </app>
```

- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
        logo is created using the `name` parameter :
        `/{name}/static/description/icon.png`.

The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.

```xml
    <block title="Title of group Bar">
    ...
    </block>
```

- `title` *optional* : The title of the block of settings (the old h2),
        you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
        (the old h3), you can perform research on its text.

The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.

```xml
    <setting string="this is bar">
        <field name="bar"/>
        ...More elements
    </setting>
```

- `type` *optional* : By default, a setting is visually separated on two
        panels (left and right), and is used to edit a given field. By
        defining `type='header'`, a special kind of setting is rendered
        instead. This setting is used to modify the scope of the other
        settings. For example, on the website application, this setting
        is used to indicate to which website the other settings apply.
        The header setting is visually represented as a yellow banner on
        the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
        not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
        displayed just below the setting label (with classname
        `text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
        icon is displayed next to the setting label to explicit that
        this setting is company-specific.
- `documentation` *optional* :  If this attribute is set, an icon is
        added next to the setting label, this icon is a link to the
        documentation. Note that you can use relative or absolute path.
        The relative path is relative to
        `https://www.odoo.com/documentation/server_version`, so it's not
        necessary to hard-code the server version on the arch anymore.

closes odoo/odoo#106425

Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
2022-12-02 14:40:25 +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
william-andre beb6e17066 [FIX] account: remove dead code complete_tax_set
This field was used in version 9.0 [1] to allow users to select their
tax rate, but it was removed in version 12 [2]

[1] https://github.com/odoo/odoo/commit/c04065abd8f62c9a211c8fa824f5eecf68e61b73
[2] https://github.com/odoo/odoo/commit/87f0d2eefb77bfc6a9a0fa7f7dcd1475c7c34639

closes odoo/odoo#80185

Related: odoo/enterprise#22441
Related: odoo/upgrade#3057
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-03-31 17:24:55 +02:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
Nicolas (vin) 008ef45e91 [IMP] l10n_mx: set tags on suspense and outstanding accounts
Set a default tag on the bank suspense account, outstanding accounts
and transfer accounts so that they are found and used by the trial
balance and COA reports.

TAsk id #2612900

closes odoo/odoo#82532

Related: odoo/enterprise#23383
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-01-25 19:07:03 +00:00
Ivan Yelizariev 2d8a80d574 [REM] account,l10n_*: delete dead code about transfer account
`_prepare_transfer_account_for_direct_creation` is not used since https://github.com/odoo/odoo/commit/04522f01e6fdbf82a657b32b312449fd7d756f79

closes odoo/odoo#79520

Signed-off-by: William André (wan) <wan@odoo.com>
2021-11-09 14:46:05 +00:00
Josse Colpaert a33d0f9fdb [IMP] l10n_mx: move demo data put on main company to demo company
closes odoo/odoo#79309

X-original-commit: 419e3cf824aaabf6b92d3f34668a2c4c98b0998f
Related: odoo/enterprise#22070
Signed-off-by: Laurent Smet <las@openerp.com>
2021-11-04 11:07:19 +00: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
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +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 17610e8ca9 [IMP] account, account_edi, l10n_*, purchase, sale: Generalize the use of account_fiscal_country_id
Before, account_fiscal_country_id was only use for tax operations; and country_id was used for all the other accounting stuff. Now, with the new ability to use foreign tax reports (with foreign VAT fiscal positions), we can generalize the fiscal country, sot that it is the one that needs to be used for the whole accounting. Since foreign tax reports were not supported before, account_fiscal_country_id is already set on existing database as the country for the "main" accounting, so the impact of this change is small.

closes odoo/odoo#68349

Related: odoo/upgrade#2322
Related: odoo/enterprise#17299
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-04-01 12:09:20 +00:00
oco-odoo 7922e5d102 [IMP] l10n_*: set newly-introduced country_id field on chart templates 2021-04-01 12:09:20 +00:00
bat-odoo feca3ad527 [IMP] base: update l10n icons
Purpose of the task is to update all l10n modules icon with new icon that i have
found in task attachment.

So in this commit, Updated all l10n modules icon with new icon.

closes odoo/odoo#65329

Taskid: 2442631
Related: odoo/enterprise#16054
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-25 15:01:43 +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
Adrien Widart 567f192d98 [REV] l10n_mx: prevent MX from printing receipts
PR #66910 has been created so the MX can print their receipts.
Eventually, this needs to be reverted since printing a receipt is
actually illegal.

closes odoo/odoo#67209

X-original-commit: 7e9261cacd9f6963dca517fe7b1f3de067af1366
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-03-04 10:33:08 +00:00
Adrien Widart 286e512ff2 [FIX] l10n_mx: allow MX to print receipts
To reproduce the error:
(Need MX configuration)
1. Go to Accounting > Customers > Receipts
2. Create a Receipt
3. Post and Print it

Error: An error message is displayed: "Only invoices could be printed."
However, MX should be allowed to print the receipts.

OPW-2456374

closes odoo/odoo#66954

X-original-commit: 0f0238c64cda308098eb5b3d30e3177cfcb4bab7
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-02-26 17:24:11 +00:00