Commit Graph
314 Commits
Author SHA1 Message Date
Julien Carion (juca) 085d7d484d [REF] base: Remove res.company favicon field
This commit simply removes the res.company favicon field and every
related code because the feature is obsolete

closes odoo/odoo#116367

Related: odoo/upgrade#4469
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-03-28 13:43:28 +02:00
Yannick Tivisse d8c9c8d10b [FIX] base: Handle portal user deletion separately
Purpose
=======

Improve the portal user deletion by preventing timeouts and
avoiding several rollbacks causes.

Specifications
==============

- Move the portal users deletions from autovacuum to its own cron.
  On big databases such as odoo.com, deleting a res.users takes
  more than 1 minute. Move the whole process into its own scheduled
  tasks.
- Commit the deletion at each user. As said previously the deletion
  can be expensive, so commit what has been done to avoid having to
  delete the same user again in case of rollbacks or timeout.
- Delete the user and the partner separately. If the partner is used
  in a sales order for instance, the unlink is possible for the user
  and not the parner. It allows to unlink the user and keep the
  partner in case it cannot be deleted.
- Re-call the cron into another transaction in case there are too many
  users to delete, instead of waiting next call, that is supposed
  to occur the day after.

Taskid: 3222941
Part-of: odoo/odoo#114656
2023-03-13 13:13:47 +01:00
Petar Najman fd5a082984 [FIX] base: Invalid flag image url computed for Serbian lang sr@latin
When computing flag_image_url field on res.lang model an invalid url is generated due to the peculiar format for serbian lang code sr@latin which has "@" sign instead of expected "_" sign and thus the unexisting url is computed, so we are forced to populate binary field flag_image instead.

X-original-commit: 85db3773ba475a143a99126c6c24b404bdd39d0b
Part-of: odoo/odoo#114565
2023-03-13 10:53:00 +01:00
Victor Feyens 24ccf7d9b0 [CLN] *: useless type info for actions
The type fields of actions already defaults to
the model name in the base model definition.

Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).

closes odoo/odoo#114539

Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-03-08 17:33:37 +01:00
Antoine (ande) 961faf9d31 [FIX] base: wrong CH state name
To reproduce the issue:
1. Go to 'res.country.state.csv' in base
2. state_ch_sh is "Shaffhausen"

Error: should be "Schaffhausen"

State code is still SH because
ISO 3166 code for this state is CH-SH

OPW-3199628

closes odoo/odoo#114202

X-original-commit: 245804aabb5cd8b3a84b2a4836b188ec9fb144e1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-03-02 18:18:50 +01:00
Ivan Yelizariev a1187c5140 [FIX] base: update currency symbol for EGP
LE is most commonly used today.

opw-3188129

closes odoo/odoo#114094

X-original-commit: e901ee541407b70fee8bad0d6adc80e0726079d2
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-03-02 16:01:11 +01:00
MerlinGuillaume 25d7d3327d [FIX] base: change default Norwegian date format
The date format set on the Norwegian language is not kept when we click
on date fields

Steps to reproduce:
1. Install Sales
2. Install and switch to Norwegian language
3. Open Sales and create a new quotation
4. Click on the 'Quotation Date' field
5. The date format is changed from '%d. %b %Y' to '%Y/%m/%d'

Solution:
Change the default Norwegian date format to a valid static format
The format used comes from babbel[^babbel], double checked with the
Norwegian locale[^nb.js]
[^nb.js]: https://github.com/odoo/odoo/blob/16.0/addons/web/static/lib/moment/locale/nb.js#L25
[^babbel]: https://www.babbel.com/en/magazine/how-to-write-the-date-in-norwegian

Problem:
The old date format didn't pass the `isValidStaticFormat` test of the
date picker, so the default format 'yyyy/MM/dd' was used instead

opw-3191605

closes odoo/odoo#113926

X-original-commit: c27226e13392207811b61aceb3c77d1e9fcc180d
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-03-01 08:51:20 +01:00
Davor Bojkić - Bole 6900eba5bf [FIX] obvious change , as it is valid since 1.1.2023
closes odoo/odoo#113492

X-original-commit: dfcc91ca1844abd284386e55d1d3700ca66b4148
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-02-27 08:41:42 +01:00
ren-odoo 55b4df5515 [IMP] base: add vat_label to Chile and Peru
VAT in Chile is called RUT. This document is used by companies, individuals are identified with the RUN (Unique national registration), this identification is being handled with the module l10n_latam_base.
Reference: https://www.sii.cl/destacados/erut/paraque_sirve.html

VAT in Peru is called RUC. This document is used by companies, individuals are identified with the DNI (National Identification Document), this identification is being handled with the module l10n_latam_base.

closes odoo/odoo#113323

Reference: https://ww3.sunat.gob.pe/ol-ti-itinsrucsol/iruc001Alias#:~:text=El%20Registro%20%C3%9Anico%20de%20Contribuyentes,relevante%20de%20los%20 sujetos%20 inscritos
X-original-commit: 64a55adbabc0d3d525274aff45ad2ccc66c7cfbc
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-02-23 18:28:52 +01:00
Dani Baumann 70aecd60b2 [IMP] add Swiss states
closes odoo/odoo#112670

X-original-commit: 57874beb5d0c2e2605f33d34ff19e78536a2b748
Signed-off-by: William André (wan) <wan@odoo.com>
2023-02-14 17:09:59 +01:00
Dylan Kiss (dyki) 8095e3f1e2 [FIX] base: change US tax id label
Since 16.0 the `Tax ID` field label is dependant on the company country.
For the US we chose `EIN` as the label.
Since there are multiple sources of tax ids in the US, it is better to leave it as the default: `Tax ID`.

task-3162675

closes odoo/odoo#112561

X-original-commit: f6846f5b9dcae6a0a9e26f3b847593a2e8a3222b
Signed-off-by: William André (wan) <wan@odoo.com>
2023-02-14 00:43:00 +01:00
gawa-odoo 29a8d65013 [FIX] base: add German states
We need German states when formatting the 'SteurNummer'.
So we provide it so the user can select his, instead of having to
 create them by hand.

task-3056694
opw-2974560

closes odoo/odoo#111932

X-original-commit: 6c8f3dc4fdffa167680f3a234a13b028c2f54a3b
Related: odoo/enterprise#36703
Signed-off-by: William André (wan) <wan@odoo.com>
2023-02-03 22:52:14 +01:00
Mohammed Erradi (moer) 94d6e8b474 [FIX] l10n_ch: Correct export fiscal position for LI
The aim of this commit is to fix the export fiscal position for invoices between Switzerland and the Principality of Liechtenstein in the Swiss localization.

context:
This commit corrects the Swiss national fiscal position, in accordance with legislation that considers Switzerland and Liechtenstein to be a common fiscal territory of application for VAT.

Previous to this commit:
- When the use create an invoice with a customer from Liechtenstein, the correct VAT is not applied because transactions to Liechtenstein were considered as export transactions.

After this commit:
- When the use create an invoice with a customer from Liechtenstein, the correct VAT is applied because transactions to Liechtenstein are considered as domestic transactions.

closes odoo/odoo#111578

Task-id: 3151891
X-original-commit: 773ad35af4b4d6d8ec608875ded6b5f22ecad1dd
Signed-off-by: Erradi Mohammed (moer) <moer@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-02-01 14:38:18 +01:00
Dylan Kiss (dyki) 8889a896f3 [FIX] base: update Spanish address format
Currently the Spanish address format does not include the province/state.

This change adds the province between parentheses after the zip code and city.

task-3147965

closes odoo/odoo#111012

X-original-commit: 2c31ad84137b3a764116bea6a6d765a2c7d03eb7
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2023-01-25 19:52:43 +01:00
niyasraphy 73c40e01a7 [IMP] base: list sale_amazon in community with upgrade
before this commit, the sale_amazon module is not listed in community instance with upgrade button.

after this commit, the sale_amazon module will be listed in community apps list with upgrade button similar to sale_ebay module.

closes odoo/odoo#110447

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-24 13:47:04 +01:00
aliya aebd1a2c7e [FIX] base: add kz to EEU country group
EEU is missing KZ among the member countries, this commit fixes this omission.

closes odoo/odoo#109936

Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-16 18:14:56 +01:00
Robert Coleman 4fab501a25 [IMP] base: add vat_label to New Zealand
VAT in New Zealand is called GST. New Zealand entities are issued IRD numbers and when registered for tax their IRD number is used as GST number.

> from: https://www.business.govt.nz/tax-and-accounting/basic-tax-types/gst

> For sole traders, your GST number will be the same as your IRD number.
> For partnerships and companies, it’s the same as your partnership or company IRD number.

GST number is legally required on all tax invoices (https://www.ird.govt.nz/gst/tax-invoices-for-gst/how-tax-invoices-for-gst-work)

I have added the VAT label as IRD/GST so that it's clear wherever else VAT label is used that the same number fits both contexts (rather than introducing a second field for identical data through NZ l10n).

closes odoo/odoo#109800

X-original-commit: 8ac78c222ae93e000a43c71ac9e359a8542f8cff
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-13 17:32:41 +01:00
aliya 85de8a8f9c [ADD] l10n_kz: add l10n_kz accounting localization
Adds a Chart of Accounts, taxes, and a demo company for Kazakhstan.
- The Chart of Accounts is added according to the official documentation:
  https://adilet.zan.kz/rus/docs/V070004771_
- The Tax report is added according to this documentation:
  https://adilet.zan.kz/rus/docs/V14E0010156

task-2693102

closes odoo/odoo#105399

Related: odoo/enterprise#33941
Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-05 09:30:04 +01:00
niyasraphy 23bc24873d [ADD] base: add Malayalam language
closes odoo/odoo#109027

X-original-commit: 7d189be63fa9b126ea93cc2d7c3433c50b6b0d89
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-03 20:15:14 +01:00
niyasraphy e0c02f534b [FIX] base: unify button name, Install => Activate in views, action
currently in the kanban view of the apps, the install button is renamed to activate from https://github.com/odoo/odoo/commit/c70984f4031612d64872fcc12e89c35f03e7d2b2 , but still in the form and action(in tree), button is still labelled as Install, so unifying the label of button to Activate in tree, form and action.

closes odoo/odoo#107907

X-original-commit: 26935d67e62649c10ed907e4a730b8f5ab1f127f
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-14 22:04:09 +01:00
Denis Ledoux 3752b3166e [REF] base: set USD as default currency for the main company
There are three rationales behind this change to set USD as default
currency and to enable it in the demo data, from the beginning.
With a demo database, before this revision:
1. On runbot, with all modules installed, it's already USD the default
   company currency. It's only when you install a module not depending
   on account that it's EUR the company currency by default (e.g. CRM)
2. in the base demo data,
   the company is set in the United States but with the currency EUR,
3. before installing account, the company currency is EUR,
   after installing account, the company currency is USD,
   this is due to the fact as the company is in the United States,
   the US Chart Of Account is installed, switching the company currency
   to USD.
4. when you install a demo database with a module not depending on
   account, you are left with a database without any active currency,
   and the monetary fields therefore do not show any currency.
   For instance, install only CRM with demo,
   you have no currency symbol before or after the expected revenue,
   which is not the best user friendly experience.
   On runbot you do not feel it because all modules are installed,
   therefore with account installed, which activated the USD currency.

Additional weird thing with point 2.:
- Unit tests in modules not dependent on account with the
  post-install tag had to handle this sudden change of currency change
  before and after installing account.
  For instance, when running their unit tests with only their module,
  but not account, the company currency is EUR,
  but when executing the same unit test with all modules installed,
  the company currency is USD.
  The unit tests had to handle this sudden change within the unit test,
  for instance by setting a 1.0 rate for their own company currency,
  which shouldn't be the case: the rate of your own currency should
  always be 1.0.

closes odoo/odoo#107113

Related: odoo/enterprise#34613
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-12-13 11:47:49 +01:00
Denis Ledoux e0ed9d48f0 [REM] base: remove useless demo file naming the company "Probike"
The only purpose of this demo data file `res_company_demo.xml
is to name the main company "Probike Inc".

But it gets renamed right after
when the file `res_users_demo.xml` gets loaded,
to "YourCompany":
- the name of the company is a related field
  to its partner name,
- the partner of the `main_company` is `main_partner`
- `res_users_demo.xml` sets the name of `main_partner` to `YourCompany`
- Hence, the name of the main company becomes `YourCompany`

This file is therefore completely useless and can be removed.

In the time, it did serve a purpose:
- the file has been created during a refactoring
  splitting the demo data files by model
  https://github.com/odoo/odoo/commit/52dc556a154df85ffee5b4d79ede4afde7483433#diff-dce2e6a784266e4c04dc0cf7654755e112868fe1c363c08bd1b303b1f4314e15R4-R7
- it was useful because it was also used
  to set the `external_report_layout` field of the main company.
  Though setting the name at the time was already useless,
  as it was already a related field to the partner name,
  which was already set to "YourCompany" a few lines above.
  https://github.com/odoo/odoo/commit/52dc556a154df85ffee5b4d79ede4afde7483433#diff-0ce7a512101e6ee40c38779735dd09a33dde136b2e582eb77b6db19322fa9295L24
- the file became completely useless when this field `external_report_layout`
  has been removed from this file
  https://github.com/odoo/odoo/commit/61eef73b52c078daaae37f8d57e93830a2e53410#diff-dce2e6a784266e4c04dc0cf7654755e112868fe1c363c08bd1b303b1f4314e15L6

closes odoo/odoo#107019

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-12-01 18:31:08 +01:00
niyasraphy 4e1493fb72 [IMP] base: show knowledge and social module in community
Do like other enterprise modules in Odoo and display missing main applications
from enterprise in community: social and knowledge.

SPECIFICATIONS

Create `ir.module.module` records for knowledge, social and appointment apps
in Odoo Community, so that users searching for those apps can see them in the
correct category with the correct icon. They can then be redirected to Odoo
website for more information about the module or an upgrade plan to use the
enterprise version.

Knowledge
  * create the record
  * use the module_category_productivity category

Appointment
  * update the record to use the new icon
  * use the module_category_marketing category (instead of sales)

Social
  * create the record
  * use the module_category_marketing category

Task-3054412

closes odoo/odoo#106580

X-original-commit: 9ada5587552d50ba4731a2401d4c18589f1d59a5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-25 18:55:52 +01:00
Dylan Kiss (dyki) 5a6404a3a6 [FIX] l10n_au: adapt taxes, tax groups and terms
This change fixes some (redundant) taxes, tax groups and specific terms for Australia.

[task-2989002](https://www.odoo.com/web#id=2989002&cids=1&menu_id=4720&action=4043&model=project.task&view_type=form)

closes odoo/odoo#106194

X-original-commit: afb9539d3b900b25871d9b34aa41ede3f1337648
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2022-11-25 09:53:08 +01:00
Nurlan Farajov 7e35138b68 [ADD] base: add Azerbaijani language
closes odoo/odoo#106000

X-original-commit: 151e3b5944210a1e5e8beb11b943f23f55ec8f9f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-20 10:37:11 +01:00
Tommy (tong) 9ed41b2bd7 [IMP] base: add Malay language
Purpose
=======
Add Malay language for Malaysian Localisation.

X-original-commit: 9dcb35a62b7d23249442a9ab045e88cb57165208
Part-of: odoo/odoo#104734
2022-11-04 09:52:54 +01:00
Thibault Delavallée aa323c3e36 [FIX] base, snailmail: Swaziland is now Eswatini
Swaziland was renamed to Eswatini in 2018. Time to update naming in Odoo.
We choose to make it in 16 as

  * it is the newest stable, not much people are using it in production, aka
    most people will have the updated name;
  * there is no need to rename it for all production databases previously
    as if used, it is easy to update its naming from Odoo directly;

Cheers !

X-original-commit: 4f97baa5b4d01b4510f0adc7064ec2846612a481
Part-of: odoo/odoo#104770
2022-11-03 08:42:51 +01:00
Laurent Desausoi 7593c073d2 [IMP] core: use inert SQL based neutralization
Before this commit the neutralize system introduced in v16 was using ORM
methods in order to change appropriate records. Although flexible, this approach
could lead to call some methods with side effects while neutralizing
(eg: overloads of write).

This patch converts the neutralize system to a safer "inert" SQL based approach
by migrating the generic method _neutralize to SQL files exposed in the
data folder.

Task id: 2961687

closes odoo/odoo#102792

X-original-commit: e5dbded9bb363351feff7ca8a56c7f8a6860f492
Related: odoo/enterprise#32580
Signed-off-by: Fabien Meghazi <fme@odoo.com>
2022-10-09 22:04:00 +02:00
Ernad Husremović 871c430c47 [FIX] base: Bosnian language settings
Uses the non-SI continental style (groups of 3 digits, comma decimal
separator, period group separator).

Closes #101723

closes odoo/odoo#101888

X-original-commit: 10b89303dfec2b668ad896ac36627741dddde708
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-10-03 15:18:52 +02:00
Alexis de Lattre 293d0a9cb4 [IMP] base: rename country group "Europe" to "European Union"
Given the group only contains EU27 members and the UK was specifically removed in 52cdfd22d7 it seems clear this group represents the European Union speifically rather than any other interpretation of "Europe".

Rename the group to match.

closes odoo/odoo#101051

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-09-26 08:38:42 +02:00
Stanislas Gueniffey 7e4cc134c6 [IMP] base: add vat_label for EC (Ecuador)
So far the vat_label was missing in res_country_data.xml.
This defines the official name for the local Tax ID (called "RUC").

closes odoo/odoo#100650

X-original-commit: 53b0ff01535c10d31102e9087d9e5196fa261630
Signed-off-by: Laurent Smet <las@odoo.com>
2022-09-23 17:20:06 +02:00
Edi Santoso 5b3d34b61c [IMP] base: add new province for Indonesia
Indonesia officially added new province. Papua Selatan, Papua Tengah, Papua Pegunungan.

closes odoo/odoo#100980

X-original-commit: 9d047bfac876f814f46cf212d2be44614a8e7a71
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2022-09-23 14:36:49 +02:00
ef00294e71 [IMP] core: store translated fields as JSONB columns
Translated fields no longer use the model ir.translation.  Instead they store
all their values as JSON, and store them into JSONB columns in the model's
table.  The field's column value is either NULL or a JSON dict mapping language
codes to text (the field's value in the corresponding language), and must
contain an entry for key 'en_US' (as it is used as a fallback for all other
languages).  Empty text is allowed in translation values, but not NULL.

Here are examples for a field with translate=True:

    NULL
    {"en_US": "Foo"}
    {"en_US": "Foo", "fr_FR": "Bar", "nl_NL": "Baz"}
    {"en_US": "Foo", "fr_FR": "", "nl_NL": "Baz"}

Like before, writing False to the field makes it NULL, i.e., False in all
languages.  However, writing "" to the field makes its value empty in the
current language, but does not discard the values in the other languages.

Here are examples for a field with translate=xml_translate:

    NULL
    {"en_US": "<div>Foo<p>Bar</p></div>", "fr_FR": "<div>Fou<p>Barre</p></div>"}

Change for callable(translate) fields: one can now write any value in any
language on such a field.  The new value will be adapted in all languages, based
on the mapping of terms between languages in the old values.  Basically the
structure of the value must remain the same in all languages, like before.

Reading a translated field is now both simpler and faster than the former
implementation.  We fetch the value of the field in the current language by
coalescing its value with the 'en_US' value of the field:

    SELECT id, COALESCE(name->>'fr_FR', name->>'en_US') AS name ...

The raw cache of the field contains either None or a dict which is conceptually
a subset of the JSON value in database (except for missing languages).  For the
sake of simplicity, most cache operations deal with the dict and return the text
value in the current language.

Trigram indexes have been adapted to the new storing strategy, and should enable
to search in any language.  Before this change, only the source value of the
field ('en_US') could be indexed.

Computed stored translated fields are not supported by the framework, because of
the complexity of the computation itself: the field would need to be computed in
all active languages.  We chose to not provide any hook to compute a field in
all languages at once, and the framework always invokes a compute method once to
recompute it.

Code translations are no longer stored into the database.  They become static,
and are extracted from the PO files when needed.  The worker simply uses a cache
with extracted code translations for performance.  This is reasonable, since
fr_FR code translations for all modules takes around 2MB of memory, and the
cache can be shared among all registries in the worker.  Changing code
translations requires to update the corresponding PO file and reloading the
worker(s).

Performance summary:
 (+) reading 'model' translated fields is faster
 (+) reading 'model_terms' translated fields is much faster (no need to inject
     translations into the source value)
 (+) searching translated fields with operator 'ilike' is much faster when the
     field is indexed with 'trigram'
 (+) updating translated fields requires less ORM flushing
 (-) importing translations from PO files is 2x slower

Some extra fixes:
 - make field 'name' of ir.actions.actions translated; because of the PG
   inheritance, this is necessary to make the column definition consistent in
   all models that inherit from ir.actions.actions.
 - add some backend API for the web/website client for editing translations
 - move methods get_field_string() to model ir.model.fields
 - move _load_module_terms to model ir.module.module
 - adapt tests in test_impex, test_new_api
 - because env.lang is injected into SQL queries, its returned value is
   now guaranteed to correspond to a valid active language or None
 - remove wizard to insert missing translations (no longer makes sense)

task-id: 2081307

Co-authored-by: Fabien Pinckaers <fp@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2022-09-15 22:37:50 +02:00
Horacio Tellez f7b8f07501 [IMP] payment: rename of acquirer to provider
Changing the name of model payment.acquirer to payment.provider
and everything that it touches. It is technically incorrect to
use the term "acquirer" for systems that only provide a service
of payment.
After this commit the model payment.acquirer and all related to
it will be renamed to payment.provider.

Task - 2842088

closes odoo/odoo#90899

Related: odoo/upgrade#3542
Related: odoo/documentation#1981
Related: odoo/enterprise#27131
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-09 13:38:08 +02:00
Romain Derie a462d87c4b [FIX] *: set correct type on html field in xml created records
When a record is created through xml data, its HTML fields should
receive a `type="html"` attribute, not a `type="xml"` attribute.

When important XML data with XML type instead of HTML type will have 2
differences:
- The field value will be prefixed by `<?xml version="1.0"/>`
- If the HTML contains multiple root nodes, the value will be wrapped in
  a `<data/>` tag.

See `_fix_multiple_roots()` and the `xml_import` class for more details.

closes odoo/odoo#98239

Related: odoo/enterprise#30491
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-19 11:52:49 +02:00
Tommy (tong) dcda0b8b56 [FIX] base: round TWD at unit's place
Issue:

 - Rounding should be done at the unit's place for New Taiwan dollar.

Solution:

 - Round TWD at unit's place

closes odoo/odoo#98116

X-origianl-commit: f9638a7
X-original-commit: b36689fea400f56f1c6a1b473ac9ceb793456f5b
Signed-off-by: Laurent Smet <las@odoo.com>
2022-08-16 13:52:18 +02:00
Vincent Schippefilt 9a5d575406 [IMP] base: unused fields in ir_module_dependency
The table ir_module_dependency was created manually with tracking fields,
but the CRUD was done manually, without the ORM.
Removing the fields that are always null will not have any impact
whatsoever but we should still do it to be correct.

closes odoo/odoo#89268

Related: odoo/upgrade#3455
Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-06-16 18:31:56 +02:00
Dossogne Bertrand 605a3c1e44 [IMP] hr_*: uniformize group category
*:
approvals
hr_apprasaisal
hr_payroll
hr_referral
fleet
hr
hr_attendance
hr_holidays
hr_recruitment
lunch

Change various access rights names to improve understandability for users.
Addition of an officer role in fleet with intermediate accesses

TaskID 2742855

closes odoo/odoo#87545

Related: odoo/enterprise#25741
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-03 14:38:19 +02:00
MAHAMADASIF ANSARI f00c443350 [IMP] base: update industry list
In the current version, some industries are named things like `Administrative`,
`Food`, and `Transportation`, and do not have the proper space and dash after
the first alphabet in full name.

This commit renames the above industries to `Administrative/Utilities`,
`Food/Hospitality`, and `Transportation/Logistics` respectively, and also adds
 space after comma and semicolon according to 'NACE' rules, and also adds a dash
 after the first alphabet in the full name.

task-2674365

closes odoo/odoo#88555

Related: odoo/upgrade#3442
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-04-27 10:03:57 +02:00
Fabien Pinckaers e045e76e35 [IMP] base: reduce new DB size by ordering columns
Postgres is aligning columns to 4 or 8 bytes, depending on their type.
So, consecutive fixed-length columns of differing size will be padded
with empty bytes due to the alignment requirements.

Before this patch, columns where created in their definition order. Now,
they are ordered based on their size, in order to minimize the padding.

As an example, before each row uses 36 bytes (+24b header):

       attname   |  typname  | typlen
    -------------+-----------+--------
     id          | int4      |      4
     create_uid  | int4      |      4
     create_date | timestamp |      8
     write_uid   | int4      |      4    -> 4 bytes padding
     write_date  | timestamp |      8
     active      | bool      |      1    -> 3 bytes padding

After each row uses 32 bytes (4 bytes saved per row):

       attname   |  typname  | typlen
    -------------+-----------+--------
     id          | int4      |      4
     create_uid  | int4      |      4
     write_uid   | int4      |      4
     active      | bool      |      1    -> 3 bytes padding
     create_date | timestamp |      8
     write_date  | timestamp |      8

This saving scheme applies to all rows in all tables. We save between 4
and 8 bytes per row just on the usual create_uid, create_date,
write_uid, write_date.

closes odoo/odoo#87896

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-04-05 17:17:27 +02:00
Laurent Desausoi (lade) b1d21f126a [FIX] base: Change state_id DIF to CMX for Mexico City
There has been a change in the code for the state_id for Mexico City. Since the beginning of 2022, the new code is CMX instead of DIF.

opw-2801208

closes odoo/odoo#87419

X-original-commit: fd72db46667e4e612a0f1d70a9e3e3ccf163de43
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Desausoi Laurent (lade) <lade@odoo.com>
2022-03-29 12:00:00 +02:00
Randall Castro 8930aa08ab [FIX] base: state codes for Costa Rica fixed
According to Costa Rica INEC (Instituto
Nacional de Estadística y Censo) governmental
institution entrusted with the running of
censuses and official surveys in the country
and Ministerio de Hacienda (Government Ministry
of Costa Rica in charge of governing the fiscal
policy on public resources, according to the
principles of economy, efficiency and
effectiveness).

INEC reference:
Topic 3. Codificación detallada de la DTA,
calificación de grado de urbanización y
región de planificación.
[Codificacion y Clasificacion](https://www.inec.cr/sites/default/files/documetos-biblioteca-virtual/meinstitucionalmcgfecr.pdf)

Ministerio de Hacienda reference:
[Codificacion](https://www.hacienda.go.cr/ATV/ComprobanteElectronico/docs/esquemas/2016/v4.1/Codificacion,canton,provincia,distritoybarrio.pdf)

closes odoo/odoo#87034

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-03-23 11:00:07 +01:00
Sadegh Ismael Nattaj 5b023efd68 [FIX] base: correct Persian language's native name
Persian language native name misspelled as "فارس" instead of "فارسی"

closes odoo/odoo#86225

X-original-commit: 073affad1595ca011f8af95be759bfc656cffe7e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-03-11 05:46:02 +00:00
Vincent Schippefilt e5523f06ce [FIX] base: unique module name declared twice
before this commit, there was 2 unique indexes on module name
after this commit, only 1 unique index remains (the one declared in base/ir_module.py) to keep the error message

closes odoo/odoo#85116

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-02-22 15:20:13 +00:00
Goffin Simon 669976db67 [FIX] base: The symbol ANG must be before the amount
REF:https://www.xe.com/currency/ang-dutch-guilder/

opw:2690166-

closes odoo/odoo#80188

X-original-commit: e84af51ffbb550d069288e498e96604cb610443e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-11-24 15:49:11 +00:00
baa 6cd586d190 [FIX] base: missing Saudi Arabia in the gcc country group
closes odoo/odoo#78412

X-original-commit: 0a166956229544d9febe294c254cc578fd8b9f6e
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-10-14 19:18:48 +00:00
baa b21e0c19c5 [IMP] base: adding new country group for the Gulf Cooperation Council (GCC)
X-original-commit: a20db564ae44baf843e3dc0c81a77e88ee13d9d4
Part-of: odoo/odoo#77960
2021-10-11 09:02:25 +00:00
Manuel Fombuena 31fda28b95 [FIX] base: en_GB, week_start: Monday
Monday is commonly accepted as the first day of the week in the UK.

Listed as first option on https://www.unicode.org/cldr/cldr-aux/charts/29/supplemental/territory_information.html#GB with Sunday as an alternative.
All mayor OS (Windows, Mac, iOS) use Monday as the first day of the week when the locale en_GB is used.

closes odoo/odoo#76780

X-original-commit: d7dfa09a2bd649cc3370b3e918469c2a3cdddc95
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-20 10:54:15 +00:00
Csaba Tóth d8af84b929 [FIX] base: update Hungarian time format
The official time format is %H:%M:%S (with colons not with dots)

closes odoo/odoo#75715

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-07 13:12:48 +00:00
Jérémy Hennecart b785cdc211 [MOV] appointment: rename module to match enterprise part
Rename website_calendar module by appointment in order to match
the changes on the enterprise part.

We now no longer use the website module to manage the basics of
online appointments. The portal module is now used in its place.

For additional info, check the enterprise PR.

task-2427015

closes odoo/odoo#72241

Related: odoo/upgrade#2492
Related: odoo/enterprise#18426
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-20 06:50:33 +00:00