Wednesday, June 19, 2024
25 changes · saas-17.3
Resolved issues and error corrections
Closing a temporary live chat now properly removes that unfinished conversation. This prevents old welcome messages from appearing again when a visitor starts a new chat, keeping the customer experience cleaner.
Original PR description
[1] commit removed the code which would delete the temporary thread when closing a non-persisted livechat. So, because of this when you open a new livechat channel after closing the previous one you will still see the welcome messages which were there in the previous thread which causes duplication of welcome messages. This commit reintroduces the code which would delete this temporary thread. [1]: 21a51f63709eb0e637911f38988527818ddf3b54 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Customers using self-ordering or kiosk screens can now see the product information button when a product has a self-order description. This helps shoppers access product details more easily before placing an order.
Original PR description
Before this commit: ========== - The product info button was not visible on the self order and kiosk product card even after adding self order description. After this commit: ========== - Now, the product info button is visible on the product card in self order and kiosk. task-3972473
Miscellaneous changes
Before this PR, throwing an error in any test hook (before, after, beforeEach, etc.) would cause the error to be logged but the test would actually timeout because the runner would freeze. This was due to the runner incorrectly catching errors in hooks. This PR ensures that all these callbacks are properly catched to ensure the errors are assigned to each relevant test and do not clog up the runner's execution. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.
Original PR description
Before this PR, throwing an error in any test hook (before, after, beforeEach, etc.) would cause the error to be logged but the test would actually timeout because the runner would freeze. This was due to the runner incorrectly catching errors in hooks. This PR ensures that all these callbacks are properly catched to ensure the errors are assigned to each relevant test and do not clog up the runner's execution. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169855
**Steps to reproduce:** - Install sale_project, E-Commerce module - Create a service product and put its invoicing policy as 'Based on milestones' - Go to website as Public user and try to add the product you created to the cart **Current behavior before PR:** A traceback is happening when a public user try to add a product -that has Based on milestones as invoicing policy- to the cart. This is happening because we check if the user has 'group_project_milestone' https://github.com/odoo
Original PR description
**Steps to reproduce:** - Install sale_project, E-Commerce module - Create a service product and put its invoicing policy as 'Based on milestones' - Go to website as Public user and try to add the product you created to the cart **Current behavior before PR:** A traceback is happening when a public user try to add a product -that has Based on milestones as invoicing policy- to the cart. This is happening because we check if the user has 'group_project_milestone' https://github.com/odoo/odoo/blob/17.0/addons/sale_project/models/product.py#L18 and if the user is not signed in he won't have this group. **Desired behavior after PR is merged:** The public user should be able to add this products. As we are now checking if the user is a public one and if the SUPERUSER has the 'group_project_milestone'. opw-3956165 Forward-Port-Of: odoo/odoo#169775 Forward-Port-Of: odoo/odoo#167810
When scanning a barcode, the search should return only one partner if the barcode is an exact match. This is the case for example when scanning a membership card. taskId: 3987605 Forward-Port-Of: odoo/odoo#169695 Forward-Port-Of: odoo/odoo#169603
Original PR description
When scanning a barcode, the search should return only one partner if the barcode is an exact match. This is the case for example when scanning a membership card. taskId: 3987605 Forward-Port-Of: odoo/odoo#169695 Forward-Port-Of: odoo/odoo#169603
This implements a new approach to solve selection issues around links (allowing the cursor at the inner _and_ outer edges of links). In the sanitization process, every link now receives 4 zero-width non-breaking spaces (unicode FEFF characters, hereafter referred to as ZWNBSP): - one before the link - one as the link's first child - one as the link's last child - one after the link like so: `//ZWNBSP//<a>//ZWNBSP//label//ZWNBSP//</a>//ZWNBSP`. An advantage of ZWNBSP over regular ZWS
Original PR description
This implements a new approach to solve selection issues around links (allowing the cursor at the inner _and_ outer edges of links). In the sanitization process, every link now receives 4 zero-width…
This implements a new approach to solve selection issues around links (allowing the cursor at the inner _and_ outer edges of links). In the sanitization process, every link now receives 4 zero-width non-breaking spaces (unicode FEFF characters, hereafter referred to as ZWNBSP): - one before the link - one as the link's first child - one as the link's last child - one after the link like so: `//ZWNBSP//<a>//ZWNBSP//label//ZWNBSP//</a>//ZWNBSP`. An advantage of ZWNBSP over regular ZWSP (unicode 200B) is they're less likely to be used deliberately by the user, so much so that we can safely assume all of them are technical and can be removed indiscriminately. ZWSP and ZWNBSP are used to mark a separation between words in languages that don't use spaces for that purpose (eg, Lao). ZWNBSP are to ZWSP what NBSP (unicode 00A0) are to regular spaces. Because of that advantage, we don't need to track the ZWNBSP (so there is no need to wrap them in `span` elements), simplifying the code considerably. We therefore now remove all ZWNBSP when saving. There is a possibility to introduce "orphaned" ZWNBSP during the editing process, if for instance the link has a big enough padding or margin that it's possible to click between two of a link's ZWNBSP (one outer, the other inner). Inserting a character or a paragraph break in such a position will move the ZWNBSP to a place where it's not useful anymore. The sanitizer will then reintroduce the useful ZWNBSP in their rightful places. We remove the orphaned ZWNBSP from the sanitizer whenever that is possible without risking to break the selection. To properly deal with this change, we also change the handlers for the delete/backspace/deleteRange, enter and arrow keys. This PR also makes some indirectly related changes: - It fixes a bug with Bootstrap buttons in the "backend" where it's currently impossible to put the selection within them (and the wrong cursor appears) because of a Boostrap CSS. - It introduces a debugging utility function to log the selection. - It slightly modifies the way the `enter` key handler works at the inner edges of links so that a paragraph break will never be inserted at the end of the link (creating an empty link). Co-authored-by: Sébastien Geelen <sge@odoo.com> task-3604728 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#165470 Forward-Port-Of: odoo/odoo#157200
Description of the issue this PR addresses: Paragraphs are not admitted in list items in the editor. But the way they were sanitized away was broken. After commit [1] contiguous paragraphs in a list item were converted to their own new list item with oe-nested class to remove the bullet point (eg, `<li><p>a</p><p>b</p></li>` became `<li>a</li><li class=oe-nested>b</li>`), which broke some snippet using paragraphs nested within list item. This commit convert those p tags with attributes
Original PR description
Description of the issue this PR addresses: Paragraphs are not admitted in list items in the editor. But the way they were sanitized away was broken. After commit [1] contiguous paragraphs in a list item were converted to their own new list item with oe-nested class to remove the bullet point (eg, `<li><p>a</p><p>b</p></li>` became `<li>a</li><li class=oe-nested>b</li>`), which broke some snippet using paragraphs nested within list item. This commit convert those p tags with attributes to span tags and use `<br>` tags to separate those spans and unwraps those without attributes. task-3932057 [1]: https://github.com/odoo/odoo/commit/3f9938823189935a013846db9c9a96b5d8bd15d0 Forward-Port-Of: odoo/odoo#168959 Forward-Port-Of: odoo/odoo#166433
Add an option to restrict users from creating language on mobile self-order & kiosk mode. task - 3980908 Forward-Port-Of: odoo/odoo#168804
Original PR description
Add an option to restrict users from creating language on mobile self-order & kiosk mode. task - 3980908 Forward-Port-Of: odoo/odoo#168804
Before this fix, when grouping by a date filter that only had "false" value, the global filter matching was causing a traceback trying to split a non existant month/year value. This commit fixes this behavior by checking for "false" in date filter and setting the matching filter to "undefied" OPW: 3776544 OPW: 3952358 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169555 Forward-Port-Of: odoo/odoo#169453
Original PR description
Before this fix, when grouping by a date filter that only had "false" value, the global filter matching was causing a traceback trying to split a non existant month/year value. This commit fixes this behavior by checking for "false" in date filter and setting the matching filter to "undefied" OPW: 3776544 OPW: 3952358 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169555 Forward-Port-Of: odoo/odoo#169453
Update the OWL lib. Release notes: https://github.com/odoo/owl/releases/tag/v2.2.10 https://github.com/odoo/owl/releases/tag/v2.2.11 These releases contain small improvements * v2.2.10 [IMP] runtime: allow using any class as a type in props validation Update reactivity.md [IMP] owl-vision: Better snippets [FIX] docs: code in example cannot run * v2.2.11 [FIX] compiler: better support for arrow function and function call [IMP] owl-vision: Autocomplete and added missing owl dir
Original PR description
Update the OWL lib. Release notes: https://github.com/odoo/owl/releases/tag/v2.2.10 https://github.com/odoo/owl/releases/tag/v2.2.11 These releases contain small improvements * v2.2.10 [IMP] runtime: allow using any class as a type in props validation Update reactivity.md [IMP] owl-vision: Better snippets [FIX] docs: code in example cannot run * v2.2.11 [FIX] compiler: better support for arrow function and function call [IMP] owl-vision: Autocomplete and added missing owl directives [IMP] index: export batched utility function [FIX] playground: correctly escape backslashes and interpolation sigils [FIX] compiler: correctly escape special characters in template literals [FIX] Typo docs [FIX] runtime: don't emit async hook warnings when cancelled/destroyed --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169745
Before this commit: - the tooltip is mismatched to the conditions of service_tracking_type. After this commit: - fixes the tooltip of the product in `task_in_project` and `project_only` fields. ref PR: https://github.com/odoo/odoo/pull/103974 task-3964655 Forward-Port-Of: odoo/odoo#169736 Forward-Port-Of: odoo/odoo#167830
Original PR description
Before this commit: - the tooltip is mismatched to the conditions of service_tracking_type. After this commit: - fixes the tooltip of the product in `task_in_project` and `project_only` fields. ref PR: https://github.com/odoo/odoo/pull/103974 task-3964655 Forward-Port-Of: odoo/odoo#169736 Forward-Port-Of: odoo/odoo#167830
This commit adds 3 missing payment method logos: 7eleven, Cashalo and Cebuana. task-3994673 | Before | After | |--------|--------| |  |  | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forwa
Original PR description
This commit adds 3 missing payment method logos: 7eleven, Cashalo and Cebuana. task-3994673 | Before | After | |--------|--------| |  |  | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#169647
When leaving the table mode, the filter should be removed to show all products again. taskId: 3989229 Forward-Port-Of: odoo/odoo#169642 Forward-Port-Of: odoo/odoo#169416
Original PR description
When leaving the table mode, the filter should be removed to show all products again. taskId: 3989229 Forward-Port-Of: odoo/odoo#169642 Forward-Port-Of: odoo/odoo#169416
Currently, a traceback occurs when the user changes the type of a product. Steps to reproduce:- 1) Install sale, POS 2) Create a confirmed sale order with a product 2) Now change the product type for the above created `SO` product Error:- ``` TypeError: 'NoneType' object does not support item assignment ``` In the [1] commit there is no return type, So it by default returns None. Because of no return type, the value of `res` would be `None` at [2]. It leads to a traceback wh
Original PR description
Currently, a traceback occurs when the user changes the type of a product. Steps to reproduce:- 1) Install sale, POS 2) Create a confirmed sale order with a product 2) Now change the product type for the above created `SO` product Error:- ``` TypeError: 'NoneType' object does not support item assignment ``` In the [1] commit there is no return type, So it by default returns None. Because of no return type, the value of `res` would be `None` at [2]. It leads to a traceback when assigning a value to `res`, which is a `NoneType` at [3]. [1] https://github.com/odoo/odoo/commit/d9c5d163f251f59829b00decae94044941ee44e4 [2] https://github.com/odoo/odoo/blob/a142a51faa8ab8cce9c9ae4a14e15646c2118f5e/addons/sale/models/product_template.py#L95 [3] https://github.com/odoo/odoo/blob/a142a51faa8ab8cce9c9ae4a14e15646c2118f5e/addons/sale/models/product_template.py#L97 sentry-5488262774 Forward-Port-Of: odoo/odoo#169376
Before this PR, a test could hang indefinitely if an error occured. The flow is the following: - error occurs - the contains helper reset is internal `hasUsedContainsPositively` following the `after` callback - an error occurs if the pending contains is a negative assertion (count=0) - hoot never keeps going The `hasUsedContainsPositively` variable should not be cleaned by the contains instances. It should only be cleaned once when the test is done. Forward-Port-Of: odoo/odoo#169836
Original PR description
Before this PR, a test could hang indefinitely if an error occured. The flow is the following: - error occurs - the contains helper reset is internal `hasUsedContainsPositively` following the `after` callback - an error occurs if the pending contains is a negative assertion (count=0) - hoot never keeps going The `hasUsedContainsPositively` variable should not be cleaned by the contains instances. It should only be cleaned once when the test is done. Forward-Port-Of: odoo/odoo#169836
Before this PR, the "forward_operator" chat bot step would fail when logged in as a portal user. Indeed, this step post a message which requires reading the partner of the operator but portal users are not allowed to do so. This PR fixes the issue. opw-3987375 Forward-Port-Of: odoo/odoo#169748
Original PR description
Before this PR, the "forward_operator" chat bot step would fail when logged in as a portal user. Indeed, this step post a message which requires reading the partner of the operator but portal users are not allowed to do so. This PR fixes the issue. opw-3987375 Forward-Port-Of: odoo/odoo#169748
The main goal of this PR is to ensure that the `X` button or `Esc` shortcut (Dismiss feature) of the confirmation dialog is allowed to have a different behavior than the `Cancel` button. At present, it performs the same action as the `Cancel` button but there might be cases when the dialog does not have a `Cancel` button and we still want to handle the dialog dismiss action. To enable this, this PR adds an optional callback for `dismiss` operation to the dialogData.dismiss that will
Original PR description
The main goal of this PR is to ensure that the `X` button or `Esc` shortcut (Dismiss feature) of the confirmation dialog is allowed to have a different behavior than the `Cancel` button. At present,…
The main goal of this PR is to ensure that the `X` button or `Esc` shortcut (Dismiss feature) of the confirmation dialog is allowed to have a different behavior than the `Cancel` button. At present, it performs the same action as the `Cancel` button but there might be cases when the dialog does not have a `Cancel` button and we still want to handle the dialog dismiss action. To enable this, this PR adds an optional callback for `dismiss` operation to the dialogData.dismiss that will only be executed when a dialog is closed via of the `X` button or the `Escape` shortcut. Otherwise, it will execute the callback for `cancel` operation, if any. This PR also adds/modifies some tests in `confirmation_dialog_tests.js` and `list_view_tests.js` to ensure that this new feature works as intended. **Example Use Case:** - Go to list view or kanban view. - Select the document to preview in the inspector. - Clear the input value of a required field (here, Name or Workspace), and click out or press 'Enter'. - Dismiss the alert dialog via the "X" button or the "Esc" shortcut. **Issue:** An alert dialog indicating a validation error is shown when a field value is cleared. Yet, on closing the dialog, the unnamed document is saved as is. Instead, the changes should be reverted. **Cause:** The dismiss operation is never handled in case of alert dialog for invalid selection. Hence, by default, it applies the changes made to the field. **Fix:** The alert dialog for invalid selection is different from the ones which are simply used to display warnings or alert messages because they do not need to perform any action upon dismissing the dialog. In this case, we want to prevent any invalid changes from being applied. It is achieved by calling the `leaveEditMode` method which discards them and switches the config mode. Hence, we do something similar to what is done on the click of `OK` button, on dismissing the dialog as well. This behavior is introduced because even if the user discards the dialog, any change that is not valid should not be applied. Task: [3799280](https://www.odoo.com/web#id=3799280&menu_id=4722&cids=2&action=333&active_id=10888&model=project.task&view_type=form) Forward-Port-Of: odoo/odoo#169195 Forward-Port-Of: odoo/odoo#166103
[IMP] documents_account: Add selection of journal in Document Action 'import bank statement' Backport of: https://github.com/odoo/enterprise/pull/46482/commits/d2a95d7ffa3ef2976172ed17eaf93056ea0f8c6c For now we didn't chose the bank journal because we assume that only coda file where push like this, and in the coda file we can find in which journal to send it. But Coda is limited to BE and lot of user import CSV file for bank. Add the selection of the journal (not mandatory) for Docume
Original PR description
[IMP] documents_account: Add selection of journal in Document Action 'import bank statement' Backport of: https://github.com/odoo/enterprise/pull/46482/commits/d2a95d7ffa3ef2976172ed17eaf93056ea0f8c6c For now we didn't chose the bank journal because we assume that only coda file where push like this, and in the coda file we can find in which journal to send it. But Coda is limited to BE and lot of user import CSV file for bank. Add the selection of the journal (not mandatory) for Document action, and inject CSV in the journal selected. If no journal selected inject the CSV in the first one of the list. If it's a coda file, keep as now and don't take care of the journal selected. Task-3932055 Forward-Port-Of: odoo/enterprise#64997 Forward-Port-Of: odoo/enterprise#62752
Community PR: https://github.com/odoo/odoo/pull/159995 task-3604728 Forward-Port-Of: odoo/enterprise#62474 Forward-Port-Of: odoo/enterprise#60751
Original PR description
Community PR: https://github.com/odoo/odoo/pull/159995 task-3604728 Forward-Port-Of: odoo/enterprise#62474 Forward-Port-Of: odoo/enterprise#60751
Before this commit: An IoT box would always listen to the iot.channel of the first company as it did not take into account the IoT-box company field. As such, setting an IoT box on a company C2 setting a printer and report to print on this IoT and restarting it. Report will never print as the IoT listen to C1 channel After this commit: If the IoT box company is set and the IoT is restarted. It will received the correct IoT channel. So, to print IoT reports opw-3991810 Forward-Port-Of:
Original PR description
Before this commit: An IoT box would always listen to the iot.channel of the first company as it did not take into account the IoT-box company field. As such, setting an IoT box on a company C2 setting a printer and report to print on this IoT and restarting it. Report will never print as the IoT listen to C1 channel After this commit: If the IoT box company is set and the IoT is restarted. It will received the correct IoT channel. So, to print IoT reports opw-3991810 Forward-Port-Of: odoo/enterprise#64859
The aim of this commit is giving a fallback value when we need digits' currency and that we don't have this currency loaded in the js session. This commit is almost backport of what we have done in this commit [1]. The only difference is the default value for the toFixed set to 2. task-3959277 [1]: https://github.com/odoo/enterprise/commit/6a3623c168f3bdf32b9530071e21c014dd19ea07 Forward-Port-Of: odoo/enterprise#63913
Original PR description
The aim of this commit is giving a fallback value when we need digits' currency and that we don't have this currency loaded in the js session. This commit is almost backport of what we have done in this commit [1]. The only difference is the default value for the toFixed set to 2. task-3959277 [1]: https://github.com/odoo/enterprise/commit/6a3623c168f3bdf32b9530071e21c014dd19ea07 Forward-Port-Of: odoo/enterprise#63913
opw-3935664 Forward-Port-Of: odoo/enterprise#64775 Forward-Port-Of: odoo/enterprise#63998
Original PR description
opw-3935664 Forward-Port-Of: odoo/enterprise#64775 Forward-Port-Of: odoo/enterprise#63998
Bug === 1. Open Safari or Firefox 2. Open the split tool 3. We can not open the preview by clicking on the upper card of the card Technical ========= The hover effect was done with CSS trickery, so we added a new div to remove the CSS `transform` trick. Task-3863428 Forward-Port-Of: odoo/enterprise#64841 Forward-Port-Of: odoo/enterprise#61010
Original PR description
Bug === 1. Open Safari or Firefox 2. Open the split tool 3. We can not open the preview by clicking on the upper card of the card Technical ========= The hover effect was done with CSS trickery, so we added a new div to remove the CSS `transform` trick. Task-3863428 Forward-Port-Of: odoo/enterprise#64841 Forward-Port-Of: odoo/enterprise#61010
Task-3924439 Forward-Port-Of: odoo/enterprise#64783 Forward-Port-Of: odoo/enterprise#64310
Original PR description
Task-3924439 Forward-Port-Of: odoo/enterprise#64783 Forward-Port-Of: odoo/enterprise#64310
**Steps to reproduce:** - Go to list view or kanban view. - Select the document to preview in the inspector. - Clear the input value of a required field (here, Name or Workspace), and click elsewhere or press 'Enter'. **Issues:** - _**Workspace field**_ A validation error is raised when a Workspace name is cleared. However, an alert dialog is not displayed. - _**Name field**_ An alert dialog indicating a validation error is shown yet on clicking the `OK` button, the unnamed docume
Original PR description
**Steps to reproduce:** - Go to list view or kanban view. - Select the document to preview in the inspector. - Clear the input value of a required field (here, Name or Workspace), and click elsewhere…
**Steps to reproduce:**
- Go to list view or kanban view.
- Select the document to preview in the inspector.
- Clear the input value of a required field (here, Name or Workspace), and click elsewhere or press 'Enter'.
**Issues:**
- _**Workspace field**_
A validation error is raised when a Workspace name is cleared. However, an alert dialog is not displayed.
- _**Name field**_
An alert dialog indicating a validation error is shown yet on clicking the `OK` button, the unnamed document is saved as is.
Instead, the changes should be reverted.
**Causes:**
- _**Workspace field**_
The `required` attribute was not added to `folder_id` field in the view. As a result, alert dialog was not shown.
- _**Name field**_
The config mode never changes to 'edit'. Even when a user is editing an inspector field, the mode is 'readonly'.
As a result, the boolean `isInEdition` remains false and the code-block meant to be executed
on click of the confirm button of alert dialog does not execute as intended.
**Fix:**
- _**Workspace field**_
The `required` attribute is forcefully set to true for the `folder_id` field so that an empty value for workspace
is not considered to be a 'validSelection' and the user faces an alert popup.
- _**Name field**_
This PR fixes the issue by switching to edit mode whenever user changes the value of a document inspector field.
This PR also adds a testcase in `documents_kanban_tests.js` to ensure that the confirm ('OK') button works as intended.
Task: [3799280](https://www.odoo.com/web#id=3799280&menu_id=4722&cids=2&action=333&active_id=10888&model=project.task&view_type=form)
Forward-Port-Of: odoo/enterprise#64560
Forward-Port-Of: odoo/enterprise#59734