Commit Graph
126101 Commits
Author SHA1 Message Date
Christophe Monniez e2ff2fd29b [FIX] link_tracker, pos_mercury: use unescape from html
As werkzeug.utils.unescape is deprecated in werkzeug 2.0 and the
markupsafe version of unescape just uses the built-in html.unescape [0],
we can use directly the same built-in method.

[0]  pallets/markupsafe@c35603a903

Part-of: odoo/odoo#91927
2022-05-23 08:29:54 +02:00
Christophe Monniez 65c8814a2f [FIX] various: replace deprecated currentThread method
CurrentThread is now really deprecated in Python 3.10 ... Time to
change.

Part-of: odoo/odoo#91927
2022-05-23 08:29:52 +02:00
Xavier Morel 2041f55c85 [FIX] auth_oauth: restore fetching uid from user_id
In discussing 56fe16bd I was reminded to re-set the `user_id` from
`sub` in case an override / other client would be using it, but we
didn't think that an override might also be *setting* this work key,
which apparently is the case.

Therefore restore the old behavior of *getting* the user_id from the
response object, migration to using `sub` (and removal of compat with
`user_id` and `id`) will be done when the module is reworked and the
flow compatibility, nonce, etc... are all fixed.

closes odoo/odoo#91996

X-original-commit: a787a2f644e9e83dc6320eaf372e657718fd2e22
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-05-23 07:33:43 +02:00
alt-odoo e7ebb669db [FIX] website_hr_recruitment: allow portal users to filter by department
Currently, only a public user or an internal user can access HR
department information. This is causing an access rights error when
trying to filter job offers on the website if connected with a portal
user, while there is no error if not connected (public user). We should
have the same behavior for the two cases.

closes odoo/odoo#92003

X-original-commit: 689a3aa9bf08bf3567c0fa0cc4cf67cc3d7e0b54
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Alex Thuyls (alt) <alt@odoo.com>
2022-05-21 12:10:11 +02:00
David Monjoie 7a14ea6986 [FIX] web_editor: prevent media selection during search
When updating the results following a change in the search filter or the
source sources filter (All, Illustrations, ...), the list of media is
regenerated to match the new results. If the user clicks on one media at
the right time after the search is triggered (not too fast but not too
slow either) it is possible to select a media which id is out of sync
with the new state of the widget, thus prompting `_onAttachmentClick` to
provide `undefined` to `_selectAttachment`, which ultimately leads to a
traceback in `_highlightSelected` when accessing either `media.id` or
`attachment.id` depending on the case.

This commit fixes the issue by disabling pointer interactions with
the attachments during the search and rendering update process.

closes odoo/odoo#91985

X-original-commit: bc9db4e5a5559692f461acc7402df969b6236481
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-20 21:09:08 +02:00
Federico (fega)andAndrea Grazioso 9c35ab88fc [FIX] account: multi-company error bill created by email with alias
Steps to reproduce:
- Set up an alias to receive vendor bills to company 2
- Forward a mail to this alias from an internal user
- The mail should have the email address of a partner belonging to company 1 in it

Current behavior:
- The partner from company 1 can be set as vendor even tho the vendor bill will be from company 2 (inconsistent)
- This leads to a multi-company error, and you can't open the bill as an user who can see it but not the partner.

Intended behavior:
- Partner from company 1 shouldn't be set as vendor if the vendor bill has been created from email alias of company 2.

As the intended behavior says, the code avoids to set the vendor if the bill is created through an alias.

opw-2587047

closes odoo/odoo#91973

X-original-commit: 4d5bb1fd46546870cd10d8dcd5b229de68a2e284
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: Andrea Grazioso (agr-odoo) <agr@odoo.com>
2022-05-20 21:09:04 +02:00
Mathieu Duckerts-Antoine 01d7f98e24 [IMP] web: search: domain evaluation uses action context
It is now possible to get access to the action context keys when the
search filters are evaluated. This means that a search arch filter like

    <filter name="my_filter" domain="[('my_field', '=', context.get("my_value))]"/>

can be safely evaluated if "my_value" is in the action context (or in
the user context or is builtin as before).

closes odoo/odoo#91959

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-05-20 21:09:00 +02:00
Nicolas Bayet 36e80e02a8 [FIX] web_editor: fetch undraw images in website and note
task-2794153

closes odoo/odoo#91970

X-original-commit: 536b2ff35f28836ef14cbb353b4749adee21aaad
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-20 20:14:23 +02:00
tsm-odoo ec532560d9 [IMP] mail: move discuss widget remaining logic to discuss_container
This PR prepares the ground for the one introducing the new environment in the discuss
app. Indeed, the discuss widget will be removed since it was used as an action. The discuss container
will instead be added to the action registry.  Now that the logic has been moved to the discuss_view
model, we can move the logic inside the init function to the discuss_container setup.

task-2582313

closes odoo/odoo#91890

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-20 20:14:16 +02:00
kais-odoo a6be4dea7c [IMP] rating: rename the title of rating submit page
Purpose of the commit is to reword the rating submit page
into "Rate our Services"

task-2823445

closes odoo/odoo#90979

Related: odoo/enterprise#27152
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-20 19:14:59 +02:00
Laurent Stukkens (LTU) 53ed5d54cb [FIX] project: remove unnecessary condition in _onDeleteColumn
This commit removes the unnecessary condition on modelName as the code
stands in `ProjectTaskKanbanColumn` which is only used in the
`project.task` kanban view.

closes odoo/odoo#91965

X-original-commit: cb55586bd3da19a6fbbb22728f9d2961830e1592
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-20 17:53:14 +02:00
Cedric Prieels (cpr) da1b2c0c3c [IMP] hr_timesheet,timesheet_grid: add new pivot measures and generic improvements
A new report was created for timesheets, also introducing new measures regarding
the (non-)billable time (percentage) and the timesheets revenues/costs. Some general
improvements were furthermore introduced in the timesheet apps.

See task-2783955

closes odoo/odoo#88072

Related: odoo/upgrade#3509
Related: odoo/enterprise#25922
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-20 17:53:10 +02:00
Simon Genin (ges) 8c3307a6b5 [FIX] web: fix field view get debug menu item
closes odoo/odoo#91943

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-05-20 16:46:09 +02:00
Valentin Chevalier 7f6f6a545c [FIX] payment,sale: fix access error when using the capture or void buttons
Before this commit, users may saw the capture and void buttons but
couldn't use them.

As capture or void actions need to access acquirer-related fields,
these actions are now sudoed to allow any users that see the button
to use it.

The access rules and rights are also checked before executing the action
to avoid abusive RPC calls.

task-2785144

closes odoo/odoo#91923

X-original-commit: 2e351d6ff9b7f72b486e83c827ff6e15a05c3331
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-20 15:25:46 +02:00
Valentin Chevalier ccf8ca3c04 [FIX] payment: show capture&void buttons to the right users
Users without the right permission see the buttons but can't use them.

Capture and void buttons are now only visible and usable for admin or
users in account.group_account_invoice group (for invoicing module).

task-2785144

X-original-commit: db6b54cc49ba7d9266e766112017604ed98c2cb3
Part-of: odoo/odoo#91923
2022-05-20 15:25:46 +02:00
Antoine Guenet da775cf678 [UPD] point_of_sale: update html2canvas library to latest version
The `html2canvas` library had been downgraded to its version from 2013
because of an issue with RTL rendering (see [1]). In the meantime, the
library explicitely introduced RTL rendering support (see [2]).
Upgrading the library to its latest (2022) version means a lot of old
bugs are fixed.

[1] https://github.com/odoo/odoo/commit/659e2857a651ea5f6df4a7139836d7f7398c40da
[2] https://github.com/niklasvh/html2canvas/pull/2653

closes odoo/odoo#91773

Related: odoo/enterprise#27527
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-20 15:25:23 +02:00
dbkosky af942f5f97 [IMP] account_intrastat:fields in grouped aml view
This commit refactors the protected fields out of the hardcoded list in
the account_move_line model, and into a function that can be overriden
in inherited models.

This allows for account_intrastat to specify that the intrastat
transaction code field and the intrastat product origin country field
should not be editable after the accounting lock date.

(In the corresponding commit these intrastat fields are added to the
journal views)

related PR: https://github.com/odoo/enterprise/pull/27049

closes odoo/odoo#91134

Task-id: 2753542
Related: odoo/enterprise#27049
Signed-off-by: William André (wan) <wan@odoo.com>
2022-05-20 15:25:20 +02:00
Dossogne Bertrand c5dff04665 [IMP] hr_holidays: improve cancel interface
This commit aims to improve the time off experience by:
- fixing the "cancelled" ribbon on time offs
- removing the archive dropdown action
- removing the "off until" banner in discuss if the user's leave is not validated

TaskID 2800647

closes odoo/odoo#87650

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-05-20 15:25:13 +02:00
mit patel e780665a09 [IMP] website_sale_slides: improve design of 'Start Learning' card
Currently when user purchases a course and completes the payment, the
card of the  purchased course is shown with 'Start Learning' button.
However, the layout can be improved.

This commit adds the short description of the course, duration and
steps of the purchased course to provide a bit more information to
the user. Apart from that, the title is now clickable and the
information part now occupies a bit more space than the image.

taskId-2790996

closes odoo/odoo#86873

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-05-20 15:25:10 +02:00
tsm-odoo 2c16b5939d [FIX] mail: fix incorrect seen_message_id in tests
One of the discuss_tests assumed that pyEnv.create returns a record while it returns an id.
Therefore, this test was setting a relational field to undefined instead of the id of
the related record.

closes odoo/odoo#91885

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-20 13:15:53 +02:00
Ipsita Borisagar c272573905 [FIX] mail, test_mail_full: remove an obsolete method
Before this commit:

There is an obsolete method 'channel_fetch_listeners' which is not needed now.

After this commit:

Removed this obsolete method.

Task-2827899

closes odoo/odoo#91876

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-20 13:15:49 +02:00
Valentin Chevalier 691ab5835b [IMP] payment, *: hide tokenization checkbox when paying a subscription
*: account_payment, sale, website_sale

Users should not be able to discard the tokenization of their payment if
they pay for a subscription.

This commit introduces a new helper method to better predict when the
tokenization checkbox should be shown or hidden. This also ensures that
the behavior will be the same across all modules.

task-2695201

closes odoo/odoo#91860

X-original-commit: 1d8dc53f8ed2a967b35213bc913cdfbc42ff15bc
Related: odoo/enterprise#27568
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-20 13:15:46 +02:00
Sébastien Geelen (sge) 38a05bac1c [FIX] website: fix linting errors
closes odoo/odoo#91840

X-original-commit: 0f1c783122d9ee30dd5c6f5bcb375e34067766c6
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-20 13:15:40 +02:00
Sébastien Geelen (sge) ce067c3b56 [FIX] web_editor,website,website_sale : fix products header edition
Prevent edition on e-commerce products header bar.
Since we cannot save any change done in the header object anyway,
And some edition would trigger error.
We put the all bar in a read-only mode.

task-2745151

X-original-commit: e2f7b8fad76dc816b2f6864340d3740446117cdb
Part-of: odoo/odoo#91840
2022-05-20 13:15:39 +02:00
Sébastien Geelen (sge) 6a9fd6b827 [FIX] web_editor: fix some linting errors
closes odoo/odoo#91786

X-original-commit: 46094420d70bfef0e9834a1ed7ef60beab1ccb22
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-05-20 13:15:30 +02:00
Sébastien Geelen (sge) a3ee176405 [FIX] web_editor: Fix style formating traceback
In some case, when removing format on element with multiple textNode,
the code generate a traceback.

The loops in `toggleFormat` provide a limit element `closestDecorated` to
the `splitAroundUntil` util. However this limit element can be split and
dumped by the format removal. In this case the reference was never encountered
in the DOM by the `splitAroundUntil` code and will bubble all the way to the
`<html>` TAG an try to split it, which generate an error.

We fix it by getting the `closestDecorated` in every loop.

task-2850686

X-original-commit: 2d93345c38f55c276370d0059d562d28320db2fb
Part-of: odoo/odoo#91786
2022-05-20 13:15:30 +02:00
Sébastien Geelen (sge) cc80572ee6 [FIX] web_editor: fix missing strikeThrough tests
Add some unit test for strikeThrough format.
Those tests reveal some bug in the current formating code.

task-2850686

X-original-commit: 4d8e1dc381d01bb254d2e806a335a40733608f2e
Part-of: odoo/odoo#91786
2022-05-20 13:15:30 +02:00
Sébastien Geelen (sge) 491a9d6399 [FIX] web_editor: fix unit test
Wrong contentAfter labeling.

X-original-commit: 22bb8ae8e131a576987e95911d229aad42d00193
Part-of: odoo/odoo#91786
2022-05-20 13:15:30 +02:00
Didier (did) 97dcefc91a [IMP] mail: remove isDisabled props for FollowerListMenu component
closes odoo/odoo#91616

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-20 13:15:21 +02:00
Brieuc-brd 192b9258c2 [IMP] mail: RtcActivityNotice, increase visibility
This commit improves the layout of the `o_RtcActivityNotice_button` to
increase its visibility.

task-2853027

closes odoo/odoo#91289

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-05-20 13:15:15 +02:00
Brieuc-brd 2a6956785e [REF] mail: RtcActivityNotice, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2853027

Part-of: odoo/odoo#91289
2022-05-20 13:15:14 +02:00
Kamlesh Pathekar 7c3de25673 [IMP] hr_holidays: align legend labels in calendar view
This commit to align legend labels to the corresponding icon.

task-2784839

closes odoo/odoo#87614

Related: odoo/enterprise#25758
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-20 13:15:00 +02:00
std-odoo 9c1cdd330e [IMP] mail: avoid email loops when Odoo reply automatically
Purpose
=======
In this commit, we will fix the loops that occur when you send an email
to an alias (to create a ticket e.g.). In that case Odoo can reply
"Your ticket has been created" and then the auto-replier of the user
can reply to this email and the loop occurs.

Specifications
==============
To solve this issues, we add 2 system parameters
- <mail.gateway.loop.minutes>, 120 minutes by default
- <mail.gateway.loop.threshold>, 20 by default

When an email is sent to an alias, we look on the last records created
<mail.gateway.loop.minutes> minutes ago. If we overcome the limit
<mail.gateway.loop.threshold> the email is ignored.

Alias creation detection
========================
To detect the number of records created by a specific email address we
use the `_primary_email` attribute set on the model.

Task-2294034

closes odoo/odoo#78597

Related: odoo/enterprise#21772
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-20 13:14:56 +02:00
Andro Gvivradze 0c55bfaf67 [FIX] point_of_sale: update customer screen after clicking on "New Order"
When customer pays for the order and cashier validates it and creates new order, customer screen does not update.
This means that new customer can still see the previous order until cashier starts adding new products to empty order.

With this fix customer screen will update after cashier clicks on "New Order" button.

fixes OPW-2734487

closes odoo/odoo#91868

X-original-commit: c8c7a2f9da1d0f5b6e0725f56269d7e4b4802d80
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-05-20 10:56:59 +02:00
Ivan Yelizariev 5f7602f4e1 [FIX] account: make action consistent with smart button value
Total invoiced is computed with `active_test=False` [1], however the
corresponding action didn't have that context. Since Odoo 14 `child_of` domain
filters out unaccessible records (including archived ones) [2].

Fix it by adding the context to the action.

STEPS:

1. Have a active contact that has an amount invoiced (invoices pointing to this contact name).
2. Click through on the amount invoiced button, and receive a list of relevant invoices.
3. Now go back to the contact, and archive the contact.
4. The smart button containing the amount invoiced stays the same.
5. Click through on the smart button again

BEFORE: no invoices
AFTER : listed invoices corresponds to the computed total value

[1]: https://github.com/odoo/odoo/blob/574ca75ab6fa583aabc0c1cfc65206e72864e546/addons/account/models/partner.py#L379
[2]: https://github.com/odoo/odoo/commit/3e1b960acf3f6a726338476ba9e62e5ef5c84ef9

opw-2853525

closes odoo/odoo#91828

X-original-commit: bf96188abbf8ad19d1a2f8f82a1e6248245778b5
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-05-20 10:56:50 +02:00
Prakash Prajapati cc6c5d3b64 [IMP] sale_timesheet: add test to check non-billable timesheet
This commit adds a test to make sure the timesheet linked to
the task is no-billable.

task-2723662

closes odoo/odoo#88889

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-20 10:56:46 +02:00
Prakash Prajapati f1e3615eca [IMP] project: check email in stage is sent when project is in that stage
This commit adds a test to check the email is correctly sent when the email
is linked to a project stage and a project arrives in that stage.

task-2723662

Part-of: odoo/odoo#88889
2022-05-20 10:56:46 +02:00
Prakash Prajapati 48b0ab0e0f [IMP] sale_timesheet: add test to check invoice linked to timesheet
This commit adds a test to ensure the timesheet linked to a SOL is
linked to the invoice of the SOL when the SO containing this SOL is
invoiced.

task-2723662

Part-of: odoo/odoo#88889
2022-05-20 10:56:45 +02:00
Prakash Prajapati a7cd11612b [IMP] project: improve the my tasks/private flow test
tasks assigned to the current user should be in the 'inbox' stage by default.
tasks with no project set should only be visible to the users assigned to them.

task-2723662

Part-of: odoo/odoo#88889
2022-05-20 10:56:45 +02:00
Prakash Prajapati 3b22c42d91 [IMP] project, hr_timesheet: add test subtask_with_timesheet
-Test the creation of sub-tasks through the notebook
-Set a parent task on an existing task
-Test the creation of sub-sub-tasks
-Check the correct nb of sub-tasks is displayed in the 'sub-tasks' stat button
and on the parent task kanban card
-Sub-tasks should be copied when the parent task is duplicated
-The parent task should take into account the timesheets of its sub-tasks

task-2723662

Part-of: odoo/odoo#88889
2022-05-20 10:56:45 +02:00
mafo-odoo c3b4c7d8f2 x[FIX] stock_account: wrong accounts for manual valuation
Step to reproduce:
Install purchase, stock and accounting
Create a product in a database with USA localization.
Create a new product category and select the manual valuation option.
Purchase the item, receive the item and create the Vendor bill

Current Behavior
On the journal entries you will see that the stock interim accounts
are impacted (the accounts uase for an automated stock valuation)

Expected Behavior
The used account is expenses

Explanation:
The problem comes from the fact that we don't reset/set these accounts
when changing the property valuation of a product category.

opw-2746384

closes odoo/odoo#91811

X-original-commit: 2cb9c7afb2d9e096f0c8e1ada2908b720b6e5ade
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
2022-05-20 09:54:05 +02:00
Nicolas (vin) 9453ce2b74 [IMP] account: add price total measure to invoice report
This feature isn't available as of now, and users that wants to do
this would have to use the similar report in Sale as a workaround.
As this is not always possible nor great, introduce this new measure
to display the line total tax included.

task id #2831312

closes odoo/odoo#89654

Signed-off-by: Florian Gilbert <flg@odoo.com>
2022-05-20 09:54:00 +02:00
William Braeckman 8c32ed3fb2 [FIX] project: fix deletion of column in task kanban
Upon deleting a column in the project task view a popup will be
displayed warning the user that the stage will not be deleted but
instead archived.
Prior to this commit that popup would be displayed regardless of the
group by option that is selected. However this could lead to issues when
opening the archive wizard with an id from another record.

closes odoo/odoo#91872

X-original-commit: 24d307716cbd9e05a32dde108838e16d04309116
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-05-20 07:12:08 +02:00
dbkosky 9222d6c6ad [FIX] l10n_it_edi: fix codicedestinatario foreign pa index
The pa index should only be XXXXXXX when the foreign partner is not
identified. In this commit we change the condition on the template such
that if the pa index is defined, we always utilise it. If the pa index
is not defined but the partner is italian, we use '0000000', and when it
is not defined and the partner is not italian, we use 'XXXXXXX'.

closes odoo/odoo#91871

Task-id: 2858092
X-original-commit: bf468affa2d86967b3b63a0be62063061b7b263c
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2022-05-19 22:20:30 +02:00
jbw c648f0727a [FIX] account: fix zero division when unreconciling caba exch diff
Add move_reverse_cancel=cancel back to context when reconciling moves with reverse moves.

Bug introduced in commit https://github.com/odoo/odoo/commit/e9262bfc8c775953ebe150f36ce0ab8dcb04d4bd

Database : Reproducible in v14, v15
On a Mexican company (with l10n_mx) with multi currencies enabled.
- Set rates for USD to be different at invoice and at payment date
- Create an invoice at date 1 in USD
- Create a payment at date 2 in USD for invoice generating a difference exchange move
- Try to reset the payment to draft
-The traceback (ZeroDivisionError: float division by zero) will appear.

Tickets : 2857549, 2856162, 2855038, 2852663, 2852859, 2857381

closes odoo/odoo#91841

X-original-commit: 7be0fc1d611d54f27ebd7e7b1fef9b1842cc9ae2
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2022-05-19 21:16:48 +02:00
Pierre Paridans 90e65f9762 [FIX] web: <details> visiblity check regression in Chromium 97+
Since Chromium 97, folded `<details>` content has non-zero computed
width and height which returns false-positive QUnit
`assert.isNotVisible()` calls.

In a nutshell, this was introduced in https://bugs.chromium.org/p/chromium/issues/detail?id=1185950
when Chromium implemented the ability for "Find in page" to search in folded
`<details>`. To do so, the `content-visibility` rule was used instead of
`display: none` which, even if functionally similar, has an impact on the
values returned by `getBoundingClientRect()` (i.e. used in
`assert.isNotVisible()`.

A regression report was filled in https://bugs.chromium.org/p/chromium/issues/detail?id=1276028
to highlight this change of behavior. What emerged from this report's
discussion is that Chromium has no intent to revert this change and
instead put the emphasis on avoiding to use `getBoundingClientRect()`
and similar methods for visibility check (even pushing a proposal for a
`Element.isVisible()` API; cf. https://github.com/w3c/csswg-drafts/issues/6850).

This commit works around this issue by forcing the content to `display:
none`, like in the previous Chromium versions.

closes odoo/odoo#91833

X-original-commit: b718e7eb5ceb827f59ac395577408b7bc54aa3f9
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-05-19 19:04:59 +02:00
Ivan Yelizariev 08605c506e [FIX] website: make search by "Visited Pages" work again
Field `website.visitor::page_ids` was storable initially [1], but then it was
refactored [2] and hence the search by "Visited Pages" [3] became broken.

Fix it by adding `search=` attribute

[1]: https://github.com/odoo/odoo/commit/6bec0e4d29e6b33b74962b2893a7a405667ef58c
[2]: https://github.com/odoo/odoo/commit/e33172e83210a5e0044a6fb92e315b84deefc440
[3]: https://github.com/odoo/odoo/blob/c6c7605cdae803aca4f441ef4e622a1b79f17019/addons/website/views/website_visitor_views.xml#L248-L257

opw-2622141

closes odoo/odoo#91829

X-original-commit: 792e07b8ff43ecb0499f4add27f5465c28e716cf
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-05-19 19:04:55 +02:00
Fabrice Henrion f2650a724b [FIX] account: improve terminology
closes odoo/odoo#91729

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-05-19 18:06:13 +02:00
Rohitkumar (roku) 4a8f31e25f [IMP] project,sale_timesheet: generic UX improvement for project
Purpose of this commit to improve generic usage of project
app.

So, in this commit done following changes:
  - change the placeholder of the name to 'e.g. Monthly review' in
    project_update_view_form
  - set the 'analytic account' of the project on the tasks by default
  - change the placeholder to 'e.g. Product Launch' in project_milestone_view_form
  - the 'cabinets' milestone should be linked to a milestone service,
    not a manual one so change data to milestone in demo data
  - rename the 'rating' stat button into 'last rating' in view_task_form2
  - set another employee than Mitchell for the 'customer care (prepaid hours)'
    SOL field in sale_service_demo_data
  - display a separator on the right of the stat button so remove unwanted
    properties in project_rightpanel.scss
  - add the 'name' field to the 'fields to export' when 'i want to update data'
    is set to true
  - remove the 'Getting Things Done (GTD)' example from kanban examples wizard
  - add a 'tasks due today' filter that should return tasks whose deadline falls on
    today's date in view_task_search_form

task-2809188

closes odoo/odoo#88271

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-19 18:06:09 +02:00
Adrien Widart c7072eaba6 [FIX] stock: compute forecasted inventory with inter-wh
When moving some products between two warehouses thanks to an internal
transfer, the forecasted inventory becomes incorrect

To reproduce the issue:
1. In Settings, enable "Multi-Warehouses"
2. Let WH01 be the existing warehouse. Create a second one WH02
3. Create a storable product P
4. Update the quantity of P:
    - 3 in WH01/Stock
5. Create a planned and internal transfer T:
    - Source: WH01/Stock
    - Destination: WH02/Stock
        - Ignore the warning
    - Operations:
        - 1 x P
6. Mark T as todo
7. Open the Forecasted Inventory:
    - Filters:
        - Forecasted Stock
        - Product: P
    - Group By: Warehouse

Error: The report is incorrect, it says there are 3 P in WH01 and 0 in
WH02 (should be 2 and 1). It becomes worst if T is done (the quantities
in the past become incorrect)

We should be able to move a product between two warehouses thanks to an
internal transfer (so the warning of the step 5 should be removed).
Moreover, the `report.stock.quantity` should consider that use case.

When processing a stock move, the SQL view translates it as an in-move
or out-move for a specific warehouse. For instance, if the SM comes from
a warehouse and goes to a location without any warehouse (e.g., customer
location), the SM is considered as an out-move. But here is the issue:
in case of an inter-warehouse SM, both source and destination have a
defined warehouse.

Therefore, we need to:
- Duplicate the inter-warehouses SM (so we have one in and one out)
- Fake the values (no destination warehouse for the out move, no source
warehouse for the in move)

Also, before duplicating all SM, we filter out some useless SM:
- Draft and cancelled ones
- SM done more than 3 months ago (because the report only works for [-3
months; +3 months])

Considering some tests:
(SM are confirmed. Each test has been repeated 5 times to get an
average)
|                                       |          |
|:-------------------------------------:|:--------:|
| 5000 SM, 0% inter-wh, without the fix |  ~715 ms |
| 5000 SM, 0% inter-wh, with the fix    |  ~710 ms |
|                 Impact                |   0.99x  |
|                                       |          |
| 6666 SM, 0% inter-wh, without the fix |  ~911 ms |
| 5000 SM, 33% inter-wh, with the fix   |  ~999 ms |
|                 Impact                |   1.10x  |
|                                       |          |
| 7500 SM, 0% inter-wh, without the fix | ~1004 ms |
| 5000 SM, 50% inter-wh, with the fix   | ~1097 ms |
|                 Impact                |   1.09x  |

The impact is not that significant

OPW-2752017
task-2822157

closes odoo/odoo#91772

X-original-commit: b1efc0243bbf886bbef42a32587f4a818fa34e64
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-05-19 16:40:23 +02:00