Problem
---------
Before 16.2, the fields were empty, which meant that the expense and
income accounts of the chosen category could be used.
Since 16.2, when a product is created, the expense and income accounts
are automatically pre-filled.
Objective
---------
This task aims at retrieving the old behavior to allow using category
accounts.
Solution
---------
Remove the `property_account_expense_id` &
`property_account_income_id keys` in `_get_xx_template_data` in all
localization packages that define them.
task-3438931
closesodoo/odoo#134796
X-original-commit: dae46c926d5e63683968107f06bf2bfb8e07d267
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Antoine Boonen (aboo) <aboo@odoo.com>
These changes are made as a result of simplifying attrs and 'states' in
views.
Before applying the migration script, it is necessary to fix some views.
These views are erroneous and either work by chance or are simply
untested. We have for example wrong domains, elements used by modifiers
but not present in the view, obsolete domain operators, inherit views
not targeting the right views, xpaths using attributes as target, the
use of %(...)s in views, false attribute value types in python.
Part-of: odoo/odoo#104741
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
closesodoo/odoo#130733
Related: odoo/enterprise#45531
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
… entry
- These new accounts are to automate the tax closing entry on 103 and 104 reports.
- The tax names of account 11050201 is changed to a better accounting standard name for the understanding of the accounting accounts to be configured in the tax groups, based on the name of the new account group created.
- Accounts payable and receivable are added for each of the tax groups, by company. It's not set in chart template property accounts, because they are different accounts for each tax group. For this reason, the accounts are set in load chart template method.
- Add irbpnr tax group account
- Add Exchange Outflows accounts and fix ec translation for exchange outflows account
- Filter companies with EC chart template set
We needed to adapt to saas-16.2
closesodoo/odoo#132050
X-original-commit: f7b2ff2028490fd1cf97f8fa1bc5e7103fefaa34
Signed-off-by: Josse Colpaert <jco@odoo.com>
In the translation PR (odoo#109147), 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.
Also in this commit i've redone the taxonomy that has been overwritten by another
PR.
Task: 3369579
Part-of: odoo/odoo#125017
THese are rarely intended for all users but often intended only for
employees.
account:
account.incoterms: only used within internal business models
account.journal.group: same as account.journal, add sudo in computed field
account_edi: need access to accounting objects
base_address_extended:
res.city: only employees should access address data
board: only employees uses this (old) module
crm:
crm.stage: internal users business object
hr_recruitment: employees can read
im_livechat: apply same as for the steps
l10n_ar: used on partner, not only invoices
l10n_ec: accessed only through account.move
l10n_latam: accessed on res.partner
mail:
publisher.warrenty.contract: no data, only static models
mail.channel: group_user has already his own rule
mail.group: group_user has already his own rule
mail.message.subtype: group_user has already his own rule
mail.message.all: remove, already has a portal and employee rule
partner_autocomplete: no interaction with public
project:
project.tags: only needed for project sharing
sale_management:
sale.order.option: same as sale.order
utm: employee already has write access
web_editor: test models that have nothing to do here
web_tour: only employees uses tours
website_sale:
product.ribbon: add sudo for access
base:
ir.default: only employees uses set (could probably be converted to group_system)
ir.ui.view.custom: same as ir.ui.view, add sudo when needed
report.*: portal users don't configure reports
res.users.log: create in sudo, no access needed (adapt test to use another model)
res.lang: still needed for public
closesodoo/odoo#118701
Related: odoo/enterprise#41285
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
- 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
closesodoo/odoo#123708
X-original-commit: 19b9384867485ea5fc30bac9192a21a91335f567
Signed-off-by: Josse Colpaert <jco@odoo.com>
- Add missing account tag on repartition line taxes to fix the report 104 amounts for per tax
closesodoo/odoo#121588
X-original-commit: 368ef541466933dfe647150d58227c32035100e7
Signed-off-by: Josse Colpaert <jco@odoo.com>
- 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)
closesodoo/odoo#121579
X-original-commit: ba837dc3023327dd5bdb3cf579c59e76cbe73bbf
Signed-off-by: Josse Colpaert <jco@odoo.com>
Sales profit tax witholds should not affect the tax report 103, it should be empty
closesodoo/odoo#121317
X-original-commit: 2dd8dd999b93dafdee5054beb71a7348eaec4eb9
Signed-off-by: Josse Colpaert <jco@odoo.com>
- Add 16 document type for "in invoices" when partner type identification is RUC.
closesodoo/odoo#119870
X-original-commit: d5a1a1aa8c7e3af8bc07da90cd7aa39e2d0fd931
Signed-off-by: Josse Colpaert <jco@odoo.com>
Co-authored-by: Andres Calle <andres.calle@trescloud.com>
- Inactivate unused identification types: passport and unknown
- Fix website in the manifest to point to official documentation
- Fix data in some taxes
- Adds reimbursement taxes
closesodoo/odoo#114273
X-original-commit: 3ee5d7a0fbccae5f742e1aba8d3d24f8bab3cbdd
Related: odoo/enterprise#37747
Signed-off-by: Josse Colpaert <jco@odoo.com>
Co-authored-by: Andres Calle <andres.calle@trescloud.com>
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.
closesodoo/odoo#117005
Task-id: 3248632
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
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
closesodoo/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>
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 commit, we change the taxes name so that it's more clear and consistent for the users
Task-id: 3052677
Part-of: odoo/odoo#116384
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
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
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
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.
closesodoo/odoo#109147
Task-id: 3119934
Signed-off-by: Laurent Smet <las@odoo.com>
There is a lot of use case where reports are exclusively in the company
currency, or have columns only in this currency. In these case, showing
the currency symbol is redundant, takes space and makes the reading
slower.
With this change, we will avoid displaying the symbol in a variety of
use case where it is not needed.
Task id #2868674closesodoo/odoo#109666
Related: odoo/enterprise#35671
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
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 #99572closesodoo/odoo#102032
X-original-commit: 591757902dcdf1e3609d9c5ae23e2b134ee8e4da
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
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
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
closesodoo/odoo#93212
Related: odoo/documentation#2223
Related: odoo/upgrade#3595
Related: odoo/enterprise#28205
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
There was a problem loading the demo data, because at the
installation of the CoA, the document types had not been loaded
yet. By changing the order in which the files are loaded
in the manifest, we make sure that the when we upgrade the demo
data to Ecuadorian standards that the right document type is set.
(as it will be there because it will be loaded before the loading
of the demo data)
closesodoo/odoo#92889
X-original-commit: a641cfb470c5454a8772851f1f9c6c0271b23774
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
Because of the change in order of operations, for the main company
when we install e.g. l10n_ec, the CoA installed is the Ecuadorian
one, which makes the fiscal country EC, but the country_id still US.
We suspect https://github.com/odoo/odoo/blob/7cb109e7b0ee2e46cef79ec7d3076d16715567f9/addons/account/models/chart_template.py#L278
for the change in behaviour as the generic coa does not have US as
company anymore and that somehow led for the sales journal to
require to use document types. (there we use the fiscal country which
is set to Ecuador)
The solution anyhow here, is that for the demo data, we should
use the fiscal country as well to see if we need to add the
document type to the demo invoices or not.
closesodoo/odoo#92772
X-original-commit: 40dab08559d5b4c837589ce96d6d7ce23f14fd98
Signed-off-by: William André (wan) <wan@odoo.com>
Do not require user to type all digits of the document number
Instead, fill the dash-separated numbers with zeroes, as needed
closesodoo/odoo#90865
X-original-commit: 9ed26751bfbe84444f291835de5f47bbac3f7dde
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Stanislas Gueniffey (stgu) <stgu@odoo.com>
Remove most values uselessly specified because giving the same value as
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)
* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default
This will reduce noise/inconsistencies between manifests specifications,
simplify analysis of manifests content, ...
closesodoo/odoo#90209
Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Currently all latam localizations except Chile use country_id in _localization_use_documents().
account_fiscal_country_id should be used instead in all modules.
closesodoo/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>
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)
closesodoo/odoo#84280
Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
Before when you installed one localization e.g. PE, but then you would
install another one with a demo company, then that demo company's demo invoices
might have adapted to the structure of PE, while it might be for another
country.
In the meantime we check that the necessary latam_document_numbers are set.
closesodoo/odoo#82998
X-original-commit: bef38eaee0e389554d35fede53a1224b72271d7f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
Many changes involved several localizations.
Tax groups data files that were missing the country_id:
AR, AU, EC, ET, HR, HU, IT, JP, LU, MN, NZ, SI, UK, ZA
Account_data.xml files being renamed or split to account_tax_group.xml
AT, CH, CL, PE, SK
Tax templates that were missing tax group information:
CH
Tax groups missing that were added:
EC
Part-of: odoo/odoo#77295
- 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
closesodoo/odoo#75055
Signed-off-by: Josse Colpaert <jco@openerp.com>
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.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
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
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.
closesodoo/odoo#65329
Taskid: 2442631
Related: odoo/enterprise#16054
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>