Commit Graph
165814 Commits
Author SHA1 Message Date
Maryam Kia 23394cb345 [IMP] mail: Allow screen and video sharing at the same time
Before:
- sharing the screen stops sharing video and vice versa

after:
- If user starts to share screen at the same time with video sharing, a pip of video sharing appears on the call when user focuses on the sharing screen and vice versa. This pip is draggable and depends on the nearest corner to drag situation, will be located on the corner.

Task-3374606

closes odoo/odoo#130354

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-18 22:16:57 +00:00
Renaud Thiry 79e9665a49 [IMP] mail: improve Composer duplicates check
Only duplicate emails used to be checked when sending a mass mail.

However it is possible (e.g. using templates) to send a mass mail
to the same person containing different information.

The existing functions to allow models to specify emails
processed in the past by some other means are kept.

A new check is added in the processing that checks the full contents
of the message, subject and attachment ids.

The strings are not hashed as most situations are:
- Sending the exact same mail to everyone
  -> Only need to check against one message
   -> Same complexity as hashing

- Sending all different emails
  -> Checking inequality of str is usually very fast

For attachments, as we cannot compare them easily.
They are ignored for the purpose of equating emails
whenever there are the same number of attachments
in the email values as there are on the composer.

This is because each email should receive its own copy
of the composer attachments. If they have a different
number of attachments, they were generated dynamically
through reports and we assume they are all different.

We can thus remove the 'document based' information
as it is implicitly infered from this check.

-------------------------

Test utils are also updated for two purposes:

1. Add optional body and attachment_name discriminents
assertMailMail assumed all emails could at least be
differentiated by subject. Our test breaks that
assumption, so we use body and attachment to find the
best-fitting email based on the data passed in.

2. Check email_formatted on recipients
When using assertMailMailWEmails, we first find the
email using the non-formatted email of the recipient.
This does not match assertSentMail which checks against
the raw email_to value, which would often be formatted.

Task-2826811

closes odoo/odoo#99541

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 22:16:56 +00:00
Didier (did) 8ef53019db [IMP] web: add mail types file to _jsconfig
closes odoo/odoo#135751

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-18 20:56:24 +00:00
Damien Bouvy 500a17a20a [IMP] base: correct symbol position for MVR currency
Source: http://www.mma.gov.mv/#/currency/currencysymbol

Task-3508431

closes odoo/odoo#135744

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-09-18 19:43:06 +00:00
David Monnom (moda) 4f5dd90aa7 [IMP] pos_self_order: default user for self_order mobile
Following the Odo comment https://github.com/odoo/odoo/pull/129562#discussion_r1306030434

We need to ensure that we have a default user for the mobile SelfOrder
when no session is open.

If we don't have a user, the system will be in sudo mode and the price
calculation will be erroneous because the system has chosen the wrong
taxes: it doesn't know which company to use to calculate the taxes.

We now force the setting of a default user for pos_config with mobile
selfOrder enabled, so that when no session is open, the default user
will be used.

closes odoo/odoo#134273

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-18 16:48:02 +00:00
niyasraphy e4f251f8db [IMP] purchase: merge purchase_enterprise
before this commit, purchase_enterprise module is
not adding any functionality to the system, other
than adding few demo data records and passing a
context to an existing action.

initially this module is added to bring the
dashaboard functionality to the purchase app,
but with the introduction of the spread sheet
app, the added dashboard is removed from
the purchase_enterprise app in this
commit: https://github.com/odoo/enterprise/commit/61c8314728fc99dd8c7deb3c55d15e30b4844e18

after this commit, this demo data and context
is moved to the purchase app and remove the
purchase_enterprise app.

closes odoo/odoo#132475

Related: odoo/enterprise#45986
Related: odoo/upgrade#5064
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-09-18 15:42:43 +00:00
Aaron Bohy fd757d7f29 [FIX] web: action service: sanitize action.domain
When it is unset, the domain of an action can be either false or
the empty string, which in both cases means []. Before this commit,
we didn't process the domain in thoses cases (i.e. we kept the
false or empty string value). However, having an empty string as
domain could cause issues if it is manipulated by Domain/pyutils.
In particular, in stock.picking, clicking on "Insert menu in
spreadsheet" crashed before this commit.

To prevent those issues from happening, this commit sanitizes the
domain of the action at the first entry point, such that it's
always an array (the empty array in our case).

This commit comes with a test in enterprise, which reproduces the
scenario given above, as we couldn't find framework and blackbox
scenario to highlight it.

closes odoo/odoo#135738

X-original-commit: a7c32029aaf595b9b3ae13b9c425e384ab4c8305
Related: odoo/enterprise#47500
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-18 10:14:14 +00:00
niyasraphy bf9076439e [IMP] l10n_{}: redirect to own documentation
before this commit, the website link given to
l10n module was generic link of fiscal
localization.

after this commit, on clicking website/learn more
user will be redirected to documentation of specific
country localization.

closes odoo/odoo#135725

Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-09-18 10:14:12 +00:00
Victor Feyens 90796edd15 [FIX] website_sale: do not show unavailable carriers
Carriers with no/invalid/incompatible rules shouldn't
be displayed in the checkout process.

opw-3413820

closes odoo/odoo#135717

X-original-commit: 5052b9e4a15155c694cf005fdf330997770c6cac
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-18 10:14:11 +00:00
yhu-odoo 9e1a0de027 [FIX] mrp: set correct byproduct qty when update bom
When update bom for MO, we records the ratio of (qty on Bom) / (qty on
MO)
https://github.com/odoo/odoo/blob/25502b8513afc9fca0dcdef9df9e814eea2e4ae8/addons/mrp/models/mrp_production.py#L2356-L2361
so when add byproduct, it should be (qty on Bom) / ratio instead of (qty
on Bom) * ratio to get the qty for MO:
https://github.com/odoo/odoo/blob/25502b8513afc9fca0dcdef9df9e814eea2e4ae8/addons/mrp/models/mrp_production.py#L2336

closes odoo/odoo#135691

X-original-commit: 52c03ad19fc8a764cbb362528ae94537c56f2610
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-09-18 10:14:10 +00:00
yhu-odoo a7ec4d60e7 [FIX] mrp: Don't change product_qty/uom when update bom on draft MO
Fix the issue when update the bom on a draft MO, the product_qty and
product_uom_id will be reseted to 1.0 unit.
The original product_qty and product_uom_id hould be kept when update
bom.

X-original-commit: f1a397ede16c56db3410fd9c5fe387dc98c46422
Part-of: odoo/odoo#135691
2023-09-18 10:14:10 +00:00
Samuel Degueldre 4aaee61a5f [REF] website_slides: remove usage of legacy dialog to enroll
The Dialog widget is deprecated and will soon be removed, this commit
converts the usage of this dialog for the enroll buttons to use the new
dialog service.

To avoid duplicating the opening logic in the Quiz code, the selector of
the widget that opens the dialog now targets the #wrapwrap and uses
event delegation for the button, avoiding the need to manually spawn the
dialog for buttons added to the DOM after the first load.

closes odoo/odoo#135476

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-18 10:14:07 +00:00
Shubham Thanki 66e8e65682 [IMP] web: allow users to download multiple vcards at once
This commit adds a download vCard server action in the list view of contacts,
making it possible to download multiple vCards at once.

Task-3385058

closes odoo/odoo#135435

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 10:14:06 +00:00
Dawn Hwang fd1f6e1621 [FIX] base: Fix Swiss date and number formats
The fr_CH date format has been broken for years, with unnecessary spaces
after the period. This has been removed.

The de_CH thousands separator prematurely ends after the millions
because it does not loop indefinitely. This has been fixed as well.

closes odoo/odoo#135355

X-original-commit: 287a03224c9144bb547d2cf7cdc046b83b830a16
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-09-18 10:14:05 +00:00
Lucas Lefèvre (lul) 65962d09c3 [FIX] spreadsheet_edition: autofill references in pivot functions
See enterprise PR

closes odoo/odoo#135024

Task: 3458637
X-original-commit: 8bfc188ca4fb9cd8d1e351c0e6d4adbf195405fb
Related: odoo/enterprise#47224
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-09-18 10:14:05 +00:00
adsh-odoo 02720ba28c [IMP] website_event: disable register button and remove the deadcode
-> Prevent registration button activation without selected tickets.
-> Remove the deadcode which was there to append the warning when we click on
   the register button without selecting the ticket.

Task-3345854

closes odoo/odoo#131715

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 10:14:01 +00:00
Victor Piryns (pivi) c06881ff69 [IMP] mail: cleanup activities
Description:
The mail_activity table can grow quite large, for example a
business that is making heavy use of the CRM module, slowing down
searches on said table. A lot of users sets activities and then
forget about them, just polluting the database with useless data.
Also we currently keep the activities of archived users, which will
never be resolved, because said users has been archived, so it is
supposed that he will never be able to log in again to remove their
scheduled activities.

Solution:
- Delete activities when archiving an user
- Add a gc routine to delete overdue activities older than X years,
  where X is a system parameter.

Reference:
task-3337077

closes odoo/odoo#130895

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 10:14:00 +00:00
Victor Feyens bfbf9035d6 [CLN] website_sale: product_template.py
* clean fields definition
* partial methods reordering according to guidelines

closes odoo/odoo#126637

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-18 10:13:59 +00:00
Horacio Tellez (hote) 433e7e578e [IMP] website_sale: new ecommerce description
Today, we have `sale_description` visible on the eCommerce
(below the product name) and in the PDF reports.
We alse have `website_description` that is only on eCommerce,
below the product information.

Issues:
  - you might want a very long eCommerce description that is
    not printed on the pdf;
  - you might want to use text formatting on that description:
    bold text, bulleted list, accordion, .. --> not possible at
    the moment.

We are thus adding an `ecommerce_description` (HTML field) to
the product that will be shown on the product page and in the
shop if the product is selected.

Task - 2906587

Part-of: odoo/odoo#126637
2023-09-18 10:13:59 +00:00
std-odoo 0a506d63c6 [IMP] mail: convert the "Reset Password" template into QWeb
Purpose
=======
Convert the "Reset Password" template into QWeb, so the users can't
modify it. All values are manually overwritten anyway, and we don't
want the users to be able to change it.

Technical
=========
Now we also manually rollback the transaction, to be sure to not keep
any record in database related to the password change.

We manually create the <mail.mail> because all methods that allow to
send an email from a QWeb template in mail thread use the mail composer,
and `user_notification` is not supported for the `message_type` in this
wizard.

Before, force_send was set to False only when we import users.
Now we just skip the email sending when we import and always set
force_send to True.

Task-3265210

closes odoo/odoo#125874

Related: odoo/upgrade#4807
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-18 10:13:59 +00:00
thsh-odoo f115aa013b [FIX] website_slides: inaccurate completion time
How to reproduce the bug
=========================.
1. Open e-Learning.
2. Create a section.
3. Add a content in the created section and change the default duration .
-> New duration is not set and it is taking the default duration only

Technical
=========
https://github.com/odoo/odoo/commit/7b7fdf8f2771840797e1d416a8275ba3666ab542
This commit introduce the feature to set default time for the content in the
backend if user put the Duration field empty for that content but because of
the extra 'not' in the condition it was always getting true so every time
default value is stored and if completion_time is not there then it is set
to 0.

After this Commit
==================
Now whatever duration user will put, it will be set and if completion_time is
not given then it will give us the default time.

Task-3340462

closes odoo/odoo#135668

X-original-commit: 5cae7c3fa6f564a3f8d42cb255377cdc2ef86276
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-09-18 08:46:58 +00:00
can-odoo 402bf48fb5 [FIX] website: remove ToC snippet on removing last content
The user has the option to remove the last block from the Table of
Content snippet prior to this commit, but doing so breaks the Add Item
feature because there is no reference to adding a new item in the
snippet area, and doing so is also not a good idea.

If the block is the final one in the Table of Content after this commit,
removing the last Content will remove the ToC snippet.

task-3081442

closes odoo/odoo#135733

X-original-commit: 164db4013439042725c94f1690ae0a311be9d554
Signed-off-by: Guillaume Dieleman (gdi) <gdi@odoo.com>
2023-09-17 14:37:09 +00:00
niyasraphy 31f0b21cda [IMP] core: remove wrongly added empty file
added in: https://github.com/odoo/odoo/commit/6cc1c435fd3bb9ed71c4a02796099c6e6f6b5d2b

closes odoo/odoo#135724

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-09-16 09:42:52 +00:00
Claire Bretton (clbr) c1996e335e [FIX] account: fix self.id.origin in get_last_sequence()
When trying to customize Swiss invoice report with QR-Bill
through Studio an error was thrown because it tries to _compute_name()
on a dummy 'account.move' record with self.id=0.

This is part of a more general task in master around report customization
but it make sense to backport the fix in all stable versions.

task-id:3492033

closes odoo/odoo#135722

X-original-commit: d95aae51a23ff163e959a1f3064f42a89cfaf516
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-09-15 20:34:33 +00:00
Thomas Lefebvre (thle) 6f77665383 [FIX] website_sale: modify template if fiscal position changes
Steps to reproduce:
-------------------
- Without going to the shop first, login with a user
   who triggers a different fiscal position and pricelist than the public user.
- In another browser tab (incognito or separate tab),
    go to the shop with the public user.
- Select the pricelist previously used
   by the user in the other session.

Issue:
------
We obtain the prices for the other user's fiscal position.

Cause:
------
When we login with a user who triggers a fiscal position mapping
and go to the `/shop` page, `products_prices`  will be frozen with values
calculated with the fiscal position (via `_get_sales_prices`).

If we change our fiscal position, but use a template that contains
the same `t-cache` key, we won't re-evaluate the template.

As a result, it is possible to obtain values calculated
for another fiscal position.

Solution:
---------
As the template values take into account the fiscal position,
we need to add a `t-cache` key to identify this fiscal position.

opw-3316153

closes odoo/odoo#135709

X-original-commit: 45d765c723a8e7bb05f1b79f6234559018660262
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-09-15 20:34:32 +00:00
dane@odoo.com 7a85ea2eeb [FIX] mass_mailing_themes: fix image path
The image from mass_mailing was moved to mass_mailing_themes
Therefore we should also update its path.

task-3328661

closes odoo/odoo#135692

X-original-commit: fc34e1049c2ad979df611f1aa4b57f66b8cdf5b1
Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
2023-09-15 20:34:30 +00:00
Robin Lejeune (role) e3b3bc2978 [FIX] website: fix animations in popups without backdrop
Since the scrollbar was moved from the window to .modal-content at [1],
animations inside popups without backdrops would not be working anymore
because the scroll was not checked against the right element.

This commit fixes this by using the right scroll element's scrollTop.

task-3328419

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

closes odoo/odoo#135404

X-original-commit: 1b618b323424e29b0ddf9eae686e0ef2540b3627
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-09-15 20:34:29 +00:00
Valentin ChevalierandMathieu a9f9316b22 [IMP] website_sale: Show a toast notification when add to cart
This commit introduces an exciting new way to have visual feedback when
a customer adds a product to the cart.

Instead of an animated image moving toward the cart icon, a toast
notification that sums up the product(s) added to the cart is now shown.

Note that a minor change to `notificationService` has been made to allow
more customization. It is now possible to extend it while specifying a
custom `NotificationContainer`.

task-3492346

closes odoo/odoo#133990

Related: odoo/upgrade#5106
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Mathieu (mano) <mano@odoo.com>
2023-09-15 20:34:28 +00:00
Valentin Chevalier 95bb1c906b [FIX] website_sale: improve the speed of /shop/cart/update_json
Before this commit, a lot of `/shop/cart/update_json` wrongly requested
to re-rendender cart templates.

Now, calls to `/shop/cart/update_json` will specify if they needs the
updated cart templates or not.

Part-of: odoo/odoo#133990
2023-09-15 20:34:28 +00:00
FrancoisGe d84e570630 [FIX] web: switching pages doesn't change pager limit
Before this commit, in form view, editing a record then switching page
incremented the pager limit by 1.

closes odoo/odoo#135659

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-09-15 19:14:28 +00:00
Moises Lopez - https://www.vauxoo.com/ 3d3327d5f0 [IMP] point_of_sale: Speed-up queries filtering by 'pos_order.state'
The following method:
 - https://github.com/odoo/odoo/blob/2091994c/addons/pos_restaurant/models/pos_config.py#L40

Gets the following query:

    SELECT min("pos_order".id) AS id,
    count("pos_order".id) AS "table_id_count",
    "pos_order"."table_id" as "table_id"
    FROM "pos_order"
    LEFT JOIN "restaurant_table" AS "pos_order__table_id" ON (
        "pos_order"."table_id" = "pos_order__table_id"."id")
    WHERE (("pos_order"."state" = 'draft')
        AND ("pos_order"."table_id" in (TOO MANY IDS HERE)))  -- for this case 178 restaurant_table records ids
    GROUP BY  "pos_order"."table_id", "pos_order__table_id"."id"
    ORDER BY "pos_order__table_id"."id"

It spends 24ms without index

After creating index it spends 0.57

It is not the unique side filtering by pos_order.state column

Check the following lines of code:
 - https://github.com/odoo/odoo/blob/f5553c550/addons/point_of_sale/models/pos_order.py#L678
 - https://github.com/odoo/odoo/blob/f5553c550/addons/point_of_sale/models/pos_order.py#L690
 - https://github.com/odoo/odoo/blob/f5553c550/addons/website_sale_coupon/models/sale_order.py#L91

closes odoo/odoo#135636

X-original-commit: a658dfcd60032cfe01f2f019f4bf05e140d68339
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-09-15 18:13:47 +00:00
Dylan Kiss (dyki) f31a0ea7a5 [IMP] account: add date options for tax periods
Currently the tax report always opens the previous month by default.
Since tax periods are not always months, it makes much more sense to
open the previous "tax period" (whatever length it has) when opening the
tax report.

In order to allow that, this commit introduces a "This Tax Period" and
"Previous Tax Period" option for reports and sets the default period
for the tax report to "Previous Tax Period". The rest of the
functionality is done in the related enterprise commit.

task-3481913

closes odoo/odoo#133715

Related: odoo/enterprise#46601
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-09-15 16:45:52 +00:00
Julien Carion (juca) 1a44537095 [IMP] mail: avatar card preview v2
This commit changes the behavior of the avatar card preview so that it
is now triggered on click instead of on hover and the previous behavior
of the click event (open chat) is therefore removed. It also adds the
functionality to the Message and Activity components of discuss so that
clicking on the avatar inside these components will also show the card.
It also makes sure that the id of the user is added to the persona even
if nothing indicates that it should.

task-3442819

closes odoo/odoo#131355

Related: odoo/enterprise#47084
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-09-15 16:45:50 +00:00
Victor Piryns (pivi) 30650af183 [FIX] project: improve tags name_search robustness
Description:
The commit 05855b6bb6d8a22ceb1f8b25332a146eed912660 introduced a
fast-path for the name_search on tags from the form view of tasks.
But the implementation was too complex and wasn't handling correctly
all possible operators (it just had a fallback on the default
parent name_search implementation).
The aim is to simplify the code for better robustness and
maintainability long term.

Fix:
Convert the query to it's equivalent python code. It has a slight
performance regression than the previous implementation (we are
making 3 queries worse-case instead of 1), but the regression is
non-significant and not critical.

Affected versions:
16.0 up to master

Reference:
task-3503721

closes odoo/odoo#135631

X-original-commit: 9d95314aaca7c087d7159e3f603bcea99f69b217
Signed-off-by: Audric Onockx (auon) <auon@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-09-15 12:15:17 +00:00
Loukas Wets (lowe) 8ee8010cf6 [IMP] pos_self_order: install kitchen display for pay after each
Previously, when ordering with the Self app and paying after each order,
since paid orders aren't displayed on tables in floor plan, and orders
aren't send to kitchen directly. The flow is stuck.

This PR makes sure that the kitchen display is installed if the pay
each order is set. If not it will install it.

Because the kitchen display is only available in Enterprise, the
paying after each order mode is not available in community. When selecting
the mode in community the upgrade to Enterprise popup will be displayed.

task-3429195

closes odoo/odoo#135534

X-original-commit: 6c2dd0a53cb4dd33af01fdc3553ba2b379188265
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Loukas Wets (lowe) <lowe@odoo.com>
2023-09-15 12:15:16 +00:00
Mathias Mathy (MAMA) 167c51b1f9 [IMP] stock{_dropshipping},mrp,repair: remove onchange('code') from stock_picking_type
Legacy code still use 'onchange' on the 'stock.picking.type' field code
to compute the different xxx_location_id.
As it is no more viable, this commit replace all these onchange by
compute methods.
These changes also has a side effect as some already existing compute
methods now get a set of 'stock.picking.type' in input, such that these
methods are also updated to handle this case.

closes odoo/odoo#134650

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-15 12:15:14 +00:00
sofiagvaladze 597c9fd854 [IMP] hr_recruitment: sanitize applicant's phone/mobile and normalize email
In order to have faster and more reliable search for similar applicants,
1 - we add normalized email and sanitized phone and mobile fields on hr.applicant.
2 - we use those fields for a search of similar applicants.

task - 3282883

closes odoo/odoo#120521

Related: odoo/upgrade#4977
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-09-15 12:15:12 +00:00
Sébastien Theys c6df607104 [FIX] mail: fix warning in user_modify_own_profile_tour
Follow up of https://github.com/odoo/odoo/pull/129239

Fixes runbot issue https://runbot.odoo.com/web#id=24581&view_type=form&model=runbot.build.error&menu_id=405&cids=1

closes odoo/odoo#135617

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-09-15 10:48:32 +00:00
Louis (loco) 597b519c4d [FIX] *: enable to use the backslash character in a field label of form
*website

Steps to reproduce the bug:
- Drop the "Form" snippet on the website.
- Add a new field.
- Replace the field label by "test\".
- Save.
=> Traceback of type "Cannot read properties of null (reading
'dataset')" appears.

In the `start()` function of the `s_website_form` public widget, the
field names of the form are extracted thanks to the `serializeArray()`
function. The field elements are then found by doing a `querySelector()`
on the field names. In our case, the field name of the new field
extracted by `serializeArray()` is `test\\` (there are two backslashes
because the field name is a string so the first backslash has to be
escaped by a second backslash). The problem is that this string has to
be escaped one more time in order to be used in a `querySelector()`. As
it is not the case, the result of the `querySelector()` is `null`
leading to a traceback when the code tries to access its dataset. To
solve the problem, the character `\` is encoded before being stored in
the `name`, `data-name` or `data-visibility-dependency` attribute of the
field element. Thanks to the encoding, the `querySelector()` operation
can perform correctly on those attributes.

opw-3470291

closes odoo/odoo#135587

X-original-commit: 03f230a77c0d38b46944d45b4991f48e45b275dd
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-09-15 10:48:31 +00:00
duongnguyen b69200ac46 [IMP] hr_holiday: archived employees not display in time off
closes odoo/odoo#135581

X-original-commit: ba4d3de6673bcc149a813cc40c4e088d8f0367fc
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-15 10:48:30 +00:00
Loukas Wets (lowe) 7a37975cfa [FIX] pos_restaurant: concurrent update error
Previously when a table was deleted 2 write calls were sent. This was a
problem because it causes a concurrent update error. One of the write calls
is undesirable and comes from the unWillUnmount from EditableTable component.
This commit removes the unwanted write call.

closes odoo/odoo#135512

X-original-commit: b1c5267845f82e8444d8548cb317d23721c31592
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Loukas Wets (lowe) <lowe@odoo.com>
2023-09-15 10:48:29 +00:00
Pierre Paridans 25d0783b59 [IMP] web: reduce jquery-ui lib (remove useless modules)
Includes: widget.js, position.js, data.js, keycode.js, scroll-parent.js,
unique-id.js, widgets/draggable.js, widgets/droppable.js,
widgets/sortable.js, widgets/autocomplete.js, widgets/menu.js,
widgets/mouse.js

task-3439226

closes odoo/odoo#135491

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-09-15 10:48:28 +00:00
Pierre Paridans 68e78881bf [IMP] website_sale: remove dependency on jQuery UI Effects
This commit replaces the usage of jQuery UI Effects "Expo" by the
default jQuery effect (aka. "swing"), but shorter to keep a similar
"punchy" feeling when adding a product to the shopping cart.

Note: this will allow to remove jQuery UI Effects in a follow-up commit.

task-3439226

Part-of: odoo/odoo#135491
2023-09-15 10:48:28 +00:00
Maruan Aguerdouh (magm) 59b2c10cbf [FIX] website_sale: add to cart modal properly displayed on list view
Made the modal for add to cart to be the same when in Grid view and list
view. We achieve this by modifying the css inside
`#products_grid.o_wsale_layout_list`.

opw-3235969

closes odoo/odoo#134699

X-original-commit: 643141dd284f1da869f540dd7aabbe9753eec3a5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-09-15 10:48:27 +00:00
Mathieu Duckerts-Antoine 4aa5f00dc9 [IMP] web: sample server: support of array_agg
In SampleServer, we make _mockReadGroup support array_agg (at least for
the field id).

closes odoo/odoo#135020

Related: odoo/enterprise#37757
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-09-15 10:48:25 +00:00
Quentin 413c5a878c [FIX] account_edi_ubl_cii: handle 0 basis_qty and None attachement_name
When parsed, if the attachment has a basis quantity of zero,
it creates an error, because it is used in a division.
The condition that checks whether is computed
should be done only if this variable is none.

The code does not handle if `attachement_name.text` is None,
which can be caused by an orphan ID tag (e.i. "<cbc:ID />") ,
in the xml of the pdf.

opw-3470969

closes odoo/odoo#135566

X-original-commit: bfc83df736596a32f6009ad673194db20f18dec8
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-09-15 09:22:09 +00:00
Florent de LabarreandMiquel Raïch eee455e799 [FIX] account: fpo map account is not used
Before this commit, the fiscal position is not used to determine account.

closes odoo/odoo#135559

X-original-commit: 57f71fa2666af591a8d3d28af65fcfab8a7d3785
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Co-authored-by: Miquel Raïch <miquel.raich@forgeflow.com>
2023-09-15 09:22:08 +00:00
Benjamin Vray b9c0d9f780 [FIX] web_editor: fix oi icons css for editor panel
Since the commit [1], some Font Awesome icons have been replaced by 'oi'
icons in the editor panel. This has resulted in a situation where both
'fa' and 'oi' icons coexist.

These changes have caused two issues in the editor panel:

- The icons in the two buttons used to flip a background shape are no
longer centered within their buttons.

- When a row of buttons contains a mix of 'oi' and 'fa' icons, all these
buttons no longer have the same width. This issue was identified in
Master when new options for flipping/rotating an image shape were
introduced (see this commit [2]). Even though this bug may not be
visible in version 16.3, it is still necessary to address it here since
any potential changes could reveal this bug.

This commit resolves these issues by adjusting certain parts of the CSS
code of the the editor panel to handle 'oi' icons in the same way as
'fa' icons for these two specific cases.

[1]: https://github.com/odoo/odoo/commit/418413e4997a6b65eb7ad9e9ef8aba42805f1c0c
[2]: https://github.com/odoo/odoo/commit/fbb395021da5e8ba115d36dfd683f8576a74bf80

task-3493051

closes odoo/odoo#135330

X-original-commit: 3729cf6ab4261a29431ef05fcb7cc33ba5e3ad5a
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-09-15 09:22:07 +00:00
Ivan Rasputin 1711e91257 [IMP] core: test exporting of translation files
Static qweb files are not tested for syntax errors.
This commits adds a hacky way to do this job: we test exporting of translation files.

Inspired by the following PRs, that were made as a response for errors caught by sentry

* https://github.com/odoo/enterprise/pull/43975
* https://github.com/odoo/odoo/pull/128221

closes odoo/odoo#128445

Related: odoo/enterprise#44074
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-15 09:22:04 +00:00
oco-odoo 80b4c4c623 [FIX] account: reports: translate line codes properly in copied aggregation formulas
Example: Copy the Belgian P&L, try to open the copied report => error message saying some aggregation terms cannot be expanded. If you open the its form view, you can see that line BE_PL_14's balance formula has been translated from this

BE_9906.balance + BE_791.balance - BE_691_2.balance + BE_794.balance - BE_694_6.balance

to this on the copy:

BE_9906_COPY.balance + BE_791_COPY.balance - BE_691_2_COPY.balance + BE_794.balance - BE_694_6.balance

This is buggy ; BE_794.balance and BE_694_6.balance should be BE_794_COPY.balance - BE_694_6_COPY.balance, in order for them to match the other lines of the copied report properly.

This bug touches other reports more generally. It was due to the fact we replaced the codes in aggregations while we were copying the lines, and not after copying all the lines. Because of that, lines that were referrenced by an aggregation expression belonging to a line coming before them in sequence were not taken into account, as they were not part of the code_mapping dict yet.

OPW-3505592

closes odoo/odoo#135585

X-original-commit: 43ed3e69291833ca82cd1257ade021862997828c
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-09-15 08:08:36 +00:00