Friday, January 31, 2025
22 changes · saas-17.4
Resolved issues and error corrections
Batch transfers can now be saved and sorted by ZIP code even when some deliveries do not have a ZIP code. This prevents an error that interrupted warehouse users while organizing pickings.
Original PR description
Issue Before This Commit: ============================ A traceback occurs when attempting to sort pickings by zip if any picking has a False or empty zip value. Steps to Reproduce: ===================== 1. Install the stock_fleet module. 2. Navigate to Batch Transfer in the Stock module under the Operations tab. 3. Create a new batch and add pickings, ensuring some have a zip value while others do not. 4. Save the batch, which triggers a traceback error: TypeError: '<' not supported between instances of 'bool' and 'str'. With This Commit: ===================== The issue occurred because sorting directly on the zip caused an error when the zip was False. this fix ensures that sorting treats zip as an empty string () when it is False, preventing the error. task - [4535113](https://www.odoo.com/odoo/my-tasks/4535113)
Miscellaneous changes
There were problems reported on some invoices caused by rounding errors. This PR solves these problems, and adds more test cases to the precision unit tests. task-4464702 task-4509607 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194813
Original PR description
There were problems reported on some invoices caused by rounding errors. This PR solves these problems, and adds more test cases to the precision unit tests. task-4464702 task-4509607 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194813
This commit fixes the width of not available items inside the search results list and the search result dropdown. We achieve the fix by using the same approach used in this commit: https://github.com/odoo/odoo/commit/9ffbc8720b84f51d5d03a7e11c74c19b62cf46c0 opw-4444222 task-4517564 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195316
Original PR description
This commit fixes the width of not available items inside the search results list and the search result dropdown. We achieve the fix by using the same approach used in this commit: https://github.com/odoo/odoo/commit/9ffbc8720b84f51d5d03a7e11c74c19b62cf46c0 opw-4444222 task-4517564 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195316
Versions -------- - 16.0 Backport of https://github.com/odoo/odoo/pull/195266 Issue ----- Use `float_compare` to compare floating point amounts on reward validation. Forward-Port-Of: odoo/odoo#195793 Forward-Port-Of: odoo/odoo#195637
Original PR description
Versions -------- - 16.0 Backport of https://github.com/odoo/odoo/pull/195266 Issue ----- Use `float_compare` to compare floating point amounts on reward validation. Forward-Port-Of: odoo/odoo#195793 Forward-Port-Of: odoo/odoo#195637
Steps: - Install `purchase` or any other model with analytic_mixin - Install `analytic` - Install `web_studio` - Enable analytic in configuration - Add a new approval on 'button_confirm' in `purchase.order` - Set a domain with analytic_distribution e.g - - e.g. ("order_line.analytic_distribution", "=", "Administrative") - Click on Refresh button - The refresh button preview shows x records - Create a new purchase.order - Add analytic on op
Original PR description
Steps: - Install `purchase` or any other model with analytic_mixin - Install `analytic` - Install `web_studio` - Enable analytic in configuration - Add a new approval on 'button_confirm' in…
Steps:
- Install `purchase` or any other model with analytic_mixin
- Install `analytic`
- Install `web_studio`
- Enable analytic in configuration
- Add a new approval on 'button_confirm' in `purchase.order`
- Set a domain with analytic_distribution e.g
- - e.g. ("order_line.analytic_distribution", "=", "Administrative")
- Click on Refresh button
- The refresh button preview shows x records
- Create a new purchase.order
- Add analytic on optional column
- Add a new product with analytic_distribution Administrative
- Try to use `button_confirm`
- Approval is not working while the refresh shows record is available
The json fields, in particular the `analytic_distribution` fields, are not designed to be searched via a `filtered_domain` (which is what studio approval uses to check whether or not a button can be used by the current user), this is currently a technical limitation.
To avoid any future problems, this commit prevents users from using a json field to search on them, since this is not supported.
opw-4416646
Forward-Port-Of: odoo/odoo#195916
Forward-Port-Of: odoo/odoo#195765[FIX] survey: fix final leaderboard layout - Install survey - Create a survey “Live Session” - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple choice with 1 correct, score: 1) - Click on “Create Live Session” - Join the session with another browser - Answer the question correctly - On the survey manager, go to the end of the survey (Final leaderboard) The stats only occupies a small portion of the width and the button are very cl
Original PR description
[FIX] survey: fix final leaderboard layout - Install survey - Create a survey “Live Session” - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple…
[FIX] survey: fix final leaderboard layout - Install survey - Create a survey “Live Session” - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple choice with 1 correct, score: 1) - Click on “Create Live Session” - Join the session with another browser - Answer the question correctly - On the survey manager, go to the end of the survey (Final leaderboard) The stats only occupies a small portion of the width and the button are very close to the title. We solve the problem by enlarging the stats like the previous result screens to get a layout similar as in v16.0. [FIX] documents: fix close buttons - Install survey - Create a survey “Live Session” - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple choice with 1 correct, score: 1) - Click on “Create Live Session” - Join the session with another browser - Answer the question correctly - On the survey manager, go to the end of the survey (Final leaderboard) - Click on the "Close" button Nothing happens while it should close the session and get back to the survey form. Actually, the code was closing the session but failed to get back to the survey as it was using "window.history.back()" and the button "create session" launches the session in a new tab that has no history as all the survey happens on the same URL. We solve the problem by reloading the page instead. As the session is closed, the page then displays "Thank you". We change slightly the tour as it expects that at the end, the close button leads to the survey back-end form (as it checks the presence of the button "Create Session" which is the action "action_start_session"). But as the session is started in a new tab, we have decided that it is better to display the final "Thank you" screen rather than returning to the back-end survey form as this is meant to be displayed in public. [FIX] documents: fix infinite line when max score is 0 How to reproduce: - Create a live survey - Add a “Single Line Text Box” and check “Save as user nickname” - Add a second question (ex.: multiple choice with 1 correct, score: 1) - Click on “Create Live Session” - Join the session with another browser - Answer the wrong answer to the question At the end of the survey, the score bar size is very big (multiple time of the screen width). We solve the problem by avoiding dividing by 0. Task-4381603 Forward-Port-Of: odoo/odoo#190442
Upon zooming in on the elearning slides view from the mobile by finger pinch, the whole page zooms in and not just the content, which causes the content quality to be still blurry. To Reproduce on Runbot: 1.Go to eLearning module. 2.Go to "Edit" on any of the courses. 3.Add a pdf content. 4.From the phone, go to the website elearning for the same course. 4.Click on the pdf content we uploaded. 5.Try finger pinch zooming in, the document gets still blurry. 6.The issue seems to be that
Original PR description
Upon zooming in on the elearning slides view from the mobile by finger pinch, the whole page zooms in and not just the content, which causes the content quality to be still blurry. To Reproduce on Runbot: 1.Go to eLearning module. 2.Go to "Edit" on any of the courses. 3.Add a pdf content. 4.From the phone, go to the website elearning for the same course. 4.Click on the pdf content we uploaded. 5.Try finger pinch zooming in, the document gets still blurry. 6.The issue seems to be that there's no finger pinch zoom in and out, and when you try doing that the whole page zooms in and out, not changing the quality of the document. So, the solution was to make zoom in and out icon available on small screen devices as well. opw-3893275 Forward-Port-Of: odoo/odoo#178655
**Steps to Reproduce:** - Navigate to /shop . - Open editor mode and select a product. - Use the reorder widget from the editor panel to change the product's position. - Notice the product jumps 2 positions instead of 1 when reordered. **Issue:** - Two products, 'Warranty' and 'Chair Floor Protection', have the same website_sequence. This causes the reorder logic to malfunction, making products jump 2 positions when one is placed in front or behind these two. **Fix:** - Updated the w
Original PR description
**Steps to Reproduce:** - Navigate to /shop . - Open editor mode and select a product. - Use the reorder widget from the editor panel to change the product's position. - Notice the product jumps 2 positions instead of 1 when reordered. **Issue:** - Two products, 'Warranty' and 'Chair Floor Protection', have the same website_sequence. This causes the reorder logic to malfunction, making products jump 2 positions when one is placed in front or behind these two. **Fix:** - Updated the website_sequence of conflicting products to ensure all products have unique values. **Affected Versions:** 16.0~master opw-4150099 Forward-Port-Of: odoo/odoo#191297
Steps to Reproduce: - Go to the website editor. - Add a form to the page. - Select the form and change the default action from "Send an email" to "Create an opportunity." - Select the "Subject" field. - Set the visibility condition of the "Subject" field to "visible only if the phone number is set." - Since this is a mandatory field, define a default value for the "Subject" field. - Save the changes. - Fill out the form but leave the phone number field empty so that the "Subject" field
Original PR description
Steps to Reproduce: - Go to the website editor. - Add a form to the page. - Select the form and change the default action from "Send an email" to "Create an opportunity." - Select the "Subject" field. - Set the visibility condition of the "Subject" field to "visible only if the phone number is set." - Since this is a mandatory field, define a default value for the "Subject" field. - Save the changes. - Fill out the form but leave the phone number field empty so that the "Subject" field does not appear. - Attempt to submit the form. - Bug: the form is not sent and there is an error message. The error occurs preventing the record from being created because all required fields are not present, we should use the default value as it has been provided. This commit prevents adding the "disabled" attribute to inputs that are required for models. opw-4447039 Forward-Port-Of: odoo/odoo#195660 Forward-Port-Of: odoo/odoo#194902
Steps to reproduce: - In V17.0 drag and drop an "Image Gallery" block into the page. - Upgrade to 18.0 - Click on the last "Image Gallery" indicator and then quickly on the first one. - Traceback: "TypeError: Cannot read properties of null (reading 'classList') at Carousel._setActiveIndicatorElement ..." This issue is caused by the front-end code of the image gallery, which updates the active indicator during a slide event. When the crash happens, it cannot find the active slide in the
Original PR description
Steps to reproduce: - In V17.0 drag and drop an "Image Gallery" block into the page. - Upgrade to 18.0 - Click on the last "Image Gallery" indicator and then quickly on the first one. - Traceback: "TypeError: Cannot read properties of null (reading 'classList') at Carousel._setActiveIndicatorElement ..." This issue is caused by the front-end code of the image gallery, which updates the active indicator during a slide event. When the crash happens, it cannot find the active slide in the DOM. After investigation, everything already works with Bootstrap, and the purpose of this code remains unclear. However, in the stable version, we are not taking any risks and will not modify it. In this commit, we simply added a return; in case the active slide is not found. opw-4519455 Forward-Port-Of: odoo/odoo#195606
Before this commit, with a slow internet connection, if a user added an item to the order and pressed the pay button very quickly (before completing the price loading), it would bypass the payment step and directly give the receipt. opw-4305214 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186960
Original PR description
Before this commit, with a slow internet connection, if a user added an item to the order and pressed the pay button very quickly (before completing the price loading), it would bypass the payment step and directly give the receipt. opw-4305214 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#186960
**Problem**: `this.state.showCodeView` cannot be relied upon because `toggleCodeView` of `HtmlField` is never called in cases like mass mailing. Instead, `MassMailingSnippetsMenu` forces code view without using the `HtmlField` mechanism. **Solution**: Instead of checking `this.state.showCodeView`, directly check the return value of `this._getCodeViewEl()` in `MassMailingHtmlField`. **Steps to Reproduce**: 1. Add an Image-Text snippet. 2. Save the snippet. 3. Resize the image. 4.
Original PR description
**Problem**: `this.state.showCodeView` cannot be relied upon because `toggleCodeView` of `HtmlField` is never called in cases like mass mailing. Instead, `MassMailingSnippetsMenu` forces code view without using the `HtmlField` mechanism. **Solution**: Instead of checking `this.state.showCodeView`, directly check the return value of `this._getCodeViewEl()` in `MassMailingHtmlField`. **Steps to Reproduce**: 1. Add an Image-Text snippet. 2. Save the snippet. 3. Resize the image. 4. Switch to code view. 5. Save. 6. Observe that the class `o_modified_image_to_save` is not removed from the image. opw-4406195 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195587 Forward-Port-Of: odoo/odoo#195539
The $0 placeholder in templates is highly useful, but it is not considered when saving a view. For instance, the search icon in the shop search bar has an incorrect xpath: `/data/xpath[3]/form/t[1]/div[1]/button[1]/i[1]`, where the inner `t[1]` actually points to another view through a `<t>$0</t>` containing the inherited view. The method responsible for handling this replacement fails when the element is editable, causing a crash. This commit ensures that when an xpath jumps to another t
Original PR description
The $0 placeholder in templates is highly useful, but it is not considered when saving a view. For instance, the search icon in the shop search bar has an incorrect xpath: `/data/xpath[3]/form/t[1]/div[1]/button[1]/i[1]`, where the inner `t[1]` actually points to another view through a `<t>$0</t>` containing the inherited view. The method responsible for handling this replacement fails when the element is editable, causing a crash. This commit ensures that when an xpath jumps to another template, it disallows the branding. task-3609835 Forward-Port-Of: odoo/odoo#187760
Email clients have begun implementing security measures to protect users from phishing by analyzing email links, and interacting with them (see task-3972953). This has the side effect of automatically unsubscribing email recipients from mailing lists by clicking the link in the footer of the emails. This commit adds an intermediate step to the process, by requiring users to click on a button before they are unsubscribed. task-4364446 Forward-Port-Of: odoo/odoo#195643 Forward-Port-Of: o
Original PR description
Email clients have begun implementing security measures to protect users from phishing by analyzing email links, and interacting with them (see task-3972953). This has the side effect of automatically unsubscribing email recipients from mailing lists by clicking the link in the footer of the emails. This commit adds an intermediate step to the process, by requiring users to click on a button before they are unsubscribed. task-4364446 Forward-Port-Of: odoo/odoo#195643 Forward-Port-Of: odoo/odoo#189561
A little oversight with the bugfixes in https://github.com/odoo/enterprise/pull/76543 that enforced incomplete data in exports like XLSX. **Reproduction**: - Have a intrastat report where the new feature "Load more..." is applied (enough data) - Create/Save a XLSX file from this report **Issue to be resolved**: The result will be incomplete and the "Load more..." is printed and it is impossible to get a full data export... Info: @wt-io-it Forward-Port-Of: odoo/enterprise#78168 Forwa
Original PR description
A little oversight with the bugfixes in https://github.com/odoo/enterprise/pull/76543 that enforced incomplete data in exports like XLSX. **Reproduction**: - Have a intrastat report where the new feature "Load more..." is applied (enough data) - Create/Save a XLSX file from this report **Issue to be resolved**: The result will be incomplete and the "Load more..." is printed and it is impossible to get a full data export... Info: @wt-io-it Forward-Port-Of: odoo/enterprise#78168 Forward-Port-Of: odoo/enterprise#77958
This commit will authorize to delete an online synchronization from the cog menu even if the connection is in error. Previously, we added a check that if the connection throws a user error or a redirect warning we can't delete it. We will remove this. Backport of odoo/enterprise#72902 task-4526918 Forward-Port-Of: odoo/enterprise#78198
Original PR description
This commit will authorize to delete an online synchronization from the cog menu even if the connection is in error. Previously, we added a check that if the connection throws a user error or a redirect warning we can't delete it. We will remove this. Backport of odoo/enterprise#72902 task-4526918 Forward-Port-Of: odoo/enterprise#78198
Before this commit, the test was relying in "today's" date for creating the recurring invoices. Since the time period for generating them was too short, the expected deliveries were not being generated. After this commit, we give a fixed date to the start date of the subscriptions and then generate the recurring invoices with a time distance of a month, solving the issue. Issue-from: OPW-4166852 Related PR: odoo/enterprise#73397 Forward-Port-Of: odoo/enterprise#76336
Original PR description
Before this commit, the test was relying in "today's" date for creating the recurring invoices. Since the time period for generating them was too short, the expected deliveries were not being generated. After this commit, we give a fixed date to the start date of the subscriptions and then generate the recurring invoices with a time distance of a month, solving the issue. Issue-from: OPW-4166852 Related PR: odoo/enterprise#73397 Forward-Port-Of: odoo/enterprise#76336
When trying to print invoice before reveiving etims details by the gouvernment, we get an error because we're trying to access some attributes of those fields, such as `strftime` or `len()` With this commit, we replace non set fields by empty strings either for display purpose or methods calls. opw-4480304 Forward-Port-Of: odoo/enterprise#78176
Original PR description
When trying to print invoice before reveiving etims details by the gouvernment, we get an error because we're trying to access some attributes of those fields, such as `strftime` or `len()` With this commit, we replace non set fields by empty strings either for display purpose or methods calls. opw-4480304 Forward-Port-Of: odoo/enterprise#78176
**Steps to reproduce:** - Use the `NL Company`; - Go to `External Identifiers` (via `Settings / Technical / Sequence & Identifiers`): - Remove `l10n_nl.tax_report_rub_3bg_tag` and/or `l10n_nl.tax_report_rub_3bg_tag` identifiers;  - Try to access `EC Sales List` (via `Accounting / Reporting / Statement Reports`). ___ **Issue:** Can't access `EC Sales List` o
Original PR description
**Steps to reproduce:** - Use the `NL Company`; - Go to `External Identifiers` (via `Settings / Technical / Sequence & Identifiers`): - Remove `l10n_nl.tax_report_rub_3bg_tag` and/or…
**Steps to reproduce:**
- Use the `NL Company`;
- Go to `External Identifiers` (via `Settings / Technical / Sequence & Identifiers`):
- Remove `l10n_nl.tax_report_rub_3bg_tag` and/or `l10n_nl.tax_report_rub_3bg_tag` identifiers;

- Try to access `EC Sales List` (via `Accounting / Reporting / Statement Reports`).
___
**Issue:**
Can't access `EC Sales List` of the Dutch company after deleting any or both of the `l10n_nl.tax_report_rub_3bg_tag` and/or `l10n_nl.tax_report_rub_3bg_tag` identifiers.

___
**Expected:**
Users should be able to access `EC Sales List` even when an identifier is deleted as there is a fallback.

___
**Cause:**
The fallback doesn't refer to the good tax options.
https://github.com/odoo/enterprise/blob/b2368558afdf922fdf04bdcfa8a98b4e690ddccd/l10n_nl_intrastat/models/account_sales_report.py#L82-L84

___
**Fix:**
Adapt the fallback references' module for retrieval as done for testing in: https://github.com/odoo/enterprise/blob/b2368558afdf922fdf04bdcfa8a98b4e690ddccd/l10n_nl_intrastat/tests/test_sales_report.py#L22-L24
___
opw-4425376
Forward-Port-Of: odoo/enterprise#77843
Forward-Port-Of: odoo/enterprise#76366Whatsapp API doesn't allow to send captions with audio anymore, therefore we should modify the way we handle captions. After this commit audio will be sent first while text message will stay in a composer, it will only be sent after the audio is sent. task-4007616 Forward-Port-Of: odoo/enterprise#77885 Forward-Port-Of: odoo/enterprise#66818
Original PR description
Whatsapp API doesn't allow to send captions with audio anymore, therefore we should modify the way we handle captions. After this commit audio will be sent first while text message will stay in a composer, it will only be sent after the audio is sent. task-4007616 Forward-Port-Of: odoo/enterprise#77885 Forward-Port-Of: odoo/enterprise#66818
Version: - 17.0 Steps to reproduce: - Install the Sign module. - Try to open a sample document. Issue: - An access error occurs when a "Sign User" tries to access a demo sign template. Solution: - Allow internal users to access sample data. task- 4390945 Forward-Port-Of: odoo/enterprise#75522
Original PR description
Version: - 17.0 Steps to reproduce: - Install the Sign module. - Try to open a sample document. Issue: - An access error occurs when a "Sign User" tries to access a demo sign template. Solution: - Allow internal users to access sample data. task- 4390945 Forward-Port-Of: odoo/enterprise#75522
When the user tries to forward a Google Maps location in a message, a traceback will appear. Steps to reproduce the error: - Go to WhatsApp > Templates > Create a new template A > Header Type: Location - Set a Body message > In Variables, Set the sample values for all the variables - Create a new Contact with a Mobile number > Send a Whatsapp message with template A - User will receive a message with a link of location > Forward that message back to that number Traceback: ``` File "
Original PR description
When the user tries to forward a Google Maps location in a message, a traceback will appear. Steps to reproduce the error: - Go to WhatsApp > Templates > Create a new template A > Header Type:…
When the user tries to forward a Google Maps location in a message,
a traceback will appear.
Steps to reproduce the error:
- Go to WhatsApp > Templates > Create a new template A > Header Type: Location
- Set a Body message > In Variables, Set the sample values for all the variables
- Create a new Contact with a Mobile number > Send a Whatsapp message with template A
- User will receive a message with a link of location > Forward that message back to that number
Traceback:
```
File "/home/odoo/odoo/enterprise/whatsapp/controller/main.py", line 42, in webhookpost
wa_account_id._process_messages(value)
File "/home/odoo/odoo/enterprise/whatsapp/models/whatsapp_account.py", line 225, in _process_messages
body += Markup("<br/>{location_address}").format(location_name=messages['location']['address'])
File "/home/odoo/.local/lib/python3.10/site-packages/markupsafe/__init__.py", line 213, in format
return self.__class__(formatter.vformat(self, args, kwargs))
File "/usr/lib/python3.10/string.py", line 165, in vformat
result, _ = self._vformat(format_string, args, kwargs, used_args, 2)
File "/usr/lib/python3.10/string.py", line 205, in _vformat
obj, arg_used = self.get_field(field_name, args, kwargs)
File "/usr/lib/python3.10/string.py", line 270, in get_field
obj = self.get_value(first, args, kwargs)
File "/usr/lib/python3.10/string.py", line 227, in get_value
return kwargs[key]
File "/home/odoo/.local/lib/python3.10/site-packages/markupsafe/__init__.py", line 249, in __getitem__
return self._kwargs[key]
KeyError: 'location_address'
```
https://github.com/odoo/enterprise/blob/2b4acb4c82a7374d45f25a7d8eebdc53b7f6e140/whatsapp/models/whatsapp_account.py#L225
Here, ``location_name`` is used instead of ``location_address``,
So, It will lead to the above traceback.
sentry-6206183097
Forward-Port-Of: odoo/enterprise#76883