Daily updates from Odoo
Monday, February 5, 2024
29 changes · 17.0
Enhancements to existing features
The Point of Sale preparation display now includes sound notifications when new orders arrive. This improvement helps kitchen and preparation staff stay alert to incoming orders without constantly watching the screen, improving operational efficiency and order fulfillment speed.
Original PR description
In this commit we add a sound notification for incoming orders. Task: 3705003 https://github.com/odoo/odoo/pull/152323
This update adds two new rounding methods (HALF-EVEN and HALF-DOWN) to Odoo's financial calculation tools. These additional rounding options provide more flexibility for handling decimal values in financial transactions and reporting, allowing businesses to choose the rounding method that best fits their accounting standards and requirements.
Original PR description
Add support for `HALF-EVEN` and `HALF-DOWN` as value for `rounding_method` argument of `float_round()`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Point of Sale system now uses improved audio notifications with a new error sound and a new notification sound for the preparation display. These updated sounds provide clearer audio feedback to staff during checkout and order preparation operations.
Original PR description
In this commit we add 2 new notification sounds: `error.wav`, `notification.wav`. We replace the old error sound with the new one. The notification sound will be used in the preparation display. Credits: - error sound: https://github.com/akx/Notifications - notification sound: https://m2.material.io/design/sound/sound-resources.html Task: 3705003 https://github.com/odoo/enterprise/pull/55700 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
Subscription products with multiple billing period options (monthly, 6-month, yearly) were incorrectly showing only "per month" on the website regardless of the selected variant. This fix corrects the script loading order to ensure the period display logic works properly, allowing customers to see the correct billing period for each product variant they select.
Original PR description
**Issue Description**: When creating a subscription product that has time-based pricing and options. The product on the website simply displays a recurring monthly period, rather than the six-month…
**Issue Description**: When creating a subscription product that has time-based pricing and options. The product on the website simply displays a recurring monthly period, rather than the six-month and annual periods as configured. This only happens in 17.0 and higher. The problem was happening because this patch wasn't calling. https://github.com/odoo/enterprise/blob/4c577804b4f6fadb1d606896a3c124909b85ab6b/website_sale_subscription/static/src/js/variant_mixin.js#L14-L28 That's because of the file with the patch needs to be loaded before this one https://github.com/odoo/odoo/blob/bfe857db1dd5408af57f46aa51eae8be82a4c6f9/addons/website_sale/static/src/js/website_sale.js#L15 **Steps to Reproduce**: 1. Create a new subscription product in the `Subscriptions` app. 2. In the `Attributes & Variants` tab, add a new attribute `periods` with values such as `Monthly`, `6 Months`, `Yearly`. 3. In the `Recurring Prices` tab, add each variant of the product (`Monthly`, `6 Months`, `Yearly`) along with their corresponding `Recurring Plan` and `Recurring Price`, then save. 4. Click the `Go to Website` smart button and try to change the product variants. 5. Observe that the product is always labeled as "per month" regardless of the selected variant. **Proposed Solution**: To resolve this, ensure that the mixin is patched before its usage. This can be achieved by forcing the load order of the scripts. This adjustment ensures the correct script loading sequence, allowing the patch to apply before the mixin is used. opw-3654134
Added a confirmation prompt when users scan a package barcode after already scanning individual items. This prevents accidental scanning errors during high-volume product arrivals, reducing time-consuming rework when the wrong package barcode is scanned by mistake.
Original PR description
Step to reproduce: - have two products - add one quant of each in the same package - create a out stock move - scan 1 item - scan the package Issue: A high volume of product arrivals with multiple barcodes per item can lead to occasional errors in scanning the wrong barcode (package). Time consuming to redo everything. Solution: Whenever one or multiple item have already been scanned, we ask the user a confirmation if they scan a package barcode. opw-3610819 Forward-Port-Of: odoo/enterprise#55621 Forward-Port-Of: odoo/enterprise#54389
Fixed an issue in Web Studio's XML resource editor where only the first element was being saved when editing reports, causing data loss. The editor now properly saves all elements in the XML document and correctly handles whitespace, ensuring your report customizations are fully preserved.
Original PR description
Backport of https://github.com/odoo/enterprise/pull/48385 Forward-Port-Of: odoo/enterprise#55444
This fix resolves a system error that prevented users from editing timesheet entries when an employee had multiple projects assigned on the same date. The issue occurred when viewing timesheets grouped by employee, and the fix ensures the system properly handles multiple project assignments without crashing.
Original PR description
**Steps:** - Open Timesheet > All Timesheets -Add values for multiple projects for any employee on a particular date. - Now group by Employee. - Try to change the value for that employee on that particular date. **Issue:** - Traceback occurs and user is unable to change the values for existing timesheets. **Cause:** - 'line.project_id' is expected to be a single record (singleton), but it appears to be a set or a list of records. The allow_timesheets attribute is then attempted to be accessed directly on the set or list, which results in a ValueError. **Fix:** - By incorporating the 'all' function and the explicit iteration over line.project_id, you avoid attempting to access the allow_timesheets attribute directly on the collection, which is what causes the 'singleton error'. This fix correctly handles cases where line.project_id may contain multiple records. **Task**-3613014 Forward-Port-Of: odoo/enterprise#55596 Forward-Port-Of: odoo/enterprise#51741
Fixed inconsistent button styling in the Planning app where some buttons had rounded edges while others had sharp edges. Applied consistent rounded corner styling across all top buttons in the Planning app interface to improve visual consistency and user experience.
Original PR description
Steps to reproduce: - Go to planning app at top button are not consistent - Some have rounded edges while others have sharp edge Issue: - planning app > the planning app's top button are not consistent. Some have rounded edges while others have sharp edge. Solution: - adding the bootstrap class 'rounded' to round edges of buttons task-3549328 Forward-Port-Of: odoo/enterprise#55507 Forward-Port-Of: odoo/enterprise#49587
Fixed a bug in Ecuador's withholding tax feature where the base amount would incorrectly reset to zero when users changed the withholding tax rate on a bill. This fix ensures the base amount is preserved when modifying withholding tax details, allowing users to accurately process withholding taxes without having to re-enter information.
Original PR description
With an Ecuador company setup Create and post a bill Hit 'Add witholding' On the witholding line change the withholding tax Issue: base will reset to 0 opw-3690401 Forward-Port-Of: odoo/enterprise#54913
This fix resolves an issue where document filters were not being applied correctly when replacing a file in the activity view. Previously, when users filtered documents by type (like Image/Video) and then replaced a document, all document types would reappear instead of maintaining the active filter. The fix ensures that the selected filter remains applied after replacing a document.
Original PR description
**Steps to reproduce:** - Schedule activity on a .pdf document and also on a .png document. - Apply Image/Video filter. (Only the .png file will be visible now) - Select and replace the .png document with another image. **Issue:** - Both .pdf and .png documents are now visible in the view instead of just the image/video type documents. This issue is faced as an empty domain is received by the 'load' method of the activity model. **Fix:** - This PR fixes the issue by passing props in the 'load' method call to ensure that the default data remains as it is, and the existing domain is still applied. Task: [3718403](https://www.odoo.com/web#id=3718403&menu_id=4722&cids=2&action=333&active_id=10888&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#55716
This fix resolves an issue where dropdown search fields (many2one autocomplete) were displaying outdated results after changing a related selection. When users changed an action type and then searched in a linked field, the search results would incorrectly match the previously selected type instead of the newly selected one. The fix ensures the search field properly refreshes when its configuration changes.
Original PR description
### Steps to reproduce the issue: 1. Open Menu Items 2. Open the form to a menu 3. Select an action type (e.g. ir.actions.report) 4. Select another action type (e.g. ir.actions.act_url) 5. Click on the field next to it 6. Click on "Search More..." 7. The results displayed match the first action type selected (report), not the second (act_url) ### Explanation: `res_model` is initiated in two functions: `useOpenMany2XRecord()` and `useSelectCreate()` in the `setup()` of the `Many2XAutocomplete` class. The value is never updated for as long as this instance of the field exists. ### Suggested fix: Everytime the key changes, a new instance of the field will replace the current one, calling its own `setup()` with the updated values. opw-3628017 Forward-Port-Of: odoo/odoo#151385 Forward-Port-Of: odoo/odoo#147543
This update fixes several usability issues with the banner feature in the web editor. Users can now properly navigate to the next line after a banner, the cursor correctly appears inside the banner when created, and keyboard shortcuts like Ctrl+A work as expected without accidentally deleting banner content. These fixes improve the overall editing experience when working with banners.
Original PR description
**Current behavior before PR:** - Inserting a banner after already existing content it's impossible to go to the next line of the banner. - Inserting a banner did not set focus inside the banner; instead, focus was placed after the banner. - Performing Ctrl+A and backspace inside a banner would unintentionally remove Its first element, which could be a block tag - When a banner was inserted at the first line and Ctrl+A and backspace is performed, nothing happens. **Desired behavior after PR is merged:** - It's now possible to navigate to the next line of the banner. - Now, upon creating a banner, focus is now correctly set inside the banner. - Now performing Ctrl+A and backspace inside the banner will no longer remove its first element if it's a block tag. - Now, all the content except banner will be selected and removed. task-3432167 Forward-Port-Of: odoo/odoo#129874
This fix resolves an issue where the system could get stuck in an infinite loop when validating parent-child relationships in categories. The problem occurred when circular references existed but didn't include the starting item. After this fix, the system properly detects and prevents these problematic circular relationships from being created.
Original PR description
Prevent an infinite loop when the cycle in the parents does not contain the starting id: `3->2->1->2->1...` Example: ``` >>> m=self.env['ir.module.category'] >>> c1,c2,c3 = map(m.browse,[1,2,3]) >>> c2.parent_id = False >>> c3.parent_id = False >>> c1.parent_id = c2 >>> (c3|c2).parent_id = c1 # this never ends ``` With current patch the call to `_check_recursion` successfully detects the new cycle. 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#151549 Forward-Port-Of: odoo/odoo#151294
This fix resolves a critical threading issue in the accounting module where simultaneous discount imports could cause system instability and require server restarts. The problem occurred when multiple processes tried to patch discount calculations at the same time, leading to corrupted or missing methods. This fix ensures that discount imports work safely even when multiple users or processes access the system simultaneously.
Original PR description
The patch method is not thread safe, which is very annoying for SH users for instance. One obvious issue is that during one thread patching the method, other threads will also be impacted and have 100 decimal places for the discount. But it is even worse: * thread A start: original = real_original; new = patchedA * thread B start: original = patchedA; new = patchedB * thread A end: reset original to real_original * thread B end: reset original to patchedA Now at the end of the transaction, the original method simply doesn't exist anymore, and we only have one of the patches, which forces a restart of the server to fix it. [opw-3552839](https://www.odoo.com/web#id=3552839&model=project.task) Forward-Port-Of: odoo/odoo#151874 Forward-Port-Of: odoo/odoo#151787
Fixed an issue where custom event cover images displayed blurry on event cards in the website builder. The system was unnecessarily resizing custom images to a low resolution (256x256 pixels), while default images were not affected. This update ensures custom images maintain proper quality when displayed in card layouts.
Original PR description
### Steps - Go to website and edit - Add an event block - Change the template of the block from picture to card layout. - Replace the image of one card by a 4k image. ### Issue The custom cover is blurry. ### Reason By default the custom cover is resized to 256x256 (but not the default one because it uses a static image path). opw-3390459 Forward-Port-Of: odoo/odoo#145898
This fix resolves a crash that occurred when users tried to archive a document from the activity view. The issue was in how the system handled default parameters when loading activities. The fix ensures the system properly sets the domain filter instead of attempting to add to a non-existent one, restoring normal functionality to the archive feature.
Original PR description
**Steps to reproduce:** - Select a document in activity view to get its preview - Click the archive button => traceback **Before this PR:** The `load` method of 'Activity Model' led to the traceback while attempting to set the domain of params, when none were received. (bug introduced by : 7682286) **After this PR:** This issue is resolved by tweaking the code of `load` method. In case of default params, it now directly sets a domain, instead of trying to add a domain to the one obtained in params. Task : [3704340](https://www.odoo.com/web#id=3704340&menu_id=4722&cids=2&action=333&active_id=10888&model=project.task&view_type=form) Forward-Port-Of: odoo/odoo#151741
This update improves the reliability of the hardware drivers module by adding proper error handling to a subprocess operation. Previously, if a system command failed during execution, the error would go undetected. Now the code properly catches and handles these errors, preventing silent failures and improving system stability.
Original PR description
we execute a subprocess without checking if an error occurs so we place the subprocess.call() in a try except 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#152212
This update fixes a visual alignment issue that occurred when users attached files to course reviews on the Slides website. When adding or editing a review and attaching files, the attachments were displaying misaligned in the dialog box. This fix ensures that attached files now appear properly aligned, improving the user experience when managing course reviews.
Original PR description
Steps to reproduce ================== 1. Go to the slides website. 2. Open any course. 3. Click on 'add a review' or 'edit review'. 4. Attach any files. -> Files appear misaligned. After this PR ================= They will be perfectly aligned. Task-3624281
This fix resolves a display issue where website snippets set to full height (100%) would become incorrectly oversized after closing a popup modal. The problem occurred because the system was measuring the snippet height against the wrong reference point when a popup was active. This fix ensures snippets maintain their correct height regardless of popup interactions.
Original PR description
Steps to reproduce the bug: - In Website edit mode. - Drag and drop a "Cover" snippet into an empty page. - Sets the "Height" option of this snippet to "100%". - Drag and drop a "Media List" snippet…
Steps to reproduce the bug: - In Website edit mode. - Drag and drop a "Cover" snippet into an empty page. - Sets the "Height" option of this snippet to "100%". - Drag and drop a "Media List" snippet into the page. - Drag and drop a "Popup" snippet into the page. - Save the page. - Scroll quickly the page to the bottom before the popup appears. - When the popup is open, resize the window to trigger a "resize" event. - Close the popup. - Scroll the page to the top. - Bug: the height of the "Cover" snippet is a way too high. This bug occurred because the height of the snippet with the "Height: 100%" option enabled is calculated based on the scrollable element it is in (since this commit [1]). However, when a popup is opened, the detected scrollable element was incorrect due to the "overflow: hidden" rule added to "#wrapwrap" by the "modal-open" class on the `<body>`. [1]: https://github.com/odoo/odoo/commit/b371cb42cb67115692464c102813b7ebd54785d9 opw-3643498 Forward-Port-Of: odoo/odoo#150838
This fix corrects an issue where tax reports showed incorrect amounts when using cash basis accounting with down payments. The problem occurred because the system wasn't properly tracking the origin of cash basis entries, causing deduction amounts to be calculated as negative instead of positive. This fix ensures tax calculations are accurate in these scenarios.
Original PR description
Before, the tax tag invert is computed based on the entry type if the entry type is different from "entry" or based on the tax set and the balance of aml for entries with type "entry". This is fine…
Before, the tax tag invert is computed based on the entry type if the entry type is different from "entry" or based on the tax set and the balance of aml for entries with type "entry". This is fine in most cases but we can reach a wrong tag invert if we use cash basis and down-payment. Here are the steps to reproduce: - Create a company with cash basis tax (ex: "TVA 20% (Services)" for l10n_fr) - Make sure no "base tax received account" is set in the cash basis settings - Create a product with a cash basis default tax and an income account which is not the default one - Create an sale order with this product for 100€ + 20% tax - Create a down payment for 30€ + 20% tax (add the tax to downpayment) - Create the final invoice with deduction of down payment - Register a payment on both to create the caba entries => Tax report will show 160€ of base instead of 100€ To have the issue, it's important that the income account of the product line differs from the account used on the down payment line in the final invoice because the issue involved having a negative base line in the resulting caba move. If the same account is used for invoice down/product line the caba base lines will be grouped in one non negative line. For the same reason, the "base tax received account" must remain empty. The deduction aml on the cash basis entry of final invoice have an tag invert at False instead of True. So it's computed as -30€ instead of +30€. If we reproduce the case with a non cash basis tax, it will work because the move type will be different from "entry" and tag invert will be computed only based on the type. To solve this issue, we now compute the tag invert based on caba origin move if any to improve the tag invert computation for cash basis entries. opw-3597141 Forward-Port-Of: odoo/odoo#148448
This fix resolves an error that occurred when customers tried to add certain field types (like "Delivery Point Address") to website forms in eCommerce. The system was attempting to display unsupported JSON field types that customers cannot properly fill out. The fix removes these incompatible field types from the available options, preventing the error and improving the user experience.
Original PR description
Issue: When adding a new field to the website form of the "Extra Info" page in the eCommerce, a traceback is raised `OwlError: Missing template: "website.form_field_json"`) when the customer selects the type "Delivery Point Address"(`sale.order.access_point_address`). Explanation: JSON fields are not supported as selectable types in website forms, and they should not be because customers would not be able to properly fill them out. Fix: Filter out all JSON fields from the list of authorized fields in website forms; they will not appear anymore in the list of selectable types. opw-3596713 Forward-Port-Of: odoo/odoo#152382 Forward-Port-Of: odoo/odoo#152290
This fix resolves an issue where applying font colors to multiple images in website content was not working correctly. The problem occurred because the color formatting was being incorrectly applied around image elements. The fix ensures that images are properly excluded from font color formatting, allowing color changes to work as intended.
Original PR description
Current behavior before PR: While applying font color, when multiple picture snippet is selected the color was not properly applied to the selection. It was observed that the font gets unintentionally applied around the figure which was preventing the proper application of selected color. Desired behavior after PR is merged: It has been made sure that whenever the figure element is encountered it should not be appended inside font tag. task-3640901 Forward-Port-Of: odoo/odoo#152248 Forward-Port-Of: odoo/odoo#147733
The emoji picker in the web editor was opening at an incorrect position on the screen. This fix ensures the emoji picker now appears precisely where the user's cursor is located, improving the user experience when inserting emojis into content.
Original PR description
**Current behavior before PR:** - Emoji picker opened at an incorrect position. **Desired behavior after PR is merged:** - The Emoji picker now opens precisely at the cursor location task-3569967 Forward-Port-Of: odoo/odoo#140038
This fix corrects how currency exchange rates are stored and calculated in sales orders. Previously, exchange rates were being rounded down (truncated), which caused incorrect currency conversions between the sales order currency and company currency. The fix ensures rates maintain full precision, resulting in accurate financial calculations.
Original PR description
Since 857c4851754dcddf9e6dc7b39585914beaf89c88, rates are not truncated anymore. The stored rate value on SO, between SO currency and company currency was not adapted and was still truncated, leading to invalid values after rates conversion. See also 5a621cea4c5a16998a3b83890144f81a3880244b where the same solution was appied to pos orders. opw-3638199 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152460 Forward-Port-Of: odoo/odoo#152296
This update fixes a bug that occurred when deleting calendar activities linked to events. The system was missing required information during the deletion process and wasn't properly removing the activity records. This fix ensures calendar activities can be safely deleted without causing errors.
Original PR description
Thread has not been provided in `onUpdate` in `unlink` patch. Also record should be deleted from existing activities.
This fix resolves errors that appeared on Odoo website pages when CSS stylesheets are served from a content delivery network (CDN). The system was trying to read CSS rules from external stylesheets, which triggered security restrictions. The fix filters out stylesheets from different sources to prevent these errors from occurring.
Original PR description
Before this commit, we tried to access in javascript the cssRules property of some stylesheets, to parse and display to the user potential css errors, to help him to detect and fix them. [1] Since a…
Before this commit, we tried to access in javascript the cssRules property of some stylesheets, to parse and display to the user potential css errors, to help him to detect and fix them. [1] Since a recent change [2], people get tracebacks on website pages in odoo.com (without being logged in). The issue comes from the fact that when assets are served via a CDN (which is the case in odoo.com for not logged users), reading the cssRules throws a CORS error. This error is logged in the browser console. We only spotted the issue since [2], because it delays the moment we access the cssRules property (we wait for translations). Thanks to that, the error service is ready and able to handle errors, and it does display the error in a dialog, which allowed us to detect the issue. To fix the issue, we filter out stylesheets with a different origin. [1] 5e920db3ee25cb9f47ae2c0a98db35c4cda9d60f [2] 332268c724ae269378176b3c000ba4ff733ce5e9 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
Documentation and clarification updates
This update adds a corporate signature for Innovyou (innoviù Srl) to Odoo's Contributor License Agreement documentation. This is a legal/administrative update that formally recognizes Innovyou as an authorized contributor to the Odoo project.
Original PR description
On behalf of: https://github.com/innovyou [info@innovyou.co](mailto:info@innovyou.co) Description of the issue/feature this PR addresses: Added corporate signature for Innovyou (innoviù Srl). Old PR: odoo/odoo#152404 Forward-Port-Of: odoo/odoo#152414
A contributor has signed the Contributor License Agreement (CLA) required for submitting code to Odoo. This is a legal compliance step that allows the contributor to participate in the Odoo development process. The change updates documentation to record that this contributor has completed the necessary legal requirements.
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
This pull request registers a new contributor's signed Contributor License Agreement (CLA). The contributor has confirmed they have read and agreed to Odoo's contribution guidelines and legal requirements, allowing them to submit code contributions to the project.
Original PR description
Login CLA 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