Commit Graph
167888 Commits
Author SHA1 Message Date
Guillaume-gdi e190faa8ba [FIX] web_editor: make new font size classes responsive
Since [this other commit], we use classes to change the font size of
text. Unfortunately, we forgot to make them responsive. This commit
fixes that.

[this other commit]: https://github.com/odoo/odoo/commit/194f73a9bbad8c3c3fb5c378e7bdfa704aaacdc0

task-3615976

closes odoo/odoo#144047

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-30 11:44:46 +00:00
Mayurrajsinh Rathod de983fc207 [FIX] website_slides: prevent constraint error when changing the type
Before this commit
==================
Modifying the type of content from video to webpage or webpage to video
violates the constraint.

Technical
=========
When we change the 'slide_type' of the slide.slide model from video to any
other type, or from webpage to any other type, the value url or html_content
is not removed and remains same. However, when switching between video and
webpage, the 'exclusion_html_content_and_url' constraint is violated because one
of them should be null.

After this commit
=================
When the type of content is changed, the existing URL or HTML content is
removed as they are no longer needed.

Task-3474466

closes odoo/odoo#144042

X-original-commit: b68d2f52e9d3d0f18257a17dc1a24db6bee860b1
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-11-30 11:44:45 +00:00
Pedram (PEBR) e725d5615a [IMP] point_of_sale: limit pricelist item loading based on products
Before this commit, the point of sale module would attempt to load all
pricelist items from the database, even if there were a high number
defined. This could cause memory issues.

Although the products loaded into the POS can be limited, all of the
pricelist items would still be loaded, even for not loaded products.

This commit improves the pricelist loading to only load pricelist
items related to the products loaded into the POS. When new products
are loaded, their associated pricelist items are added.

This optimization prevents unnecessary pricelist item loading and
reduces memory usage in cases with large pricelists.

opw-3374866

closes odoo/odoo#143265

X-original-commit: f39e8a125c64e4a225122d975500d78e5925f4bd
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-11-30 11:44:43 +00:00
Arthur Detroux (ard) 51518c0788 [FIX] web_editor: fix font size dropdown on ipad / tablet
With [commit 1], the editor toolbar was ported to OWL. One side effect
of this port is that the condition for displaying the font size dropdown
was no longer based on screen size but on the OS / Browser used. This
lead to iPads not having the font size dropdown.

This did not create a direct error on 16.4 but in 17.0, the dropdown was
changed by [commit 2] and the assumption was that it would always be
displayed.

This leads to a traceback when starting website edition on an iPad.

This commit restores the original condition for displaying the font size
dropdown which is based on screen size and not on browser.

Steps to reproduce the bug (17.0):
- Open Website on an iPad
- Start edition
=> Traceback

[commit 1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997
[commit 2]: https://github.com/odoo/odoo/commit/194f73a9bbad8c3c3fb5c378e7bdfa704aaacdc0

opw-3594634
opw-3590980
opw-3594313
opw-3594615

closes odoo/odoo#144041

X-original-commit: 6be141eab1742ad300805c6deb4805673805c7c9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-11-30 10:13:31 +00:00
Tiffany Chang (tic) 914da73d30 [FIX] purchase_mrp: avoid inconsistent test exchange rate
Test was breaking during the nightly builds. Most likely due to the
same issue as the one that odoo/odoo#131389 fixes, so we apply the
same fix.

closes odoo/odoo#144031

X-original-commit: 900373b2658240570f97998a7d86a6f4c3fb67fc
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-11-30 10:13:30 +00:00
Khushi 704951bf6b [FIX] spreadsheet_dashboard: change search panel icon
This commit changes the 'cursor-like' icon visible on hovering over a dashboard
in dashboard search panel to a 'pointing hand-like' icon.

Task ID : 3597552

closes odoo/odoo#144021

X-original-commit: a4fc5a4ca5c37d8b6dbe36d9441bfa9a7dc7eb7b
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Khushi Patel (khpa) <khpa@odoo.com>
2023-11-30 10:13:29 +00:00
kdeb@odoo.com 66a59653a5 [FIX] account_check_printing: Add missing space for Checks.
Issue:
In the Accounting dashboard, when displaying pending checks, there was
a missing space between the number and the word "Check"
(e.g., "1Check to print").

Steps to reproduce:
1. Go to "Accounting --> Vendors --> Payment", click NEW.
2. Choose Checks as the Payment Method, complete the form, and click
CONFIRM.
3. Observe the Accounting dashboard, specifically the Bank journal
section.

Solution:
- Ensured proper spacing between the number of checks and the
text "Check" in the dashboard display.

opw-3591902

closes odoo/odoo#144019

X-original-commit: 2dab1c57ae45a747db0cbbf6101bad824e64f11d
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Kawtar Drissi El Bouzaidi (kdeb) <kdeb@odoo.com>
2023-11-30 10:13:28 +00:00
Sven Fuehr 95da5fa781 [FIX] l10n_de: DIN5008: add margin between top edge and image below
Currently there is no margin between the top edge and the image below
in the DIN5008 layout.
Thus the image may be cut off when printing the page.

This commit adds a 10mm margin.

opw-3599133

closes odoo/odoo#144013

X-original-commit: 23e6f7c0f8b793d4aa30df8a65b29def516ecb87
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Sven Führ (svfu) <svfu@odoo.com>
2023-11-30 10:13:27 +00:00
Julien Van Roy 3a3fcb96a4 [IMP] account_edi_ubl_cii: Bis 3 products should have a name
The items in the Peppol Bis 3 xml should all have a `Name` tag,
otherwise a validator will raise: "[BR-25]-Each Invoice line (BG-25)
shall contain the Item name (BT-153)." This `Name` is the product's name
or the label in case of invoice line with no product set.

task-3607354

closes odoo/odoo#144012

X-original-commit: cafa302e61a9a4be909629a9a596fd8bbe7e6017
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-11-30 10:13:27 +00:00
Sanket Brahmbhatt ed98a580f4 [FIX] base_import: handle exception while import image in url form
An error will be generated when a user tries to import or upload a file into the
 invoice module and the file is attached to an image via a URL form but the
 image is invalid or cannot be found.

step to reproduce-
- install the `Accounting`.
- open Accounting > Vendors Menu > Products.
- import file (image url must be invalid or not found )
- the error will be generated.

At the time of solving the conflicts of FW mistakenly changed the
"ImportValidationError" to "ValueError". Due to these changes,
the error is shown in the log.

FW - https://github.com/odoo/odoo/pull/137596
sentry-4538772256

closes odoo/odoo#144011

X-original-commit: 581c0c69f368f08bcf9803942027b172b8bc2694
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-11-30 10:13:26 +00:00
alsh-odoo d0f9d8cca7 [FIX] l10n_fr_pos_cert: calculate valid previous month date
This traceback arises when the current day of the date is 31 while the
schedule action (Generate Monthly Sales Closing) runs.

Scenarios to produce the issue:
[1]
* Imagine the 'date_stop' value is '31-10-2023'
* When the scheduled action('Generate Monthly Sales Closing') runs
* The value of the 'month_target will be 9' and 'year_target' remains same
* The value of 'interval_from' will be '31-09-2023' (an invalid date).

[2]
* Imagine the 'date_stop' value is '31-03-2023'
* The value of 'interval_from' will be '31-02-2023' (an invalid date)

It leads to the traceback
Error: 'ValueError: day is out of range for month'

See:-
https://github.com/odoo/odoo/blob/5fb9825384895fd303bd15c3e4f8dbc55d35904f/addons/l10n_fr_pos_cert/models/account_closing.py#L124-L134

After applying this commit, it will resolve the issue by giving a valid date
in all scenarios.

sentry-4589899768

closes odoo/odoo#143982

X-original-commit: 836d2dae11b663c54bc47f7bc020bced3f243bf8
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-11-30 10:13:24 +00:00
Aaron Bohy 39874b0e9c [FIX] web: tests: make mock fetch almost sync (micro-tick)
Before this commit, a studio qunit test ("edit/delete menus")
sometimes failed on runbot, because it tried to click on a button
in a modal footer, but it found 3 of them, because another dialog
which was expected to be closed at that moment, was still opened.

There was no guarantee for the dialog to be closed because of the
way browser.fetch was mocked. The fetching part was ok, but the
function returned a Response object, whose `json` method is async
(setTimeout-like async, i.e. "real" ticks).

This commit mocks some functions of the returned Response instance
to ensure that, by calling nextTick after a click or whatever, the
fetch operation has been done, the body has been decoded, potential
renderings are finished and the DOM has been patched.

Runbot error 23054

closes odoo/odoo#143980

X-original-commit: 66ef3ae730a233dc510425e0a5baca2973de493e
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-30 10:13:23 +00:00
Benoit Socias af344710c2 [FIX] web_editor: make the grid item drop more robust
It happened previously that the grid item could be broken if `top` and
`left` style properties were not set on it, which resulted in `NaN`
values being used in the grid-area computation.
This commit makes the drop more robust by obtaining their values through
the computed style instead of the style. This way these properties are
always defined.

task-3554752

closes odoo/odoo#143903

X-original-commit: 7a8fd5792f9eedfebf812b15730259de2b511a58
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
2023-11-30 10:13:20 +00:00
Patrick Hoste 4a97700a38 [FIX] website_slides: fix share copy link
With this commit 963842381e
ClipboardJS was removed to use the native clipboard api.
But here the innerText was checked instead of the value
so there was nothing to copy in the clipboard.
This commit fix this.

Task-3607299

closes odoo/odoo#143206

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-11-30 10:13:18 +00:00
Odoo's Mergebot f359866bf5 [FW][MERGE][IMP] mass_mailing: improve test tools
Move '_create_mailing_list' as a base mass mailing tool to make it easily
usable by most mail-related test addons.

Improve some logs to ease debugging, notably for marketing automation.

Add a tool to simulate opening a mailing at trace level in addition to existing
tools to simulate a click or a bounce

Task-3506681 (MA: Test cleanup)
Task-2981581 (MA: Fix trace duplication and various issues)

closes odoo/odoo#143088

Forward-port-of: odoo/odoo#143040
Forward-port-of: odoo/odoo#141773
Related: odoo/enterprise#51232
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-11-30 10:13:15 +00:00
Thibault Delavallée 3450e0171b [IMP] mass_mailing: add test helper to simulate opening mails
Add a tool to simulate opening a mailing at trace level in addition to existing
tools to simulate a click or a bounce

Task-3506681 (MA: Test cleanup)
Prepares Task-2981581 (MA: Fix trace duplication and various issues)

X-original-commit: 1d4829e0597e4498663542381882ff810c5e42b5
Part-of: odoo/odoo#143088
2023-11-30 10:13:15 +00:00
Thibault Delavallée 94dc448577 [IMP] mass_mailing: improve some test tools and logs
Move '_create_mailing_list' as a base mass mailing tool to make it easily
usable by most mail-related test addons.

Improve '_filter_mail' tool by allowing to give an additional 'email_from'
used to filter emails produced under a mock. When having similar records
mailed several times (e.g. several mailings triggered at the same time which
may happen for marketing automation tests) it eases finding the right email
linked to a given mailing / recipient.

Improve some logs to ease debugging, notably for marketing automation.

Task-3506681 (MA: Test cleanup)
Prepares Task-2981581 (MA: Fix trace duplication and various issues)

X-original-commit: aad84dda189e13d76a87e349a7d56d84e584879c
Part-of: odoo/odoo#143088
2023-11-30 10:13:15 +00:00
Achraf 0b270fa796 [FIX] website_sale: Revert #143108
This pr https://github.com/odoo/odoo/pull/143108 was breaking eCommerce.

opw-3616105

closes odoo/odoo#144206

X-original-commit: 84a4a7fe9036fd5ff089ab51992da3ba3aaf1020
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-11-30 08:53:06 +00:00
Chong Wang (cwg) d94898a3ae [FIX] tools: remove nondeterminism in pot files
The test added in 09a4762b will fail randomly, because of the nondeterministic
os.walk access. This commit removes this nondeterminism in the pot.

closes odoo/odoo#143918

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-11-30 07:37:17 +00:00
xO-Tx 63a3c99872 [FIX] website: fix visible cookies bar container
Steps to reproduce:

- Enable the "Cookies bar" in website configuration > Go to website
(Edit mode).
- Select the cookies bar > Change its layout to "Popup" > The modal
container becomes visible in edit mode only.

The `#website_cookies_bar` element will automatically get one line
height (equivalent to its current `line-height` value) because of the
`contenteditable="true"` added to it, which makes it visible in edit
mode (The container has this default height in all layouts, but it's
hidden by the cookies bar content in "Discrete" and "Classic" modes).

The goal of this commit is to simply hide this element to prevent this
behaviour.

Remark: The same issue occurred on a `.s_popup` parent with an inner
`.modal` element and was fixed in [1] by keeping their visibility
synchronized.

[1]: https://github.com/odoo/odoo/commit/cfd53b8fae3ad9f677df49a03fe6d2945dbb5da2

linked to opw-3485565

closes odoo/odoo#143913

X-original-commit: 4374adfde3627852d0a932f3d10fa74fe0b76a83
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
2023-11-30 07:37:16 +00:00
Alejandro Mellado cddee627c0 [FIX] l10n_mx: tax group wrong name, missing translations
This changes intend to update current tax group records to fix naming
issues and add missing translations.

closes odoo/odoo#143907

Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-11-30 07:37:15 +00:00
Romain DerieandVranckx Florian 7c6844fa6c [FIX] website: make forms work again when inside html fields
Recent commit [1] in Odoo 15 (which is a backport of commit [2] which
was merged in Odoo 17) introduced a security layer on forms but only
for forms which are inside `ir.ui.view`. The forms inside HTML fields
are thus not working anymore, because those don't receive the required
signature.

For the record:
- `ir.ui.view` = `website.page` pages, some part of the controller pages
- HTML fields = the most part of the editable areas in controller pages

[1]: https://github.com/odoo/odoo/commit/17c6f6f30bf13bd3c303b28d9a314bd76dd8f4dc
[2]: https://github.com/odoo/odoo/commit/7d25e7bf9243367c87b1b2005587ae728730b49c

opw-3586333

closes odoo/odoo#143139

closes odoo/odoo#143879

X-original-commit: 5e5a14ae4a522a589f6112d1687bb910f86f9a6d
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Vranckx Florian (flvr) <flvr@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2023-11-30 07:37:14 +00:00
Romain Derie 731811e409 [REV] website: revert 17c6f6f30bf13bd3c303b28d9a314bd76dd8f4dc
X-original-commit: 49215f2cd31777d4ba0e845819e181daed82f887
Part-of: odoo/odoo#143879
2023-11-30 07:37:14 +00:00
Benoit Socias 3fa6af39c9 [FIX] web_editor, website: fix ignoring unapplied device invisibility
Upon drop, the fix in [1] did consider invisible the blocks that were
visible within the current preview mode (mobile/desktop).
Because of this `onTargetHide` was be called instead of `onTargetShow`.

This commit changes that behavior so that the correct method remains
called according to the actual visibility, but the `DeviceVisibility`'s
`onTargetShow` is adapted to only add the override if it matches the
current preview mode.

No steps to reproduce for this first change, but third-party options
could have been impacted by it.

This commit also adds that condition on the cleanup that was added in
[2] to keep the `dataset.invisible` state consistent upon toggling the
preview mode.

Steps to reproduce this second issue:
- Drop a Columns snippet.
- Make a column visible only on mobile.
- Make another column visible only on desktop.
- Toggle preview mode several times.

=> `dataset.invisible` was set to `1` on all columns having
device-dependent visibility.

[1]: https://github.com/odoo/odoo/commit/acfca25e48ac9bc227234de860fe8128f0312ed4
[2]: https://github.com/odoo/odoo/commit/174e9fe0d8665d1a81c90a6f7bf5cc9e3361f161

task-3538535

closes odoo/odoo#143640

closes odoo/odoo#143875

Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-11-30 07:37:13 +00:00
Sébastien Theys 766226df0b [FIX] mail: load data and message only once per chatter load
Basing RPC purely on OWL rendering cycle is a bad idea, as anything can
happen at any time, outside of our control in a complex application.

Controls to (re)load is completely moved up to the form controller,
which is closer to functional changes.

This will fix an issue where `register_as_main_attachment` is called
multiple times, sending the same invoice to OCR multiple times.

closes odoo/odoo#143867

Related: odoo/enterprise#51670
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-11-30 07:37:12 +00:00
aliya 842f303bb9 [FIX] account: journal check vals should have journal id as keys
This commit fixes the consistency issue missed in https://github.com/odoo/odoo/commit/a9dd388a1128ac406b6a5cec58b3833aadb04c62.
Currently, to_check_vals dictionary has journal records as keys. Later, the total amount and count of account moves marked with `to_check` are retrieved by journal.id, which don't exist in the `to_check_vals` dictionary, so `to_check` value is never displayed on the dashboard. That dictionary should contain the actual ids instead.

task-3611262

closes odoo/odoo#143801

Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-11-30 07:37:09 +00:00
Adrien Guilliams (adgu) f94d14833c [FIX] pos*: fix parseFloat not used correctly
pos*: point_of_sale, pos_discount, pos_restaurant

Prior to this commit, the money_details_popup was using
the formatStrCurrency which it should not because it use the Odoo
parseFloat method which accept localized number string. This commit
fixes this by using the built-in parseFloat method and calling
formatCurrency. This commit also adapts some parts
of the code where we used the parseFloat method from the web module
incorrectly.

closes odoo/odoo#143782

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-11-30 07:37:08 +00:00
Louis (wil) 2b7f88004d [FIX] base: correct wrong translation
'field' is the name of a variable and shouldn't be translated

closes odoo/odoo#143441

X-original-commit: 52ce28f8c2e7998e247d3291e57ddd1ca3d604b9
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-11-30 07:37:07 +00:00
Pierre-Yves Dufays 0a0dac150e [FIX] sales_team: load demo data
How to reproduce:
- install a new DB without demo data and crm: -i crm --without-demo=1
- go to settings and click on "Load demo data" at the end of the page
- the demo data will not be installed and the following error will appear in
the logs "Assigned user Marc Demo has no access to the document and is not able
to handle this activity."
- and "Marc Demo" has no access to the CRM app

If the "crm" module is installed with the demo data at the module installation,
it works and "Marc Demo" has access to the CRM app.

The cause of the problem is that in the first case "Marc Demo" doesn't belong
to group_sale_salesman while in the second case well.

By reverting partially the change that remove the group_sale_salesman by
removing group_sale_salesman_all_leads (see odoo/odoo#139731), the problem is
solved.

Technical note: the load of the demo data as a second step fails when creating
an activity on a record for which "Marc Demo" has no access to because in the
create method of mail_activity, we check that the user has access to the
underlying record (_check_access_assignation). It works when installing the
demo data while installing the module because in that case "Marc Demo" belongs
to "group_sale_salesman" which give him the read access to the record. The
solution here is to just re-add that group where it is removed indirectly by
removing the group group_sale_salesman_all_leads from "Marc Demo".

Another solution would have been to remove this check
(_check_access_assignation) as we don't need it anymore (see odoo/odoo#139917
where we display activities for which the user has no access to the underlying
record from the menu in the systray). But it won't solve the consistency
between installing the demo data while installing the module vs installing the
demo data afterward. That's why this solution has been chosen, but we plan also
to remove the check (_check_access_assignation) as it is no longer needed.
Note that planning activities from the interface even if the assigned user has
no access to the underlying record works because the flag "automated" is set to
true in that case (that flag will probably also be removed).

Task-3600535

closes odoo/odoo#142806

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-11-30 07:37:04 +00:00
roen-odoo 3f51e45b84 [FIX] pos_coupon: remove 0€ reward from the list of rewards
Current behavior:
When you use a coupon that gives a free product combined with a promo
that gives 50% discount. The reward of 50% disappears when you add the
free product.

Steps to reproduce:
- Create 2 program with no conditions :
  - One that gives 50% discount on all products with a code
  - One that gives a free product A
- Make sure product A has a tax
- Open PoS
- Add a product with no tax to the order
- Apply the 50% discount
- Add product A
- The reward of 50% disappears

Note:
This happens because we try to apply a 50% discount on amount that is 0
wich leads to a reward with a NaN amount. Wich makes the reward for the
program disappears, because here (https://github.com/odoo/odoo/blob/15.0/addons/pos_coupon/static/src/js/coupon.js#L624)
currentMaxKey is null.

opw-3529959

closes odoo/odoo#142527

X-original-commit: 9be0955218b5584f27a75b401946a853ac2588ae
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-30 07:37:03 +00:00
Elisabeth Dickinson d16dc2c4b7 [FIX] hr_recruitment: realign kanban footer items
The kanban's footer elements were misaligned vertically.

task-3473010

closes odoo/odoo#140104

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-11-30 07:37:02 +00:00
Guillaume-gdi 3b1e3329b9 [FIX] website: change OLG call timeout to 20s
This commit changes the timeout of the OLG call to 20s. We don't want
users to wait too long for the creation of a new website.

Related to task-3248852

closes odoo/odoo#137703

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-11-30 07:37:01 +00:00
Guillaume (gdi) de5a7d5038 [IMP] iap: monitor performance of IAP calls
This commit adds loggs to monitor the performance of the IAP calls.

Related to task-3248852

Part-of: odoo/odoo#137703
2023-11-30 07:37:01 +00:00
Aman Patel 40934f4089 [FIX] hr_timesheet: internal project visible only in configuration menu
Steps:
- Install timesheet.
- Go to configuration->projects.
- Internal project is visible.
- Check the projects menu.
- Internal project not visible.
- Turn on project stages from the configuration.

Issue:
- After turning on project stages, the internal project gets visible in
projects menu as well.

Cause:
- We have not set 'is_internal_project' to false for group stages.

Fix:
- Set 'is_internal_project' to false.

task-3392129

closes odoo/odoo#143796

X-original-commit: ac2aa3fc810f2edf60ae2e276abfbb7432e5b633
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-30 06:24:15 +00:00
tsm-odoo 0feaa4f650 [FIX] bus, website_livechat: prevent psycopg2 errors during tests
`psycopg2` errors sometimes happen during tests. This is caused by
race conditions between several `cr.execute()`/`cr.fetch*`.

This is even worse with websockets that are long lived connections
that sometimes open a cursor in the middle of the test.

Before websockets, longpolling was just disabled during tests. This
commits disable websockets as well in order to prevent those errors
as much as possible.

Some live chat tours were updated in [1] after the websockets intro-
duction due to some race conditions. This was reverted as the fix
relied on a hack on websockets that are now unavailable.

fixes runbot-25357,24809

[1]: https://github.com/odoo/odoo/pull/103521

closes odoo/odoo#143647

X-original-commit: e3b07a301036fcce76ebbbd856b507326b88160a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-11-30 05:17:40 +00:00
Chrysanthe (chgo) 5ba7e9e16c [FIX] web: fix bolder label in properties field
This commit fixes a visual issue with a label of the properties modal
that has a bolder font-weight than the other.

This issue comes from the fact we recently changed the behavior of our
`bold` and `bolder` variants.

To avoid this issue, we simply remove the label to render the text
directly inside the `label`.

task-3580556

closes odoo/odoo#143794

X-original-commit: 467fb0cb5318594a3b7222640645ad0d15d03c42
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Chrysanthe Gomrée (chgo) <chgo@odoo.com>
2023-11-30 04:12:46 +00:00
Julien Carion (juca) 05eea6dfc1 [FIX] web: kanban: missing quickcreate button in empty kanban
This commit fixes an issue where the quickcreate button was missing from
the kanban view when it was grouped by a non many2one field and contained
no record yet (so that no column is shown yet).

Steps to reproduce:

-Go to a kanban view on a model with no record
-Group by as scalar value (eg: Description)
->The "New" button disappears

OPW-3459808

closes odoo/odoo#143793

X-original-commit: 112ba1cb64b5170fdefd267de8e765f87b444b56
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
2023-11-30 03:03:58 +00:00
Guillaume-gdi b9f8eb73e8 [FIX] website: prevent console error when email in link tools
This commit prevents the editor to search for anchors when the link URL
is an email. This way we prevent an error in the console.

Related to runbot-18747

closes odoo/odoo#143791

X-original-commit: e767c7d4b0ccdeb016cf224b80e269afce4b3028
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-11-30 01:05:42 +00:00
Florian(flg) c1caf94f89 [FIX] l10n_dk_oioubl: Verify that partner have a vat number
The aim of this commit is verifying that the partner for who
we want to generate an oioubl file has a vat number set.

no task id

closes odoo/odoo#142684

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-11-29 22:42:37 +00:00
Soukéina Bojabza c3781985e5 [FIX] web_editor, website: allow "Position" for grid image hover effects
In grid mode, if an image is in an image column (with the class `o_grid_
item_image`), it has the "Position" image option, allowing to select
between "cover" (= the image takes the whole grid-area, which means it
could be "cropped") and "contain" (= the image is entirely visible and
keeps its ratio in the available space). When there is a shape on the
image, this option is hidden and it is "contain" by default (or else the
shapes would be cropped). See commit [1].

Commit [2] added the "On Hover" animation option, to add hover effects
on images. In order for the effect to be applied, a shape is needed and
if no shape is specified, a dummy square shape is used instead. As there
is a shape, if it is a grid image, the "position" is forced to "contain"
(because of commit [1]).

The issue is that while it is logical for some hover effects to never be
"cover", as they could be cropped (i.e. "Dolly Zoom", "Outline", "Mirror
Blur" and any effect with a shape selected), it is not the case for the
other effects when there is no shape.

This commit improves this by allowing the "Position" option to be used
with these other hover effects when no shape is selected (so only with
the dummy square shape).

Steps to reproduce:
- In edit mode, drop the "Banner" snippet.
- Add the "Overlay" hover effect on the big image.
=> The image became "smaller" because it was forced to "contain".

[1]: https://github.com/odoo/odoo/commit/faf19ef7f87fc043fb9a814516e01b8eeafd9b61
[2]: https://github.com/odoo/odoo/commit/7f730f81ec541cc7791fc6b3fded17c838433f85

task-3568406

closes odoo/odoo#141468

Signed-off-by: Robin Lejeune (role) <role@odoo.com>
2023-11-29 21:33:53 +00:00
Arnold Moyaux 360b3aae3a [FIX] stock_account: invalid layer on bill due to rounding
What are the steps to reproduce your issue?
Price Decimal Precision set at 5, currency at 2. Anglosaxon enabled.
Have a product with a unit / purchase cost of 3.30125
Create Purchase for 1500.00 and receipt in.
This creates an SVL and AML for 4951.88
Create Bill with unit cost of 3.30125 and total amount of 4951.88
Confirm Invoice

What is the current behavior that you observe?
The layer unit price value is calculated unrounded (line 304, purchase_stock/models/account_move_line.py) - so 4951.88 / 1500 = 3.30125333333.
This is then subtracted from the Invoice unit price leaving a difference of 0.00000333333
Despite the price_unit difference being less than the precision this then multiplies out to be 0.005 that gets rounded to 0.01.
A new SVL layer is created, and a new move valued at 0.01 and remaining value on existing correct layer is reduced by 1c.
When anglosaxon attempts to reconcile the various moves, it is unable to because there is now a 1c difference in the sum of the relevant AML's.

What would be your expected behavior in this case?
Not to create useless SVL that is wrong
Reconcile anglosaxon records normally.

It happens due to the comparaison between the layer price unit that
is not rounded and the price unit of the account.move.line that is
rounded to the decimal accuracy. We want to keep the most accurate
value so we modify _get_gross_price unit to recompute the unit price
this way we ignore the rounding

close #140410

closes odoo/odoo#143768

X-original-commit: 73aaaa9550b15225e25fcd750ebfd5fb58436064
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-11-29 17:47:02 +00:00
Leloup Loïc (lole) d910f6704e [FIX] website_sale : fix empty result message
before PR:
when searching a product that doesn't exist in the
shop, the error message "no results found for ..."
appears, but when searching another failed product,
we hit the cache and the same "..." is displayed.

after PR:
avoid using the cache for the empty results
message

opw-3496581

closes odoo/odoo#143611

X-original-commit: 545a6983146d7e1b0c03ec632c3db72116b1b744
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-11-29 17:47:01 +00:00
Aaron Bohy 0dfada3f3f [FIX] web: avoid translation not ready error in errors
Before this commit, error message like "Uncaught Promise" were
translated. However, it may happen that the error is created (and
thrown) before the translation service is ready, i.e. before the
translations are loaded. Indeed, the error service is started first
and starts listening on errors that might be raised. If a module
throws an error (e.g. rejects a promise) before the localization
service is started, the error service being already set up, it
catches it and instantiates the appropriate Error. Doing so, a
"translation error" is thrown as translations aren't ready yet.

Translating those messages makes little sense anyway, as they
target developpers and they can't be found in the code if they
are translated. This commit thus stop translating them.

Issue found while investigating on opw 3602193

closes odoo/odoo#143551

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-29 16:30:19 +00:00
Pedram (PEBR) 7bbba71bda [FIX] point_of_sale: Include uncategorized products in sales report
Prior to this commit, products without assigned categories were not
displayed in the sales details report. This issue was due to the
report's logic excluding products that did not fall under any
specific POS category.

This commit introduces a change where products without categories are
now considered under a default category named "Not Categorized" in the
sales report. This ensures that all products, regardless of category
status, are accounted for and visible in the sales details, improving
the comprehensiveness and accuracy of the report.

opw-3594985

closes odoo/odoo#143440

X-original-commit: 6b7afc9f16133314ff6247f11db002bd3a64d289
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-11-29 16:30:18 +00:00
Michael (mcm) 036c72e5ec [FIX] web: disable browser autocomplete
Before this commit, browsers added suggestions when focusing fields.
This commit removes these suggestions.

Warning: there are two kind of autocompletion. One which suggests data
you already entered and completes only the current field if chosen.
The other is auto-fill which suggests your personal info like
email, address, ...
Only the first kind is fixed here, the second cannot be removed at the
moment.

task id: 3114291

closes odoo/odoo#143854

X-original-commit: 201cc48b50b374ea9445f0d148c4e0faeb825327
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-11-29 14:49:49 +00:00
amdi-odoo 342bf28c6f [FIX] mass_mailing: fix fullscreen icon size
Fix the email designer fullscreen icon size by adding the .img-fluid css
class to make the icon image responsive and ensuring it won't scale
beyond its parents.

For screens of max-width 1135px, a css rule applies a 100% min-width
on every only child image which doesn't have the img-fluid class.
This min-width rule was making the icon size bigger than it's actual parent.
Setting the img-fluid class on the image icon for it to not match this rule
fixed the issue.

Task-3604699

closes odoo/odoo#143831

X-original-commit: f5be98b29ac1efb9f547e38d0fde4e65dcc5b8a6
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Amélie Dieudonné (amdi) <amdi@odoo.com>
2023-11-29 14:49:48 +00:00
dise-odoo fdff9f0318 [FIX] project_todo: change shortcut for creating a todo command
The current shortcut used to create a todo is already a shortcut on
Windows used to switch to lens view, which is impractical.

It was changed from "Alt + Ctrl + L" to "Alt + Shift + T".

closes odoo/odoo#143805

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-29 14:49:47 +00:00
tsm-odoo 579ee6d979 [FIX] bus: mock websocket worker during tests
The bus service communicates with the websocket worker in
order to deliver messages coming from the bus. Most of the
time, it is using a `SharedWorker` but when this kind of
worker is not available, it fallbacks on a `Worker`.

During tests, the `SharedWorker` is mocked to prevent opening
websockets on the server. However, the `Worker` is not.

Since [1], opening websockets during tests is forbidden thus,
any test relying on `Worker` and expecting a connection to be
established would fail.

This PR solves this issue by mocking the `Worker` constructor
as well.

[1]: https://github.com/odoo/odoo/pull/141519

closes odoo/odoo#143988

X-original-commit: 1c67542decb1b6ad38fd15532cb6ac82417ca6dc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-11-29 07:51:39 +00:00
Alexandre Kühn 0c998ef1cd [PERF] mail: faster load of discuss at init messaging
- Messaging menu was slow when there are many mail failures
- Discuss app is slow whenever there are many pinned threads
- Initial page load was slow when pinned threads were group chats
  with hundreds of members

All these performance issue come from aggressively eager call
to reactive callbacks, which `onChange()` and `compute()` were
relying on.

This commits fixes the performance issue with:
- Update cycle in `@mail/record`, which calls eager computed fields
  and onChange at the end of an update transaction in discuss models,
  so that computation is called only once rather than many times
  (while only the later value matter)
- Add support for lazy computed fields (which they are by default),
  so that computed fields are only computed when needed.
- Add support for sorted many fields, which also follow the update
  cycle and eager/lazy mode of field. This makes sorting operation
  on many fields efficient and preserves eventual correctness of
  expected order of items in these relational fields.

With module `contacts` installed and populate `--size="medium"`,
init_messaging and mail_failures took 12sec. for Mitchell Admin.
With this commit, this has been reduced to 1sec.

closes odoo/odoo#143382

Related: odoo/enterprise#51410
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-11-28 21:21:04 +00:00
Pedram (PEBR) fb2ee0200d [FIX] pos_loyalty: display relevant loyalty programs on receipts
Previously, if there were multiple loyalty programs with different
sets of rules, all of them would appear on the receipt, regardless of
their applicability to the order. This caused confusion as it included
programs that were not actually applied to the customer's order.

This commit addresses the issue by altering the receipt logic. Now, a
loyalty program will only be shown on the receipt if it has either
awarded points or had points redeemed in the specific order. This
ensures that only relevant loyalty programs are displayed, enhancing
clarity and accuracy in customer receipts.

opw-3608570

closes odoo/odoo#143376

X-original-commit: d4b366f2d741f2087a947d61d7e0618492cc2bf1
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-11-28 21:21:03 +00:00