The summary is a short char field. It should not contain carriage
returns.
The description is the longer text field.
Remove unnecessary spaces in both.
Automatically dedent the description to avoid this issue poping up
again in future modules.
closesodoo/odoo#138214
Related: odoo/enterprise#48695
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Problem
---------
In master, XML attributes have been modifed from attrs={'invisible':...}
to invisible=. During the conversion, the condition where not properly
cleaned up.
Objective
---------
Clean up the XML attributes.
Solution
---------
Reduce conditions by removing unecessary elements:
- `fiscal_country_codes` always returns at least an empty string.
- All country codes are in capital letters, no need to `lower` them.
task-3493124
closesodoo/odoo#134329
Related: odoo/enterprise#46920
Signed-off-by: Josse Colpaert <jco@odoo.com>
before this commit, the website link given to
l10n module was generic link of fiscal
localization.
after this commit, on clicking website/learn more
user will be redirected to documentation of specific
country localization.
closesodoo/odoo#135725
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Steps to reproduce:
- Create new SaaS database and set country to Philippines
Current behaviour:
- Fiscal Country is United States
Expected behaviour:
- Fiscal Country should be Philippines
task-3474384
closesodoo/odoo#133619
X-original-commit: 0f373827ac349bbf3b52360e9b6d8869f595a869
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
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>
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.
task-3370463
closesodoo/odoo#127469
Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.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 PR, we change the taxes name so that it's more clear for the users
closesodoo/odoo#114811
Task-id: 3052677
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.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>
Register a ph contact with vat 123-456-789-012
Validation Error will raise
Currently we use check the PH vat against regexp \d{3}-\d{3}-\d{3}-\d{5}
This seems to be not correct according to the official documentation
https://serp-p.pids.gov.ph/publication/public/view?slug=taxpayer-identification-number-tin-its-development-and-importance-in-tax-administration
"""
12 digit number (E.g. 123 456 789 002), of which the first digit
identifies type of taxpayer (0 for corporations, 1-9 for individuals
and other businesses), second to eighth digits are sequential numbers
between 0 and 9, ninth digit is a check number, last three digits are
000 for individuals and head office of businesses and 001-999 for
branches of businesses, if any
"""
The TIN should be a 9 digit code + 3 for the branch code
opw-3141793
closesodoo/odoo#116491
X-original-commit: f0e9a3ce7fec9bb86b8703a6d49c0bc70c80d5c3
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
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
install l10n_ph module and open any vendor bill, click on action button and click Download BIR 2307 XLS, in the opening wizard, the one2many field moves_to_export is not aligned well in the form due to missing colspan and currently the field is too compact in the form.
closesodoo/odoo#108094
X-original-commit: 53ffdccc0310c32980297d5dcc3f6a24fa852a8c
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Many country-specific fields were displayed while a company with another country was selected (in case of a multi-company environment).
These country-specific fields are now visible only if one of the selected companies with said country is selected.
closesodoo/odoo#106221
Related: odoo/enterprise#34226
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Traceback when computing taxes using TaxCloud.
Steps to reproduce:
-Activate TaxCloud in accounting settings, with valids "API ID" and
"API KEY".
-Create an invoice for a USA customer with an invoice line and
"Fiscal Position" set to "Automatic Tax Mapping (TaxCloud)" (in the
"Other Info" tab).
-Confirm
-->Traceback
Traceback:
File
"/src/enterprise/16.0/account_taxcloud/models/taxcloud_request.py",
line 136, in get_all_taxes_values
for item in response.CartItemsResponse.CartItemResponse:
AttributeError: 'NoneType' object has no attribute 'CartItemResponse
Explanation:
-There's a traceback when CartItem is empty (like if there are no move
lines).
-It is empty because of the filter in the function
'_process_lines(self, lines)'.
--> 'lines.filtered(lambda l: not l.display_type)'.
-The goal is to take only move lines that are not Notes or Sections.
-This worked in v15 because display_type was defined as:
display_type = fields.Selection([
('line_section', 'Section'),
('line_note', 'Note'),
], default=False, help="Technical field for UX purpose.")
-But now in v16 it is defined as:
display_type = fields.Selection(
selection=[
('product', 'Product'),
('cogs', 'Cost of Goods Sold'),
('tax', 'Tax'),
('rounding', "Rounding"),
('payment_term', 'Payment Term'),
('line_section', 'Section'),
('line_note', 'Note'),
('epd', 'Early Payment Discount'),
],
compute='_compute_display_type', store=True, readonly=False,
precompute=True, required=True,
)
-The display_type=False does not corresponds anymore to move lines
that are not Sections or Notes, but it corresponds to no move lines at
all.
The fix:
Will filter move lines that are not of type 'line_section' or
'line_note'.
Discussion:
Do I fix the traceback that we get when there a no move lines? This
'issue' is present since at least v14 and it seems like nobody ever
complained.
+:
I've applied the similar change to some lines in the code that also
check if 'display_type' is False for some 'account.move.line' records.
++:
The fix revealed an other issue in the function
'_inter_company_create_invoices' of the file
enterprise/account_inter_company_rules/models/account_move.py:
There's a call on a function that doesn't exist anymore
'line._set_price_and_tax_after_fpos()'. I've deleted the line.
opw-3064174
closesodoo/odoo#106452
X-original-commit: 8bfca5832adaf9e147f2443d0bf56cf921f9ff0c
Related: odoo/enterprise#34352
Signed-off-by: William André (wan) <wan@odoo.com>