Daily updates from Odoo
Tuesday, November 26, 2024
22 changes · 18.0
Resolved issues and error corrections
Internal users now correctly receive the configured default privacy setting for calendar events, even when they are not administrators. This ensures company calendar privacy preferences are applied consistently without requiring elevated user rights.
Original PR description
Before this commit, the calendar default privacy setting was not working for internal users beacause they couldn't see the setting value of other users if they weren't administrators. This commit fixes the issue by making a sudo update on the `res.users.settings` object when computing the calendar default privacy setting of it (and in the inverse method as well). Sudo was needed to allow the business customization and bypass the security that the record rule dictates on users not being able to see the other user's settings (unless they're administrators). task-4260794
This fix prevents an accounting migration from failing when no account entries are found. It ensures the system handles empty results correctly, avoiding an error that could block database upgrades.
Original PR description
- During the migration, the database was blocked, and the following issue occurred: [traceback](https://pad.odoo.com/p/issue_4352724_suba) - This issue was caused by the method `_get_chain_info`…
- During the migration, the database was blocked, and the following issue occurred: [traceback](https://pad.odoo.com/p/issue_4352724_suba)
- This issue was caused by the method `_get_chain_info` returning an [integer value](https://github.com/odoo/odoo/blob/3485abaa313263ea1946b9bdbffec5928d31fd72/addons/account/models/account_move.py#L3847) If at least one account move is retrieved, `chain_info` contains some values, and the condition `if early_stop and chain_info:` is executed as expected.
- However, if no account moves are found (i.e., zero account moves), `chain_info` is assigned the value 0. In this case:
- The condition `if early_stop and chain_info:` is not executed because `chain_info` has no values.
- Then subsequent condition `if 'unreconciled' in chain_info['warnings']:` is executed, which raises the error `TypeError: 'int'-object is not subscriptable` because `chain_info` is an integer(0) and does't have subscriptable attributes like ['warnings'].
- To resolve this issue, I converted the return values of `_get_chain_info` integer to boolean values
TBG - [1648](https://upgrade.odoo.com/web#id=1648&cids=1&menu_id=107&action=178&model=upgrade.request.traceback.group&view_type=form)
OPW - [4352724](https://www.odoo.com/odoo/project/70/tasks/4352724#)
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-prThis fixes the live chat chatbot layout so answer buttons appear outside the message bubble as intended. The change improves readability and makes chatbot interactions look cleaner for website visitors.
Original PR description
Before this commit, chatbot answers buttons appear inside the message bubble. This happens because the new xpath target introduced in https://github.com/odoo/odoo/pull/188407 had the wrong position argument. This commit fixes the issue by changing the position to `after`. Before:  After: 
Creating a new stock replenishment record no longer triggers an error before the user has selected a product or unit of measure. This keeps the replenishment workflow usable and avoids a confusing crash during record creation.
Original PR description
Currently, a traceback occurs when the user tries to create a new stock replenishment record. To reproduce this issue: 1) Install `stock` 2) Create a new record from `operation/replenishment` Error:-…
Currently, a traceback occurs when the user tries to create a new stock replenishment record. To reproduce this issue: 1) Install `stock` 2) Create a new record from `operation/replenishment` Error:- ``` AssertionError: precision_rounding must be positive, got 0.0 ``` This error is occurring because of the recent refactoring from the below commit. https://github.com/odoo/odoo/pull/183833/commits/17d9af14cad0bace48edf2d1b072cc4d12532875 Initially, there was a condition that if there is no product or location, the `_get_qty_to_order` method simply returns False. But because the condition was removed from the above mentioned commit, we get the rounding value as 0.0 as there is no uom when initially creating a new record. This leads to the above traceback when the below line executes with rounding as 0.0 https://github.com/odoo/odoo/blob/74d4503a45c9d4ca741d349c3fce673358d2cc42/addons/stock/models/stock_orderpoint.py#L361-L364 We can resolve either by returning False if there is no product/uom or just add an extra check of rounding. sentry-6088943207
Fixes an issue where clicking crop controls after editing an image could trigger an error and interrupt the editing flow. The editor now avoids saving the image at the wrong moment, so users can crop images more reliably.
Original PR description
**Current behavior before PR:** After modifying an image, clicking any cropper button generated a traceback. this occurred because clicking the button triggered a blur event, and tries to save modified image in saveModifiedImage method. In the saveModifiedImage method, the image src was split. However, since the cropper container was open, the image had its original src rather than the cropped one. As a result, attempting to split the original src caused the traceback. **Desired behavior after PR is merged:** Now, before opening the cropper, the o_modified_image_to_save class will be removed from the image. This ensures that when blur events are triggered by clicking the cropper buttons, the savePendingImages method does not call saveModifiedImage to save the image and once the cropper is closed, the o_modified_image_to_save class will be added back to the image if it is not already present. task:4263575
This fixes a timezone mismatch that could cause Odoo to incorrectly decide whether a page became outdated after a websocket disconnection. Users should see more accurate refresh warnings, reducing unnecessary confusion or missed prompts.
Original PR description
The outdated page watcher detects when the page is outdated i.e. when the autovacuum ran while the websocket was disconnected. To do so, it compares the last disconnection datetime with the last autovacuum datetime received from the server. However, last disconnected datetime is saved in UTC while value coming from the server is parsed using the default timezone. This PR fixes the issue by handling both datetime with the default timezone.
Point of Sale receipt sending now works reliably by SMS and WhatsApp without triggering an error. Email receipt delivery is also improved because basic receipts are included as attachments, helping customers receive complete proof of purchase.
Original PR description
Before this commit: ========== - There was a traceback error when sending receipts through SMS and WhatsApp. - Basic receipts were not being added as email attachments when sending receipts through email. After this commit: ========== - The traceback error while sending receipts has been resolved, and the receipt sending flow is now seamless. - Basic receipts will now be attached as email attachments when sending receipts through email. task-4212901 Related: - Enterprise: https://github.com/odoo/enterprise/pull/70891
The blog author snippet now uses the stored author name instead of directly checking the author record. This prevents public website visitors from hitting permission-related issues when viewing blog posts, helping author information display consistently.
Original PR description
Author snippet previously used the author_id field on the blog post record which would run in to permission issues as public user. Used the already existing author_name field on the blog record which also seemed to be used in older versions of Odoo to bypass this permission issue. opw-4330319
The HTML editor now correctly detects when selected text has a custom font size, so users can use the remove formatting button to reset it. The toolbar also shows the correct font size when selecting all content, reducing confusion while editing formatted text.
Original PR description
**Behaviour before PR:** When a `font-size` is applied on a text, remove-format icon is disabled in toolbar when that text is selected and user is unable to reset `font-size`. This happens because in `formatSpecs` `isFormatted` method fails to get correct value in case of `setFontSizeClassName`. Same scenario is with `isFormatted` method of `fontSize`. **Behaviour after PR:** Now remove-format icon is enable when font-sized text is selected and user can remove and reset font-size of selected text. task-4263625 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Task records in Website Project will no longer log phone or company-name changes that are not useful for task history. This keeps task activity cleaner and avoids inconsistent behavior depending on which related apps are installed first.
Original PR description
Before this commit, the partner_phone field in `project.task` model is tracked because it is a related field linked to `partner_id.phone` and `phone` is tracked. Moreover, that field is also defined in `industry_fsm` module but its definition is different which could lead to unexpected behavior depending on the installation order. This commit duplicates the definition of that field from industry_fsm to website_project to make sure to not have a different behavior depending on the installation order of those modules. It also removes the tracking on `partner_company_name` since it is not really useful in task if one day `company_name` in `res.partner` model is tracked.
This fix prevents an error when users create a new replenishment entry before selecting a product. It restores a missing check so inventory staff can open the replenishment form normally and continue planning stock needs.
Original PR description
Steps to reproduce: Inventory → Operations → Replenishment → New → Traceback Error Issue: [Last changes](odoo/odoo@28d24a05ca94f0fbecf) in the file removed the condition ensuring product_id before getting its quantity which created the error. fix: Added the removed condtion. opw-4352363 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Project dashboard shortcuts now open the expected views for purchase orders, warehouse transfers, and stock moves. The purchase order counter now excludes empty orders, so the number shown matches the records users see when they click it.
Original PR description
1) Added views for the following top bar actions: - Purchase Orders - To WH - From WH - Stock Moves 2) In project dashboard, the count of purchase orders in the stat button was taking empty purchase orders into account. However, when clicking on it, only the POs containing lines were shown, which is not consistent. We then remove the empty POs from the count, this is also to be consistent with the count of sales orders which does not take the empty SOs into account. task-4313971 version-18.0 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a visual issue in the mail area where logged notes displayed with an unnecessary border. The change makes note entries look cleaner and more consistent, improving readability without changing functionality.
Original PR description
Before / After <img width="254" alt="Screenshot 2024-11-25 at 14 23 16" src="https://github.com/user-attachments/assets/0ea6235e-ad18-4001-8c6c-31860e5d0371"> <img width="268" alt="Screenshot 2024-11-25 at 14 23 00" src="https://github.com/user-attachments/assets/efb3a21b-ce6c-4999-9aea-e67e52332011">
The sick leave relapse checkbox is now only visible to authorized time off officers. This prevents regular employees from seeing an internal payroll-related option that they should not access.
Original PR description
A checkbox to indicate if a Sick leave is a relapse of a previous sick leave was added to version 18.0. Regular users can see the checkbox when creating or viewing sick leave while the intention was for only time off officers to be able to see it. This patch fixes this issue by assigning the checkbox to the correct group. task-4354558
Fixed a layout issue in Appraisals where feedback editor buttons could appear broken when users clicked into feedback fields. This keeps the appraisal feedback experience cleaner and easier to use across screen sizes.
Original PR description
Steps ----- 1. Appraisals > Click on one or go to Configuration > Appraisal templates 2. Click on the feedback. A text 'Type "/" for commands' appears with buttons in a broken layout. Cause ----- With the new html_editor, editor buttons are descendants of `o_appraisal_input` in the DOM. Changes ----- - restrict the selector that is used to prevent overflow so it doesn't impact editor - hide the power buttons to avoid overflow when ui size is between `sm` and `md` (they are hidden automatically below `sm`) opw-4338929
Subscription invoices are no longer shortened just because an end date falls inside the next billing period. This keeps billing periods and next invoice dates stable when sales teams use end dates to encourage renewals or upsells.
Original PR description
Before this commit, when the end_date occured inside the next period, we
could invoice the prorated part of the period.
Invoice from 5th of November to 5 of December.
End date on the 1st of December.
The invoice would be from the 5th of November to the 1st of December.
As this seems smart, it would disrupt some flows where salesperson would
put an end_date as an incentive to force people pay their
contract/upsells in a fear of service disruption.
With the previous code, the invoice would be prorated and removing the
end_date would mess up with the next_invocie_date and invoicing periods.
taskid: 4358288Fixed subscription closing so backend closures and automatic expirations end contracts as of today when required, instead of extending them to the end of the current billing period. This helps keep contract status and billing timelines accurate for customers and internal teams.
Original PR description
After this commit https://github.com/odoo/enterprise/commit/31033a6863c841d7d0d5e434331c8a34420a3374 the contract could be closed with end_date at the end of the current period. There are several cases when the end_date should still forced as "today": - closing from the backend - expiration cron taksid: 4358288
This fix ensures overtime work entries are only generated when the relevant overtime setting/status allows it. It helps avoid incorrect overtime records, improving payroll and attendance accuracy for affected employees.
Original PR description
Purpose ======= The field was introduced when the overtime generation mechanism was already existing. But was included into the decision process to generate overtime work entries.
**Issue:** Two terms appear in English on an invoice. **Expected:** These terms should be translated in Spanish. **Steps to reproduce:** - Activate Accounting app in a Mexican database; - Create a customer invoice; - Send and print including the CFDI; - Open the PDF for the invoice; - The terms "Usage" and "Predial Account" appear untranslated. **Cause:** No translation have been found for these keys. **Fix:** Add Spanish translations for these terms. opw-4332513
Original PR description
**Issue:** Two terms appear in English on an invoice. **Expected:** These terms should be translated in Spanish. **Steps to reproduce:** - Activate Accounting app in a Mexican database; - Create a customer invoice; - Send and print including the CFDI; - Open the PDF for the invoice; - The terms "Usage" and "Predial Account" appear untranslated. **Cause:** No translation have been found for these keys. **Fix:** Add Spanish translations for these terms. opw-4332513
Fixes errors that could interrupt sending point-of-sale receipts by SMS or WhatsApp. Email receipt delivery is also improved by ensuring basic receipts are included as attachments, making the customer receipt process more reliable.
Original PR description
Before this commit: =========== - There was a traceback error when sending receipts through SMS and WhatsApp. - Basic receipts were not being added as email attachments when sending receipts through email. After this commit: =========== - The traceback error while sending receipts has been resolved, and the receipt sending flow is now seamless. - Basic receipts will now be attached as email attachments when sending receipts through email. task-4212901 Related: - Community: https://github.com/odoo/odoo/pull/181828
Users can now delete Data Cleaning storage records without hitting an unexpected system error. This prevents disruption during routine storage cleanup and keeps the Data Cleaning workflow reliable.
Original PR description
When the user tries to delete the storage record, A traceback will appear. Steps to reproduce the error: - Install ``data_cleaning`` module - Go to Data Cleaning > Storage > Select any record >…
When the user tries to delete the storage record,
A traceback will appear.
Steps to reproduce the error:
- Install ``data_cleaning`` module
- Go to Data Cleaning > Storage > Select any record > Actions > Delete > Delete
Traceback:
```
UndefinedTable: relation "ir_attachment_report" does not exist
LINE 1: DELETE FROM "ir_attachment_report" WHERE id IN (498, 963, 12...
^
File "odoo/http.py", line 2363, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 329, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "odoo/models.py", line 4498, in unlink
cr.execute(SQL(
File "odoo/sql_db.py", line 354, in execute
res = self._obj.execute(query, params)
```
``ir.attachment.report`` model is ``_auto = False``.
So, a database table will not be created for the model.
When the user tries to delete the record of that model,
It will lead to the above traceback.
sentry-6073448766This fixes subscription closing so the end date matches the business context. Backend and automated expiration closures end immediately, while customer portal cancellations keep service active until the paid period ends.
Original PR description
After this commit https://github.com/odoo/enterprise/commit/31033a6863c841d7d0d5e434331c8a34420a3374 the contract could be closed with end_date at the end of the current period. There are several cases when the end_date should still forced as "today": - closing from the backend - expiration cron Moreover, when the customer close the contract on the portal, it would put it on closed state directly. We decide to put the end_date to avoid trigger all the closing mechanism right away (stop access to resources, service etc when the service is paid until the end of the period). taksid: 4358288