Daily updates from Odoo
Tuesday, December 16, 2025
162 changes
11 changes
Resolved issues and error corrections
This update fixes a technical issue preventing portal users from correctly filtering job postings. The change involved adding a security layer (`sudo()`) to access department data, which was previously causing access errors. This ensures portal users can consistently use the department filter functionality.
Original PR description
**Steps to reproduce:** 1. Install `website_hr_recruitment` 2. Open the job website page and, through editor add a filter for department 3. Switch to a portal user and change the department filter **Issue:** - The controller passes department_id to the template, but unlike before this commit https://github.com/odoo/odoo/commit/0ab6e84c54f134c8744d8f94108a715e989b2815, where the code used sudo() to sort departents https://github.com/odoo/odoo/blob/6159c6527cfa38ea0c92e6f3fa6025ee534a1acb/addons/website_hr_recruitment/controllers/main.py#L81 it now just passes the department_id without actually returning a full record with accessible fields. In the template, the filter rendering uses selected_filter.name, which triggers an AccessError for portal users. **Solution:** - Apply `sudo()` when accessing `hr.department` to avoid access errors for portal users. opw-5103910 Forward-Port-Of: odoo/odoo#229040
This update resolves issues where copying and pasting content within the website builder could cause rendering errors or duplicated content. The fix filters out specific attributes that trigger saved node behavior, ensuring pasted content integrates correctly and avoids unexpected formatting changes. This improves website stability and user experience.
Original PR description
When the user copies a range of the html in the page, they may copy nodes with attributes that mark them to be saved. This happens if they select around a savable node, or if they select inside a savable node and the format plugin include clones of the ancestors (to keep matching style). This commit filters the attributes on the nodes that are copied, to prevent the user from pasting nodes marked as they should be saved. Steps to reproduce: - Open website builder - Select a link of the menu in the header - Copy - Move the selection to "normal" text (like in the footer) - Paste - Save - Bug: the website cannot render ### - Open website builder in translate mode, on a blog post - Select a word in the middle of a paragraph - Copy - Paste - Bug: The paragraph gets replicated inside itself opw-5053872 task-5222402
This update corrects a visual issue where content within toggle lists inside banners was misaligned. The fix targets a styling error that incorrectly applied margins to paragraph elements, ensuring proper alignment and a consistent user experience. This improves the overall appearance and usability of the HTML editor.
Original PR description
**Steps to reproduce:** - Create a banner. - Create a toggle list inside the banner. - Notice that the content inside the toggle list is not properly aligned. **Description of the issue:** - This happens because a margin-bottom is applied to all last `o-paragraph` elements inside the `o_editor_banner class`. Since the toggle list also contains `o-paragraph` elements that are the last child within it, the margin-bottom style is incorrectly applied to those as well. **Solution:** - Apply the margin-bottom only to the last direct child of `.o_editor_banner_content`. task-5213985 Forward-Port-Of: odoo/odoo#237177 Forward-Port-Of: odoo/odoo#233709
This update allows administrators to prevent automatic module installation during database upgrades, addressing potential upgrade failures caused by outdated or missing modules. This improves upgrade stability and ensures business logic functions correctly, particularly after module changes.
Original PR description
In some case, a database can be in a state where some auto install module are not installed - when the user uninstall a module - when module was added in stable and a database was created before the…
In some case, a database can be in a state where some auto install module are not installed - when the user uninstall a module - when module was added in stable and a database was created before the addition. It can lead to issues where an upgrade fails or some business logic does not work as expected because of the missing modules. This is not easy to reproduce and to test, even if uninstalling such module should in theory work and be tested. This pr proposes to add a flag "--skip-auto-install" to the config to be able to disable all auto install of modules. It is open to discussion to change this to a config option, with or without a module list **Initial solution (alternative to avoid a config)** --dev skipautoinstall **Current solutions** (command line param) --skip-auto-install **Maybe in the future but unlikely** (more flexible) --skip-auto-install=all --skip-auto-install=web_enterprise,iap (krma suggestions) --skip-auto-install=* --skip-auto-install=web_*,iap Those two last one could be more flexible but the use case are limited and can be done another way with an explicit -i, maybe no worth the additional complexity (mainly since we need to filter in two different places) Note that this pr uses **get** on the config just in case the config is monkey patched somewhere to make it more robust. Forward-Port-Of: odoo/odoo#239044 Forward-Port-Of: odoo/odoo#234710
This update resolves a technical error that prevented users from saving a duplicate transaction when a journal wasn't linked. The fix ensures the system handles missing journal data correctly, preventing a crash and improving the user experience. This change enhances stability and reliability of the account synchronization process.
Original PR description
Currently, an error occurs when user opens the `account.duplicate.transaction.wizard.form` view and saves it. **Steps to Reproduce:** - Install the `account_accountant` module. - Using `Open View`,…
Currently, an error occurs when user opens the `account.duplicate.transaction.wizard.form` view and saves it. **Steps to Reproduce:** - Install the `account_accountant` module. - Using `Open View`, open the `account.duplicate.transaction.wizard` view > enter the start date, and save.. `ValueError: Compute method failed to assign account.duplicate.transaction.wizard(22,).provider_duplicate_ids` The error occurs because when the view is opened and saved, the _compute_provider_duplicate_ids method is triggered. Since no journal is linked to the wizard, the method assigns an empty list ([]) to provider_duplicate_ids [1]. Because this is a O2M field, assigning a raw empty list is invalid and causes the error. This commit ensures that when journal is missing, instead of assigning an empty list ([]), a valid relational command `([Command.set([])])` is used. Ref: https://github.com/odoo/enterprise/pull/97196/commits/c109e0bcce20f14b6dbd3d28e61b135f1fd048f2 [1] https://github.com/odoo/enterprise/blob/d808ad3f6ff52632e00cf1a68de0e5270e52895d/account_online_synchronization/wizard/account_journal_duplicate_transactions.py#L53 sentry-7080686084 Forward-Port-Of: odoo/enterprise#101177
Previously, users couldn't change the name of the 'Help' menu item in the Helpdesk, encountering an error. This update allows users to rename the menu item, resolving a usability issue and providing greater flexibility within the Helpdesk feature. This change ensures a smoother experience for users managing their Helpdesk workflows.
Original PR description
**Issue** It was not possible to rename the "Help" menu item, an error appeared with the message: "This URL is reserved for the helpdesk teams with 'website form' feature enabled.", even if the user was not trying to edit the URL. **Change** Allow the user to edit the menu item's name. opw-5375334 Forward-Port-Of: odoo/enterprise#101567 Forward-Port-Of: odoo/enterprise#101323
This update fixes a bug where import errors weren't shown during batch imports. Now, if an import fails due to incorrect data (like a value that doesn't match the expected format), users will receive a notification, allowing them to quickly identify and correct issues during the import process. This improves data accuracy and reduces manual verification efforts.
Original PR description
Steps to reproduce ================== - Go to contact, - Import the following file ```csv id,name,active __import__.res_partner_SV_test_01,Name 1,TRUE __import__.res_partner_SV_test_02,Name 2,TRUE __import__.res_partner_SV_test_03,Name 3,TRUE __import__.res_partner_SV_test_04,Name 4,TRUE __import__.res_partner_SV_test_05,Name 5,incorrect value __import__.res_partner_SV_test_06,Name 6,TRUE __import__.res_partner_SV_test_07,Name 7,TRUE __import__.res_partner_SV_test_08,Name 8,TRUE ``` - Set the batch size to 4 - Click on the import button => Only 4 records have been imported and no error is displayed Cause of the issue ================== Errors were only checked in test mode opw-5242285 Forward-Port-Of: odoo/odoo#239632 Forward-Port-Of: odoo/odoo#239109
This update fixes an issue where the website editor's highlight overlay was misaligned when the website was zoomed in. The fix ensures that the overlay accurately reflects the selected content regardless of the zoom level, improving the user experience when editing mobile websites. This resolves a visual inconsistency that could lead to incorrect website designs.
Original PR description
Steps to reproduce: =================== 1- Go to the Website editor. 2- Go to mobile view 3- Zoom in (e.g., set it to 120%). 4- Click on any snippet inside the website iframe. -> The highlight…
Steps to reproduce: =================== 1- Go to the Website editor. 2- Go to mobile view 3- Zoom in (e.g., set it to 120%). 4- Click on any snippet inside the website iframe. -> The highlight overlay is in the wrong position. When the website builder iframe is zoomed (scaled), the overlay elements (blue selection borders) become misaligned and incorrectly sized. Cause: ====== This occurs because `targetRect` returns coordinates in the iframe's internal coordinate system (unscaled), while `iframeRect` is in the window's coordinate system (scaled). So when we try to draw the Overlay (in Main Window) using targetRect (from Iframe), we must scale the `targetRect` values to match the Main Window's reality. See [1] for more informations on how `getBoundingClientRect` works Solution ========= Scale targetRect to match the main windows's reality. [1]: https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect opw-5345154 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where users were encountering errors when creating reports in Web Studio, specifically when adding fields to the report layout. The fix prevents the generation of invalid field nodes, ensuring reports render correctly and avoids disruptions to the reporting process. This improves the stability and usability of Web Studio for creating custom reports.
Original PR description
cf commit Forward-Port-Of: odoo/enterprise#102170 Forward-Port-Of: odoo/enterprise#99385
This update fixes an issue where background colors were lost when copying tables from the Knowledge interface to other Odoo applications. The change ensures that the correct formatting is preserved during the copy-paste process, improving the user experience when working with tables.
Original PR description
To make it possible to properly copy DOM elements across editors, the `application/vnd.odoo.odoo-editor` mimetype was introduced in the `ClipboardPlugin`. However, this was not used inside the `HtmlViewer`. Because of this, some content formatting could be lost when copying elements from an `HtmlViewer` to an editor. This commit solves this by also invoking the code that fills the clipboard in `ClipboardPlugin` when content is copied in an `HtmlViewer`. Steps to reproduce: - Insert a table in Knowledge - Set a background color on a few cells - Use the "lock" feature of Knowledge (inside a dropdown the menu on the right) - Select the entire table - Copy/paste it in a project task => The background colors in the cells were lost task-4017841 Forward-Port-Of: odoo/odoo#239746 Forward-Port-Of: odoo/odoo#238655
This update ensures the TM-m30 printer is consistently recognized as a receipt printer within Odoo, regardless of the backend used. Previously, the system incorrectly identified some printers as office printers. This change improves printer compatibility and ensures accurate receipt printing functionality.
Original PR description
Before this commit, the receipt printer subtype was assigned based on the presence of `CMD:ESC/POS;` in the `device-id` of the printer. However, this string was only present for the `lpd` backend, for `dnssd` it was not resulting in a subtype of Office printer. After this commit, we additionally check for the string `TM-m30` in the device name, and if it is present we set it as a receipt printer. We also check for the string `ZPL` and if found set it as a label printer. task-5411994 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#240171
16 changes
Enhancements to existing features
This update enhances how Odoo calculates order amounts by allowing custom addons to modify the selection of order lines used in the calculation process. This change provides greater flexibility for businesses to tailor order amount calculations based on specific needs, improving accuracy and reporting. It’s a refinement of existing functionality.
Original PR description
This allows to change the record set of order lines which are used by `sale.order` `_compute_amounts` by custom addons Forward-Port-Of: odoo/odoo#239928 Forward-Port-Of: odoo/odoo#233239
This update optimizes how translations are imported into Odoo, reducing the size of the data processed and preventing potential memory issues. By focusing only on updated translations, the import process is now more efficient, especially with frequent updates to large mail templates.
Original PR description
Before this commit, when importing the translations with the TranslationImporter object, the save method was building one big query per model, with each JSON object containing all the languages. On our server, where 36 languages are installed, this leads to big JSON objects, especially for some large mail templates. Recently, we even got MemoryErrors because of the soft memory limit being hit. The query was about 250MB long. In the function, we already have the current values, so it's easy to compare them to the new values, and only consider these in the query. Furthermore, there is no need to add the languages that aren't being updated. With this commit, we are building a slightly more complicated query, but it will receive much less data when the translations are updated frequently, as unchanged values will be ignored. Task-id: none Forward-Port-Of: odoo/odoo#239678
Resolved issues and error corrections
This update resolves an issue where attempting to refund orders containing archived products resulted in a blank page. The fix ensures that product information is correctly synchronized, allowing refunds to process smoothly even after a product has been archived. This improves the reliability of the Point of Sale system.
Original PR description
Step to reproduce: - start pos and finalize a order with product A - go backend - Archive product A - start the pos again - try to refund the order Observation: - Blank page with traceback in console…
Step to reproduce: - start pos and finalize a order with product A - go backend - Archive product A - start the pos again - try to refund the order Observation: - Blank page with traceback in console ``` Caused by: TypeError: Cannot read properties of undefined (reading 'filter') at __exports.getOrderChanges at Proxy.getOrderChanges ``` Cause: - until now `product.template` model is looked for filter after a reload https://github.com/odoo/odoo/blob/1b2500422209ed5feb6d49716f94d58c931bf541/addons/point_of_sale/static/src/app/models/data_service_options.js#L91-L93 https://github.com/odoo/odoo/blob/1b2500422209ed5feb6d49716f94d58c931bf541/addons/point_of_sale/static/src/app/services/data_service.js#L290-L295 and not `product.product`, this makes `product_id` available but `product_tmpl_id` undefined, causing inconsistency Fix: - we add `product.product` in `cleanupModels` for data to in sync with backend opw-5237961 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a potential error that could occur when creating invoices with journal items that don't have labels assigned. The change ensures that the code handles missing label values gracefully, preventing a traceback and ensuring invoices can be successfully validated. This improves the stability of invoice creation processes.
Original PR description
Creating an invoice containing journal items without a label triggers a traceback because the code unconditionally slices the 'name' field (line.name[:64]) without ensuring it is not False. Since 'name' is not a required field on account.move.line, it must be safely handled.
This commit ensures that the label is always a string by falling back to an empty string when the value is missing.
Steps to reproduce the bug:
- Create a storable product
- Create an invoice:
- Add the product to the invoice
- Set any customer
- Go to the journal items tab
- Remove the label of the journal item corresponding to the product
- Try to validate the invoice
- A traceback is raised
opw-5360602
Forward-Port-Of: odoo/odoo#239664
Forward-Port-Of: odoo/odoo#239188This update resolves an issue where a newly duplicated website page wasn't immediately visible in the page list. Users now need to reload the page list after duplicating a page to ensure the new page appears correctly. This improves the user experience and prevents frustration when managing website pages.
Original PR description
Steps to reproduce: - Go in website page list - Select a page - Click on actions -> duplicate - Select a name - New page doesn't appear in the list, you need to reload to be able to see it task-5412167 https://github.com/odoo/odoo/issues/225299 Forward-Port-Of: odoo/odoo#240041 Forward-Port-Of: odoo/odoo#239702
This update resolves an issue where triple-clicking a checkbox in a checklist would unexpectedly select the entire list item. The fix ensures that triple-clicking a checkbox only checks the box, improving the user experience and preventing unintended selections.
Original PR description
**Current behavior before PR:** Currently, triple clicking on a checkbox in a checklist item ends up selecting the list content. This happens because in `selection_plugin` `onTripleClick` handler selects the whole list item. **Desired behavior after PR is merged:** This PR ensures that `onTripleClick` in `selection_plugin` does nothing if tripleclick is triggered when checking a box. task-5361579 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#238876 Forward-Port-Of: odoo/odoo#237690
This update allows administrators to prevent automatic module installation during database upgrades, addressing potential upgrade failures caused by outdated or missing modules. This enhances stability and ensures business logic functions correctly, particularly after module uninstalls or new stable releases.
Original PR description
In some case, a database can be in a state where some auto install module are not installed - when the user uninstall a module - when module was added in stable and a database was created before the…
In some case, a database can be in a state where some auto install module are not installed - when the user uninstall a module - when module was added in stable and a database was created before the addition. It can lead to issues where an upgrade fails or some business logic does not work as expected because of the missing modules. This is not easy to reproduce and to test, even if uninstalling such module should in theory work and be tested. This pr proposes to add a flag "--skip-auto-install" to the config to be able to disable all auto install of modules. It is open to discussion to change this to a config option, with or without a module list **Initial solution (alternative to avoid a config)** --dev skipautoinstall **Current solutions** (command line param) --skip-auto-install **Maybe in the future but unlikely** (more flexible) --skip-auto-install=all --skip-auto-install=web_enterprise,iap (krma suggestions) --skip-auto-install=* --skip-auto-install=web_*,iap Those two last one could be more flexible but the use case are limited and can be done another way with an explicit -i, maybe no worth the additional complexity (mainly since we need to filter in two different places) Note that this pr uses **get** on the config just in case the config is monkey patched somewhere to make it more robust. Forward-Port-Of: odoo/odoo#239044 Forward-Port-Of: odoo/odoo#234710
This update resolves a bug preventing purchase orders from being found when matching vendor bills created by users associated with a company. The fix normalizes the search criteria to account for the difference between how purchase orders and vendor bills store partner information, ensuring accurate matching and bill visibility.
Original PR description
There are two issues: 1) When making a purchase matching, and adding a vendor bill to a PO, when searching for the corresponding purchase order, it will not find it if the purchase order is an user…
There are two issues:
1) When making a purchase matching, and adding a vendor bill to a PO, when searching for the corresponding purchase order, it will not find it if the purchase order is an user with a company
2) When making a bill matching, the vendors bill will not appear.
Steps to reproduce:
-------------------
* Create a company A
* Create a partner A of type individual as a sub-partner to the company A
* Create a purchase order with partner A and confirm it
* Create a vendor bill corresponding to the purchase order
1)
* Click on the purchase matching smart button the vendor bill and try to add to PO
* Search for the purchase order
-> Issue, the purchase order does not appear.
2)
* Go on the purchase order
* Click on Bill matching smart button
-> Issue the vendor bills will not appear
Observation:
-----------
The issue is that purchase Orders store the partner exactly as selected (individual contact), while Vendor Bills are normalized internally to the parent company ("commercial_partner_id'). This creates a mismatch when making the search.
https://github.com/odoo/odoo/blob/9e9e992698946b75212040ca0ff812194200a8bf/addons/account/models/account_move_line.py#L480-L483
1) The domain of the search is
https://github.com/odoo/odoo/blob/58b888992f80a58fecdb92e23fea0050f2178faf/addons/purchase/wizard/bill_to_po_wizard_views.xml#L10-L11
The domain on the search does not take into consideration the missmatch between Vendor Bill and PO.
2) When calling action_bill_matching, the domain is:
https://github.com/odoo/odoo/blob/73590e017e9f2861b0852952e14261e57eb67f70/addons/purchase/models/purchase_order.py#L609-L621
This is a similar issue as 1) and https://github.com/odoo/odoo/commit/c0e86ba6d31708fb16765ba0e0596adc2f29dcd8
Why the fix:
------------
Commercial_partner_id is always set, adding it in the search will allow to normalize the search on the parent_company if there is one.
https://github.com/odoo/odoo/blob/18.0/odoo/addons/base/models/res_partner.py#L450-L455
opw-5067995
Forward-Port-Of: odoo/odoo#236913This update resolves an issue preventing users from controlling prices within the POS system when utilizing the Swedish blackbox integration. Previously, this functionality was restricted, but now it's enabled, aligning with requirements for the Swedish blackbox which differs from the Belgian version. This ensures accurate pricing for Swedish POS transactions.
Original PR description
Before this commit, user couldn't control the price in the POS if using the swedish blackbox. After this commit, user can control the price. It's not clear why the behavior at integration was set to this but it appears that it's not mandatory for swedish blackbox unlike the belgian one. opw-5253401 Forward-Port-Of: odoo/enterprise#101797 Forward-Port-Of: odoo/enterprise#100984
This update resolves an issue where newly added buttons in the web studio form editor weren't correctly focused or displayed in the sidebar. The fix corrects the XPath coordinates used for focusing, ensuring a smoother and more intuitive user experience when creating new buttons within complex form layouts. This improves usability for users building custom forms.
Original PR description
Have an arch with many conditional button in the header Click on Add a button in the form editor. Before this commit, the new button was not correctly focused and the sidebar did not display the properties of the new button. This was because we gave the wrong xpath coordinates to focus to the editor. After this commit, this flow works as expected task-5364798
This update fixes an issue where internal transfers using barcode scanning wouldn't correctly assign a result package when the package already contained items. The fix ensures that a package is always assigned as the result package, regardless of whether it's empty or contains items, improving the reliability of the barcode picking process.
Original PR description
Issue ===== When scanning a package as result package, if the package is empty, it works, but if this package already has content, it doesn't work. How to reproduce ================ 1. Enable…
Issue ===== When scanning a package as result package, if the package is empty, it works, but if this package already has content, it doesn't work. How to reproduce ================ 1. Enable "Packages" and "Storage Locations" settings; 2. Create two packages with some content in WH/Stock/Shelf 1; 3. Create an empty package; 4. Create an internal transfer directly from the Barcode app; 5. Scan Shelf 1 barcode and scan first package; 6. Scan the empty package => It's assigned as the result package; 7. Confirm the operation; 8. Create another internal transfer; 9. Scan Shelf 1 barcode and scan second package; 10. Scan the no more empty package => This time, it's not assigned as the result package. Reason ====== A package was assigned as the result package only if one of the following conditions is matched: 1. The scanned package is empty (it's what's happening in 6.); 2. The selected line has no result package yet and the scanned package is in the selected line's destination location. Here, it doesn't work because since we move a package, the barcode line has already a destination package (the same then the source package.) Fix === For the condition 2., adapt the condition to make it works too if the selected line has the same package as the source and result package. [opw-5326234](https://www.odoo.com/odoo/project/49/tasks/5326234) Forward-Port-Of: odoo/enterprise#101959 Forward-Port-Of: odoo/enterprise#101357
This update fixes a security vulnerability where Portal and Internal users could create private Knowledge Articles even without the necessary permissions. The change restricts article creation using 'sudo' and adds UI controls to hide creation buttons for users lacking the correct access. This ensures only authorized users can create articles.
Original PR description
How to Reproduce : 1. Remove 'Create' access on the 'Knowledge Article' model for Portal and Internal users. 2. Now log in as a Portal. 3. Try to create a new private article. 4. Log in as an…
How to Reproduce : 1. Remove 'Create' access on the 'Knowledge Article' model for Portal and Internal users. 2. Now log in as a Portal. 3. Try to create a new private article. 4. Log in as an Internal user. 5. Try to create a new private article. Both Internal and Portal users can still create private articles even after 'Create access' is removed. Article creation logic in `knowledge.article` was bypassing the usual access rights because of `sudo` (mainly to add the creator as a member, since creation rights on the member model are not granted). This allowed users to create private articles even without create access. This commit introduces: 1. Model-level access check in `create`. Sudo the creation of articles only when the user has create rights. 2. UI imp to hide the '+' button in the sidebar and the `New` button in the topbar when the user doesn't have create access. 3. New test cases to verify that model-level access rights are respected when creating an article. task-4916280 Forward-Port-Of: odoo/enterprise#100776 Forward-Port-Of: odoo/enterprise#93034
This update resolves an error that occurred when users attempted to duplicate transactions through the account module. Specifically, the system now correctly handles scenarios where no journal is associated with the duplication process, preventing a crash. This ensures smoother operation for users and avoids data inconsistencies.
Original PR description
Currently, an error occurs when user opens the `account.duplicate.transaction.wizard.form` view and saves it. **Steps to Reproduce:** - Install the `account_accountant` module. - Using `Open View`,…
Currently, an error occurs when user opens the `account.duplicate.transaction.wizard.form` view and saves it. **Steps to Reproduce:** - Install the `account_accountant` module. - Using `Open View`, open the `account.duplicate.transaction.wizard` view > enter the start date, and save.. `ValueError: Compute method failed to assign account.duplicate.transaction.wizard(22,).provider_duplicate_ids` The error occurs because when the view is opened and saved, the _compute_provider_duplicate_ids method is triggered. Since no journal is linked to the wizard, the method assigns an empty list ([]) to provider_duplicate_ids [1]. Because this is a O2M field, assigning a raw empty list is invalid and causes the error. This commit ensures that when journal is missing, instead of assigning an empty list ([]), a valid relational command `([Command.set([])])` is used. Ref: https://github.com/odoo/enterprise/pull/97196/commits/c109e0bcce20f14b6dbd3d28e61b135f1fd048f2 [1] https://github.com/odoo/enterprise/blob/d808ad3f6ff52632e00cf1a68de0e5270e52895d/account_online_synchronization/wizard/account_journal_duplicate_transactions.py#L53 sentry-7080686084 Forward-Port-Of: odoo/enterprise#101177
This update ensures the TM-m30 printer is consistently identified as a receipt printer, regardless of the underlying connection method (like lpd or dnssd). Previously, the system incorrectly classified some printers. This change improves the accuracy of receipt printing functionality within Odoo.
Original PR description
Before this commit, the receipt printer subtype was assigned based on the presence of `CMD:ESC/POS;` in the `device-id` of the printer. However, this string was only present for the `lpd` backend, for `dnssd` it was not resulting in a subtype of Office printer. After this commit, we additionally check for the string `TM-m30` in the device name, and if it is present we set it as a receipt printer. We also check for the string `ZPL` and if found set it as a label printer. task-5411994 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#240171
This update resolves an issue where users couldn't rename the "Help" menu item in the Helpdesk, receiving an error message. Now, users can directly edit the name of this menu item, improving usability and flexibility within the Helpdesk feature.
Original PR description
**Issue** It was not possible to rename the "Help" menu item, an error appeared with the message: "This URL is reserved for the helpdesk teams with 'website form' feature enabled.", even if the user was not trying to edit the URL. **Change** Allow the user to edit the menu item's name. opw-5375334 Forward-Port-Of: odoo/enterprise#101567 Forward-Port-Of: odoo/enterprise#101323
This update fixes an issue where calendar events were not displayed in chronological order when no work location was assigned. The change ensures events are now sorted by their start time, providing a more accurate and user-friendly month view for tracking homeworking schedules. This improves the clarity and usability of the calendar.
Original PR description
Purpose ======= Fix the events ordering in the calendar month view. Specification ============= When comparing 2 events, if none of them has a work location the events are ordered following their title, in alphabetical order. This is wrong, the events should be ordered following their start time to keep a chronological order in the month view. Task-5407656 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#234583
5 changes
Enhancements to existing features
This update automatically marks Odoo orders as paid when an UrbanPiper order is marked as 'dispatched'. This prevents order cancellations due to cashier oversight and ensures accurate order status tracking. It also integrates UrbanPiper orders into the blackbox reporting system.
Original PR description
*= urban_piper, black_box_be In this commit: =============== - When UrbanPiper updates an order to `dispatched`, we now automatically mark the order as paid in Odoo. - This prevents the order from being cancelled during the POS session closing if the cashier forgot to mark it as ready. - Also, we are adding this urban piper order to the blackbox, if it was not recorded in it. Task: 5261892
Resolved issues and error corrections
This update corrects a test failure related to VAT number validation for Thailand. Following the recent implementation of stricter VAT number checks, a test case was found to use an incorrect format. This fix ensures the test accurately reflects the new validation rules and maintains the integrity of the Thailand VAT reporting functionality.
Original PR description
Following the implementation of proper validation for VAT numbers for Thailand, this now fails as the one set in the test doesn't follow the proper format. Community PR: odoo/odoo#239616 Total credits to @vin-odoo Forward-Port-Of: odoo/enterprise#102049 Forward-Port-Of: odoo/enterprise#101905
This update corrects a formatting problem in invoices generated when using quotation templates in sales orders. Previously, the invoice PDF displayed product names and descriptions on the same line, leading to an unreadable format. This fix ensures descriptions appear on separate lines, improving invoice clarity and professionalism.
Original PR description
### Issue: In this issue, when a quotation template is used in sale order, the end line is missing between name and description in the invoice pdf. #### Steps to reproduce: 1- Install a db with sale…
### Issue: In this issue, when a quotation template is used in sale order, the end line is missing between name and description in the invoice pdf. #### Steps to reproduce: 1- Install a db with sale and invoicing installed 2- Create a quotation template, and add a description in the line. 3- Create a quotation with the created template. 4- Confirm the order and create an invoice for the sale order. 5- Print the pdf, as seen the name and description are shown in the same line, while if the sale order was created without a template, we would have seen the description from product in the next line. `_get_journal_items_full_name` is used to enforce the product name in the description. However, in cases where product name doesn't exist in the description, e.g. our case here, the name and description will be shown in the same line in the invoice pdf. This can be fixed by adding a new line between the name and the description. opw-5130171 Forward-Port-Of: odoo/enterprise#100417
This update resolves a bug preventing users from adding products to invoices when navigating from an fsm task. The issue stemmed from inconsistent context settings between accessing invoices from a sale order versus a task, impacting the search domain for products. This ensures consistent functionality regardless of the initial navigation path.
Original PR description
On a fsm task, using the smart button to go to the invoice, will not give the same domain for the products, if you go from the sale order or directly from the task Steps to reproduce:…
On a fsm task, using the smart button to go to the invoice, will not give the same domain for the products, if you go from the sale order or directly from the task Steps to reproduce: ------------------- * Create a product - Purchase: False - Sale : True * Create a fsm task * Add products * Go to the sale order * Create the invoice (regular invoice) * Go back to the task * Go to the invoice using the invoices smart button * Try to add your product -> issue it's not possible. Observation: --------------- The domain of the search is not the same if we go from the sale order or from the task. This is because the domain depend on the context and the context is not the same : [Domain](https://github.com/odoo/odoo/blob/8258ddf12ed6c0495628f7a480d1e2424e756540/addons/account/views/account_move_views.xml#L1134-L1141) When using the smart button on the SO, some elements will be added to the context, the important one is: default_move_type : "out_invoice": [SO context](https://github.com/odoo/odoo/blob/18.0/addons/sale/models/sale_order.py#L1453) Instead when using it on the task, the context does not have that element: https://github.com/odoo/enterprise/blob/cb79d565031ee0e1bec9db82aa35deb2e1c03576/industry_fsm_sale/models/project_task.py#L325-L327 This will be calculate here in the js files: [evalContext](https://github.com/odoo/odoo/blob/c3367bd7c6900e42394b006ccf48c3b36a1b87e9/addons/web/static/src/views/fields/field.js#L400) opw-5135567 Forward-Port-Of: odoo/enterprise#101606 Forward-Port-Of: odoo/enterprise#98612
This update resolves an issue where users couldn't rename the 'Help' menu item in the Helpdesk, receiving an error message. The change now allows users to directly edit the menu item's name, removing the restriction and improving usability.
Original PR description
**Issue** It was not possible to rename the "Help" menu item, an error appeared with the message: "This URL is reserved for the helpdesk teams with 'website form' feature enabled.", even if the user was not trying to edit the URL. **Change** Allow the user to edit the menu item's name. opw-5375334 Forward-Port-Of: odoo/enterprise#101567 Forward-Port-Of: odoo/enterprise#101323
5 changes
Enhancements to existing features
This update removes a performance-hindering feature from the account report engine. The previous method, using 'safe_eval', was only needed for a specific calculation and caused slowdowns with large datasets. This change improves overall report generation speed and prepares the system for future updates like the partner ledger refactoring.
Original PR description
The safe_eval used in account report was only useful for domain engine to handle "-sum()". This however has huge performance impacts when handling a lot of lines, for example in the future partner ledger refactoring. task-5116827
This update streamlines the bank reconciliation process by ensuring the chatter used within the bank reconciliation widget now pulls information from the statement line instead of the general move. This reduces unnecessary noise and improves the clarity of reconciliation reports, making the process more efficient for users.
Original PR description
Before this commit, the chatter of bank reconciliation widget was using the move's chatter and not the statement line one. This commit changes that to have less noise when we do the reconciliation. task-5385187
This update integrates AI-powered SEO directly into the Odoo website. It automatically generates titles, descriptions, and keywords for web pages based on their content, improving search engine visibility. A new feature allows for structured data output control, ensuring optimal website performance.
Original PR description
This PR introduces an AI-based SEO to the website app. It does so by overriding the `TitleDescription.autoFill` method, using the default agent to generate title, description, and keyword based on the page content. This PR also adds a new parameter to the `_generate_response` of the `ai.agent` to allow one to pass a JSON schema for getting structured outputs. Doing so, it adds a restriction on the controller endpoint to forbid the use of structured outputs if the `enable_html_response` flag is set to true. task-5385183 Community PR: https://github.com/odoo/odoo/pull/238889
Resolved issues and error corrections
This update fixes an issue where refreshing a new offer page would reset the employee information, requiring users to re-enter details. The change ensures the correct employee context is maintained when the offer page is refreshed, improving the user experience and data accuracy. This prevents data entry errors and streamlines the offer creation process.
Original PR description
Steps to Reproduce ================== - Go to Employees - Choose an employee with no offers - Click on the "Offers - new" smart button (a form view will open with the correct employee name at the bottom) - Refresh the offer's page without saving (the employee field is emptied and the required Applicant field appears) Issue ================== The generate offer action that is triggered through the smart button returns a one-time action dictionary with the context. But that context is lost when we refresh the offer page as it's not saved anywhere. Fix ================== Replace the action dictionary with an action record for creating a new offer to ensure the context is maintained upon page refresh. Task-ID: 5059490
Code cleanup and technical improvements
This update enhances the partner ledger report by leveraging Odoo's report engine, allowing for more flexible customization. Specifically, users can now define custom groupings within the report, providing greater control over the data presented. This improves the report's usability and analytical capabilities.
Original PR description
Currently, the partner ledger is generated using the dynamic lines generator. This is fine but it doesn't take advantages of the features of the report engine. With this commit, it now uses a custom engine. This allows notably the user to define a custom groupby. task-4245219
10 changes
Enhancements to existing features
This update optimizes how Odoo imports translations, addressing a previous issue where large JSON objects caused memory problems. By focusing only on updated translations and simplifying the import query, the system now handles frequent updates more efficiently, preventing potential errors and improving overall performance.
Original PR description
Before this commit, when importing the translations with the TranslationImporter object, the save method was building one big query per model, with each JSON object containing all the languages. On our server, where 36 languages are installed, this leads to big JSON objects, especially for some large mail templates. Recently, we even got MemoryErrors because of the soft memory limit being hit. The query was about 250MB long. In the function, we already have the current values, so it's easy to compare them to the new values, and only consider these in the query. Furthermore, there is no need to add the languages that aren't being updated. With this commit, we are building a slightly more complicated query, but it will receive much less data when the translations are updated frequently, as unchanged values will be ignored. Task-id: none Forward-Port-Of: odoo/odoo#239678
Resolved issues and error corrections
This update allows users to configure recurring prices for individual product variants within subscription orders. Previously, users couldn't specify variant-specific pricing, limiting flexibility. This change ensures accurate recurring revenue tracking for products with multiple variations.
Original PR description
Version: - 19.0 Before: - When creating a product with variants and setting recurring prices, users could not select product variants in the recurring price list. Issue: - The recurring price list appeared read-only for product variants, preventing users from defining variant-specific recurring prices. Cause: - The product variant field was missing from the recurring pricing view. Fix: - Added the product variant field to the recurring prices list view, allowing users to select and manage variants while setting recurring prices. Taskid-5361266
This update resolves an issue preventing price adjustments in the POS system when using the Swedish blackbox integration. Previously, price control wasn't possible. Now, users can manage prices correctly within the Swedish blackbox, aligning with current regulations. This ensures accurate reporting and transactions for Swedish customers.
Original PR description
Before this commit, user couldn't control the price in the POS if using the swedish blackbox. After this commit, user can control the price. It's not clear why the behavior at integration was set to this but it appears that it's not mandatory for swedish blackbox unlike the belgian one. opw-5253401 Forward-Port-Of: odoo/enterprise#101797 Forward-Port-Of: odoo/enterprise#100984
This update ensures that Luxembourg companies (l10n_lu) using the general ledger and generating FAIA XML reports correctly include vendor bills under the 'PurchaseInvoices' tag, as required by a recent FAIA update. This resolves a reporting discrepancy and ensures compliance with Luxembourg tax regulations.
Original PR description
Since version 2.01 of FAIA, it is a requirement to include the `PurchaseInvoices` tag in the FAIA XML. With a `l10n_lu` company: - Create a vendor bill. - In the general ledger, download the FAIA XML report. In the generated XML document, the vendor bill will not appear under `PurchaseInvoices`. The `PurchaseInvoices` section is meant to mirror the `SalesInvoices` section and contains the exact same structure. This PR implements a generic template for both. **Specs and source** (in `FAIA_v2.01_full`): https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip opw-5360572 Forward-Port-Of: odoo/enterprise#102092 Forward-Port-Of: odoo/enterprise#100697
This update fixes an issue where the Quality Control module's list view was incorrectly loading. The change ensures the correct view is used, resolving a problem that prevented users from accessing the Control Points feature. This ensures the Quality Control module functions as intended.
Original PR description
Since odoo/enterprise#94012, when loading the quality.point list view from the main menu, `quality_point_routing_view_tree` is used instead of `quality_point_view_tree`. This is not correct. To reproduce : - Install quality_control and mrp_workorder - In Quality Module, go to Quality Control / Control Points [opw-5253899](https://www.odoo.com/odoo/project/966/tasks/5253899)
This update prevents website errors related to rental events when product types are misconfigured. Specifically, it addresses a technical issue that caused tracebacks during payment processing, ensuring a smoother user experience for customers purchasing rental tickets. While the rental feature itself is being addressed, this fix focuses on robust error handling.
Original PR description
Versions -------- - 17.0+ Steps ----- 1. Have `website_event_sale` but not `stock` installed; 2. create an event with a ticket; 3. make the ticket's product rentable; 4. change ticket's product type to Goods; 5. publish the event to website; 6. register for the event via website; 7. go to payment. Issue ----- AttributeError: 'bool' object has no attribute 'tzinfo' Cause ----- Having odd configurations like rentable tickets creates rental orders without rental dates, leading to unhandled errors. Solution -------- While rentable event tickets doesn't make enough sense to make it work, we can still improve the error handling to prevent showing tracebacks to the client. opw-5207045 Forward-Port-Of: odoo/enterprise#101859 Forward-Port-Of: odoo/enterprise#99000
This update fixes a bug that occurred when users attempted to duplicate transactions through the account.duplicate.transaction.wizard view. The issue was caused by an error when no journal was linked, now the system correctly handles this scenario by using a valid relational command to avoid the error.
Original PR description
Currently, an error occurs when user opens the `account.duplicate.transaction.wizard.form` view and saves it. **Steps to Reproduce:** - Install the `account_accountant` module. - Using `Open View`,…
Currently, an error occurs when user opens the `account.duplicate.transaction.wizard.form` view and saves it. **Steps to Reproduce:** - Install the `account_accountant` module. - Using `Open View`, open the `account.duplicate.transaction.wizard` view > enter the start date, and save.. `ValueError: Compute method failed to assign account.duplicate.transaction.wizard(22,).provider_duplicate_ids` The error occurs because when the view is opened and saved, the _compute_provider_duplicate_ids method is triggered. Since no journal is linked to the wizard, the method assigns an empty list ([]) to provider_duplicate_ids [1]. Because this is a O2M field, assigning a raw empty list is invalid and causes the error. This commit ensures that when journal is missing, instead of assigning an empty list ([]), a valid relational command `([Command.set([])])` is used. Ref: https://github.com/odoo/enterprise/pull/97196/commits/c109e0bcce20f14b6dbd3d28e61b135f1fd048f2 [1] https://github.com/odoo/enterprise/blob/d808ad3f6ff52632e00cf1a68de0e5270e52895d/account_online_synchronization/wizard/account_journal_duplicate_transactions.py#L53 sentry-7080686084 Forward-Port-Of: odoo/enterprise#101177
This update fixes an issue where unscheduled shifts weren't correctly displayed in the Gantt view, requiring a page refresh to resolve. The change ensures that shifts are updated instantly when unscheduled, providing a more accurate and reliable view of team availability. This improves planning efficiency and reduces confusion.
Original PR description
**Steps to reproduce:** Go to planning gantt view. Click on shift. Click on unschedule button on popover. **Issue:** When clicking on Unschedule button on a shift popover, sometimes the shift still appears and again clicking on that it cause missing error occured until the page is refreshed. **Cause:** The record wasn’t updating in the view after a shift was unscheduled, so the unscheduled shift was still showing. **Fix:** Modified the method to reload the model and notify the view immediately after calling action_unschedule, ensuring shifts reflect the latest server state without requiring a manual refresh. task-5075381 Forward-Port-Of: odoo/enterprise#102010 Forward-Port-Of: odoo/enterprise#97108
This update resolves an issue where inaccessible folders within a company's structure were incorrectly appearing in search results. The fix ensures that only accessible folders and their direct children are displayed when searching folder hierarchies, improving data accuracy and user experience. Performance testing confirmed this as the optimal solution.
Original PR description
`user_folder_id` and `folder_id`'s `child_of` were not taking into account that the path could be broken if inaccessible folders are between accessible documents. E.g., the DB structure COMPANY └── Folder A └── Folder B (inaccessible to User A) └── Folder C Would appear to user A as COMPANY └── Folder A SHARED └── Folder C such that "Folder C" should not be found when searching `child_of` "Folder A" or "In Company". Note that more creativity would be necessary to fix this before 19.0 as the stored `folder_id` field could not be `_search`ed. Task-5231269
This update resolves an issue preventing users from renaming the "Help" menu item in the website helpdesk module. Previously, a technical error blocked renaming, even without attempting to change the URL. Now, users can directly edit the menu item's name, improving usability and flexibility.
Original PR description
**Issue** It was not possible to rename the "Help" menu item, an error appeared with the message: "This URL is reserved for the helpdesk teams with 'website form' feature enabled.", even if the user was not trying to edit the URL. **Change** Allow the user to edit the menu item's name. opw-5375334 Forward-Port-Of: odoo/enterprise#101567 Forward-Port-Of: odoo/enterprise#101323
13 changes
Enhancements to existing features
This update enhances the Guatemalan localization by automatically including the XML file alongside the PDF invoice when e-invoices are emailed to customers. Previously, only the PDF was sent, but now customers receive both files for greater transparency and convenience. The XML file naming convention has also been standardized.
Original PR description
Purpose: In the Guatemalan localization, when an electronic invoice is created, the email template to the customer already contains the PDF version of the DTE. However, the XML file, generated and…
Purpose: In the Guatemalan localization, when an electronic invoice is created, the email template to the customer already contains the PDF version of the DTE. However, the XML file, generated and sent to the SAT through Infile, is not attached to that email. Even though the SAT and Infile deliver the XML to the customer, it is more convenient and transparent if Odoo includes it directly in the outgoing invoice template email, so the customer receives both files in one place. Before this commit:- - Only PDF version is attached by default in customer email for e-invoices. - Name of edi document is prefixed with `Demo` if company is in demo environment (check parent company's environment in case of child company) (e.g. DEMO_certificate_INV_2025_00001.xml) and prefixed with `SAT` if company is in testing or production environment(e.g. SAT_certificate_INV_2025_00001.xml). After this commit:- - XML version is also attached by default along with PDF in customer email for e-invoices. - Name of edi document is always prefixed with `SAT`. task-5224521
This update optimizes how Odoo imports translations, reducing the size of the data processed and preventing potential memory issues. By focusing only on updated translations, the import process is now more efficient, especially when updates are frequent.
Original PR description
Before this commit, when importing the translations with the TranslationImporter object, the save method was building one big query per model, with each JSON object containing all the languages. On our server, where 36 languages are installed, this leads to big JSON objects, especially for some large mail templates. Recently, we even got MemoryErrors because of the soft memory limit being hit. The query was about 250MB long. In the function, we already have the current values, so it's easy to compare them to the new values, and only consider these in the query. Furthermore, there is no need to add the languages that aren't being updated. With this commit, we are building a slightly more complicated query, but it will receive much less data when the translations are updated frequently, as unchanged values will be ignored. Task-id: none Forward-Port-Of: odoo/odoo#239678
This update ensures the IoT boxes automatically update their code to match the latest database version, running nightly at midnight. This prevents discrepancies and maintains data consistency between the database and the IoT devices. Existing IoT boxes require a restart to implement this new synchronization process.
Original PR description
This PR adds the code which checks every midnight to see if the version of the database has changed. If so, it will update the iot box's code to align it to the database version Note: 1) the existing iot boxes will need to restart to get this cron job 2) Outside of database upgrade the code won't be upgraded with the cron Forward-Port-Of: odoo/odoo#239049
Resolved issues and error corrections
This update resolves an issue impacting payroll calculations for Swiss employees, specifically related to overtime payments (ST-Overtime) and the LPP (Lump-Sum Payment Plan). The fix ensures accurate tax and social security deductions are applied, improving compliance and financial reporting for businesses using the Odoo Enterprise module.
Original PR description
Forward-Port-Of: odoo/enterprise#102161
This update resolves an issue where image styles (like transform and width) were incorrectly applied to new media types after an image was replaced. Now, styles are automatically removed when switching between image and other media types, ensuring consistent styling across the HTML editor. This improves the user experience and prevents unexpected visual behavior.
Original PR description
**Current behavior before PR:** - When an image had styles applied to it (such as transform or width) and was replaced with another media type like an icon or document, those styles were incorrectly carried over to the replaced media. **Desired behavior after PR is merged:** - Since transform and width styles are meant to apply only to images, they are now removed when an image is replaced with other media types. task-5373362
This update fixes an issue where analytic distribution information was lost when expenses were reinvoiced to customers. Now, the analytic account linked to the sales order takes priority, ensuring accurate tracking of costs and revenue across all related documents (expense, SO, and vendor bill).
Original PR description
Steps to reproduce the flow: - Create an expensable product “Hotel” that can be reinvoiced to a customer - Create an analytic distribution model that automatically applies the analytic account…
Steps to reproduce the flow: - Create an expensable product “Hotel” that can be reinvoiced to a customer - Create an analytic distribution model that automatically applies the analytic account “Commercial &Marketing” to the previous created product “Hotel” - Create an SO for a customer “Gilles”. The SO is linked to the analytic account “Home Construction” - Create an expense which category is “Hotel”. The analytic distribution is automatically set to “Commercial & Marketing” - Reinvoice this expense to “Gilles”. The analytic distribution automatically changes to “Home Construction”. -> Wrong. We lose part of the information - When posting the expense report, the expense is added in the SO through a dedicated SO line. The analytic account previously set as “Home Construction” is now transformed, for an unknown reason, into “Commercial & Marketing”. -> Wrong. - On the vendor bill, the analytic distribution is “Home Construction” Now: 1. The analytic plans from the expense and from the SO are different. Simply add the analytic account from the SO 2. The analytic plans are the same. There are conflicts. In this case, the analytic distribution set on the SO is prioritary. We ensure that costs incurred or sales generated from the expense are reflected in the SO's analytic plan rather than the generic one. In the previous example, Home Construction is the only analytic account that should be considered on the expense, bill and SO. task-4564463
A recent update was incorrectly displaying inaccurate reconciliation numbers on the dashboard, leading to users not seeing the expected reconciliation entries. This revert fixes the issue by ensuring the correct number of entries is shown, allowing users to properly reconcile their accounts. This resolves several related support tickets.
Original PR description
This recent commit is causing an issue for lots of databases. The wrong number of entries to reconcile is displayed on the dashboard. After clicking on the "N to reconcile" button, no entries appear in the reconciliation view. this is a revert of commit #ed71144 opw-5414718 opw-5418442 opw-5418117 opw-5417268 opw-5417879 opw-5417291
This update resolves an issue where invoices with negative tax amounts caused export errors. The fix addresses a technical problem related to how tax calculations were handled during invoice generation, preventing a key error and ensuring accurate UBL document creation. This improves the reliability of invoice printing and exporting.
Original PR description
Steps to reproduce: - Create an invoice with a negative tax on a line. - Confirm - Send & Print Issue: Traceback will show It occurs because when grouping tax subtotal vals we don't handle the withholding taxes properly, causing a KeyError when we later want to retrieve the correct values from `ubl_values` opw-5419227
This update resolves an issue where product documents would stop appearing on product pages after a document version was updated. The fix ensures that the product document record is correctly linked to the latest document version, maintaining accurate product information. This prevents data inconsistencies and ensures users always see the most current document associated with a product.
Original PR description
**Steps to reproduce:** 1. Install `sale_management` and `documents`. 2. Go to settings > check `product` under Files Centralization. 3. Create a product and add a document to it using the smart button. 4. Update the version of that document from the *Manage Versions* action on the document page. **Issue:** - After updating the document version, the linked document no longer appears on the product page. **Cause:** - The product page displays records from the `product.document` model, but its `ir_attachment_id` was not updated when the document’s version changed. **Solution:** - Update the `ir_attachment_id` on the corresponding `product.document` record when the document version is updated. opw-5144041
This update fixes a validation error that occurred when starting work orders for flexible resources, specifically when the time was set to a late part of the day. The change ensures that attendance intervals are correctly aligned with the work order's start and end dates, preventing the 'start date must be earlier than end date' error. This improves the reliability of scheduling and time off requests.
Original PR description
**Steps to reproduce** On a local DB, with demo data: - Change your machine's time to a late part of the day (e.g. 6pm) - Install `mrp_workorder` - Set the "Standard 40 hours/week" (used by a…
**Steps to reproduce** On a local DB, with demo data: - Change your machine's time to a late part of the day (e.g. 6pm) - Install `mrp_workorder` - Set the "Standard 40 hours/week" (used by a workcenter) as flexible. - From the Shop Floor, start the "WH/MO/00003 - Manual Assembly" workorder. "Validation Error: The start date of the time off must be earlier than the end date." **Cause** `_calculate_date_finished` in mrp is calling `plan_hours` and under certain conditions with a flexible resource, it is possible for `plan_hours` to return a datetime before the `day_dt` parameter. This happens because for flexible resources, `_attendance_intervals_batch` can return attendance intervals with start or end datetimes outside of the start_dt -> end_dt window. For example, a flexible calendar with 8h/day will return the 8:00->16:00 interval, even if start_dt is later than 8:00. **Change** Don't return attendance intervals outside of the [start_dt, end_dt] interval by shifting them if necessary. opw-5123230
This update fixes an issue where part-time employee time off calculations incorrectly included company working days, even when those days were holidays. Now, time off is accurately calculated to reflect only the employee's actual working days, ensuring correct holiday pay is applied. This improves payroll accuracy for part-time staff.
Original PR description
Currently when a employee has a diferent working schedule than the company's one (part time employee), when he takes time off the computation includes days where he is not working but is an active working day for the company. That is not considering holidays. e.g. -employee works monday to wednesday -company works monday to friday -there is a holiday on the thursday taking monday to wednesday should count 4 days. added holidays support for this case opw-5082080 I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where invoice postings in the Chilean Edition tests were incorrectly interpreting dates due to timezone differences. The fix ensures invoices are processed accurately by freezing test times and setting a fixed invoice date, preventing date rollbacks and improving test reliability.
Original PR description
**Issue:** ```python File "/data/build/enterprise/l10n_cl_edi/models/account_move.py", line 744, in _l10n_cl_edi_post_validation raise UserError( odoo.exceptions.UserError: The stamp date and time…
**Issue:**
```python
File "/data/build/enterprise/l10n_cl_edi/models/account_move.py", line 744, in _l10n_cl_edi_post_validation
raise UserError(
odoo.exceptions.UserError: The stamp date and time cannot be prior to the invoice issue date and time. TIP: check in your user preferences if the timezone is "America/Santiago"
```
**Cause:**
Posting an invoice at early local hours (e.g., 2025-12-11 04:00) is converted by the [Chilean timezone (America/Santiago)](https://github.com/odoo/enterprise/blob/ac3f333d97eda5c86a0813490ac6204d4ec5721f/l10n_cl_edi/models/l10n_cl_edi_util.py#L117-L120) to the previous day (e.g., 2025-12-10 19:30).
**Solution:**
- Freeze the test time at a stable CL-safe hour
- Add a fixed `invoice_date` aligned with the frozen timestamp
Reference : [timezone converter](https://dateful.com/time-zone-converter?t=730pm&d=2025-12-10&tz2=Santiago-Chile)
Runbot error: [234755](https://runbot.odoo.com/odoo/runbot.build.error/234755)
Related PR: https://github.com/odoo/enterprise/pull/99518
Forward-Port-Of: odoo/enterprise#101901This update corrects a technical issue affecting the display of expense reports. Previously, column widths weren't calculating correctly due to lost classnames in the expense report override. This fix ensures accurate column widths are applied, improving the user experience when viewing expense reports.
Original PR description
Before this commit, some classnames set on the list renderer were lost in the expense override. As a consequence, the column width logic couldn't be applied correctly. The widths were computed with a wrong available width (the width of table's parent element, which is the renderer itself). 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
2 changes
Resolved issues and error corrections
This update corrects a bug in the accrual plan calculation, preventing future leave requests from being blocked when remaining leave balances are below the cap. The fix involves a temporary workaround to avoid an infinite loop during calculations, ensuring accurate future leave availability.
Original PR description
Accrual plan for leave days gets blocked, even when the remaining leave balance is below the cap. As a result, no additional leaves are accrued beyond a certain point, even though they should be. #…
Accrual plan for leave days gets blocked, even when the remaining leave balance is below the cap. As a result, no additional leaves are accrued beyond a certain point, even though they should be.
# Steps to reproduce:
Go to time off app
* Create a new leave type.
* Create a new accrual plan with:
- one milestone :
- 2 days accrued per month
- Cap: 10 days
- start accruing 1 days after
- No expiration
- Carry over: All
* Create and validate a leave allocation
- 1 year ago
- new leave type
- new accrual plan
* Take the maximum number of leaves available.
* Advance the computer calendar by 1 year.
* Again, take the maximum number of leaves.
* Advance the computer calendar by another year.
* Try to take a future leave.
-> Issue: It’s not possible to take a future leave, the number of accrued days has stopped increasing. The accrual plan appears blocked.
Objective : The accrual plan should continue to allocate leave days even if leaves have been consumed regularly, as long as the remaining leaves are under the cap.
## Issue
Before going further: the property `leaves_taken` of the `hr.leave.allocation` is supposed to contain the number of leaves this allocation cover until "today".
In the `_test_get_allocation_future_leaves1` added test, in the last line of the test :
`assert_virtual_leaves_equal(self, leave_type_day, 2, self.employee_emp, date='2023-02-01')`
When calling `get_allocation_data` with a `target_date` set in the future, the result is wrong. Here is how it works :
`get_allocation_data`
...
.....`_get_consumed_leaves` (1)
...........`_get_future_leaves_on` (2)
...............`_process_accrual_plans` (3)
....................`_compute_leaves` (4)
.........................`_get_consumed_leaves` (5)
..............................`get_future_leaves_on` (6)
...................................`process_accrual_plans` (7)
**A)** The method **(2)** try to calculate the added number of days each allocation will have on `target_date`. So it creates a copy of the allocation in memory using the 'new' method:
`fake_allocation = self.env['hr.leave.allocation'].with_context(default_date_from=accrual_date).new(origin=self)`
It will then update it to `target_date` using `_process_accrual_plans` and will return the difference of days between the
updated `fake_allocation` and the current allocation (`self`)
**B)** Before iterating over each accrual date, the `_process_accrual_plans` **(3)** will get the `leaves_taken` property which is a computed field. It will trigger `_compute_leaves`.
**C)** The method **(4)** will call `_get_consumed_leaves`, and so the nightmare begins.
**D)** The method **(6)** will create a second `fake_allocation` based on the origin of the first `fake_allocation` (see **A)**).
**E)** This time, `_process_accrual_plans` **(7)** will also look at the `leaves_taken`, but won't trigger the `_compute_leaves` probably because the current allocation is a `fake_allocation` of a `fake_allocation`, and one property of the `new` method is that `Two new records with the same origin record are considered equal.`. Therefore, the `leaves_taken` is considered to be already computed (but it's not).
So `_process_accrual_plans` read the `leaves_taken` which is 0 (probably the default value of `leaves_taken`), but it should be 20 !
**F)** As the value of `leaves_taken` is wrong, the fake_allocation n°2 is also wrong, and its `number_of_day` is 10 but the `number_of_days` of the origin allocation is 20. So `get_future_leaves_on` **(6)** will return -10 which makes no sense, and all the previous calls computations will be wrong. And the final `virtual_remaining_leaves` value will be 0 instead of 2.
## Source of the issue
In the `_process_accrual_plans` method, for each allocation, `leaves_taken` is only computed once at the start of the loop over the allocation "important" dates (see `nextcall` property of `hr.leave.allocation`). At this moment, the method calculates the `leaves_taken` the allocation will have on the `accrual_date` parameter. Yet, this property can change depending on the date the allocation is on (`nextcall` property) which leads to some issues in the computation of the `allocation.number_of_days`.
## Solution
For each allocation, compute the `leaves_taken` at every iteration trough the values of `nextcall`. BUT, this can trigger an infinite loop as computing `leaves_taken` calls `_get_consumed_leaves` which calls `_get_future_leaves_on`, which calls `_process_accrual_plans` ... To avoid this, this PR add the context variable `precomputed_allocations` (will be converted into a function parameter in master) which will prevent `_get_consumed_leaves` from calling `_get_future_leaves_on` for the allocations already up to date (contained by this very `precomputed_allocations` context variable).
**For r+: Needs a few changes at 18.0 (hours per day of employee is retrieved differently for example)**
opw-4934391
opw-5226806This update resolves an error that occurred when generating payslips for employees on weekends, specifically when a public holiday fell on a Saturday. The fix ensures the system correctly verifies the holiday's presence in the employee's schedule before generating the payslip, preventing errors and ensuring accurate payroll calculations.
Original PR description
## Short functional explanation of the error Let's say we have created a public holiday on a Saturday, which is out of an employee's schedule as they work from monday to friday. When trying to create…
## Short functional explanation of the error Let's say we have created a public holiday on a Saturday, which is out of an employee's schedule as they work from monday to friday. When trying to create a payslip for this employee for the month the public holiday occurs, it will show an error. ## Reproduction Steps 1. Create a public holiday on a Saturday. Set the Working Hours to a schedule not including Saturdays. Set the Work Entry Type as Generic Time Off. 2. Click on the Configuration tab > Time Off Types. 3. Create a Time Off type. Set the Requires Allocation field at No Limit, and the Work Entry Type field at Generic Time Off. 4. Click on the Management tab, then Time Off. 5. Click on New. Make sure to select an employee who has the same working schedule as the one you set for the public holiday, and that on their contract, their Work Entry Source is set to Working Schedule. Set the Time Off Type field to the one you just created. 6. Save and click Approve. 7. Go to Payroll. In Contracts, make sure that the employee's contract is running, and that their contract type is Full-Time. 8. Click on the Payslips tab > to pay. 9. Click on New and select the employee for which you just created a time off. ### Expected behavior The payslip is created. ### Unexpected behavior An Odoo Error Occurs. ## Origin of the issue In the code, we don't verify that the holiday is present in the employee schedule before computing the name of the payslip: https://github.com/odoo/enterprise/blob/a7e954dbe4a68b1770341e754101319a89e4de9e/hr_payroll/models/hr_payslip_worked_days.py#L87-L92 We simply check if one holiday exists, which is the case as a public holiday is applied to every employee. Therefore, we need one more check. __ opw-5269302