Commit Graph
163215 Commits
Author SHA1 Message Date
qdp-odoo a4baafa761 [IMP] account: prevent the deletion of tag when set on tax/account
Because if a tag is still linked to a tax or an account, then it's probably also still referenced in a report line, and it makes no sense allowing to delete such a tag.

closes odoo/odoo#125843

X-original-commit: 3b71689954a941b12d8eda1d08c3ad58aca320d8
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-21 01:24:28 +02:00
Jeremy Kersten 939b61822e [IMP] http_routing: server_redirect in case of 404
It is a tradeoff since we will add extra requests in case of 404 to
check if a redirect exists. But it will allow to redirect old unlinked
record to a new record.

Until now, if you delete e.g. a product instead to archive it, you have
no way to redirect old url to the new product.

closes odoo/odoo#125828

X-original-commit: 95dd21c4d69a06b56b908e138f7746ef3d131d82
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-06-21 01:24:20 +02:00
Atul Patel 7eca27ffc5 [FIX] account: fixed account group with same granularity
Upgrading the chart template will point or create xmlid
to existing records to avoid duplicate account group
for `code_prefix_start` which will raise validationError
account groups are never referenced elsewhere by xml_id,
so we don't really care about that reference
so will do this :
IF: there are account groups on the company
THEN: do not create or update new account groups

```
Account Groups with the same granularity can\'t overlap
```

closes odoo/odoo#125827

X-original-commit: e3f83dce9afe56cb43890fe0671a8d8fdce58f17
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-21 01:24:18 +02:00
xO-Tx 5b211a29a2 [FIX] web_editor: keep the observer active while adding link hint class
After preventing "async" code on link tools update in [1], the
`'link_tools'` test is still failing because of another race condition
issue:

The click on "save" after setting the link style to secondary triggers
an event handler that destroys the link tools widget (see `Wysiwyg` >
`destroyLinkTools()`), leading to calling the `_removeHintClasses()`
method first (both `_addHintClasses()` and `_removeHintClasses()` will
disable the editor observer while adding / removing the link hint
class to prevent their mutations to be recorded...).

Since the observer is inactive, the changes made to the link using the
link tools will not be processed, and the block will not be set as
`.o_dirty`.

As mentioned previously, (and starting from [2]) the editor observer is
inactive (while handling the `.oe_edited_link` class) in order to
prevent recording the mutations... But since [3], the editor had the
ability to prevent some classes (including `.oe_edited_link`) from being
taken into consideration in the `filterMutationRecords()` method...

The goal of this commit is to fix this race condition issue by simply
keeping the observer activated while handling the link hint class...

Remarks:

- These changes are supposed to fix the `link_tools` test that fails on
16.0+, but 15.0 was targeted here since the `.oe_edited_link` class is
ignored by the editor starting from 15.0 and also to prevent any future
issue linked to disabling the observer...

- Adding and removing the `active` class should not affect the history,
since it targets the `linktTools` toolbar button...

[1]: https://github.com/odoo/odoo/pull/109250/commits/f42715fdc89a6a88446c5f88ecec29e6a9c96fe1
[2]: https://github.com/odoo/odoo/pull/90064/commits/26377710a6e3ad61a8c266e9f7c0b8ade98f657d
[3]: https://github.com/odoo/odoo/commit/1c25ddb42393b136cac2a0ee0b9b7280fd803e7d

runbot-18747

closes odoo/odoo#125793

X-original-commit: 6a15cbe7b320989866ce143610dbea9ac00caa5e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-21 01:24:15 +02:00
Martin Maes c7fede7f44 [FIX] stock,mrp: formatting numbers >= 1000 is wrong
In https://github.com/odoo/odoo/pull/123074, the fix done did not take the formatting of numbers
bigger (or equal) than 1000 into account.
For example, 1000 become "1.000,00" and parsing it again will return a 1.

To fix this, simply modified the thousandsSep to an empty array

closes odoo/odoo#125784

X-original-commit: c8a738610778d110734ca5b9b9cfe8723f70f8ce
Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-06-21 00:13:59 +02:00
Guillaume (gdi) b493516aa3 [FIX] website_sale: remove useless code
Before [this other commit], every we-many2X had to specify the current
website in the domain, which is useless since [this other commit] which
does it automatically.

[this other commit]: https://github.com/odoo/odoo/commit/081ce53120e652bf07106d5982e26048f2b843e6

Related to task-3316278

closes odoo/odoo#125669

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-21 00:13:54 +02:00
stefanorigano (SRI) b0baac6fc4 [FIX] web, mail: Dropdown and PopoverWowl, increase contrast
This commit adapt several components and utility-classes in order to
increase visual contrast.

In the case of `o-mail-ActivityGroup` and `o-mail-NotificationItem`
templates, these has been reworked in order to use default BS components
and consequently automatically inheriting the improved design.

task-3338419

closes odoo/odoo#124903

Part-of: task-3326263
X-original-commit: 190ec1c947e17b2b4aa8614e9e0a04d00cb38d90
Related: odoo/enterprise#42507
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-21 00:13:49 +02:00
stefanorigano (SRI) 3168ae5fcc [FIX] web: Dropdown, adjust menu position
task-3338419

X-original-commit: 37dfaf8fa19746e90974b21b3f9dfae1f2be2233
Part-of: odoo/odoo#124903
2023-06-21 00:13:49 +02:00
Maryam Kia 896a69cc30 [IMP] mail: disable escape on composer wizard
task #2793003
- rename Cancel to Discard on composer wizard
- disable escape on composer wizard to prevent closing the composer accidentally

closes odoo/odoo#120427

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-21 00:13:46 +02:00
Dossogne Bertrand d9b1b470b8 [IMP] hr_holidays: improve stress days display
Before this commit stress days were displayed as colored rectangles
on the calendar which made it ambiguous compared to leaves.
After this commit the stress day have the number colored and in bold
instead and the signification has been added to the legend on the side.
Moreover, clicking the event displays a popover giving a short
description of the stress day instead of opening a time off creation
modal.
This commit also adds `web/static/src/views/calendar/util.js` which
exports a method generating a datespan expression given two dates.

task-3226525

closes odoo/odoo#125749

X-original-commit: eb2b6068a998812890c8d37330c986fd3fc30d4f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-20 20:32:48 +02:00
Rodolpho Lima e76459bc0e [FIX] web_editor: link with @ open new window option
Before this commit, when using the LinkTools (website, mass_mailing),
if an http URL contained a "@" (ex: https://www.youtube.com/@iRopes),
it got incorrectly recognized as an e-mail URL and the option to open
the link in a new windown was hidden from the UI.

This commit fixes the issue by making the test for e-mail URL slightly
more robust than just checking for the presence of a "@".

task-3356685
opw-3349704

closes odoo/odoo#125742

X-original-commit: 3f1db2397e50b26e2658d270cbb7ce908d5c05cd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-20 20:32:44 +02:00
vlst 5aaee3af66 [IMP] point_of_sale: Allow contact deletion
Currently, deleting contacts (partners) while a pos session is
open is not allowed.
(Even if the respective partner isn't part of any POS sessions)

This creates a bad experience in Contacts, with too many
unnecessary User Errors.

This PR fixes this issue, by allowing the deletion of contacts
even when a pos session is open, by introducing logic that
handles the cases where a contact might be deleted during an i
active pos session.

closes odoo/odoo#124152

Task: 3349851
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-20 19:09:08 +02:00
Dhrumil Shah a3a05a5a89 [IMP] project: set project as analytic plan in the project config setting
In this commit we change following points:
  - changed string of analytic_plan_id field in res setting.
  - project set as default in the analytic plan of the project setting

task-3251642

closes odoo/odoo#120522

Related: odoo/enterprise#40702
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-20 19:09:03 +02:00
Tejas Modi 169ea1ce0c [IMP] stock: added/updated labels, actions and setting
In this commit:
================
- Added action to 'set to 0' to declare all uncounted quantities to
  0 and works like the 'set' action.
- Moved Unreserve, Scrap and Lock/Unlock buttons in action menu.
- Added Better tooltip for status and hide unnecessary status.
- Updated button and field labels.
- Changeed stat button forecast icon.
- Added Dropship setting.
- Added conflict filter in Inventory adjustment tree view.

TaskID - 3150983

closes odoo/odoo#116799

Related: odoo/enterprise#38872
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-06-20 19:08:57 +02:00
Tejas Modi 50b9dfe351 [IMP] purchase: prevent to display purchase tab to every user
Currently, the Purchase tab is visible to every user in Product form view.

In this commit, I have make Purchase tab only visible to admin access.

TaskID - 3150983

Part-of: odoo/odoo#116799
2023-06-20 19:08:57 +02:00
Tejas Modi 4d9da8b9eb [IMP] product: rename labels in product list view
In this commit, I have make responsible optional hidden and rename some labels
in product list view.

TaskID - 3150983

Part-of: odoo/odoo#116799
2023-06-20 19:08:56 +02:00
Tejas Modi 812af37275 [IMP] mrp: make fields float to Integer
In this commit, I have changed `produce_delay`, `days_to_prepare_mo` and
`sale_delay` fields into Integer because it's the number of days.

TaskID - 3150983

Part-of: odoo/odoo#116799
2023-06-20 19:08:56 +02:00
Tejas Modi 4ef1f8e052 [IMP] barcodes: removed the barcode name field size
Due to GS1, now the barcode contains a lot more than a single identifier for
an object (e.g. product, location,etc). Sometimes it contains a combination of
multiple information. It's common now to have a size greater than 32 that
we remove the parameter.

TaskID - 3150983

Part-of: odoo/odoo#116799
2023-06-20 19:08:56 +02:00
Arnold Moyaux d301cbfb64 [FIX] mrp: merge moves in pick before manufacturing
Use case:
It happens that a product is consumed in different operations.
So it needs two distinct BoM lines. Since commit [1] the stock.move
in pbm are not merged. However [1] was design for kit.
In our case we would like to have only one stock.move for all the
quantities.

The fix is not perfect because it won't work if we confirm at the
same time a move with a kit and without it. But at least it will let
people using MO without kit has the correct behavior

+ remove a duplicate of the function

[1] commit 741d2fe9ef

closes odoo/odoo#125778

X-original-commit: f74149017ca41720a69179e3f5068f530b037341
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-20 18:02:05 +02:00
Saurabh Choraria 8e93e0e6e3 [FIX] base: prevent traceback when Portal User Template is not found
When user deletes 'Portal User Template' record from 'res.users' model and when
'action_open_template_user' function is executed at that time traceback is
generated on the user side as well as in the log.

Steps to reproduce:
    1. Install Website module.
    2. Go to settings > Users&Companies > Users.
    3. Remove Internal Users from default filter.
    4. Add Inactive Users in filter and delete Portal User Template.
    5. Go to Website Settings > Privacy > Customer Account.
    6. Click on Free sign up and then on Save button.
    7. Now in Website Settings click on Default Access Rights button.
    8. The error will occur.

Applying this commit will fix this issue.

sentry-4184456381

closes odoo/odoo#125761

X-original-commit: f1906f4bb21a88e0c8008393557a16b098dea3c2
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-06-20 18:01:56 +02:00
Pierre Masereel 732827a6b1 [FIX] project: stat button display
The stat button that displays the "Blocking Tasks", is not correctly
displayed since the changes made on the statinfo widget.

So we adapt it to make it more beautifull

closes odoo/odoo#125759

X-original-commit: dde96cff4cd71aa85526ca8a88bb52b6fd8b1cf7
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-06-20 18:01:53 +02:00
Michael (mcm) da85977e83 [FIX] web: fix domain selector double click
Before this commit, we needed to double click on "add a rule/group"
to execute the action if focused an input.
This commit fixes this issue, we can now click once to execute the
action of the buttons.

task id: 3346327

closes odoo/odoo#125756

X-original-commit: 0db23b5a7e29f8714a63375c5d86f5d1b2220bda
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-20 18:01:48 +02:00
Jorge Pinna Puissant 3b330abd15 [FIX] web: setting compile label correctly
- Open Settings;
- In the search write : __comp__.props

Before this commit, some settings are shown. This occurs because of un
error in the compiler, where we add to the search list, the path of the
label, and not the label itself.

closes odoo/odoo#125739

X-original-commit: 2a4dc724d0d791ea52dc73b79e582c726ece21da
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-06-20 15:58:40 +02:00
Jurgen (jugj) d7ec92f349 [FIX] hr_holidays : Remove automatic notification if no responsible_ids is set
Currently in hr_leaves_type, if no responsible_ids are set, all members of group_hr_holidays_user would get notified, the new behavior changes that to :
If no responsible_ids are set, no one is notified.
Some unit tests had to be adapted to this new flow, since they were sometimes getting created with no responsible_id assigned, leading to no one being notified.
task-3284318

closes odoo/odoo#125738

X-original-commit: fb1a6a8f0072398c57508b59724fcbde9a34b124
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-20 15:58:38 +02:00
Mathieu Duckerts-Antoine 6adcd292b3 [FIX] web: search panel: fields should not be added in search bar
Let us consider the search arch

    <search>
        <field name="foo"/>
        <searchpanel>
            <field name="bar"/>
        </searchpanel>
    </search>

The two tags "field" are supposed to generate different objects:
 - the first one should generate an entry in the search bar autocompletion
 - the second one should generate a search panel section.

It turns out that the second field did also generate an entry in the
search bar. This is of course wrong. We fix that problem and add a test.

closes odoo/odoo#125724

X-original-commit: 7e62e3cf569e59a676a834198854f415fa0ae590
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-20 15:58:35 +02:00
Victor Feyens ceb1bebc0b [REV] website_sale: stop handling exclusions in /shop
Commit 91d0e9c645 made sure that excluded
combination did not appear in /shop search results, but it significantly
slowed down searches, even in databases without exclusions.

Since the excluded combinations cannot be added to the cart (and the
original feedback did not come from an effective ticket), we believe
the gain is not worth the cost.

This commit reverts that change.

Task-3326948

closes odoo/odoo#125722

X-original-commit: 3082ac99dc195a89e1299be73ef149f40231f86e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-20 15:58:33 +02:00
tsm-odoo 90dd769e93 [IMP] im_livechat, *: add emoji menu to embed livechat
*: mail, web.

This PR adds the emoji menu to the embed livechat. When mounting
the livechat on the odoo frontend, the env is shared between the
livechat app and the main app. This is an issue regarding the
overlay service since the `OverlayContainer` is mounted in the
light DOM while we would expect the overlay styles to be dicted
by the shadow DOM.

In order to solve this issue, an `OverlayContainer` is added to the
shadow DOM and a mechanism to determine whether the overlay belongs
to the light/shadow DOM is introduced.

part of task-2742676

closes odoo/odoo#125713

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-20 15:58:29 +02:00
Antoine Dupuis (andu) 73fab18182 [IMP] l10n_it_edi: Add a test for credit note XML export.
At the moment, there is no test that checks that normal credit notes
(i.e. of type TD04, not reverse-charge refunds) are correctly exported
in FatturaPA.

So we're adding one. We're making it a complicated credit note (it
contains some negative amounts) in order to improve the test coverage.

closes odoo/odoo#125690

X-original-commit: f7f2c4275531751253e0fe57a6a192fe98d6da5c
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-06-20 15:58:26 +02:00
tsm-odoo f33fcdf8c6 [FIX] im_livechat: fix cors error on embed livechat
Before this commit, starting a page with the livechat embed
in another origin than Odoo would have resulted in an CORS
error being shown due to the `bootstrap_translation` route
being called in response to the legacy `web.session` setup.

This commit restore the legacy session as it was before [1].

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

closes odoo/odoo#125565

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-20 15:58:20 +02:00
Jurgen (jugj) af5d5a2b4f [IMP] hr(_contract) : Add a graph and pivot view for employee
In this PR we add a graph and pivot view that aggregates employees that were created / have their first contract date
per month.
task-3374966

closes odoo/odoo#125419

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-20 15:58:17 +02:00
Prakash Prajapati 1179ceaa42 [IMP] hr: track the value on the employee for the Department change
task-3373484

closes odoo/odoo#125200

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-20 15:58:12 +02:00
Arjun Panchal 9f1888c0c8 [FIX] mrp: BoM Overview Formatting
Align the product with the caret icon on small screen

task-3357011

closes odoo/odoo#124236

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-06-20 15:58:06 +02:00
Victor Feyens b31a6aec1c [IMP] product,(event_*)sale: clarify (& deprecate) pricelist context
The whole contextual price of products relies on multiple context keys:
* uom
* pricelist
* quantity
* date

The related logic has already been partly removed/deprecated on products,
but the computation of discounts for events/event booths are still relying
on that logic, though imperfectly.

This commit makes sure this hacky logic (relying on those contextual keys)
is as clear and reliable as possible.
We factorize and harmonize the remaining use cases, with a dedicated constant
and specific methods, making sure:
* currency conversion
* price & discount computations
are coherent, while clearly explaining that it should not be used for
any new feature/logic/code.

We also restrict context updates as much as possible (there won't be
any discount when the pricelist is configured to hide the discount from the customer)

closes odoo/odoo#123848

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-20 15:58:03 +02:00
Yash Vaishnav 5b997c5bad [FIX] project: remove one dialog box when deleting stages of project
Steps to reproduce:
1) Install the project.
2) Enable 'project stages' through the settings.
3) Try to delete an empty stage
4) Notice that two confirmation dialog boxes appear.

Cause:
The project module contains a dialog box for deleting project stages, resulting
in two confirmation prompts when attempting to delete a project task.

Fix:
The 'deleteGroup' function in the kanban_header file is responsible for deleting
the stages in the project. the 'deleteGroup' function in the KanbanHeader class
is extended and overridden with another confirmation box.

task-3293029

closes odoo/odoo#122018

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-20 15:58:01 +02:00
Rohitkumar (roku) f2406749c2 [IMP] project: improve the project milestone
Purpose of the commit is to do the generic improvements for project.

So in this commit did the following changes:
  - display 'tasks' stat button even if there are no records because of  user create
  task immediately.
  - the milestone should not be displayed in red if the task has been completed/cancelled

task:3251634

closes odoo/odoo#119194

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-20 15:57:58 +02:00
Louis Wicket (wil) f253e0ba14 [FIX] website: lazy load translations
`_lt` must be used instead of `_t` for `gettext`s that are called when
the file is loaded.

closes odoo/odoo#125695

X-original-commit: 1cde6dc66c3337fa8e6c18156340f18fdab1dd84
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-06-20 14:41:04 +02:00
Romain Derie 24128ed434 [FIX] website: never consider megamenu as active
Oversight of [1], megamenu should never be considered as active.

[1]: https://github.com/odoo/odoo/commit/8d4e99c6a6e2281b00ec25e870065d0728e27606

opw-3375615

closes odoo/odoo#125693

X-original-commit: b024e05215bd858abe5721ad4251ba51d67afcb9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-06-20 14:41:01 +02:00
Adrien Guilliams (adgu) c730491461 [FIX] point_of_sale: formatting X and Z reports
Parts of the X and Z reports were not formatted correctly.
The parts that have changed are:
    - The datetime of the session is no more bold.
    - The columns of the tables are left-aligned for strings and right
    align for numbers.
    - The page break is better handled.

closes odoo/odoo#125648

Task-id: #3360275
X-original-commit: 2d7b7004d69bf67c1ca940c4418f4a5ac3479f1c
Related: odoo/enterprise#42799
Signed-off-by: Monnom David (moda) <moda@odoo.com>
Signed-off-by: Guilliams Adrien (adgu) <adgu@odoo.com>
2023-06-20 13:28:41 +02:00
amdi-odoo b3d579e7cc [IMP] website_slides: save space in left content panel
Purpose
=======
Earn some space in the left content panel (fullscreen and
course page panels).

Specifications
==============
- Align additional resources to the left and remove bold
on the links and icons.
- Remove "mark as done" bubble and push content to the left.
- Question mark, youtube, etc.. icons now become the mark
as undone button. Icon should have a border outline and be empty
- "V" icon remains the one we use when done (filled and green
as currently)

Task-3265917

closes odoo/odoo#125646

X-original-commit: 9dabc99c7711501ec84b3ce0902cb78fed43a868
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Dieudonné Amélie (amdi) <amdi@odoo.com>
2023-06-20 13:28:39 +02:00
Pierre Paridans d64a23ea22 [FIX] website: CSS properties value comparison
Due to a change between Chrome 101 and 114, the CSS Custom Property
containing custom string are now always serialized using the type of
quotes used in their declaration (ie. single quotes will be kept ;
double quotes also) which wasn't the case in previous versions of Chrome
(and still not the case in WebKitGTK 2.40.0 at least).

This doesn't impact the value itself but only comparison between the
computed value and an arbitrary one (like we do in the design-themes
test).

This commit fixes it by removing the single/double quotes in the
`assertCssVariable` test helper.

The impacted precondition was introduced in odoo/odoo@b29e17765f and
odoo/design-themes@8b377af3a7 .

closes odoo/odoo#125500

X-original-commit: 82074846c429dd6abad5734680ca3e7923668bb9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-06-20 11:33:28 +02:00
shreya patel (shpa) c2eb387068 [FIX] mrp: traceback while printing MO Overview Report
Issue
=====
A traceback occurs when we print MO Overview Report If the `Receipt` data has no decorator.

Steps to reproduce
=================
- Create a MO with 0 qty components Availability and set the Scheduled Date in future.
- Make a purchase for the MO components with same day Order Deadline, and confirm PO.
- Go to the MO Overview Report Click on the PRINT button and you will get the traceback.

In this commit, we ignore setting a decorator when the receipt does not have a decorator.

TaskID - 3300853

closes odoo/odoo#125009

X-original-commit: f03b22b62427ae8a4bd235c353eaa1ea0bf3ff16
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-06-20 11:33:22 +02:00
Lucas Lefèvre 23ae2b2886 [FIX] spreadsheet: force light theme
Followup of #123320

Some things changed in saas-16.2

closes odoo/odoo#125706

X-original-commit: 82f79027deb8caa1e25e0ae8389f513db98cd6cd
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-06-20 09:11:06 +02:00
Mathieu Duckerts-Antoine 850d52d0ae [FIX] web: orm: protect webSearchRead
The values for the key "async" found in some services is used to declare
async methods that should be "protected". The hook "useService" makes sure
that no code used to process results of those protected methods is
executed by a destroyed component. The orm method "webSearchRead" was
not protected due to a "typo".

closes odoo/odoo#125688

X-original-commit: 2899888a2449b42b2c5d37846fc9411da6f7f9cc
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-06-20 09:11:04 +02:00
mega-odoo e502b972c8 [FIX] web_editor: prevent error when edit the float, monetary section in website
'replace() argument 1 must be str, not bool' is generated if the user edit a
float or monetary section in the website view.

Steps to Reproduce

- Make debugger mode ON.
- Go to Settings > Translations > Languages.
- Remove the value of the 'Thousands Separator' field from the current user
language.
- Install the 'eCommerce' module.
- Go to the website.
- Go to the shop menu, and click any product from the product list.
- Click on the Edit button and try to edit any float or
monetary section like a product price (eg. change a product price from 750 to
70) and click on the Save button.

And traceback will be generated.

Applying this commit will resolve this issue.

sentry-4148693017

closes odoo/odoo#125684

X-original-commit: b895175cfc487f3db6e53351fd5774303f193698
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-20 09:11:01 +02:00
Valentin Vallaeys (vava) d41720648d [FIX] sale: format draft downpayment date
task-3299805

closes odoo/odoo#120972

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-20 09:10:56 +02:00
Valentin Vallaeys (vava) ba954604e5 [IMP] sale: add downpayment ref on SO line
When a SO has several downpayment, they all have the exact same
description "Down payment" which does not provide much information.

This commit adds the invoice reference and the date.

task-3299805

Part-of: odoo/odoo#120972
2023-06-20 09:10:55 +02:00
paso-odoo f115f330f9 [FIX] account: fix TypeError for currency in journal items
If applied, this commit will solve the issue of unsupported operand type in
journal item(s) when currency is not set.

Steps to produce:
- Accounting > Journal Entries > Create new entry.
- Add a line in Journal Items and remove the currency from that line.
- Save > Error will be generated.

Fix this issue by calling the compute of the currency when the currency is not
available.

sentry - 4069681536

closes odoo/odoo#125661

X-original-commit: 7163134b397e113c10936af908bdfebef2336d67
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-06-20 06:58:05 +02:00
william-andre 355dea8b83 [FIX] account: protect currency recompute without blocking completely
The previous fix[^1] was preventing the recomputation of the currency as
soon as there was one set.
For instance, the currency wouldn't change if we changed the journal
for one with another currency.

[^1]: 7f7743470ac1309d5e047563d06362e54edb552a

closes odoo/odoo#125671

X-original-commit: 9f8bd34818414698f9b3fd9fe926659781c13c67
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-20 01:34:42 +02:00
Mathieu Duckerts-Antoine fa0f687337 [FIX] web: orm: protect nameGet
The values for the key "async" found in some services is used to declare
async methods that should be "protected". The hook "useService" makes sure
that no code used to process results of those protected methods is
executed by a destroyed component. The orm method "nameGet" was
not protected due to a "typo".

closes odoo/odoo#125683

X-original-commit: c2b9f14fa9fbf67063b8885b698ea17a63d79454
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-20 00:24:06 +02:00
Ivàn Todorovich 800147ce9f [IMP] product: price computation performance
This commit improves the performance of `_is_applicable_for`, by:

1) Leveraging the `product.category.parent_path` field.
2) Use `applied_on` for the `if` conditions, which is ~100% faster than using
   the many2one fields due to the related record initialization.

These micro-optimizations are important because of the way `_is_applicable_for`
is used.

See: https://github.com/odoo/odoo/blob/0a5d84289/addons/product/models/product_pricelist.py#L169-L193

Which, for demostration purposes, could be simplified to:

```
for product, qty, partner in products_qty_partner:
    for rule in items:
        if not rule._is_applicable_for(product, qty_in_product_uom):
            continue
```

On a database with 470 products, and about the same number of pricelist items,
these optimization result in a ~30% speedup when computing prices for all
products at once. It may be even better depending on how many nested product
categories are used in the database and in the pricelist rules.

closes odoo/odoo#125670

X-original-commit: 3619f77c73092e800aab10f0df09ca5775545da3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-20 00:24:03 +02:00