Commit Graph
157179 Commits
Author SHA1 Message Date
Benjamin Vray 10158dbeb8 [FIX] web_editor: fix auto scroll when moving inner content
Steps to reproduce:

    - Drop enough snippets to have a scrollbar.
    - Drop a snippet with inner content having up/down arrows (e.g.
      showcase,timeline).
    - Move inner content with the arrows.
    - => The element is correctly placed but the screen scrolled along
      with it.

This commit fixes it by preventing the page from scrolling if the
element being moved is still visible after the move. The page therefore
scrolls only if the moved element is not visible after the move.

This commit also improves page scrolling when the element is hidden at
the bottom. Before, the page scrolled to bring the moved element to the
top of the page but now, it stops scrolling as soon as the element is
fully visible.

task-2952200

closes odoo/odoo#108831

X-original-commit: 675ae44803539a807c79fbc32c93b4e5d230816e
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2022-12-30 10:45:52 +01:00
fdardenne 89947487f3 [FIX] mail: activity view: add activity_ids in model domain
Since #107916, the ActivityModel did not include
`["activity_ids", "!=", false]` in its domain, causing incoherence in
some views and resulting in crashes.

To reproduce the issue:

- In the runbot, navigate to Website -> eCommerce -> Product.
- Switch to the activity view.
- Remove the Published filter.
- The view crashes due to an incoherence between the data records
  in the `web_search_read` and the `get_activity_data` calls.

This commit resolves the issue by correctly setting the domain.

closes odoo/odoo#108807

Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-12-29 20:08:42 +01:00
qsm-odoo 4f9bdbf6c8 [FIX] web_editor: remove light/dark computation based on main color
Commit [1] made the "light" and "dark" colors of bootstrap be very
light and dark variations of the "main" color ("alpha" at the time, now
"o-color-1", which is used as bootstrap "primary" color). It was already
not a very good idea, although slightly better than nothing (at the time
navbar and footer colors could not be changed at all, so without this,
they would use a gray with a blueish hue not related to the main color).

Since then, 2.5 years later, [2] and [3] were made which gave some
control over bootstrap default grays via two widgets controlling the
new "gray-hue" and "gray-extra-saturation" params. At that time, the
light and dark overrides made at [1] should have been removed as "light"
and "dark" normally default to two bootstrap grays, which we would have
had control over since [2] and [3]. This was however, not a big problem
since "light" and "dark" were not used by the website templates (well it
was by some but not a lot) and the overrides to gray colors related to
the main color was not "stupid", just less nice as less control over it.

However, since the many improvements made with [4] more than 1 year
later, the "light" color started to be used to achieve more detailed
designed for the eCommerce. And it is planned to use it in further
design elements later on. The fact that those "light" elements are not
following the "grays" configuration made by the user is thus starting to
be a problem.

This commit fixes the issue in master (>= 16.1): "light" and "dark"
colors will now follow the configured grays. In the future, we might
even improve the control over those two particular grays or maybe
improve their default value according to the theme color palette.
It was judged that stable versions can stay as they are right now. As
explained, it is not critical and you can still force your own CSS rules
if you are really unhappy with the "hardcoded" grays (related to the
main color) at some places.

[1]: https://github.com/odoo/odoo/commit/22c4311e283af95eafe1ba85ee1234bb8102110e
[2]: https://github.com/odoo/odoo/commit/35d27a6c1d3dab621de7f059565d7619ae004412
[3]: https://github.com/odoo/odoo/commit/e08184103c42eaf7f6bfb70655cb90b51e79913a
[4]: https://github.com/odoo/odoo/pull/98558

Related to task-3097005

closes odoo/odoo#108825

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-29 19:05:41 +01:00
Benoit Socias d95150c69b [FIX] web_editor: hide "Open in New Window" option for emails
When `link_tools` was introduced at [1], the selectors to the
`is_new_window` input were copied from `link_dialog`'s `_onURLInput`
without being adapted. Later the code was refactored into `link` at [2]
because they were an exact match.
This commit updates the selectors to also match the field inside the
link tools.

Steps to reproduce:
- Edit Home page
- Drop a "Banner" block
- Select the "Contact Us" button
- Change the URL to an e-mail address
=> The "Open In New Window" field was still available

[1]: https://github.com/odoo/odoo/commit/740168ce8d27da3d6a7156d2d79655a898394923#diff-6345b8d133e9b338a77c50a8e5ae824fe405cb9319e98a2ac349b072be07a3a2R321
[2]: https://github.com/odoo/odoo/commit/4a1d776243b059d423152bd026bb8bc758477224

opw-3086198
task-3096806

closes odoo/odoo#108812

X-original-commit: 292dcb99e55178358a64c9879ba4b1721e67d02c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-29 17:10:34 +01:00
Benoit Sociasandqsm-odoo 54746012d3 [FIX] web_editor, website: avoid updating the DOM when selecting a link
When `link_tools` was introduced at [1], `_onURLInput` did only update
the configuration form and did not touch the edited DOM. Even though its
name would be misleading for that purpose, it was therefore used without
issue as an event handler responding to the configuration form input
events and as a private method called in the `start` method of the
widget lifecycle.

At a later stage, with [2], DOM modifications were introduced in
`_onURLInput` (using the misleading `_adaptPreview` method whose
refactoring at [3] made it update the configuration form only in the
case of the "Link Dialog" but update the actual link DOM for the "Link
tools" (website / mass mailing)).

This commit fixes that behavior by touching what is strictly necessary
in stable to keep the original intend of `_onURLInput` (updating the
configuration UI) but at the same time update the DOM following
configuration form input events (as intended by [2]).
In master, all of this should be reviewed.

Here are steps which revealed the problem. Although, meanwhile, [4] and
its parents were merged which fixed other parts of this issue but
keeping the potentially problematic DOM update on selection as described
above. Notice that [4] and its parents may be reviewed further in a
future update.
- Edit Home page
- Drop a "Banner" block
- Select the "Contact Us" button
- Select "Custom" style in the link tool
- Select a fill color
- Deselect the button by clicking on the Banner's text
- Select the button again
=> Button is redrawn without its color

[1]: https://github.com/odoo/odoo/commit/740168ce8d27da3d6a7156d2d79655a898394923
[2]: https://github.com/odoo/odoo/commit/226c4c4032c26d3d8f622b29fb151fa8e78ba70a
[3]: https://github.com/odoo/odoo/commit/4a1d776243b059d423152bd026bb8bc758477224
[4]: https://github.com/odoo/odoo/commit/eb4edac560227b46efdcfe958e3b93e0b88def64

opw-3086198
task-3096806

X-original-commit: da25eadde299b81b78d84678978b7e1f703530cc
Part-of: odoo/odoo#108812
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-12-29 17:10:33 +01:00
clesgow c7e3f40a67 [IMP] mrp: display routes with lead times in overview
In the BoM Overview, routes were always displayed regardless of the
display options selected in the filter. Since lead times are only
relevant when checking their associated routes (as they determine them),
it makes sense to add the display of the routes in the lead times
filter.

closes odoo/odoo#108808

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-12-29 15:16:56 +01:00
Florian Charlier 2680e97aed [FIX] onboarding: fix panel's 'no' background
A traceback was shown when 'None' background was chosen to configure the
onboarding panel's background image (css class).

Supposing no one built anything with a `o_onboarding_False` class, we also
clean the result for a `False` value while we are here.

Task-3104723

closes odoo/odoo#108801

X-original-commit: 8a8da706e55073c48aa3cdc21201b4552230de87
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-12-29 14:21:40 +01:00
Aurélien Warnon a6f1fc7e79 [FIX] survey: disable submit button during javascript loading
This commit disables the submit button on the survey main form during loading.

This is done to avoid the user clicking on the submit button *before* the
JavaScript code is loaded, which will by default trigger a page reload.

That situation can happen on slow connections, and as it reloads the page, the
user keeps clicking on "start" and it keeps reloading, creating frustration.

Task-3111551

closes odoo/odoo#108802

X-original-commit: cb12745329177812bd48ac5520044069ed6ecb9e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-12-29 13:26:03 +01:00
Raphael Collet f2115ba0f2 [FIX] core: don't fail when reading recordset with ids [None]
The revision 65a012c2bba0ed81d9b525a7779c726043b17707 changed the
behavior of method _read() when invoked on a record with id None.
Before the change, the method would consider that no records have been
fetched because the id is falsy.  After the change, it keeps the id None
in the fetched records, and attempts to make subsequent SQL queries like
"column IN ()", which is syntactically incorrect.

OPW 3104957

closes odoo/odoo#108785

X-original-commit: 712d03cb2ee5f2fde0e80619be5db38aa09ed1ac
Signed-off-by: Rémy Voet <ryv@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-12-29 11:55:57 +01:00
Olivia Fantinel 830e73c760 [FIX] sale_timesheet: add missing timesheet revenues sequence
Before this commit, when the user tries to access to the project update
view of a project and at least one timesheet of that project has
`timesheet_invoice_type='timesheet_revenues'`, a traceback is occured
saying the `timesheet_revenues` does not exist in a dict used for
the sequence to display the project profitability in a certain order.

This commit adds the missing key in the dict and also in the label
displayed in the project profitability.

closes odoo/odoo#108585

X-original-commit: b9dabf59b0890e875fd1a22ffc6f506138363f83
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-29 10:58:48 +01:00
Ivan Yelizariev 3331514b16 [FIX] base: prevent using "reload" as Home Action
Home action is first action to do on opening Odoo. Usually, it's an action to
open specific menu. The `action_id` field doesn't have domain and user may
select any action. This commit prevents user selecting action with "reload" tag,
because it would lead to infinite page reloading.

STEPS:
* Set `Open POS Menu` as a Home Action
* reload the page

opw-2900439

closes odoo/odoo#108729

X-original-commit: 5f689f73ca1b5c366cc94af4b84933f9e98a4314
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-12-29 10:04:03 +01:00
Pierre-Yves Dufays 45feca25fa [FIX] survey: fix traceback when modifying answers order
Moving an answer of a multiple choice was triggering a traceback. This solves
the problem.

Technical note: the method _applyX2ManyChange which try to apply commands on
local data was trying to read field information for suggested_answer_ids on the
list view but that view was lacking that field. Adding that field as invisible
on that view solves the problem.

Same thing applies for "matrix_row_ids" for matrix questions.

Task-3106406

closes odoo/odoo#108775

X-original-commit: f08a19894c7e4515566e9744bab69d6e03174d8c
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-12-29 09:06:44 +01:00
4de1e6a375 [FIX] website_blog: show blog tag option
Since [1] the blog tag option was not shown in the website editor
option's panel anymore. Because the tag is not in an editable element
and the `data-no-check` was not specified.

After this commit the blog tag option is restored.

The `_patchForComputeSnippetTemplates()` method (added thanks to [2])
was backported here and used to set `dataset.noCheck` in stable. This
can be removed in master because setting `data-no-check="true"` in
the XML will be sufficient.

[1]: https://github.com/odoo/odoo/commit/86e3bb5e24c2d125ec4ec84ac788601c63182d0f
[2]: https://github.com/odoo/odoo/commit/faf19ef7f87fc043fb9a814516e01b8eeafd9b61

task-2811746

closes odoo/odoo#108763

X-original-commit: a6d16f1109634b596102869bcd12dd93e471f788
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Co-authored-by: xO-Tx <mou@odoo.com>
2022-12-28 17:29:11 +01:00
Benoit Socias 4ffdf8a45b [FIX] website_blog: apply cover properties behavior only on post page
Before this commit the whole options javascript of blogs was skipped if
the accessed page was not the blog post page. This actually did not work
anymore since the website preview was moved into an iframe.

After this commit, the global condition is removed, and a new condition
is added in the cover properties override so that it only applies to
blog covers displayed inside the single blog post page.

task-2811746

X-original-commit: a6b7a2731ca05314a0bd28a54d84efd61b3e1ad8
Part-of: odoo/odoo#108763
2022-12-28 17:29:10 +01:00
qsm-odoo 35d8ffd39a [FIX] web_editor: hide the "no column" option for snippets with columns
Commit [1] which occurred in 13.X for the upcoming release of the 14.0
version introduced a "No column" option for snippets whose only column
was removed but that we wanted having the possibility to switch to a
multi-columns layout. At the time: Title, Text and Cover snippets.

That "None" option was meant to be hidden (as it was at the time) for
other snippets already in a multi-columns layout. Indeed the "No column"
and "1 column" options are very similar: "No column" is just an
optimization for experienced users.

The problem here was that [2] broke the behavior. Indeed [1] marked the
code in charge to hide that "No column" option as "To improve" as the
system was limited to do that at the time... [2] actually improved the
system to allow hiding sub-widgets, but did not adapt [1], making the
"No column" option always visible.

While working and not harmful, that "No column" option may be confusing
as at best you don't see the difference with the "One column" option and
at worst, removing the column removes nice style that you cannot restore
by choosing a multi-column layout again afterwards.

While not entirely stable (in the end we never released a major version
where [1] was working as intended), this commit restores the idea behind
[1] anyway to avoid further confusion and tickets. Choosing "One column"
instead of "None" most of the time leads to a better UX anyway.

[1]: https://github.com/odoo/odoo/commit/b293ccc7c3c5ca9a55092afd2e4a7b88c7b93fc8
[2]: https://github.com/odoo/odoo/commit/ecefd51b63ed8c933243b4a2d26381d05ac288d2

Related to task-3106301

closes odoo/odoo#108757

X-original-commit: 1ff8c9a6a907b4e60f86efc27c82727b288f0947
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-28 15:40:43 +01:00
qsm-odoo 9cac574db7 [FIX] website: avoid race conditions during gray color palette tour
The "website_gray_color_palette" tour recently failed 4 times during
staging build on runbot, out of those 4 caught times, it seems that:

A) 3 were because the last step was marked as failed too soon
   (screenshots and logs seem to indicate the editor was still loading).

B) 1 was because of a "random" asset error (traceback when lazy loading
   the editor JS).

The cause of (B) was not found and should be later investigated if seen
again. This commit tries to avoid (A) which is probably related to a
known issue: when the website iframe has to reload it may sometimes take
more time than is allowed by the default timeout of tour steps. Some
improvements regarding that will be made at [1] and probably by further
PR after that (improving the editor loading speed in general).

Meanwhile, this commit reviews the tour to not save the editor as it was
actually not needed in this tour (nothing has to be saved).

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

runbot-14112

closes odoo/odoo#108747

X-original-commit: fa1819f09948c64ff7acf634eed075515f6a01d2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-28 14:40:51 +01:00
tsm-odoo b28f06a2c6 [IMP] bus: lazy start of the websocket
Before [1], the bus was started lazily: either as a consequence of
the addition of a channel to listen to or by manually calling the
`startPolling` method.

Before this commit, the websocket would have been started as soon as
the bus service starts which degrades performances.

This PR fixes the issue by re-introducing the same mechanism as before
that is by starting the websocket either by calling manually the `start`
method of the bus service or automatically when adding a channel.

[1]: odoo#75510

closes odoo/odoo#108741

X-original-commit: 800e175c5bc5d8ba23265c69c5c2cab6957fc73a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-12-28 11:42:53 +01:00
Soukéina Bojabza dba127d626 [FIX] web_editor, *: remove some inner content dropzones in Carousel
*: website

When dragging inner contents, dropzones appear in the Carousel snippet,
allowing to drop them directly in the element with the `row` class,
where it should not be the case. This is due to the `content` class
present on these elements and to the drop-in rule for inner contents
that allows them to be dropped in elements having this class.

This commit fixes this issue:
- in stable: as the XML files cannot be modified, the drop-in rule is
patched in JS to exclude the elements having both the `content` and
`row` classes.

- in master: it removes the `content` classes from the rows of the
Carousel snippet. It also removes this class from the drop-in rule,
as only Carousel was concerned by it.

See [1] for the following of this fix in design-themes.

[1]: https://github.com/odoo/design-themes/pull/603

task-3011192

closes odoo/odoo#108646

X-original-commit: 882c483ec1107879cd1c5693ea5cfce08e3220cc
Related: odoo/design-themes#628
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-28 11:42:51 +01:00
tsm-odoo 131948aca5 [FIX] im_livechat, *: fix channel created before user interaction
*: website_livechat.

Before this PR, a `mail.channel` record would have been created before
any user interaction. Since the introduction of the welcome bot, this
issue has gotten worse. Indeed, any user accessing a page with the bot
enabled created a useless channel.

Before 15.3, around 15k channels were created each month, after 15.3,
300-500k channels are created each month, most of them empty channels
whom creation could have been avoided.

This PR fixes the issue by waiting the first user interaction before
creating the channel.

closes odoo/odoo#108566

X-original-commit: b2eaf32ba92e537c7eefba6489533613be1b8c91
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-12-28 10:41:05 +01:00
Soukéina Bojabza ec2bc5e47c [FIX] web_editor: fix race condition in grid_layout tour
When trying to replace an image with the media dialog, there is first a
click on the image, which activates the options of the image, and then
a double-click, opening the media dialog to choose the new image.
However, the media dialog does not wait for the image options to be
completely initialized before opening.

This behaviour is in general not problematic but if it happens quickly
enough, in a tour for example, it might cause a traceback. This happens
because the renderings (in `_renderCustomXML`) of the image before and
after replacing it happen too closely, making the first one lose the
reference to the image parent.

This commit fixes this issue by waiting for the options to be fully
initialized before opening the media dialog, that is, by adding an
empty action in the mutex and waiting for it to complete.

runbot-10692

closes odoo/odoo#108738

X-original-commit: 7667ba149aaf179f430615c4aba4b963d1d167c6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-27 20:02:41 +01:00
aliya eed40c1865 [FIX] l10n_lu: reorder tax report lines
Somewhere during the reportalypse LU tax report lines got reordered. This commit rearranges the lines back to how they used to be in 15.0.

closes odoo/odoo#108733

X-original-commit: 97fe609b997989e11dc675a48c551e9f644d28f2
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2022-12-27 16:50:02 +01:00
Benjamin Vray 815d64d48b [FIX] web_editor: removes blue filter on selected image in edit mode
This commit removes the default image selection color (added by this
commit: [1]) used in "web_editor" in edit mode (Website, Email
Marketing). This prevents selected images from being covered with a blue
filter and allows to see the correct final rendering of an image when
it is edited (e.g. Apply a color filter to an image in a website page).

This commit also moves the rule (added by this commit: [2]) that
overridden the portal selection rule to "web_editor.frontend" because it
was applied everywhere even outside of the website/email marketing edit
mode. This rule no longer worked because of the "!important" in [1].

[1]: https://github.com/odoo/odoo/commit/3da301fcb24998333039a7b636cec0e5be8694c6
[2]: https://github.com/odoo/odoo/commit/aa8d2a8be2c8f713b4b39b2aa1ea2aaf1839396c

task-3073192

closes odoo/odoo#108732

X-original-commit: 19bebfc29f5c94ab11dab1fac2e6676eaab51592
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
2022-12-27 16:50:00 +01:00
xO-Txandqsm-odoo fb6d300a6e [FIX] website: hide link popover on social share
To reproduce the issue:

- Website > Edit mode > Add "Share" block.
- Cannot edit the link by clicking a social share item ("Edit link"
on link popover doesn't work).

Since 15.x, "Share" snippet items are not meant to be user links but
buttons to share the page on the related social media. It is also
useless to update those links after the update on [1], since they will
be replaced by the right values "on social item click" (the shared URL
may be updated during the page use as on product pages).

The goal of this commit is to fix this behavior and prevent the link
popover from appearing on items (by setting the `o_no_link_popover`
class right after the snippet is dropped into a drop zone).

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

opw-3084367

closes odoo/odoo#108724

X-original-commit: f4a602ca4d423056fa3f760fc8a3fc222e2a5e51
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-12-27 16:49:57 +01:00
xO-Tx 5e1074340f [FIX] website: fix missing space on whatsapp text for "share" block
To reproduce the issue:

- Website > Edit mode > Add "Share" block > Save.
- Click WhatsApp > Missing space between page title and its URL.

Starting from [1], the `$('title').text()` value was replaced on "Share"
snippet by `document.title` (which will trim and collapse whitespaces
in the page title). This leads to a missing space between page title
and the shared URL.

After this commit, the correct spacing is restored.

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

opw-3084367

X-original-commit: e7e9eb4f806680b19f3ec61fb080316a3160e7fb
Part-of: odoo/odoo#108724
2022-12-27 16:49:57 +01:00
luvi 850c821f7e [FIX] base_import: set the correct default separator
In the default import options, some separators had a wrong value by
default. This commit fixes those, which will fix some failing imports.

A test has been added to verify the default options set.

closes odoo/odoo#108710

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-12-27 15:49:26 +01:00
Julien Alardot (jual) ef6e3b668d [FIX] l10n_fr_fec: Fix missing colspan
Since the recent css change the text of the description field was no taking all the place he could, so it was impossible to read, thanks to the colspan it's now the way it was intended

closes odoo/odoo#108714

Task: task-3103640
X-original-commit: b35485ddbb0567ff129e9da863a29bdc66df34eb
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2022-12-27 13:18:10 +01:00
Benoit Socias 965e2bce29 [IMP] web_editor: align m2m widget label with first element
The m2m widget label is aligned at the middle of the height of the whole
option's display.

This commit makes the m2m widget label aligned with the first element
(either the first active value, or the "Choose a record..." dropdown if
no value is selected).

task-2811746

closes odoo/odoo#108227

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-27 13:18:03 +01:00
Demesmaeker fdf2dd3dd0 [FIX] sale_management: onboarding tour can't send email
This tour was broken due to the partner not having an email. The step to send the email was then
failing because the email was missing.

The problem only appears recently because the step after setting the partner is usually fast enough
to detect the dropdown of the partner field before any text was entered, and so a partner in the
demo data was chosen instead, which has an email. This problem will be investigated in another
task.

closes odoo/odoo#108703

X-original-commit: b9e80c1403de0341a0c133a254142e53ef8c2842
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2022-12-27 11:17:46 +01:00
Claire Bretton (clbr) 068f3edff9 [FIX] account,l10n_lu: Adds a migration for the l10n_lu that will get the latest taxes
All taxes change in Luxembourg, we added a script that will create or update taxes so the clients don't have to
manually update everything or ask the support to do it for them. We don't modify custom taxes.

closes odoo/odoo#108699

Task: 3098941
Related: #104833
X-original-commit: c44a33d67065e20c4ded2a229d0663191c91a0a0
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
2022-12-27 11:17:44 +01:00
dbkosky 8e20e965f0 [FIX] l10n_ke_edi_tremol: reduce command delay, fix abort message
The command delay on writing to the device is a little too prolonged.
After some testing it has been determined that this can be reduced to
by reading with the serial.read function (rather than read_all) when
we know the expected output length.

The serial read fuction accepts an integer describing how many bytes are
expected in the read buffer, and returns when the buffer is filled.

This has much better performance than waiting a fixed length of time,
and reduces the chance of getting an empty response (when the device
takes longer than expected to process the previous command).

The request sent when trying to abort was incorrect, the length byte was
too large by a value of 2. It has been corrected to be the length of the
message
i.e. LEN = 0x20 + len(<LEN><NUM><CMD>) = 32 + 3 = 35
where num is the serial message number

The error message for aborting the post was incorrect, stating the the
invoice had been cancelled when it was not successfully cancelled, and
vice versa. Loggers have also been added for the cancelling of the
invoice.

closes odoo/odoo#108629

X-original-commit: aaa0bbde8251e08feeb180fb14543ede7d05afa6
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2022-12-27 11:17:41 +01:00
Alexandre de Pape (alpa) 7eb9d9716b [IMP] website_sale: change mandatory checkout labels
This commit changes the label of the checkout button if the user is not signed in and the option is mandatory.

Backport of odoo/odoo#103072

closes odoo/odoo#108470

Task: 2929654
X-original-commit: a7a2bc6abed07af40247e7e663d309bb0db3de36
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-12-27 09:23:02 +01:00
Touati Djamel (otd) 8e4e32ab01 [FIX] mrp: use the operation type set on the BoM in MO
Steps to reproduce the bug:
- Enable “Multi-Step Routes” option in the inventory settings
- Create a storable product “P1” with BoM:
    - Add any Component
    - Go to “Miscellaneous” tab
    - Create a new picking type and set in the “Operation” tab
- Create a Mo:
    - Add the product “P1”
    - Select the created BoM
    - Go to “Miscellaneous” tab

Problem:
The operation type set on BoM does not update when selecting the BoM
on a manufacturing order

opw-3091436

closes odoo/odoo#108632

X-original-commit: cd561574d044d4799163ac90305c7914855ead50
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-12-26 11:39:49 +01:00
amdi-odoo 2a015600b2 [FIX] web,auth_totp,base: fix 2FA views
Web:

Adding a css rule constraint to avoid the rule
from overwriting the o_field_highlight css class
applied on a field in a form view.

Base, auth_totp:

Adding the o_field_highlight class on the 2FA
form fields to display the input bottom border and
thereby more easily identify the fields.

Adding a placeholder to the 2FA password field.

Modifying the 2FA title and toggle font to keep
a consistency between the different page titles.

Task-3083540

closes odoo/odoo#108611

X-original-commit: c128a01490bbbcbf824781f5e8716aa30e65ba5b
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-12-26 11:39:47 +01:00
Denis Ledoux 9b0aeca547 [FIX] auth_ldap: traceback during installation due to invalid view
This is an oversight in odoo/odoo#106425

`<div name="auth_ldap_right_pane">`
has been replaced by
`<setting ... id="oauth">`

But, in the `auth_ldap` module,
the view has not been adapted to replace the selector
`<div name='auth_ldap_right_pane' position="inside">`

Therefore leading to the below exception

```
odoo.tools.convert.ParseError: while parsing /home/odoo/src/odoo/master/addons/auth_ldap/views/res_config_settings_views.xml:3
Error while validating view:

Element '<div name="auth_ldap_right_pane">' cannot be located in parent view
```

This is most-likely because the runbot doesn't install `auth_ldap`
and therefore doesn't test it.

I take the opportunity of the commit to better name this setting
section, from `id="oauth"` to `id="module_auth_ldap"`,
first because "oauth" is not "ldap",
second to make the naming uniform compared to the other setting section
id names.

closes odoo/odoo#108530

Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-12-26 11:39:44 +01:00
dbkosky 1d97d7f7b0 [FIX] l10n_ke_edi_tremol: To send to TIMS filter
It is important that users are able to filter by invoices that need to
be posted to TIMS

This commit adds that filter in the account move tree view.

closes odoo/odoo#108645

Task-id: 2950308
X-original-commit: e19f0f478331e3c63833e791db42413e5b5a6684
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2022-12-26 10:39:13 +01:00
Ivan Yelizariev f59cea4521 [FIX] web: add missing binary class to domain_selector/fields
Domain widget has Components for every type of field to define list of available
operators, initial value, etc. However, class and template for some fields is
missing (e.g. for binary field).

This commit adds support for such fields via Default class. More specific
classes could be added later.

STEPS

* Activate Debug mode
* Open menu *User-defined Filters*
* Create a filter for `product.product`
* Select any binary field in the domain widget

opw-3084273

closes odoo/odoo#108631

X-original-commit: 3d0044046517690215625c92a6550fd6083fbd93
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-12-26 10:39:10 +01:00
smdc-odoo f79630c7e5 [IMP] l10n_sg: Change the Goods and Service tax rate
Starting from 1 January 2023, the Goods and Services Tax rate (GST) will
change and go from 7% to 8%

task-3098705

closes odoo/odoo#108336

X-original-commit: b2ca5ca9dc5c7455ec545c46696c688e78b45ca6
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Simon Morais Da Cunha (smdc) <smdc@odoo.com>
2022-12-26 10:39:05 +01:00
Pierre c539a9b214 [FIX] event_sale: division by 0 on price
When you have some order lines linked to a registration that have a
'product_uom_qty' equals to 0, you get a division by 0 error when you
try to get the 'sale_price' and the 'sale_price_untaxed'.

To avoid such issue, we are now checking if the 'product_uom_qty' is not
equals to 0 to avoid a division by 0. In the case it is equal to 0, we
consider that the 'sale_price' and 'sale_price_untaxed' are equal to 0
as nothing has been paid for this registration.

To reproduce you can do like this:
- create invite someone to your event
- create a SO with qty 1 and the price
- validate the SO and select the registration
- set product_uom_qty to 0 in the SO
- open the event dashboard (and remove the filter to get your event)

closes odoo/odoo#108653

X-original-commit: f0e8d30ac425241f42cbf7412b072502696d09c2
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-12-26 09:39:13 +01:00
momegahed 327ebf77ee [FIX] l10n_gcc_invoice: product name is not shown in arabic
Steps to reproduce:

-install l10n_gcc_invoice module
-switch to a company in Saudi Arabia (SA company)
-create and print an invoice with a product that has arabic translation

Bug:

in 880954ebfc

a change was introduced that causes the context on the fields
to be overridden by the env context

https://github.com/odoo/odoo/blob/16.0/odoo/addons/base/models/ir_qweb_fields.py#L120

this causes the arabic name `t-field` in this case to lose its context
along with the language information

Fix:

change it to `t-out`

OPW-3077547

closes odoo/odoo#108366

X-original-commit: 0113d8539334f76d364771deceb882714ddc36bb
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2022-12-25 09:47:52 +01:00
Ethan Hildick 82c72b58f6 [CLA] Update Studio73 CLA
Update the emails of all members and incorporate several new members as Studio73's contributors.
I confirm we have signed the CLA and read the PR guidelines at
www.odoo.com/submit-pr

closes odoo/odoo#108621

X-original-commit: ca8f11c739d05dfc21651d7ff1a8bd4fa0fcc4db
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-12-24 14:24:18 +01:00
Nshimiyimana Séna 68f1529490 [FIX] tools: set correct mimetype for XML files
Currently, the mimetype detection for XML files always returns
`image/svg+xml`.

opw-3062131

closes odoo/odoo#108644

X-original-commit: 6ea9e75d5a14cfe4a846be69e05c3c18f1daffcb
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-24 02:35:46 +01:00
Pierre Masereel 4ac3fbc5e9 [FIX] base: ir_attachment override traceback
When the _search method is called with, it passes this argument
to the other _search call in it con concatenate it with the
result. But when the count argument is true, it tries to take a sublist
of an integer which raise a traceback.

So we explicitly call it with count=False

closes odoo/odoo#108634

X-original-commit: 5c12edb989a044d35e8be93b40fdc0e3a66379ed
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-24 02:35:43 +01:00
Arthur Detroux (ard) 7c66694cdb [FIX] website: add a test on snippet cache
The last two parent of this commit introduced fixes towards the Snippet
Cache, more specifically, the snippet cache according to the snippet
language.

Commit [1] introduced a Snippet template "Cache" that keeps the snippet
templates in memory throughout multiple instantiation of the
SnippetsMenu. Unfortunately, while this improved performance, it also
introduced bugs where the cache was not properly cleared. Starting
the edition in translate mode, then switching back to master edit mode
would sometimes lead to the Snippets being loaded in the wrong language.

The parent commits fix that but this one introduces a test to make the
snippet cache and translation more robust.

[1]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af#diff-52a4f9d2c217548e69e6b7fd097f286f1754a6389734eea254b87255e501cbefR18

closes odoo/odoo#108643

X-original-commit: a066dc8319cc9c204656a25af16fc78ae618cd71
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-23 21:19:51 +01:00
Arthur Detroux (ard) 8d48efeece [FIX] web_editor: add snippet_lang as a template cache context key
In commit [1] it was decided that the Snippet Menu would have its UI in
the user's language, while the Snippets' Content would be in the
language of the website they are currently editing. To do so, a new
context key was added: Snippet Lang.

Unfortunately, while Odoo handles the compilation according to a
language, website_id and more, it does not do so according to the
snippet lang.

It would not be an issue if the Snippets were compiled only in edit
mode, as a Website only has one default language. Unfortunately the
Snippet Content is also rendered in translate mode (Since the
SnippetMenu is one big XML template), therefore it can be rendered in
different Snippet Lang (though it's useless).

This commit fixes that by adding Snippet Lang as a cache key so that if
the key is present, it will re-compile the template.

Steps to reproduce:
- Create a new language
- Translate a snippet (e.g. search s_cover view and translate contact
 us)
- Create a new website with 2 languages, the new language as default and
 english
- Enter translate mode
- Leave it
- Enter edit mode via the "Edit master" button
- Drop the translated snippet
- It will not be translated because the Snippet Menu was rendered in
English first.

A commit introduced after this one will test these steps.

[1]: https://github.com/odoo/odoo/commit/55a978aa86967581956f855a1c5db33b7425bd15

X-original-commit: 6eba6203e9f1b8a730ab53f80fea8e7b78818bc7
Part-of: odoo/odoo#108643
2022-12-23 21:19:51 +01:00
Arthur Detroux (ard) 0e73a5308a [FIX] website: invalidate snippet cache when changing language
Commit [1] added a snippet template cache so that if a user changes
pages on their website, they do not need to fetch the SnippetMenu from
the server again.

Unfortunately that commit added a few side effects that commit [2] tried
to fix since commit [3] made them apparent. However, there is still one
broken flow:

- Create a website with 2 languages, e.g. English (primary) and French.
- Visit the website in French and enable translate mode
- Save and click on the "Edit in Master" button
- Drag and drop a Snippet
- The Snippet is in the translated language

This commit fixes this broken flow by clearing the snippet cache when
changing the language of the website.

[1]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af#diff-52a4f9d2c217548e69e6b7fd097f286f1754a6389734eea254b87255e501cbefR18
[2]: https://github.com/odoo/odoo/commit/bb503962a36f3798c50049f2844e7b288b632955
[3]: https://github.com/odoo/odoo/commit/55a978aa86967581956f855a1c5db33b7425bd15

task-2687506

X-original-commit: eb214e1feb677c5061f9c034f3c4421a2109af2f
Part-of: odoo/odoo#108643
2022-12-23 21:19:50 +01:00
Adrien Dieudonné d816ef8939 [FIX] web: property fields should take all width
This commit restores the style we have for fields.
- Takes the full avalables space for the input value
- No limit for the label size
- Align property value to the top (only usefull in case of long label)
- Clean unnecessary css since we use grid

After this commit, the property field will be shown with the same
layout used for standard fields in groups.

closes odoo/odoo#108630

X-original-commit: a89c6763a7440822e839bdccc75d8a6177db7eec
Related: odoo/enterprise#35225
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2022-12-23 20:18:02 +01:00
Samuel Degueldre a5c0889748 [IMP] odoo,web: tests: ease memory leak debugging
This commit adds (in comments) the necessary code to (more) easily
detect memory leaks in the qunit test suite. Running the test with
those lines uncommented would log information about the heap size
after each test module and the delta of the module, after garbage
collecting.

Useful regexes to extract information from the log:
```
remove lines not containing "delta: ":
`(^.*?delta: .*$\n)|(^.*$\n)` => $1

extract deltas:
`.*suite (.*) -.*gc: (\d+).*delta: (-?\d+).*` => $1,$2,$3
```

closes odoo/odoo#108620

X-original-commit: 0d5cb1659468f01f1b6f88deca0b46c1810111b0
Related: odoo/enterprise#35224
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-23 19:19:15 +01:00
Aaron BohyandSamuel Degueldre 3ab33f6737 [FIX] web: assets: fix wrong usage of memoize
The `assets.loadBundle` function was memoized. However, this
function takes in arguments an object. What matters here is the
list of js/css libs/contents to load, and the methods to load them
are already memoized (based on the url to load, which is correct).

So the use of memoize for loadBundle was
 1) wrong, because you basically never call it twice with the same
    object reference, so you never do cache hits
 2) causing memory leaks because in mvc.js, it is called with the
    view controller instance as argument, which could thus never
    be garbage collected.

This commit remove the wrong usage of memoize, thus fixing the
memory leak.

X-original-commit: 921c68d587845785189c938aa90bd02b9936182f
Part-of: odoo/odoo#108620
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2022-12-23 19:19:15 +01:00
Aaron BohyandSamuel Degueldre 969bdafe1e [FIX] web: tests: App: correctly cleanup sharedTemplates
A lot of tests generate dynamic owl templates (e.g. form tests).
These are added in a data structure (sharedTemplates). To mitigate
the memory footprint, there was a piece of code aiming at clearing,
at the end of each test, templates generated during the test.
However, the way it was implemented was wrong, as the cleanup was
only done after the first test.

This commit fixes the issue, and thus improve the memory footprint
of the qunit suite.

X-original-commit: 6ba84b4da195d65f53c45a4e00a8ef7425f121de
Part-of: odoo/odoo#108620
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2022-12-23 19:19:14 +01:00
Aaron BohyandSamuel Degueldre 868adb0e46 [FIX] web: tests: clear handlers on LegacyBus
Before this commit, there was a piece of code aiming at clearing
event handlers registered on core.bus (the main instance of Bus),
registered during a test (main use case being: there is a service,
started in a test, and that service registers an event handler on
core.bus).

However, core.bus isn't the only instance of Bus, and this logic
should be applied to all of them (e.g. web_studio.bus). This was
a memory leak. This commit fixes it.

X-original-commit: 2e7dd01cfdad35b3c6384fec60b158747b86ab78
Part-of: odoo/odoo#108620
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2022-12-23 19:19:14 +01:00