Tuesday, December 5, 2023
7 changes · 17.0
Resolved issues and error corrections
Users can now open the Bill of Materials overview for consumable products without encountering an error. This prevents an interruption in manufacturing workflows when reviewing BoM details for products that do not track available quantities in the same way as stocked items.
Original PR description
Steps to reproduce the bug:
- Create a consumable product:
- Create a BoM
- Attempt to access the BoM overview
Problem:
An error is triggered:
"Caused by: TypeError: value.toFixed is not a function"
This error occurs when attempting to format the float value of the
available quantity for a consumable product, where the function is
called with `value: False`:
https://github.com/odoo/odoo/blob/054ca0a19aaf297f420a1b478b93ae26f1b943b8/addons/web/static/src/core/utils/numbers.js#L192
opw-[3622251](https://www.odoo.com/web#id=3622251&view_type=form&model=project.task)This fixes a timing issue that could interrupt creating a voice message in chat. Users should see more consistent behavior when recording or sending voice messages, reducing occasional failures or flakiness.
Original PR description
runbot-46626
This fix makes an automated eLearning course publishing test wait until PDF content has fully loaded before checking it. It reduces random test failures, helping keep the website slides module's quality checks stable without changing user-facing features.
Original PR description
In v17.0, the test TestUiPublisher.test_course_publisher_elearning_manager of website_slides fails randomly at the step: "eLearning: check uploaded pdf presence and perform comparison" with the…
In v17.0, the test TestUiPublisher.test_course_publisher_elearning_manager of website_slides fails randomly at the step: "eLearning: check uploaded pdf presence and perform comparison" with the error: "Cannot read properties of null (reading 'getAttribute')"
How to reproduce it ?
Locally, TestUiPublisher.test_course_publisher_elearning_manager of website_slides runs without errors but when executing it in the browser we get the same error as the runbot systematically:
– Install website_slides
– Go to shell mode and execute the setup of the test – (Backup DB if you want to run the test multiple time) – Launch in normal mode and connect with demo user – Go to URL: /web?debug=assets%2Ctests
– Type “odoo.startTour('course_publisher_standard');” in the console – An error happens at step “eLearning: check uploaded pdf presence and perform comparison”: Cannot read properties of null (reading 'getAttribute') (to avoid to wait too long, you can shorten the test by keeping mostly “addPdfToSection”)
The problem occurs because the rendering of the iframe o_wslides_iframe_viewer is not always completed when the check is triggered. We solve this problem by waiting for the rendering to finish before performing the test (using "await contains"). For safety, we do the same for another check as this might cause a similar problem in the future.
Although the test has been introduced in 16.2 (see odoo/odoo#117293) but the error happens only in 17.0 (tested only in 16.4 the way described above), we publish only the correction in 17.0 and further to avoid different correction in various version.
Task-3623736This fixes an error that occurred when users selected more than one trigger field in an automation rule. The change ensures extra field information is only calculated when it is actually needed, preventing crashes and making automation setup more reliable.
Original PR description
**Before this commit:** If you select more than one trigger field on base.automation: ``` File "/home/odoo/src/odoo/17.0/addons/base_automation/models/base_automation.py", line 302, in…
**Before this commit:**
If you select more than one trigger field on base.automation:
```
File "/home/odoo/src/odoo/17.0/addons/base_automation/models/base_automation.py", line 302, in _compute_trg_field_ref__model_and_display_names relation = automation.trigger_field_ids.relation
File "/home/odoo/src/odoo/17.0/odoo/fields.py", line 1146, in __get__ record.ensure_one()
File "/home/odoo/src/odoo/17.0/odoo/models.py", line 5819, in ensure_one raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: ir.model.fields(<NewId origin=3241>, <NewId origin=3238>)
```
**After this commit:**
`trg_field_ref_model_name` and `trg_field_ref_display_name` are only used for the `base_automation_trigger_reference` widget, which is only used when `trigger in ['on_stage_set', 'on_tag_set']`. We only need to compute them in this case, which will be OK since they use only one trigger field.
opw-3607314
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes minor point of sale issues that could occur when no order line was selected. It also improves receipt printing support for certain local requirements by including the price before discount.
Original PR description
This PR fixes small issues when there is not selectedLine in some cases. We also add the price_without_discount for the printing because of some localisation issues. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The control panel navigation arrows now stretch to match the full height of their container. This fixes a small visual inconsistency and makes the interface look more polished and aligned for users.
Original PR description
This commit allows the navigation inside the Control Panel to fill all the container height. Prior to this commit, the navigation arrows inside the control panel were not taking the whole height of the container, which would cause a weird visual render where everything would have exactly the same height except these elements. To fix the issue, we adapt some of the flex properties used in the layout, ensuring everything is well aligned. task-3580216
Guest visitors on public WhatsApp pages now have their last seen message saved correctly. This prevents the new message marker from reappearing unnecessarily and reduces repeated background updates when guests reopen the page.
Original PR description
Since 17.0, the new message separator is displayed for guests. The set_last_seen_message rpc is also triggered in order to save this information on the server side. However, the _channel_seen method does not handle guests as it should. As a consequence, the new message separator is always displayed and the rpc call is always done when a guest loads the public page. This PR enable guest support for this feature. task-3603603 community: https://github.com/odoo/odoo/pull/142546