Commit Graph
143813 Commits
Author SHA1 Message Date
wan 35e12d6efd [FIX] l10n_in_pos: make compatible with pos_l10n_se 2021-07-19 10:14:25 +00:00
wan 514f640cd1 [FIX] l10n_in: missing .id on uom.uom
Introduced in
https://github.com/odoo/odoo/commit/18a823e379ba023c176299c4034b3b28d09c2336
2021-07-19 10:14:25 +00:00
wan 1dd3f0db85 [FIX] l10n_cl: do not change master data with localized values 2021-07-19 10:14:24 +00:00
wan 060b26e95e [FIX] l10n_cl: do not remove document type for other countries
You don't want this for other latam countries.
2021-07-19 10:14:24 +00:00
wan 8dc9e64421 [FIX] l10n_ch: test with l10n_au
When l10n_au_aba is installed, the bank type recognized is `aba` and not
`bank`. The only thing we care here is that it is not `postal`.
2021-07-19 10:14:24 +00:00
william-andre dbc1aab1fc [FIX] l10n_ar: add journal_id in account.move.reversal demo
Because of
https://github.com/odoo/odoo/commit/6adaec714a9d8635b4ac4b1c0bf7c0be25b73af9
2021-07-19 10:14:24 +00:00
wan ac09bf94e2 [FIX] l10n_ar: do not touch other countries' document types 2021-07-19 10:14:24 +00:00
wan 4924a27247 [FIX] l10n_ar: do not change master data with country specific stuff 2021-07-19 10:14:24 +00:00
wan 8098fe42fd [FIX] l10n_ar_website_sale: chose right company for demo data 2021-07-19 10:14:24 +00:00
wan 07f5c94e05 [FIX] l10n*: remove duplicate strings
Some field strings are duplicated and raising a warning in the CI.
Solution is to remove duplicated fields and put them in a common module,
or to change the string in the field declaration and put the right one
in the view.
2021-07-19 10:14:24 +00:00
william-andre c1d24ce9cc [FIX] account_edi: only try to lock if there is something to lock
This check was done before cc67b5ac95 but
removed without apparent reason.
2021-07-19 10:14:24 +00:00
william-andre 502f74c1a7 [FIX] account: do not put empty narration
Having a field with an empty string makes EDIs put an empty node
Followup of
https://github.com/odoo/odoo/commit/48592a6b7548c0b2af03e0cc49180ff02943cca9
2021-07-19 10:14:24 +00:00
wan 6ad65b2ccb [IMP] account: add country to all_l10n test 2021-07-19 10:14:24 +00:00
wan 1010de2310 [FIX] l10n*: adapt test tags external + post_install
Add a static test to ensure all l10n tests are tagged in order to be
able to be run in runbot/mergebot.
2021-07-19 10:14:24 +00:00
Younn Olivier e90e7c3e00 [FIX] web_editor: fix colorpicker display on html fields
ISSUE
When selecting colors options from the editor toolbar on a html field,
the colorpicker was not displayed under the toolbar.

CAUSE
Before this commit, the colorpicker dropdown position was computed with
top, bottom and height css properties.

After a new colorpicker was introduced with multiple sections of
different sizes, the size of the dropdown-menu could not be fixed
anymore and [1] broke the existing computation to display the dropdown
above or below the toolbar.

SOLUTION
Using bootstrap dropdown 'dropup' class instead of top, bottom and
height css properties.

[1]: https://github.com/odoo/odoo/commit/96ab729850983162a0039e40c77537ef65cd039e

closes odoo/odoo#73947

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-19 09:19:14 +00:00
Aaron Bohy 8c1d226284 [IMP] web: dropdown: add "toggler" props
This commit adds an optional "toggler" props to the Dropdown
component. If set to 'parent', no toggler will be generated by
the Dropdown component. Instead, the parent element of the dropdown
will be its toggler.

closes odoo/odoo#73858

Related: odoo/enterprise#19702
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-19 09:12:31 +00:00
Aaron Bohy 923ba830db [REF] web: dropdown: make "menu" the default slot
The dropdown Component takes 2 slots: one for the toggler, and one
for the actual dropdown content. Before this commit, the default
slot was the toggler, and the other one was named "menu".

However, as the toggler is actually optional, and the "menu" slot
contains the central information about the dropdown, we decided to
swap them. The content of the dropdown is now the default slot and
the toggler can be specified with the "toggler" slot.
2021-07-19 08:54:31 +00:00
Francois (fge) a1c983250e [FIX] web: focused command style
adds the lines deleted by mistake in the commit:
d7ddd5de53

closes odoo/odoo#73749

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-19 09:11:14 +00:00
Francois (fge) 7dc28604d7 [FIX] web: traceback generated by hotkeys
This commit fixes the erroneous tracebacks generated by keyup events
in the hotkey overlay. (alt + key)

TASK-2591069 - BUG 3
2021-07-19 09:11:14 +00:00
Francois (fge) 55dab0e7d1 [IMP] web: use of a default OS for tests
The purpose of this commit is to have a test environment
that does not depend on the OS of the machine
on which the Odoo server is deployed.

Because the navigator.platform is deprecated, we will use the
navigator.userAgent to identify the OS.
2021-07-19 09:07:09 +00:00
Swapnesh Shah b42c4fed9e [FIX] crm: correctly label opportunities count in partner kanban view
Use correct label. This link leads to opportunities, not to "Favorites"
whatever that means.

closes odoo/odoo#60036

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-19 08:30:45 +00:00
Swapnesh Shah d73c841abf [IMP] survey: make error message required when validation is enabled
Before this commit *Validation Error message* was not required for questions
with *Validate Required*. This leads to having `False` displayed if
*Validation Error message* is empty.

With this commit we make *Validation Error message* required for these types
of questions which requires validation. Indeed it makes no sense to required
a validation but having no message explaning why it failed.

closes odoo/odoo#58083

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-19 08:34:32 +00:00
Julien Banken 8ab2adfbdd [FIX] slides: prevent the # anchors of the PDF controllers from triggering a scroll jump
PURPOSE

Currently, the PDF viewer is loaded from an iframe and the PDF controllers
contains empty anchor links. When the user clicks on one of these links,
the browsers based on Chromium will trigger a "scroll jump" and the iframe
will be placed at the top of the browser window.

When the PDF document is larger than the viewport, this behavior can be
quite annoying: The user will have to scroll the browser window to
see the controllers each time they click on a controller (-> link) as
(1) the controllers triggers a scroll jump and (2) the controllers are
below the document that does not fit entirely on screen. To avoid that,
the links of the PDF controllers will be replaced with spans. The
controllers will then no longer trigger a scroll jump.

SPECS

- Replace the links of the PDF controllers with spans.
- Add css rules to prevent user selection.

LINKS

Task id: 2500574

closes odoo/odoo#73937

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-19 06:54:10 +00:00
Samuel Degueldre 637967b1f9 [FIX] website: fix upload logo button being unresponsive
Since odoo/odoo#72675 the core services are now available in the
frontend, this includes the scroller service that will call
preventDefault on click events when the clicked link has an empty anchor
as this is usually used to change the cursor appearance, but we don't
want to mess with the hash which contains the webclient state.

In the configurator, the file input for logo upload is inside such an
anchor with an empty href, and so preventDefault is called, preventing
the file picker from opening. While in the configurator, we don't have
any state stored in the hash, not calling preventDefault on anchor
clicks may still cause scrolling issues among other things.

Since there is no reason other than styling for this node to be an
anchor tag, this commit replaces it with a div, and appropriate CSS to
style it.

closes odoo/odoo#73936

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-19 05:31:16 +00:00
Samuel Degueldre 2b185ca98f [FIX] website: remove double inclusion of owl library
This double inclusion was causing issues by overwriting the global QWeb
instance, thus removing previously registered templates.
2021-07-19 05:30:19 +00:00
Nicolas Bayet d1fcb9ac74 [FIX] web_editor: prevent double insert link on paste
When pasting text containing url, the url was pasted twice.
One being simple text and the other one being a link.

Task ID: 2602785

closes odoo/odoo#73709

Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-07-19 07:38:07 +00:00
ijas ahammed 6113a8c48c [IMP] iap_mail: improve the UI for 'enrich_company' template
Currently, when sending the mail for enrichment with template
`enrich_company`, we display few data with pills, like phones,
emails, industries, sectors etc. When there are too many pills
for these information, pills sometimes break into another line
if there's no enough space and the mail looks ugly.

This commit improves the behavior by improving the inline style
for those pills, and thus by making sure that it will always
display entire information in one line, instead of breaking
them into multiple lines.

Apart from that, this commit also makes the template responsive
so that is doesn't look mess in Odoo's chatter while viewing
from small devices.

TaskID-2577809

closes odoo/odoo#72507

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-16 13:21:31 +00:00
Florent de Labarre 6fe1eaaa56 [FIX] point_of_sale : ticket is save in DB
If you use electronic terminal, electronic ticket is not save in database.
I you want reprint the ticket, electronic ticket is not present in the reprint ticket.

closes odoo/odoo#73919

X-original-commit: 08583840604e71f18f3b98b6dc8d4fa04f502689
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-16 16:51:29 +00:00
Xavier Morel 6196ed0ab0 [IMP] core: mitigate possible deadlock on module installation
When installing some modules, if an other action is undertaken around
the same time it is possible for the two to deadlock, leading to the
two workers being killed by the wallclock limit watcher. This should
only be an issue on the *threaded* server, workers should not be
affected, meaning the issue is not reproducible on runbot.

A relatively reliable way to trigger this issue manually is to create
an empty database, on the "apps" kanban view install the "sales"
application, and as soon as the UI gets unblocked install the "CRM"
application. An other method (also reliable but not really doable by
hand) is to simultanously log in and install the sales
application (`sale_management` module).

The core of the issue seems to be in `_button_immediate_function`:

1. `Other` has an env ready for use and has accessed various
   models (so has pretty shallow locks on the tables e.g.
   ACCESS SHARE).
2. `Install` takes the registry lock to create the new registry.
3. `Install` needs to update one of the tables `other` has touched,
   starts waiting on the `ACCESS EXCLUSIVE` lock (the only one
   `ACCESS SHARE` conflicts with) in order to execute DDL (most `ALTER
   TABLE` forms require exclusive access to the table).
4. `Other` needs a new environment (e.g. `sudo()`, `with_user`,
   `with_context`, ...), starts waiting on the registry lock.

At this point the two threads are deadlocked, `other` waits on the
registry lock which `install` holds, while `install` waits on a table
lock which `other` holds. Since one of the waits is on the application
side, Postgres' deadlock detector can not notice the issue. That one
of the locks is on the Python side is why only the threaded
server *should* be affected.

An initial seemingly promising mitigation attempt was to

    LOCK res_partner IN ACCESS EXCLUSIVE MODE

in the prelude of `_button_immediate_function` as `res.partner` is one
of the most commonly modified models, this would force
`_button_immediate_function` to wait until all existing requests have
completed and prevent later requests from progressing.

This turns out to be unreliable, as later requests could already have
acquired an environment and would race ahead as soon as the
transaction is committed if the scheduler lets them. Trying to lock
the registries earlier doesn't work as the locking is interleaved in
normal operation and we'd just deadlock there. The commit is because
`load_modules` does not take an externally provided cursor and instead
creates its own (thus its own connection and transaction). And because
of its lack of atomicity the issue might occur regardless.

An alternate mitigation is instead to set (or drastically reduce) the
lock wait delay during module installation, installation should
normally be entirely uncontended (or infeasible in production with
large traffic) so there is limited reason it'd be waiting several
seconds on a lock. Conveniently, this means instead of the thread
being killed entirely, the install request gets aborted *and retried*,
so it can succeed a little more slowly if that allows the other
request to complete and no other concurrent request causes the same
issue.

Other alternate mitigation which got discarded: reusing registries
when creating new environments (from existing ones) if the database is
the same, that works for some case of switching environments, it
doesn't work for other where we actually fetch a registry e.g. assets
generation calls `get_modules_order` which calls `module_boot` which
calls `module_installed_bypass_session` which gets a
registry. `get_modules_order` is the last place we know we have an
existing registry. Though maybe we could strip out the entire thing
and call `module_installed(self.env)` directly?

Issue 2581648

closes odoo/odoo#73906

X-original-commit: ab84d970dcf1a9dbd5697b6600930cd1bcba3634
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-07-16 15:58:16 +00:00
Nasreddin Boulif (bon) 6499dc8d7b [FIX] base: add an alias for iso-8859-8-i == iso-8859-8
Steps to reproduce:

  - Install "Sales" module (for test purpose)
  - Active `External Email Servers` email feature and set an alias
  - Go to any Sale Team, and set an Email Alias
  - Send an email (from outside Odoo) to the sale team email alias
    - Write the body text in hebrew
    - !must ensure that the mail is encoded in iso-8859-8-i.
  - Go to Settings -> Technical -> Messages and open the receveid mail

Issue:

  Hebrew character are replaced by `�`.

Cause:

  Python does not have -e and -i codecs.
  More info here: https://bugs.python.org/issue18624

Solution:

  Create an alias for iso-8859-8-i == iso-8859-8.

opw-2482579

closes odoo/odoo#73934

X-original-commit: 632ed24936000cfb4cb3296a25ff6195a89109a0
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-07-18 13:12:17 +00:00
Florent de Labarreandvfe-odoo 002cac0701 [FIX] product: restrict deletion of used pricelists
Currently, pricelists can be deleted even if a pricelist rule uses this pricelist as base.
This leads to an error when the rule is used because it tries to access a deleted record.

This commit restricts the deletion of such pricelists, avoiding later tracebacks.

closes odoo/odoo#73907

X-original-commit: 8c3c7d9e85ca4353d3b8501cc5c484a3bd955754
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: vfe-odoo <Feyensv@users.noreply.github.com>
2021-07-16 15:59:33 +00:00
Robin Conjour 6687adbc43 [CLA] signature for demolium
Closes odoo/odoo#69217

closes odoo/odoo#73926

X-original-commit: 229f14c04d53e713af30a4a1077c954d284ff51d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-16 17:49:17 +00:00
Odoo's Mergebot 417138b443 [IMP] website: make contactus page static
Currently, contactus page is dynamic (Google map snippet, Company Data, Contact Form), in order to make it static :
- Company data snippet has been removed and replace by static data
- Google map snippet has been removed
- Website_form module has been merged into website (before, the module needed to add data into contact us page which was not static)
- Pre-fill option has been added  to s_website_form snippet and all website_form dependencies have been updated to  add "fillWith" attribute during form model registry.
- Finally, contactus-thanks has also become static !

Enterprise: https://github.com/odoo/enterprise/pull/18242
Upgrade: https://github.com/odoo/upgrade/pull/2452
task-2462993

closes odoo/odoo#69888

Related: odoo/upgrade#2452
Related: odoo/enterprise#18242
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-07-16 22:40:19 +02:00
Romain Derie c3015779cb [IMP] website, website_crm: small form improvements
- fixed xml data files order, otherwise form field would not be whitelisted,
  including `email_to`, so the mail would not be send.
- add the same data-for behavior from website_crm to website, to be able to
  prefill a field with an URL param
- removed the fallback data-for in website_crm, the JS in now in charge of
  doing that. Plus it was creating a misheavior -> you could have prefill set
  to false but still, it would prefill the user info
- fixed the form option so the field.name is not used as field.string if there
  is already an explicitely set field.string..
- adapt field name in /contactus form (xml view), form snippet (registry) and
  crm form (registry) for more consistence
- added the prefill option set to true by default on /contactus (to fit what
  we had before). This came with a change in the test as we don't need to
  enable it anymore.
- added also the prefill option to true by default on form snippet

Part of #69888
task-2462993
2021-07-16 19:13:18 +00:00
Matthieu Stockbauer 2c41797266 [IMP] website, website_crm: make contactus page static
Before this commit (and the previous ones that prepare it), the contact
us page was largely editable but not entirely. The automatic address
field on the right column prevented the page to be considered like any
other page and only the left column was editable. That led to less
possibilities and difficulties to make a modern contact page.

Now, the whole page is static, like a page the user would have created
himself. Same for the thank you page. This comes with the disadvantage
of having to handle the address by yourself (but that's not a field that
would normally change a lot anyway) and the website_crm app now needs to
be enabled on the form via edit mode after install to change the form
action to lead creations.

Part of https://github.com/odoo/odoo/pull/69888
task-2462993
2021-07-16 19:13:18 +00:00
Matthieu Stockbauer 54873d20c3 [IMP] website, *: add pre fill option for website forms
*: website_crm, website_form_project, website_hr_recruitment,
   website_sale

Replace website_crm specific behavior by another option for all website
forms.

Part of https://github.com/odoo/odoo/pull/69888
task-2462993
2021-07-16 19:13:18 +00:00
Matthieu Stockbauer 2709602006 [REF] website, *: adapt files moved to website after website_form merge
*: website_crm, website_form_project, website_hr_recruitment,
   website_sale

Part of https://github.com/odoo/odoo/pull/69888
task-2462993
2021-07-16 19:13:18 +00:00
Matthieu Stockbauer f8882698e8 [MOV] website, website_form, *: merge website_form app into website
*: crm_iap_lead_website, website_crm, website_form_project,
   website_hr_recruitment, website_sale

Part of https://github.com/odoo/odoo/pull/69888
task-2462993
2021-07-16 19:13:18 +00:00
Eduardo f1029ab20d [CLA] signature for shide
closes odoo/odoo#73917

X-original-commit: 6dca24a0cd4140118c8ebef40bff4d04ccdc98e9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-16 16:40:11 +00:00
Matthieu Méquignon e554b758c8 [CLA] Add Matthieu Mequignon to C2C CLA
closes odoo/odoo#73887

X-original-commit: bc916ec3f27a9ea2275e80402bd6aa17bf5a1bf9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-16 13:53:25 +00:00
kerteszgergo 4fced20b81 [CLA] signature for kerteszgergo
closes odoo/odoo#73885

X-original-commit: 0a11e597d933e5b159c18752ef1b6a040dc23256
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-16 13:39:12 +00:00
Benjamin Frantzen (bfr) b3e9da31a1 [FIX] l10n_it_edi: fixed zip code check for the buyer
If the buyer is Italian, it must have a zip code of length 5.
If the buyer is not Italian, the zip code is optional

closes odoo/odoo#73883

X-original-commit: 86aa7507b0d86bd13dba303c75821048d420f647
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-07-16 13:32:30 +00:00
Mashanz 19d577c64e [FIX] base: typo on class label
closes odoo/odoo#73882

X-original-commit: 454c42612f6370fa029b0e917f0bd920f967fdce
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-16 13:29:56 +00:00
Mashanz 9f22d0c43b [CLA] Signature for mashanz
X-original-commit: e8ef346d574a5f2e0525282d96d39390e13115dc
2021-07-16 13:29:54 +00:00
Amin Cheloh 134363f26c [CLA] Signature for amincheloh
closes odoo/odoo#73879

X-original-commit: 66bf02ba89ebc5b6d3f07e6716d060794cf62b6b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-16 13:25:19 +00:00
Adrien Widart f2f88075ae [FIX] point_of_sale: extract UID from POS reference
When using another language than English, the UID of a POS order may be
incorrect

To reproduce the error:
1. Open a POS's configuration and enable "Manage Orders"
2. In Settings > Languages, add ans switch to:
    - French (BE) / Français (BE)
3. Start a POS session
4. Process an order
5. Open the orders managers

Error: the processed order is named "Commande de 00001-001-0001", the
"de" in the middle shouldn't be present

This is the combination of "Commande" and the UID of the order. The
latter is extract from the POS reference, which looks like "Commande
00001-001-0001" by removing the first 6 characters. It's ok in English:
from "Order 00001-001-0001", we have "00001-001-0001". But this won't
work in all other languages (specially for RTL languages)

The unique identifier of an order is a sequence of 12 digits:
https://github.com/odoo/odoo/blob/3e8d921318e86631b73c8c92c2e462fd0d761582/addons/point_of_sale/static/src/js/models.js#L2865-L2868
Knowing this, we can easily extract the UID from a POS reference

OPW-2538645
closes #71181
closes #71182

closes odoo/odoo#73876

X-original-commit: f5b23781cdf8a9e50c9a1fcd38ec704d4a4513fb
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-07-16 13:17:22 +00:00
Samuel Degueldre ea8f7a384d [FIX] web: fallback for cache_hashes when http_routing is not installed
Previously, loading the login page with no modules installed would
result in a crash, because the translation service assumed that there
was always a cache_hashes key in the session info. This is not the case
when the http_routing module is not installed.

This module fixes that by adding a fallback for those cache_hashes in
the translation service.

closes odoo/odoo#73874

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-07-16 13:04:25 +00:00
std-odoo 43052586cb [FIX] mail_plugin: fix a translation when the enrichment fail
Bug
===
One error message is not translated.

Task-2518668

closes odoo/odoo#73856

X-original-commit: cfeff76797f2f6bd390e41974f2f8255df81a738
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-16 11:30:03 +00:00
Odoo's Mergebot 0231aaf3f7 [IMP] website_slides: open rating composer in fullscreen mode
Purpose
=======
Currently we can write a review in the slide fullscreen view.
But if we click on the button "review", we are redirected to the reviews
page. Instead, we want to open the rating composer and to stay in the
page.

Technical
=========
Add the dependency "portal_chatter.xml" from portal rating on the portal
composer Widget. It already has the dependency "portal_chatter.xml"
from the simple portal module, but because the second file was not in
the dependency, the view was not inherited and we were not able to rate
the review.

Add a new option on the portal rating composer, "hide_rating_avg" in
order to hide the global rating on the button and allow to fully
customize the button to have the same look as other buttons in the same
view.

Task-2322583

closes odoo/odoo#62872

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-16 16:03:01 +02:00
std-odoo 137843de5f [IMP] portal_rating: remove the flicker of the "portal rating" widget
Purpose
=======
Remove the flicker of the "portal rating" widget when we load the page.

Specifications
==============
Currently, the portal rating widget is composed of 2 parts
- A Python template
- A JS template

There's also 2 widget, one widget who is linked to the Python template
and which instantiate another widget (which will render the JS template).

That's why we have a flicker, the button of the widget is rendered in
Javascript.

The purpose of this commit is to simplify that, to have only 1 widget
and to have as munch as possible in the Python template.

Technical
=========
We still need 2 different template (Python / JS) because in the
non-fullscreen view, after editing our review, we do not want to refresh
the page, but we want the average rating to be updated.

Task 2322583
2021-07-16 11:32:57 +00:00