Wednesday, November 8, 2023
43 changes · master
Security fixes and vulnerability patches
This change adds a guard to help ensure users only access Discuss content they are allowed to see. It reduces the risk of unintended exposure in conversations and adds supporting tests to verify the protection works.
Enhancements to existing features
This update streamlines how several Odoo areas process view definitions, reducing unnecessary internal lookup work. Users should not see functional changes, but the system may perform these operations a bit more efficiently and consistently.
Original PR description
Replace a bunch of unnecessary xpath calls by find/iterfind, also simplify a pair of alternations to just check both relevant values.
Code cleanup and technical improvements
This change updates several live chat and messaging components that handle conversations, attachments, reactions, previews, and real-time communication. The PR details are minimal, so the business impact appears to be internal maintenance or cleanup rather than a clearly defined user-facing change.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140644
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140644
Before this commit, the Messaging Menu had the following issues: - Header is too large; - Header color in dark theme is too white; - Important notifications (= needactions) are not highlighted enough compared to muted notifications; - Notification body and title looked too alike; => title should be more visible than content - Mouse-hovering on notification items breaks background-inherit style of avatar and IM status; => side-effect of `list-group-item-action` - Desktop: Header
Original PR description
Before this commit, the Messaging Menu had the following issues: - Header is too large; - Header color in dark theme is too white; - Important notifications (= needactions) are not highlighted enough…
Before this commit, the Messaging Menu had the following issues: - Header is too large; - Header color in dark theme is too white; - Important notifications (= needactions) are not highlighted enough compared to muted notifications; - Notification body and title looked too alike; => title should be more visible than content - Mouse-hovering on notification items breaks background-inherit style of avatar and IM status; => side-effect of `list-group-item-action` - Desktop: Header items slightly move when changing selection; => comes from `fw-bolder` - Desktop: mark as read button was too small and not visible enough; - Mobile: too many borders, and they are too strong; => undesirable dropdown style - Mobile: Messaging Menu had poor "New message" button link whereas Discuss app has nice "Start a conversation" button; - Mobile: "Start a conversation" button is not shown on livechat tab; - Mobile: when menu is open while Discuss app is open in background, it's unclear whether the messaging menu is open or not; => missing background highlight on Messaging Menu toggler - Mobile: State of Mobile Discuss App was not synced properly when using Messaging Menu at the same time; => e.g. unselected tab - Mobile: Discuss app and Messaging Menu were not properly aligned; => Messaging Menu did not offset position based on systray navbar height - Mobile: active navbar item was not highlighted enough, especially in white theme; - "OdooBot has a suggestion" is shown on all tabs instead of only in "All" tab like "OdooBot has a request"; This commit fixes all the above issues. Some styling issues were also affecting the Activity Menu, such as borders and highlighted open state. This commit applies these few improvements on the Activity Menu too. Before  After   Forward-Port-Of: odoo/odoo#140405
Forward-Port-Of: odoo/odoo#141198
Original PR description
Forward-Port-Of: odoo/odoo#141198
This commit avoids a traceback when trying to install hr_timesheet post to "hours" uom deletion. Steps ===== - Install module sale_management - In Settings > Sales > Product Catalog section, activate the option Units of Measure - Go to Units of Measure configuration menu - Remove the unit of measure "Hours" - Install hr_timesheet Issue ===== A traceback appears indicating: "Cannot update missing record 'uom.product_uom_hour'" Cause ===== Since https://github.com/odoo/odoo/comm
Original PR description
This commit avoids a traceback when trying to install hr_timesheet post to "hours" uom deletion. Steps ===== - Install module sale_management - In Settings > Sales > Product Catalog section, activate…
This commit avoids a traceback when trying to install hr_timesheet post to "hours" uom deletion. Steps ===== - Install module sale_management - In Settings > Sales > Product Catalog section, activate the option Units of Measure - Go to Units of Measure configuration menu - Remove the unit of measure "Hours" - Install hr_timesheet Issue ===== A traceback appears indicating: "Cannot update missing record 'uom.product_uom_hour'" Cause ===== Since https://github.com/odoo/odoo/commit/ab76c421c279b26195396b61e66b3e8853785226, deletion of system uom is prohibited. An exception exists for uom "Hours" that can be deleted without warning. This exception is removed inside hr_timesheet as this uom is needed in this module. However, it can still be deleted prior to hr_timesheet installation. When it is deleted, the installation of hr_timesheet raises a traceback as the data file hr_timesheet_data tries to access and update this record. Fix === Before updating the record uom "hours" in the data file, a call to a method ensure_iom_hours is made. This method recreate this uom if it does not exist in the database anymore. task-3551315 Forward-Port-Of: odoo/odoo#141438 Forward-Port-Of: odoo/odoo#138541
In many situations, when you click on a button, you want to disable all the other buttons while it is running. Currently, in each of these situations, we duplicate the same code that disabled all the buttons and enabled them afterwards. Unfortunately, in many cases, if the code executed crashes, the buttons are not enabled. In this commit, we're going to create a helper so that we have a single version of the code that correctly handles crashes. This helper will disabled all the buttons,
Original PR description
In many situations, when you click on a button, you want to disable all the other buttons while it is running. Currently, in each of these situations, we duplicate the same code that disabled all the buttons and enabled them afterwards. Unfortunately, in many cases, if the code executed crashes, the buttons are not enabled. In this commit, we're going to create a helper so that we have a single version of the code that correctly handles crashes. This helper will disabled all the buttons, then execute the click code and enabled all the buttons afterwards. If the code crashes, it will also enbaled them. The problem has been reported for the Settings Form view: When you edit this view and click save, if an error occurs in the save, all the buttons remain disabled. Forward-Port-Of: odoo/odoo#140938
Commit 70f853aab9a7 introduces `oi-smile-add` UI icon but it also removes by mistake `oi-text-effect` icon. This commit reintroduces `oi-text-effect` icon. task-3586386 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141408
Original PR description
Commit 70f853aab9a7 introduces `oi-smile-add` UI icon but it also removes by mistake `oi-text-effect` icon. This commit reintroduces `oi-text-effect` icon. task-3586386 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141408
As all the templates are now imported in the owl app, there is not need anymore to specify the owl="1" attribute in the templates. Ref-https://github.com/odoo/odoo/pull/130467 Linked PR- https://github.com/odoo/enterprise/pull/50344 task-3508331 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141383
Original PR description
As all the templates are now imported in the owl app, there is not need anymore to specify the owl="1" attribute in the templates. Ref-https://github.com/odoo/odoo/pull/130467 Linked PR- https://github.com/odoo/enterprise/pull/50344 task-3508331 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141383
Before this commit, when the ChatGPT prompt dialog was closed while waiting for a response, the "loading" overlay would be present until such response was complete. Moreover, in certain occasions, the rpc callback, called after the component was destroyed, could lead to a traceback due to reading a property of a no longer existing reference to the prompt input element (namely, in the `_unfreezeInput` method). This commit improves the user experience by unfreezing the UI on dialog clo
Original PR description
Before this commit, when the ChatGPT prompt dialog was closed while waiting for a response, the "loading" overlay would be present until such response was complete. Moreover, in certain occasions, the rpc callback, called after the component was destroyed, could lead to a traceback due to reading a property of a no longer existing reference to the prompt input element (namely, in the `_unfreezeInput` method). This commit improves the user experience by unfreezing the UI on dialog close, even if a response is pending, and prevents the rpc callbacks from running after the component is destroyed. task-3586380 Forward-Port-Of: odoo/odoo#141442
To reproduce: 1. Create an MO of Product with BOM 2. Manually set qty for a component 3. Produce all Issue: Two consumtion warning lines are shown, and numbers are wrong --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140753
Original PR description
To reproduce: 1. Create an MO of Product with BOM 2. Manually set qty for a component 3. Produce all Issue: Two consumtion warning lines are shown, and numbers are wrong --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140753
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141173
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141173
When user removes the quantity of product and tries to confirm the product in configure wizard, a traceback will appear. Steps to reproduce the error: - Go to Sales > Configuration > Settings - Product Catalog > enable Variant Grid Entry - Pricing > enable Pricelists (Advanced price rules) - Go to products > pricelist > open any pricelist > Add a line > set value of Min. Quantity - Create new Quotation > Select that pricelist > Add a product > Select a product that has variants
Original PR description
When user removes the quantity of product and tries to confirm the product in configure wizard, a traceback will appear. Steps to reproduce the error: - Go to Sales > Configuration > Settings -…
When user removes the quantity of product and tries to confirm the product in configure wizard,
a traceback will appear.
Steps to reproduce the error:
- Go to Sales > Configuration > Settings
- Product Catalog > enable Variant Grid Entry
- Pricing > enable Pricelists (Advanced price rules)
- Go to products > pricelist > open any pricelist > Add a line > set value of Min. Quantity
- Create new Quotation > Select that pricelist > Add a product >
Select a product that has variants (ex. Conference Chair) >
In configure wizard, remove quantity > Confirm
Traceback:
```
TypeError: '<' not supported between instances of 'NoneType' and 'float'
File "odoo/http.py", line 2138, in __call__
response = request._serve_db()
File "odoo/http.py", line 1714, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1741, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1942, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 191, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 717, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/sale_product_configurator/controllers/main.py", line 135, in sale_product_configurator_update_combination
return self._get_basic_product_information(
File "addons/sale_product_configurator/controllers/main.py", line 327, in _get_basic_product_information
price=pricelist._get_product_price(
File "addons/product/models/product_pricelist.py", line 111, in _get_product_price
return self._compute_price_rule(product, *args, **kwargs)[product.id][0]
File "addons/product/models/product_pricelist.py", line 205, in _compute_price_rule
if rule._is_applicable_for(product, qty_in_product_uom):
File "addons/product/models/product_pricelist_item.py", line 319, in _is_applicable_for
if self.min_quantity and qty_in_product_uom < self.min_quantity:
```
https://github.com/odoo/odoo/blob/fe79e1b5fdc408d55bbb3ac11209163436c1fa2c/addons/product/models/product_pricelist_item.py#L319 Here, when user removes quantity of product,
qty_in_product_uom will be None.
So it will lead to above traceback.
sentry-4547178082
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#139166Description of the issue/feature this PR addresses: Current behavior before PR: - When create a free product reward, reward and sale order line description use product's name so if many reward are variants of others, the description will be the same. It make portal user confusing when they chose reward in portal Image before commit:    Desired behavior after PR is merged: - the description will include display of product so that will contain name of variants's attributes Image after commit:   --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#138884
Field 'date_done' is a datetime object and field 'invoice_date' is a date object. They will be considered as different even if the 'date' part is the same which is the opposite required to check if invoice is direct. ```py >>> ddt.date_done datetime.datetime(2023, 7, 11, 10, 2, 56) >>> invoice.invoice_date datetime.date(2023, 7, 11) >>> ddt.date_done != invoice.invoice_date True ``` This fix casts 'date_done' into a date object before comparison. ```py >>> ddt.date_done.date() !
Original PR description
Field 'date_done' is a datetime object and field 'invoice_date' is a date object. They will be considered as different even if the 'date' part is the same which is the opposite required to check if invoice is direct. ```py >>> ddt.date_done datetime.datetime(2023, 7, 11, 10, 2, 56) >>> invoice.invoice_date datetime.date(2023, 7, 11) >>> ddt.date_done != invoice.invoice_date True ``` This fix casts 'date_done' into a date object before comparison. ```py >>> ddt.date_done.date() != invoice.invoice_date False ``` Task link: www.odoo.com/web#model=project.task&id=3571327 opw-3571327 Forward-Port-Of: odoo/odoo#140538 Forward-Port-Of: odoo/odoo#140273
1. Order Plans by sequence in the widget and analytic item views 2. Add amount_field to analytic widget in sales and purchase views 3. UI improvements Task-3572128 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141030
Original PR description
1. Order Plans by sequence in the widget and analytic item views 2. Add amount_field to analytic widget in sales and purchase views 3. UI improvements Task-3572128 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141030
Reproduce: * create a sub-plan (with parent_id) * make that plan a main plan (void parent_id) * open the analytic line view Result: Traceback because the dynamic field was not created Forward-Port-Of: odoo/odoo#141409
Original PR description
Reproduce: * create a sub-plan (with parent_id) * make that plan a main plan (void parent_id) * open the analytic line view Result: Traceback because the dynamic field was not created Forward-Port-Of: odoo/odoo#141409
Reproduce: * Accounting > Vendor > Amounts to Settle * Group By: Due Date (any) There is an error because `payment_date` is not stored. We also allow more operators in `_search_payment_date` because the `read_group` will use `<=` and `>=` to open the groups. We still transform `=` to `<=` to enable the quick search. Forward-Port-Of: odoo/odoo#141457
Original PR description
Reproduce: * Accounting > Vendor > Amounts to Settle * Group By: Due Date (any) There is an error because `payment_date` is not stored. We also allow more operators in `_search_payment_date` because the `read_group` will use `<=` and `>=` to open the groups. We still transform `=` to `<=` to enable the quick search. Forward-Port-Of: odoo/odoo#141457
Styling for domain selector's reset domain button was lost in https://github.com/odoo/odoo/pull/128680. This commit simply brings it back. Forward-Port-Of: odoo/odoo#141470
Original PR description
Styling for domain selector's reset domain button was lost in https://github.com/odoo/odoo/pull/128680. This commit simply brings it back. Forward-Port-Of: odoo/odoo#141470
Added test for recent fix 495a5090a5bb96d4114690c61c5398282ec263c3 Also fixes a wrong recordset vs id comparison --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141496
Original PR description
Added test for recent fix 495a5090a5bb96d4114690c61c5398282ec263c3 Also fixes a wrong recordset vs id comparison --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141496
The current spreadsheet layout is not adapted to print the document as the spreadsheet component is designed to only be rendered in the visible part of the client viewport, the invisible parts of the spreadsheet are not rendered. This revision adds the possibility to render the whole spreadsheet when the user wants to print the document (either via a top menu button or with the generic shortcut Ctrl+P). Task: 3575484 Description of the issue/feature this PR addresses: Current behavio
Original PR description
The current spreadsheet layout is not adapted to print the document as the spreadsheet component is designed to only be rendered in the visible part of the client viewport, the invisible parts of the spreadsheet are not rendered. This revision adds the possibility to render the whole spreadsheet when the user wants to print the document (either via a top menu button or with the generic shortcut Ctrl+P). Task: 3575484 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#140281
### !! To test this feature properly, you need to be in a multiple workers environment !! [This other commit] added a progress bar that displays the installation progress of modules to be installed at the end of the website configurator. This progress bar was only visible if there were modules to install. This PR: - displays a progress bar even if there is no module to install. - corrects the existing progress bar to make it smooth and avoid jerky progress. - makes the progress bar advanc
Original PR description
### !! To test this feature properly, you need to be in a multiple workers environment !! [This other commit] added a progress bar that displays the installation progress of modules to be installed…
### !! To test this feature properly, you need to be in a multiple workers environment !! [This other commit] added a progress bar that displays the installation progress of modules to be installed at the end of the website configurator. This progress bar was only visible if there were modules to install. This PR: - displays a progress bar even if there is no module to install. - corrects the existing progress bar to make it smooth and avoid jerky progress. - makes the progress bar advance continuously (without ever stopping). - prevents the progress bar from reaching 100% before the new site has been created. To achieve this, this PR follows the following methodology. ### If there is no module to install: The progress bar is 100% fake, allowing the user to understand that something is happening. The progress follows the next function.  This shortens the waiting time felt by the user and encourages him not to leave / refresh the page. ### If there are modules to install: We take 70% of the progress bar and divide it by the number of elements to be installed. We fill the progress bar as the modules are installed, faking a progress during each module install. Once all the modules have been installed, we fake the last 30 percent (for text generation, image download, etc.). A short video is worth a thousand words (here, a module is installed each time a checkbox is ticked). There are 7 modules so the progress bar is 7 * 10% for modules + 30% for the rest. https://github.com/odoo/odoo/assets/78849981/ea4d0e5b-13be-4a92-8810-cbf594b7f394 --- [This other commit]: https://github.com/odoo/odoo/commit/ab6564be94533a64a0a942202f0860423ec7dc4d task-3557675 Forward-Port-Of: odoo/odoo#138921
This commit removes some text style options when the editor is used in the backend. In the website it makes sense to have all the options but in the other apps, it is not necessary to have all the options. task-1958098 Forward-Port-Of: odoo/odoo#141412
Original PR description
This commit removes some text style options when the editor is used in the backend. In the website it makes sense to have all the options but in the other apps, it is not necessary to have all the options. task-1958098 Forward-Port-Of: odoo/odoo#141412
Before this PR, bus notification was not reset before testing the bus notification of link previews. https://runbot.odoo.com/web/#id=28333&view_type=form&model=runbot.build.error&menu_id=405&cids=1 Forward-Port-Of: odoo/odoo#141419
Original PR description
Before this PR, bus notification was not reset before testing the bus notification of link previews. https://runbot.odoo.com/web/#id=28333&view_type=form&model=runbot.build.error&menu_id=405&cids=1 Forward-Port-Of: odoo/odoo#141419
This commit fixes the layout of icons and labels in the "AI", "Animate", "Highlight" buttons of the text toolbar in Website edit mode. Before this commit, there was too much space between the icon and the label of the "AI" button and not enough space between the icon and the label of the "Animate" and "Highlight" buttons. task-3586280 Forward-Port-Of: odoo/odoo#141440
Original PR description
This commit fixes the layout of icons and labels in the "AI", "Animate", "Highlight" buttons of the text toolbar in Website edit mode. Before this commit, there was too much space between the icon and the label of the "AI" button and not enough space between the icon and the label of the "Animate" and "Highlight" buttons. task-3586280 Forward-Port-Of: odoo/odoo#141440
Before this commit, a grouped kanban view with create="0" on the root node would still allow to quick create record in columns (i.e. the "+" icon would still be displayed). However, clicking on it would most likely raise an AccessError as the user isn't allowed to create records. This commit restores the pre 16.0 behavior, which is to disallow quick creation if the user can't create. Task 3559638 Description of the issue/feature this PR addresses: Current behavior before PR: Desir
Original PR description
Before this commit, a grouped kanban view with create="0" on the root node would still allow to quick create record in columns (i.e. the "+" icon would still be displayed). However, clicking on it would most likely raise an AccessError as the user isn't allowed to create records. This commit restores the pre 16.0 behavior, which is to disallow quick creation if the user can't create. Task 3559638 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141538 Forward-Port-Of: odoo/odoo#141418
Since the headers redesign in [this PR], the phone number or/and the email address appear on most headers, but it was impossible to edit the links and save them. This was due to dynamic classes set on the `<a>` itself, which was thus forced into a certain state and uneditable. This commit fixes it: when modifying the text, the href is now modified too. [this PR]: https://github.com/odoo/odoo/pull/119650 task-3570111 Forward-Port-Of: odoo/odoo#140869
Original PR description
Since the headers redesign in [this PR], the phone number or/and the email address appear on most headers, but it was impossible to edit the links and save them. This was due to dynamic classes set on the `<a>` itself, which was thus forced into a certain state and uneditable. This commit fixes it: when modifying the text, the href is now modified too. [this PR]: https://github.com/odoo/odoo/pull/119650 task-3570111 Forward-Port-Of: odoo/odoo#140869
### [FIX] account_peppol: peppol_move_state One flow wasn't considered in the PR that added a ready state: - A user unchecks BIS3 XML generation and sending via Peppol in the send & print wizard - `peppol_move_state` is set to `ready`, even though it's not possible to send it without the XML file, so it queues forever This commit adds a `skipped` state. If the XML file is not generated, the `peppol_move_state` is changed to `skipped` and the user needs to manually regenerate attachments
Original PR description
### [FIX] account_peppol: peppol_move_state One flow wasn't considered in the PR that added a ready state: - A user unchecks BIS3 XML generation and sending via Peppol in the send & print wizard -…
### [FIX] account_peppol: peppol_move_state One flow wasn't considered in the PR that added a ready state: - A user unchecks BIS3 XML generation and sending via Peppol in the send & print wizard - `peppol_move_state` is set to `ready`, even though it's not possible to send it without the XML file, so it queues forever This commit adds a `skipped` state. If the XML file is not generated, the `peppol_move_state` is changed to `skipped` and the user needs to manually regenerate attachments to send the invoice via Peppol. Also, the BIS3 checkbox shouldn't be deselected automatically when peppol checkbox is deselected. ### [FIX] l10n_*: add partner bank demo data When trying to send a demo peppol invoice, a user gets an error about the missing recipient bank. The user then needs to set the invoice back to draft, create the bank, and save changes, before being able to send the invoice via Peppol. To make the demo process smoother, this commit adds a `res.partner.bank` record for every demo company that is eligible for peppol. However, it can be useful in general, so these are added in the community l10n modules. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141258
Impacted versions: 16.0+ How to reproduce: - create a lot of articles in Knowledge (i.e. 3000+) - click twice on the `Search Articles` fake search bar in the Knowledge Form view Current behavior: - the command palette does not open - the command palette is broken and won't open again (even with the `CTRL+K` shortcut) Expected behavior: - the command palette open once and should not break even if the user clicks multiple times. Technical explanation: - The promise given to the
Original PR description
Impacted versions: 16.0+ How to reproduce: - create a lot of articles in Knowledge (i.e. 3000+) - click twice on the `Search Articles` fake search bar in the Knowledge Form view Current behavior: -…
Impacted versions: 16.0+ How to reproduce: - create a lot of articles in Knowledge (i.e. 3000+) - click twice on the `Search Articles` fake search bar in the Knowledge Form view Current behavior: - the command palette does not open - the command palette is broken and won't open again (even with the `CTRL+K` shortcut) Expected behavior: - the command palette open once and should not break even if the user clicks multiple times. Technical explanation: - The promise given to the `onWillStart` hook of the `command_palette` can sometimes never be resolved by design (see `KeepLast`). i.e.: - `setCommandPaletteConfig` is called `onWillStart` - `setCommandPaletteConfig` is then called as a result of the `SET-CONFIG` bus event - the first promise will never be resolved since it uses a `KeepLast`, therefore `onWillStart` will never be resolved either. - In `command_service`, the variable `isPaletteOpened` is set to `true` before the command palette dialog is actually mounted. - If `onWillStart` is never resolved, the component will never be mounted, and as such the dialog can never be closed, therefore `isPaletteOpened` stays `true` forever resulting in a deadlock preventing any further opening of the command palette. The issue can be resolved by adding all `KeepLast` promises in a race, which is what `onWillStart` should actually be waiting for, since it will be resolved as soon as any `KeepLast` promise is resolved. task-3554068 Forward-Port-Of: odoo/odoo#141613 Forward-Port-Of: odoo/odoo#140545
Before this commit, some assets of the "web_editor.wysiwyg_iframe_editor_assets" bundle could not be loaded because of unmet dependencies. The loading of such modules failed silently because the module loader waits for the "DOMContentLoaded" event in order to replace the DOM's content by the error report, and such event is not triggered by the wysiwyg's iframe. This commit removes unnecessary assets from the mentioned bundle and solves the dependency errors. Forward-Port-Of: odoo/odoo#14
Original PR description
Before this commit, some assets of the "web_editor.wysiwyg_iframe_editor_assets" bundle could not be loaded because of unmet dependencies. The loading of such modules failed silently because the module loader waits for the "DOMContentLoaded" event in order to replace the DOM's content by the error report, and such event is not triggered by the wysiwyg's iframe. This commit removes unnecessary assets from the mentioned bundle and solves the dependency errors. Forward-Port-Of: odoo/odoo#141591
This PR [1] introduced unwanted dependency between l10n_lu_reports and l10n_lu_hr_payroll. In this commit we remove it. The PR [1] was attempt to undo error made in PR [2] [1] - https://github.com/odoo/enterprise/pull/49991 [2] - https://github.com/odoo/enterprise/pull/45720 Forward-Port-Of: odoo/enterprise#50381
Original PR description
This PR [1] introduced unwanted dependency between l10n_lu_reports and l10n_lu_hr_payroll. In this commit we remove it. The PR [1] was attempt to undo error made in PR [2] [1] - https://github.com/odoo/enterprise/pull/49991 [2] - https://github.com/odoo/enterprise/pull/45720 Forward-Port-Of: odoo/enterprise#50381
Searching a Knowledge article through the command palette was very slow, mostly because the search results were sorted using computed fields in Python. This work contains 2 performance improvements to `get_user_sorted_articles`: - Improve the computation time of `_compute_is_user_favorite` in Python - Implement a custom SQL query for `get_user_sorted_articles` so that the ordering is done entirely in SQL. A query count test is introduced for `get_user_sorted_articles` first and is
Original PR description
Searching a Knowledge article through the command palette was very slow, mostly because the search results were sorted using computed fields in Python. This work contains 2 performance improvements…
Searching a Knowledge article through the command palette was very slow, mostly because the search results were sorted using computed fields in Python. This work contains 2 performance improvements to `get_user_sorted_articles`: - Improve the computation time of `_compute_is_user_favorite` in Python - Implement a custom SQL query for `get_user_sorted_articles` so that the ordering is done entirely in SQL. A query count test is introduced for `get_user_sorted_articles` first and is updated throughout the commits as a visual check for the improvements. Called with a recordset of ~1000 articles,`_compute_is_user_favorite` was observed to be ~8 times faster. A complete search (empty search query) with `get_user_sorted_articles` on a database of ~3000 articles was observed to be ~15 times faster. See each commit for more details. See [the community PR] for the fix to the command palette. [the community PR]: https://github.com/odoo/odoo/pull/140545 task-3554068 Forward-Port-Of: odoo/enterprise#50466 Forward-Port-Of: odoo/enterprise#48945
Task: 3575484 Forward-Port-Of: odoo/enterprise#49829
Original PR description
Task: 3575484 Forward-Port-Of: odoo/enterprise#49829
As all the templates are now imported in the owl app, there is not need anymore to specify the owl="1" attribute in the templates. Ref-https://github.com/odoo/odoo/pull/130467 task-3508331 Forward-Port-Of: odoo/enterprise#50344
Original PR description
As all the templates are now imported in the owl app, there is not need anymore to specify the owl="1" attribute in the templates. Ref-https://github.com/odoo/odoo/pull/130467 task-3508331 Forward-Port-Of: odoo/enterprise#50344
More and more provider/institutions requires that we pass along the psu(customer) IP address when making direct calls (when the user is behind the screen and clicking on the button). So this commit performs exactly that. Forward-Port-Of: odoo/enterprise#47600
Original PR description
More and more provider/institutions requires that we pass along the psu(customer) IP address when making direct calls (when the user is behind the screen and clicking on the button). So this commit performs exactly that. Forward-Port-Of: odoo/enterprise#47600
This commit fixes the position of the favorite widget within the kanban view of Frontdesk. Prior to this commit, the filter was added after the title, which would displays it under the title. To fix the issue, we place it before the title, as we do in Project, and add some flex classes to handle that layout. We also removed some `padding` classes to provide a better visual alignment between the left and right side of our cards. task-3582084 | 17.0 | 17.0-fix-frontdesk-favorit
Original PR description
This commit fixes the position of the favorite widget within the kanban view of Frontdesk. Prior to this commit, the filter was added after the title, which would displays it under the title. To fix the issue, we place it before the title, as we do in Project, and add some flex classes to handle that layout. We also removed some `padding` classes to provide a better visual alignment between the left and right side of our cards. task-3582084 | 17.0 | 17.0-fix-frontdesk-favorite-position-kanban-chgo | | ------------- | ------------- | | <img alt="image" src="https://github.com/odoo/enterprise/assets/128030743/0d1ba064-0fbf-432f-8d94-4e6e8ea9dcf7"> | <img alt="image" src="https://github.com/odoo/enterprise/assets/128030743/1166c628-71da-404c-bbd8-44e63ae55e2a"> | Forward-Port-Of: odoo/enterprise#50132
Purpose ======= Make Social YouTube compliant with the remarks we received. Make all YouTube icons at least 20 pixels high, show the number of likes instead of the percentage, changes some icons displayed in the Kanban view. Task-3549103 Forward-Port-Of: odoo/enterprise#48975
Original PR description
Purpose ======= Make Social YouTube compliant with the remarks we received. Make all YouTube icons at least 20 pixels high, show the number of likes instead of the percentage, changes some icons displayed in the Kanban view. Task-3549103 Forward-Port-Of: odoo/enterprise#48975
Steps: Create a non-fsm task T. Make sure it has a Customer. Go to sub-tasks tab, and display the column "Customer". Create a subtask and make sure it has a customer too. Unset T's customer. Issue: "Customer" column disappeared on the sub-tasks tab. Cause and Fix: In that commit https://github.com/odoo/enterprise/pull/41700/files, the best way to fix the bug was to hide the column. However, we can limit this inconvenience to Field Service. task-3462486 Forward-Port-Of: odoo/enterp
Original PR description
Steps: Create a non-fsm task T. Make sure it has a Customer. Go to sub-tasks tab, and display the column "Customer". Create a subtask and make sure it has a customer too. Unset T's customer. Issue: "Customer" column disappeared on the sub-tasks tab. Cause and Fix: In that commit https://github.com/odoo/enterprise/pull/41700/files, the best way to fix the bug was to hide the column. However, we can limit this inconvenience to Field Service. task-3462486 Forward-Port-Of: odoo/enterprise#50273 Forward-Port-Of: odoo/enterprise#45663
Steps: - Open Employee - Create an employee with standard 40 hours/week working hours - Open planning - Create a shift for that employee for multiple days - Search for that employee - Try dividing the shift through cutting tool Issue: - When we divide the shift through cutting tool TypeError occurs. Cause: - Missing optional chaining operator in the variables unavailability_at_start and unavailability_at_stop which didn't execute the find method and throws the TypeError. Fix: -
Original PR description
Steps: - Open Employee - Create an employee with standard 40 hours/week working hours - Open planning - Create a shift for that employee for multiple days - Search for that employee - Try dividing the shift through cutting tool Issue: - When we divide the shift through cutting tool TypeError occurs. Cause: - Missing optional chaining operator in the variables unavailability_at_start and unavailability_at_stop which didn't execute the find method and throws the TypeError. Fix: - Add the optional chaining operator in the variables unavailability_at_start and unavailability_at_stop. task-3576698 Forward-Port-Of: odoo/enterprise#49889
…for one payment If a transaction is manually matched with one payment that is inside a batch, the rejection wizard should not appear. This is useful for the case of banks making one transaction per payment inside a batch. task-3547187 Forward-Port-Of: odoo/enterprise#50302 Forward-Port-Of: odoo/enterprise#49418
Original PR description
…for one payment If a transaction is manually matched with one payment that is inside a batch, the rejection wizard should not appear. This is useful for the case of banks making one transaction per payment inside a batch. task-3547187 Forward-Port-Of: odoo/enterprise#50302 Forward-Port-Of: odoo/enterprise#49418
Forward-Port-Of: odoo/enterprise#49995
Original PR description
Forward-Port-Of: odoo/enterprise#49995
Imagine the following case: - You have a receipt for 20x a product; - You want to put 10 product into a first package, then 10 more in another package; - So, you open the receipt in the Barcode App, scan 10 times the product's barcode and then put in pack. What happens here is that the move line is put into a new package but that's all, so you end up with one line for the product, 10/20 qty and with the new package as the result package. Thus, if you scan the product one more time, it wil
Original PR description
Imagine the following case: - You have a receipt for 20x a product; - You want to put 10 product into a first package, then 10 more in another package; - So, you open the receipt in the Barcode App, scan 10 times the product's barcode and then put in pack. What happens here is that the move line is put into a new package but that's all, so you end up with one line for the product, 10/20 qty and with the new package as the result package. Thus, if you scan the product one more time, it will update this existing and already packaged line's quantity, making impossible to set the remaining quantity in another package. To fix that, just before to call the `action_put_in_pack`, the "reserved" quantity of the move line will be decreased to its `qty_done` and a new move line will be created for the remaining quantity. Since the new line won't have any `qty_done`, only the first one will be packaged. Forward-Port-Of: odoo/enterprise#50277