Commit Graph
13 Commits
Author SHA1 Message Date
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
Raúl b27705c901 [REF] l10n_ec: Message validation for VAT
- We refactored the VAT validation from a validation error to a warning that is stored in l10n_ec_vat_error
- Remove the "-" and "EC" from the base_vat in the EC validation/example
- Only validate the length in the base_vat
- Add compute field with the warning message in the l10n_ec

closes odoo/odoo#123708

X-original-commit: 19b9384867485ea5fc30bac9192a21a91335f567
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-06-05 16:17:20 +02:00
Andres Calle c2b77cc244 [ADD] l10n_ec: Improve accounts in chart template
- Adds early pay discounts, cash dicounts accounts
- Sets the ecuadorian chart of accounts as updatable (same as most
localizations)
- Fix the account type, many should be liability current and not liability payable (otherwise the usage of these accounts affects the payable/receivable reports)

closes odoo/odoo#121579

X-original-commit: ba837dc3023327dd5bdb3cf579c59e76cbe73bbf
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-05-16 20:33:29 +02:00
stevTresCloudandAndres Calle c07d3a3882 [ADD] l10n_ec: Add 16 document for document mapping in invoices
- Add 16 document type for "in invoices" when partner type identification is RUC.

closes odoo/odoo#119870

X-original-commit: d5a1a1aa8c7e3af8bc07da90cd7aa39e2d0fd931
Signed-off-by: Josse Colpaert <jco@odoo.com>
Co-authored-by: Andres Calle <andres.calle@trescloud.com>
2023-05-11 13:55:01 +02:00
4c4493c3a1 [IMP] l10n_ec: update and upgrade
Overhaul of l10n_ec, developped in collaboration with the 3Cloud team

[Data improvements]
- Adds missing tax groups
- Adds VAT 8%, used for tourism operations on special hollidays
- Fixes base percentage on Withhold VAT taxes
- Corrects tax name from Iva to IVA
- Improves SRI paymment options, with sequence widget and inactavtes
deprecated payment options.
- Fixes short code of document types
- Corrects document type name for insurance
- Adds withhold document type, to be implemented in separated module
- Removes unused fiscal positions
- Removes unnecessary journals
- Desactivates unused payment methods
- Provides updated and improved translations

[Functional improvements]
- Automatic setup of several journals when creating new companies
- Adds restrictions to ensure proper setup of ecuadorian journals
- Improves ecuadorian journal form

closes odoo/odoo#113302

Task: 3011311
See: odoo/enterprise#33977
See: odoo/upgrade#4098
X-original-commit: c9568fbb7544ededb37f57892f930d198083c06f
Related: odoo/enterprise#37359
Signed-off-by: Josse Colpaert <jco@odoo.com>
Co-authored-by: Andres Calle <andres.calle@trescloud.com>
Co-authored-by: Josse Colpaert <jco@odoo.com>
Co-authored-by: Juan Daniel Álvarez <juan.alvarez@trescloud.com>
Co-authored-by: Steven Luna <steven.luna@trescloud.com>
2023-03-31 15:52:18 +02:00
Maximilien (malb) deee288909 [IMP] l10n_{latam_invoice_document,ec,ar,cl}: translate
In the following task (https://github.com/odoo/odoo/pull/112803) there is two commits. One of them remove a change made in the other by mistake. We did a PR in saas-16.2 to revert the impacted localisation (https://github.com/odoo/odoo/pull/116292). The goal of this pr is to add back the translation for latam invoice documents.

closes odoo/odoo#116224

Task-id: 3244168
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-03-23 19:13:49 +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
maximilien(malb) 10f9460d2b [IMP] l10n_ec: translation
Before this PR, all this localisation was written in spanish, but all the localisation have to be written in english and then translated back in the native language. This PR correct that.

closes odoo/odoo#109147

Task-id: 3119934
Signed-off-by: Laurent Smet <las@odoo.com>
2023-01-30 09:39:21 +01:00
Stanislas Gueniffey d111b4b343 [IMP] l10n_ec: user-friendly document number
Do not require user to type all digits of the document number
Instead, fill the dash-separated numbers with zeroes, as needed

closes odoo/odoo#90865

X-original-commit: 9ed26751bfbe84444f291835de5f47bbac3f7dde
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Stanislas Gueniffey (stgu) <stgu@odoo.com>
2022-05-09 14:03:16 +02:00
aliya 47cf4e8066 [FIX] l10n_ar, l10n_ec, l10n_pe: use fiscal country
Currently all latam localizations except Chile use country_id in _localization_use_documents().
account_fiscal_country_id should be used instead in all modules.

closes odoo/odoo#84756

Task: 2761248
X-original-commit: cf61089d9480d7450d2916911b0859cd5f6efcce
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Tastemirova Aliya (alta) <alta@odoo.com>
2022-02-17 09:06:57 +00:00
Christopher Ormaza 35a7c559f1 [FIX] l10n_ec: Make the VAT exception clearer
closes odoo/odoo#77999

X-original-commit: 86edaaf05a65181767e775ad355f528415c29887
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-10-07 13:09:33 +00:00
Christopher Ormaza 02e0a93e58 [IMP] l10n_ec: Ecuadorian Localization
- Chart of Account based on IFRS
- Validation for RUCs and CI for Ecuadorian VAT
- Taxes and Groups - minimum
- Initial Structure for 103 and 104 Reports to SRI
- Entity, Point of Emission, address of emission, and type of emission added to journal
- SRI payment methods, used on EDI Process
- Ecuadorian Banks data
- Latam Identification Types
- Latam Document Types Related

closes odoo/odoo#75055

Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-09-03 15:45:37 +00:00