Tuesday, April 7, 2026
25 changes · saas-19.2
New functionality added to Odoo
This update introduces the ability to export Slovak VAT reports in XML format, aligning with government regulations. This ensures accurate and compliant reporting for our Slovakian clients, simplifying the process of submitting VAT data to the tax authorities. It's a key improvement for meeting Slovakian tax requirements.
Original PR description
Add XML export for the Slovak VAT report, following the official government format Related: https://github.com/odoo/odoo/pull/257528 task-6040973 Forward-Port-Of: odoo/enterprise#112963
Enhancements to existing features
This update simplifies user database access management by adding a dedicated 'databases' tab to the user view. Previously, administrators had to manually search for user database connections. Now, they can quickly view and manage all databases a user has access to, improving efficiency and security.
Original PR description
The aim of this commit is to allow db_manager to see the list of databases in which a specific user has access and to allow removing this access in bulk if required. Before this commit: To see the list of db in which a user has access, a db_manager would have to go to the list view and make a search on the login/name of the user, potentially matching other db_user in the process. After this commit: The list of db is available out of the box in a databases tab on the res.user view. Task-id: 5945298 Forward-Port-Of: odoo/enterprise#112645
Resolved issues and error corrections
This update corrects a discrepancy in the calculation of employment bonuses for Odoo Enterprise users in Belgium. The change reflects the latest regulations from Partena Professional, ensuring accurate bonus payments up to April 2026. This update maintains compliance with Belgian tax laws and avoids potential financial discrepancies.
Original PR description
https://www.partena-professional.be/fr/le-bonus-lemploi-au-1er-avril-2026?utm_source=sfmc&utm_medium=email&utm_campaign=InfoFlash+Daily+Mail+-+FR&utm_content=article-read-more-cta&utm_term=All%20Subscribers&utm_id=81873&sfmcContactKey=litom@odoo.com Forward-Port-Of: odoo/enterprise#112970
This update improves the setup process for printers in our Point of Sale system. A new checklist document has been added to the POS form, guiding users through the necessary steps to enable LNA access for their printers via the browser. This simplifies the configuration and reduces user frustration.
Original PR description
The LNA configuration for printers is complicated for users. To help them this PR will add a check list document inside the point of sale form view which will explain all the steps the clients should do to enable LNA access for their printers in the browser. Task-[5933321](https://www.odoo.com/odoo/project/1737/tasks/5933321) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253461 Forward-Port-Of: odoo/odoo#249226
This update resolves an issue where the XML generated for Swiss payments (iso20022_ch) was using an outdated payment schema. The fix ensures the XML adheres to current Swiss banking standards, specifically the pain.001.001.09 format, and adds necessary validation attributes. This improves payment processing accuracy and compliance.
Original PR description
**PROBLEM** According to documentation (https://www.six-group.com/dam/download/banking-services/standardization/sps/ig-credit-transfer-sps-2025-en.pdf) PstlAdr must be structured. This isn't the case when generating a xml for the payment method iso20022_ch. **STEP TO REPRODUCE** 1. install l10n_ch and account_iso20022. 2. Create a swiss contact with a full address. And activate payment on the bank account of this contact. 3. Select the Company CH, and set a bank account in the bank journal configuration. 4. Create a vendor payment to the swiss contact. 5. Create a batch payment with it, and validate to get the xml. 6. Open the xml, and notice the PstlAdr isn't structured. Ticket [link](https://www.odoo.com/odoo/project.task/5880247) opw-5880247 Forward-Port-Of: odoo/enterprise#112273 Forward-Port-Of: odoo/enterprise#107025
This update fixes an issue where the barcode scanner was incorrectly identifying products based on the user's company settings instead of the current business context. Now, the barcode scanner accurately recognizes products based on their defined nomenclature, ensuring correct product identification and picking processes. This resolves a situation where products weren't found when scanned.
Original PR description
### Issue: The company used in the main barcode menu is the `company_id` of the user rather than the current contextual company of the session. This is problematic as we might endup using the wrong…
### Issue: The company used in the main barcode menu is the `company_id` of the user rather than the current contextual company of the session. This is problematic as we might endup using the wrong barcode nomenclature. ### Steps to reproduce: - Have 2 companies: company 1 and company 2 - Set the barcode nomenclature of company 1: default, company 2: GS1 - Incarnate a user allowed in both companies but with default company 1 - With company 2, create a product and set its barcode to 36939282410106 - From the main menu open the barcode app and scan 0136939282410106 #### > No product was found (even thought it is correct in GS1) ### Cause of the issue: Scanning from the main barcode menu will trigger a call of the `main_menu` method relying on the nomenclature of the contextual company of the request: https://github.com/odoo/enterprise/blob/804ea21c225a7a1e0763bac188f027adeb3ab78f/stock_barcode/static/src/main_menu/main_menu.js#L98-L99 https://github.com/odoo/enterprise/blob/804ea21c225a7a1e0763bac188f027adeb3ab78f/stock_barcode/controllers/stock_barcode.py#L15-L21 However, when opening the main barcode menu from the app menu, no contextual warehouse was set to the view: https://github.com/odoo/enterprise/blob/804ea21c225a7a1e0763bac188f027adeb3ab78f/stock_barcode/views/stock_barcode_views.xml#L6-L11 As such, the environment of the request will be set here: https://github.com/odoo/odoo/blob/9393b0db6791fe5a7f576cff55705e315fb3dd11/odoo/http.py#L2083 based on the company of the user rather than the one of the context: https://github.com/odoo/odoo/blob/9393b0db6791fe5a7f576cff55705e315fb3dd11/odoo/api.py#L694-L722 ### Fix: Setting the company slices the `current_company` in first position of the `allowed_company_ids`: https://github.com/odoo/odoo/blob/260c69ed64f8663b6935b9863c86aac6dbecd961/addons/web/static/src/webclient/switch_company_menu/switch_company_menu.js#L33-L39 https://github.com/odoo/odoo/blob/260c69ed64f8663b6935b9863c86aac6dbecd961/addons/web/static/src/webclient/switch_company_menu/switch_company_menu.js#L68-L81 which can be recovered from the cookies via the `_get_allowed_company_ids`: https://github.com/odoo/enterprise/blob/43f65ff2f3c6177cc69647bbb85bb40a84409457/stock_barcode/controllers/stock_barcode.py#L432-L442 precisely used by the `_get_barcode_nomenclature`: https://github.com/odoo/enterprise/blob/43f65ff2f3c6177cc69647bbb85bb40a84409457/stock_barcode/controllers/stock_barcode.py#L485-L491 Note that passing the context in the arguments of the `main_menu` JSON route will not really solve the issue by it self since the context is no longer shared with the request: c8cd1d4a83de7a5798cbb910a788fbb6fe208d2f ### Additional Issue: The type `dest_location` does not exist on barcode types: https://github.com/odoo/odoo/blob/485a64b6a1e91feb4310f282c6dd1cd021f1780b/addons/barcodes_gs1_nomenclature/models/barcode_rule.py#L16-L20 so that the type used by these lines can not work: https://github.com/odoo/enterprise/blob/1dedc5bbcee43bfd13e55206e3d7364f715ca9be/stock_barcode/controllers/stock_barcode.py#L29-L30 https://github.com/odoo/enterprise/blob/1dedc5bbcee43bfd13e55206e3d7364f715ca9be/stock_barcode/controllers/stock_barcode.py#L52-L56 ### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Set the barcode nomenclature to GS1 - Set your warehouse in receipt in two steps and add a barcode to the WH/Input: 3033710074365 - From the main menu open the barcode app and scan 4133033710074365 #### > No product or picking was found (even thought it is correct in GS1 that should create an internal transfer with WH/INPUT as destination) opw-5847529 Forward-Port-Of: odoo/enterprise#112783 Forward-Port-Of: odoo/enterprise#111662
This update fixes a problem where invoices sent to the Colombian DIAN tax authority would incorrectly be marked as duplicates and rejected. The fix prevents a rollback process when the DIAN GetStatus endpoint fails, ensuring invoices are correctly accepted by DIAN and the system state is accurately updated.
Original PR description
Steps to reproduce:
- Send a Colombian DIAN invoice (SendBillSync flow)
- Simulate a non-200 response from the DIAN GetStatus endpoint during the call of _get_attached_document (see ticket)
Issue:
The invoice is accepted by DIAN but the state is never written. When trying to send the invoice a second time DIAN rejects the invoice as a duplicate (already submitted).
Cause:
`_get_response_history` returns `("", error_msg)` on non-200 status_code and when calling `_get_attached_document`
-> error and rollback and `invoice_accepted` is not written correctly
opw-5919395
Forward-Port-Of: odoo/enterprise#111349
Forward-Port-Of: odoo/enterprise#111186This update resolves a potential issue where the Autopay feature incorrectly assigned bank accounts. The change adds a check for valid account numbers before assigning sanitized account numbers, ensuring accurate and reliable Autopay setup. This improves the stability and accuracy of the HK Autopay integration.
Original PR description
. Add account_number check before assign sanitized_account_number task-6049640
This update corrects a restriction on a key field used in Belgian payroll reporting, allowing proper access to necessary data. Previously, access was limited, causing errors when retrieving payroll information. This change ensures accurate reporting and functionality for users in the l10n_be_hr_payroll module.
Original PR description
onss_expeditor_number is used to fetch dimonas and other operations on hr.version, leading to access errors since this field is restricted to base.group_system This commit changes the access rights on the field from `base.group_system` to `hr_payroll.group_hr_payroll_user` task-6094854
This update addresses an issue where the Master Production Schedule (MPS) wasn't correctly accounting for safety stock levels, leading to inaccurate demand forecasts for dependent components. The fix ensures that safety stock is considered when calculating indirect demand, resulting in more reliable production planning and reduced stockouts. This improves the accuracy of the MPS and optimizes inventory levels.
Original PR description
Steps to reproduce: ------------------- * Enable "Master Production Schedule" in Inventory settings * Create tracked Product "Child" and set up a vendor * Create tracked Product "Parent" and set up a…
Steps to reproduce: ------------------- * Enable "Master Production Schedule" in Inventory settings * Create tracked Product "Child" and set up a vendor * Create tracked Product "Parent" and set up a bom as component "Child" and Lead Time: 2 days * Create tracked Product "GParent" and set up a bom as component "Parent" and Lead Time: 2 days * Open MPS and add your three products: - Child, Parent: activate indirect demand - Parent: Safety Stock Target of 10 * Add 1 in the forecast demand for "Gparent" on third column -> Will have 20 Indirect Demand Forecast of Child in the first column and -9 on the second Observation: ------------- Usefull comment form the function : https://github.com/odoo/enterprise/blob/b332af45a46b2295797a5096f68b7953554a495b/mrp_mps/models/mrp_mps.py#L424-L447 When creating a demand from the MPS, it will always take the first date of the interval (ex: Week 10 (2-8/Mar), it will create the demand for the 2 of Mars) When calculating the production schedule. we wil we calculate each product for each date_range: https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L488 https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L509 When calculating the values for a product, we will set the indirect demand qty for it component The demand will created the demand in function of the date of when the parent need and the lead time (it will for the previous date range because of the lead time): https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L554 https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L555 If the demand is not equal to the resplensih_qty we will create another demand to compensate, it will use the first date of range minus the lead time it will send it to the previous date range: https://github.com/odoo/enterprise/blob/ea805995f66e007c0aef6b473a2b16dbe54d73bc/mrp_mps/models/mrp_mps.py#L556-L560 In our case this will create the issue, since it will try to compensate each time on the previous week. opw-5413838 Forward-Port-Of: odoo/enterprise#112811 Forward-Port-Of: odoo/enterprise#107671
This update resolves an issue where intercompany purchase orders weren't correctly transferring product variant information, leading to missing components in manufacturing orders. The fix ensures that variant data is properly retrieved from the purchase order, enabling accurate production scheduling within the intercompany process. This improves the reliability of intercompany transactions.
Original PR description
In a multicompany setting, when buying product with intercompany rule, the never variant attribute was lost. Steps to reproduce: ------------------- * Enable intercompany transaction * Enable variant…
In a multicompany setting, when buying product with intercompany rule, the never variant attribute was lost.
Steps to reproduce:
-------------------
* Enable intercompany transaction
* Enable variant grid entry
* Enable multistep routes
* Unarchive MTO
* Settings>Users & Companies>Companies
* Enable Generate Sales Orders in company A
* Create a product:
- Never variant with at least two values
- MTO and manufacture
* Create a bom,
- Company : company B
- Add a component with apply on variant: choose one of the variants
* Create and confirm a purchase order, for a never variant of the product, in company A with vendor as company B
* Confirm the sales order in company B
-> The manufacture order does not include the components that are applied on variant
Observation:
-------------
When creating a sale order for an intercompany rule, button_approve is overwritten and it calls the function "inter_company_create_sale_order.
That function will create the sale order from the data of the purchase order:
https://github.com/odoo/enterprise/blob/273528ba462f2f2b5768bf29dbdb697713a8e619/sale_purchase_inter_company_rules/models/purchase_order.py#L63-L64
When preparing the value for each order line, the attribute value for the never variant will not be retrieved:
https://github.com/odoo/enterprise/blob/273528ba462f2f2b5768bf29dbdb697713a8e619/sale_purchase_inter_company_rules/models/purchase_order.py#L63-L64
Since the attribute value is lost, it will not be retrived by the mto since it should get the value from the PO.
opw-5438723
Forward-Port-Of: odoo/enterprise#107122This update corrects a calculation error within the Belgian HR contract salary module that was impacting the accurate reporting of yearly cost sacrifices. The fix ensures that the system now correctly calculates this key financial metric, improving the reliability of HR reporting. This change primarily affects payroll and financial reporting processes.
Original PR description
Forward-Port-Of: odoo/enterprise#112723
This update corrects a bug that caused the 'Replace by Attendance' button to fail when multiple attendance work entries of the same type were created. The fix eliminates duplicate entries from a data processing step, preventing the application from crashing and ensuring the button functionality works correctly.
Original PR description
### Steps to reproduce: - Download Payroll app - From the top bar 'Employees' > 'Employees', create a new employee - From the top bar 'Work Entries' > 'Work Entries', add 2 Attendance work entries on…
### Steps to reproduce: - Download Payroll app - From the top bar 'Employees' > 'Employees', create a new employee - From the top bar 'Work Entries' > 'Work Entries', add 2 Attendance work entries on different days, with different creation days (either wait 24h between creations, or adjust one create_date in DB) - Click on any empty cell, you'll find the "Replace by Attendance" smart button replicated > If you activate debug mode and click on any cell > **UncaughtPromiseError > OwlError** ### Cause of issue: https://github.com/odoo/enterprise/blob/482b4564b3a81e914d6eead9a7b85a23b7cac3dc/hr_work_entry_enterprise/static/src/work_entries_gantt_model.js#L110-L138 `formattedReadGroup` is called with both `work_entry_type_id` and `create_date:day`. If the user has created several work entries of the same type on different days, we would get multiple group results having the same `work_entry_type_id`. These duplicated records later produce an Owl crash because the button list uses `t-key="workEntry.id"`. https://github.com/odoo/odoo/blob/72be98d705e225f663b65e289e11d0b8642ec6f8/addons/hr_work_entry/static/src/views/work_entry_calendar/work_entry_multi_selection_buttons.xml#L16-L17 ### Fix: Since the goal of the above method is to extract the favorite work entries to later use in smart buttons and `userFavoritesWorkEntriesIds.map((r) => r.work_entry_type_id?.[0]).filter(Boolean)` extracts all the entries' `work_entry_type_id` (including duplicates), the easiest way to get rid of these duplicates is to create a `Set`. opw-5953671 Forward-Port-Of: odoo/enterprise#109986 Forward-Port-Of: odoo/enterprise#109823
This update fixes an issue where tracking references weren't consistently passed through multi-step delivery processes. Now, when 'Propagate carrier' is enabled on a delivery rule, the tracking reference will automatically update to the next picking, ensuring better shipment visibility and traceability for sales orders. This enhancement improves order tracking accuracy and efficiency.
Original PR description
Steps to reproduce:
- Enable multi-step routes in Inventory settings
- Go to Warehouse Management → Operation Types
- Set Delivery to 3 steps
- Open the 3-step delivery routes and enable “Propagate carrier” on any rule
- Create a storable product P1
- Create a sales order with 1 unit of P1
- Confirm the sales order
- Open the generated picking
- Go to the Additional Info tab
- Set Tracking Reference = 123
- Confirm the picking
- Open the next picking (Pack operation)
Problem:
The tracking reference is not propagated to the next picking, even though the rule has “Propagate carrier” enabled.
Expected behavior:
The tracking reference should be propagated to the subsequent picking when carrier propagation is enabled on the rule. Even if no carrier set.
opw-6052930
Forward-Port-Of: odoo/odoo#256851This update resolves an issue impacting website performance by optimizing how product categories are checked for published products. The previous method caused excessive database queries, but this fix restores efficient performance and ensures faster website loading times. This change improves the overall user experience.
Original PR description
`has_published_products` was previously computed recursively. For recursive fields, the ORM disables prefetch optimizations. In 3ffca1961cb1671e7028dd4dceca82d2e74a2e21, the computation switched to…
`has_published_products` was previously computed recursively. For recursive fields, the ORM disables prefetch optimizations.
In 3ffca1961cb1671e7028dd4dceca82d2e74a2e21, the computation switched to `_read_group` to avoid loading all published products into cache and prevent memory issues. However, this introduced an N+1 pattern when evaluating:
```python
categories.filtered(lambda categ: categ.has_published_products)
```
As a result, query count became dependent on the number of active categories, which broke SQL performance tests when demo data were installed.
This commit updates the computation again to avoid recursion and restore ORM prefetch optimizations, making the number of queries independent of the number of active categories.
This commit also removes redundant checks already enforced by ORM `ir.rule`. For example, the following pattern evaluates `has_published_products` three times: once in the user domain, once in the access rule domain added by `search`, and once in the filter.
```python
domain = [("has_published_products", "=", True)]
categs = self.env["product.public.category"].search(domain)
categs.filtered("has_published_products")
```
runbot-234948
Forward-Port-Of: odoo/odoo#257071
Forward-Port-Of: odoo/odoo#256415This update corrects a bug where the system automatically adjusted dates on Czech tax documents that had already been processed. This was causing issues with accurate reporting related to late tax deductions, a common requirement in the Czech Republic. Now, users must manually adjust dates for posted documents to ensure correct accounting.
Original PR description
Description of the issue/feature this PR addresses: This automatic date alignment make sense in case of new document, but when you work on document that was posted. User should change it manually. In Czech republic we have something like late tax deduction and in this case there is not alignment of dates. Current behavior before PR: When you change taxable_supply_date it automatically change date Desired behavior after PR is merged: Disable this calculation od moves that hase been posted. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257135
This update fixes an issue where a second resupply picking was being created when adding a component to a subcontracting order. The fix ensures that new components are correctly grouped with existing pickings, streamlining the inventory management process for subcontracted manufacturing. This prevents unnecessary stock movements and improves order accuracy.
Original PR description
Steps to reproduce: 1- Install Inventory, Purchase and Manufacturing 2- Enable 'multi-step routes' in the settings 3- Create Product A and create a Bill of Materials (BoM type: subcontracting,…
Steps to reproduce: 1- Install Inventory, Purchase and Manufacturing 2- Enable 'multi-step routes' in the settings 3- Create Product A and create a Bill of Materials (BoM type: subcontracting, Component A) 4- Repeat the same for Products [B,C] with components [B,C] correspondingly. 5- Assign the same subcontractor to all of them 6- Create a Purchase Order for both Product A and Product B with vendor as the subcontractor and confirm it 7- Add a new order line with Product C and save Description of issue: A second resupply picking is created Expected behavior: Should group the new product's component with the existing picking Why this happens: When assigning the resupply picking for the new product's component, the search domain for the existing picking includes production_group_id, which is different for the added product. This prevents merging of components into a single resupply picking despite sharing the same destination and purchase order Fix: We ignore production_group_id since it is not necessary in the resupply stock moves domain. opw-5906451 Forward-Port-Of: odoo/odoo#251713
This update fixes an issue where the cost of a sale order wasn't accurately calculated when using the dropshipping feature. The fix ensures that the cost reflects the purchase order price (e.g., $10) for dropshipped products, resolving a discrepancy where the cost was incorrectly displayed as $0. This improves the accuracy of financial reporting.
Original PR description
**Problem:** The cost is not correctly computed on sale order line when the product is dropshipped. **Steps to reproduce:** - enable "margins" and "dropshipping" settings - create a tracked, fifo…
**Problem:** The cost is not correctly computed on sale order line when the product is dropshipped. **Steps to reproduce:** - enable "margins" and "dropshipping" settings - create a tracked, fifo product with dropship route - add a vendor in the purchase tab - confirm a sale order for 1 unit - set a unit price of 10 in the PO and confirm it - validate the dropship picking - come back to the sale order and unhide de cost column **Current behavior:** the cost is 0 **Expected behavior:** the cost should be 10 based on the unit price of the PO **Cause of the issue:** To compute the purchase price, when there is valued moves linked to the sale order line and the product is fifo/avco, we call _get_price_unit() on the moves. https://github.com/odoo/odoo/blob/98e6e929bf8e0c34ec77fb9d07ef253e0abf681c/addons/sale_stock_margin/models/sale_order_line.py#L21 Which uses the value of the moves https://github.com/odoo/odoo/blob/98e6e929bf8e0c34ec77fb9d07ef253e0abf681c/addons/stock_account/models/stock_move.py#L237-L243 But for dropshipped move the value on the moves is always 0. So the return value will be 0 and purchase price will be 0. **fix:** - The idea of the fix is to use _get_value() instead of the move value for dropship moves. This approach is already used in the code inside _run_average_batch() https://github.com/odoo/odoo/blob/98e6e929bf8e0c34ec77fb9d07ef253e0abf681c/addons/stock_account/models/product.py#L474-L475 - In case there is not only dropship moves we need to do a weighted average opw-6051004 Forward-Port-Of: odoo/odoo#256089
This update resolves a bug where adding captions to images with a 'display:block' style incorrectly removed surrounding text blocks. The fix ensures captions are added and displayed correctly, preventing multiple captions from being added to the same image and improving the overall image editing experience.
Original PR description
Steps to reproduce: - Go to To-do - Open a demo record (e.g., "Welcome Mitchell Admin") - Click on an image - Click on "Caption" from the toolbar - Click on the image again Description of the issue:…
Steps to reproduce: - Go to To-do - Open a demo record (e.g., "Welcome Mitchell Admin") - Click on an image - Click on "Caption" from the toolbar - Click on the image again Description of the issue: - When adding a caption, the parent paragraph block of sibling nodes is removed, making them direct children of the editable area. - After adding a caption, reopening the powerbox does not show the caption button as active, allowing multiple captions to be added on the same image. Cause: - When the image has `display:block`, `closestBlock` returns the image itself as its closest block. - As a result, when a caption is added to an image, its parent paragraph block is not split around the image even if the image has sibling nodes, and when `unwrapContents` is called, both the image and its siblings get unwrapped, making them direct children of the editable area. - Since `closestBlock` is the image (and not a `<figure>`), the caption button in the toolbar is not marked as active even when a caption already exists, so clicking it again adds another caption instead of removing the existing one. Solution: - Instead of using the image's `closestBlock` directly, find the `closestBlock` of its parent element. - This ensures the correct block is found even when the image has `display:block`. task-6051549 Forward-Port-Of: odoo/odoo#256436 Forward-Port-Of: odoo/odoo#255064
This update fixes a vulnerability in the email marketing editor where users could inadvertently create checklists using a shorthand command. The change prevents pasting checklist content, ensuring that checklist creation is fully disabled as intended and improving email marketing security.
Original PR description
In email marketing, checklist creation is disabled via powerbox, toolbar, and shortcut (Ctrl+Shift+9), but it can still be created using the shorthand command ('[] ').
Disable the checklist shorthand command to ensure checklist creation is fully restricted in email marketing.
task-6048027
Forward-Port-Of: odoo/odoo#257143
Forward-Port-Of: odoo/odoo#254816This update resolves an issue where leave scheduling calculations were incorrectly skipping employee availability, leading to potential scheduling conflicts. The fix ensures that all employee work intervals are considered when determining the earliest available time for leave, resulting in more accurate and reliable leave scheduling. This improves the overall accuracy of the HR system.
Original PR description
Before this commit, in `_get_first_working_interval_batch` the `collect_employees` helper only inspected the first item of each employee's work interval. The batch calendar query starts from the global `min_dt` which is the earliest leave end across all employees in the batch. For an employee whose leave ends later, the first returned interval can therefore still fall before that employee's own threshold (`min_dts[employee_id]`). The old code would discard that interval and, since it never examined subsequent ones, silently skip the employee with no result. This commit fixes the issue by replacing the single-item check with a loop that iterates over all of the employee's intervals and picks the first start time strictly after `min_dts[employee_id]`. Forward-Port-Of: odoo/odoo#257310
This update fixes a potential inconsistency issue in the Point of Sale (POS) system. Previously, users could modify tax settings while a POS session was open, leading to discrepancies between receipts and invoices. Now, a safeguard prevents these changes, ensuring accurate financial reporting.
Original PR description
There is a safeguard in account.tax.write prevents modifying taxes as it is forbidden to modify a tax used in a POS order not posted. This guard only applies for a predefined set of fields in…
There is a safeguard in account.tax.write prevents modifying taxes as it is forbidden to modify a tax used in a POS order not posted. This guard only applies for a predefined set of fields in account_tax.py. After 18.0, the tax-included behavior is controlled through the `price_include_override` field instead of `price_include`. However, this field was not added in the forbidden fields, allowing users to modify tax inclusion while a POS session is open. This bypasses the safeguard and can lead to inconsistencies, as the POS caches tax configuration at session start. For example, changing this setting mid-session may differences between POS receipts and backend invoices. By adding `price_include_override` to the forbidden fields, the UserError can properly be raised. Additional note: test_fiscal_position_between_frontend_and_backend was updated to close the POS session before changing taxes since the safeguard now correctly blocks this. Related ticket: opw-6042367 Forward-Port-Of: odoo/odoo#257035 Forward-Port-Of: odoo/odoo#254487
This update fixes an issue where Chrome logs weren't reliably captured during shutdown, particularly when errors occurred. The changes also address Chrome's log buffering behavior and add resilience to Chrome shutdown attempts, ensuring more complete and accurate log data for troubleshooting.
Original PR description
odoo/odoo#255054 saved the chrome log at the end of a tour (logging that as `INFO` on success and `RUNBOT` on failure). However as it turns out there are a few issues with that: 1. In case of chrome error during termination (`stop`), those errors can not be in the log, since the log was already saved. 2. Chrome buffers logs a lot more than anticipated, and because `--v=0` logs are a lot less chatty than `--v=1` the logs routinely show essentially nothing (a few tour steps are logged then nothing). Also make `stop` a bit more resilient to chrome issues: - handle errors around ws shutdown - wait for chrome to shut down before we try to remove the data directory - also add a fallback *killing* chrome if it doesn't seem to be shutting down Forward-Port-Of: odoo/odoo#256656 Forward-Port-Of: odoo/odoo#256061
This update resolves a bug where the bold formatting action wasn't consistently removing bolding from selected text, particularly when `/file` components were present. The fix ensures that bolding is correctly applied or removed based on editable text nodes, improving the functionality of the HTML editor.
Original PR description
When determining whether the "bold" action is about adding bold or removing bold, non-editable text nodes are also taken into account. Because of this, if the selection contains an embedded component such as `/file`, it always considers bold was not applied on all nodes, and should therefore be applied. The action thus never removes bold. This commit fixes this by only taking into account the editable nodes. Steps to reproduce: - Go to a "To do" note - Add a few lines of text - Add a `/file` in the middle - Select all - Press Ctrl+B: bold is applied on the surrounding text - Press Ctrl+B again => Bold was not removed from the surrounding text task-5955977 Forward-Port-Of: odoo/odoo#257550 Forward-Port-Of: odoo/odoo#249816
This update fixes an issue where a browser tab change while the product configurator dialog is open would reset sales orders to their previous state. Now, changes made within the dialog are correctly saved, ensuring data integrity when switching between tabs. This improves the user experience for complex product configurations.
Original PR description
## Versions 18.0+ ## Issue When the product configurator dialog is open, a browser tab change acts like a discard on the SOL: coming back to the Odoo tab displays the dialog but the SOL has been…
## Versions
18.0+
## Issue
When the product configurator dialog is open, a browser tab change acts like a discard on the SOL: coming back to the Odoo tab displays the dialog but the SOL has been reverted to its previous state.
## Steps to reproduce
- Create a new SO for any customer:
- Add a standard (non-combo/non-variant) product (e.g. "Apple Pie");
- Save manually;
- Change the product for a combo or variant one (e.g. "Customizable Desk");
- With the opened dialog, change from browser tab then come back;
- The SOL has been reset to the standard product ("Apple Pie") and confirming the dialog has no effect).
## Cause
The `beforeVisibilityChange` hook is triggered by the tab change and saves the form without updated values. This is because the hook checks for two conditions to be true: https://github.com/odoo/odoo/blob/2f00b0085574653ca1a8f734ef91893a4a1c1a7c/addons/web/static/src/views/form/form_controller.js#L479-L483 The tab change indeed changes the document's visibility to "hidden" but the controller has never been updated with the form's display in the dialog and, therefore, `this.formInDialog` is indeed equal to zero.
## Test
No test as we cannot simulate a browser tab change then come back to the first tab.
opw-5494089
Forward-Port-Of: odoo/odoo#257846
Forward-Port-Of: odoo/odoo#247797