Daily updates from Odoo
Monday, May 18, 2026
39 changes · saas-19.2
Resolved issues and error corrections
This update resolves an issue where allocated leave time wasn't correctly displayed in the Time Off Request wizard when duplicate leave types were created. The fix ensures that each leave type's allocation data is accurately retrieved, regardless of shared names, preventing incorrect leave calculations.
Original PR description
Pre-requisite: --------------------------------------- 1. Install the Time Off module 2. Create a new company (e.g, Test Company) 3. Create New Timeoff Type: * Ensure a default company is set (e.g,…
Pre-requisite:
---------------------------------------
1. Install the Time Off module
2. Create a new company (e.g, Test Company)
3. Create New Timeoff Type:
* Ensure a default company is set (e.g, YourCompany)
4. Duplicate the created Time off type:
* Remove (Copy) from the name so both records share the same name
* Clear the Company field on the duplicated record
Steps to reproduce:
---------------------------------------
1. Go to Time Off type which has no Company
2. Allocation Smart button > New
3. Set allocation for some days (e. g, 10 Days) > Approve allocation
4. Now, click on Employee > Time Off smart button
5. On the Dashboard, you can see allocated leaves
6. Click on any day to create a Time Off Request
Observation:
---------------------------------------
The allocated Time Off Type is not available in the request wizard, even though allocation exists.
Issue:
---------------------------------------
When natively computing allocation statistics for the UI, the `_compute_leaves` loops through a pre-fetched `data_days` structure and incorrectly extracts the calculation metrics by matching the `holiday_status.name` string via a list comprehension lookup index (`item[0]`).
https://github.com/odoo/odoo/blob/73d73c5c6606e0b34c754bfc4de035840951dd3b/addons/hr_holidays/models/hr_leave_type.py#L288-L294
If Time Off Type A and Time Off Type B share the name 'Generic Leave', the list comprehension evaluates sequentially and forcefully maps the dictionary of whichever version structurally sits first in the memory sequence directly onto both overlapping identifiers simultaneously!
Solution:
---------------------------------------
Directly match records using their unique ID.
This ensures that each database record always retrieves its own correct data, preventing any mix-up or accidental sharing of values between records that may have the same name.
opw-6105759
Forward-Port-Of: odoo/odoo#264104
Forward-Port-Of: odoo/odoo#261680This update simplifies the process of retrieving transactions from Codabox. Previously, users needed write access to the company record, which wasn't necessary after the initial connection was established. This change streamlines the process and improves efficiency.
Original PR description
Currently, we use the `_l10n_be_codabox_verify_prerequisites` method before trying to fetch transactions. This method checks if the user has write access rights on res.company model which should not be mandatory to fetch transactions from codabox when the connexion is already created. opw-6108811 Forward-Port-Of: odoo/enterprise#117097
This update fixes an issue where the product carousel displayed fewer than 16 products when a product had over 256 variants. The previous fix was a workaround that increased search limits. Now, the system correctly handles products with a large number of variants, ensuring a complete and accurate product carousel display. This improves the user experience for browsing products with many options.
Original PR description
# How to reproduce - Create a Product with more than 256 variants - Publish it to the website - Go to the website and add a Product Carousel - Set it to display newest products & hide variants # The…
# How to reproduce - Create a Product with more than 256 variants - Publish it to the website - Go to the website and add a Product Carousel - Set it to display newest products & hide variants # The problem Fewer than 16 products are displayed # Cause This issue was already adressed by this commit : https://github.com/odoo/odoo/pull/195857 But because of limitations for specifically the "Newest Products" filter (cf. original commit message), the fix was only a workaround. Indeed, it increased the search limit to 256 before filtering out the variants, which caused problems when there was more than 256 variants. But since then, big changes made in 19.0 has allowed us to implement a better fix : https://github.com/odoo/odoo/commit/e3b062e5d3820 # Proposed Solution Since we can now pass the model in the options : https://github.com/odoo/odoo/blob/b5069328734e623c12b0de50a177d501f7f0c995/addons/website/models/website_snippet_filter.py#L90 We give "product.template" when the `hide_variants` option is enabled and we filter on products. This allows use to remove the whole workaround that needed increase the limit on product searchs then getting their templates. A recent commit blocks passing "product.template" since it does not have a dedicated snippet filter : https://github.com/odoo/odoo/pull/257208/changes/8e264ae4ea6ae16bbd410ac384733ff8759938a6 But in the commit message, they mention that this targets snippet in single-record mode, which is not our case. So, we move the logic to only be applied for single-record filters opw-6054059 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260340
This update corrects a bug where a new paragraph created after splitting a styled heading would inherit the heading's formatting (like color). The fix ensures that newly created paragraphs are empty and without inherited styles, aligning with the expected behavior. This improves the consistency and predictability of the HTML editor.
Original PR description
Problem: Pressing Enter at the end of a styled heading (e.g., with a color) creates a new paragraph that inherits the heading styles. This is no longer the expected behavior. The new paragraph should be empty and without inherited styles. Solution: When splitting a heading at its boundaries and creating a base container, fill it with a `br` instead of carrying over styles. Steps to reproduce: - Add a heading. - Apply a style (e.g., color). - Place the caret at the end of the heading. - Press Enter. - Observe that the new paragraph still has the heading color. task-6147897 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264624 Forward-Port-Of: odoo/odoo#262150
This fix resolves an issue where generating closing entries in the Inventory Valuation view incorrectly calculated values when multiple companies were selected. The update ensures that the generated account move lines accurately reflect the inventory valuation based on the selected main company, preventing mismatched balances.
Original PR description
**Problem:** In view Inventory valuation, generate entry doesn't work when multiple companies are selected. In the view only the main company matters. That means that even if multiple companies are…
**Problem:** In view Inventory valuation, generate entry doesn't work when multiple companies are selected. In the view only the main company matters. That means that even if multiple companies are selected, only the stock variation lines related to the main company selected are displayed (which is expected). But if you then click on 'generate entry' the account move lines created will have wrong values (not matching the values appearing in the view) **Steps to reproduce:** - create 2 new companies (to have clean accounting) - create a warehouse for both companies - for both comp, in settings for the 'fiscal localization' set Package : Generic Chart of account, if not already set (to have account journals). From company 1 : - create a storable prod with avco perpetual category - confirm PO for 2 @ 10, receive - bill only 1 @ 10 From company 2: - make sure the category is also perpetual average from this other company - confirm PO for 2 @ 50, receive, don't bill Notice how from the 'Inventory Valuation' view, rightfully, only the main company matters (no matter what other comp are selected): - If main comp is comp 1 there is stock variation lines for amount of 10 (which is expected because we have 20 in stock and only 10 in stock valuation account) - If main comp is comp 2 there is stock variation lines for amount of 100 (which is expected because we have 100 in stock and only 0 in stock valuation account) With comp 1 and 2 selected and comp 1 as main company: - click on 'Generate Entry' **Current behavior:** - both line have a balance of 110 **Expected behavior:** - they should have a balance of 10 as we saw on the 'inventory valuation' view **Cause of the issue:** To generate the data from the 'inventory valuation' view, inside _get_report_data() we call stock_value() and stock_accounting_value() to compare values from inventory and value from accounting. https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/report/stock_valuation_report.py#L36-L37 stock_value() sums total_value() of each product in the valued accounts https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L90-L94 Whereas stock_acounting_value(), sums the balance of each account move line of each valuation account https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L112-L114 All of this is related to the main company because we call _get_report_data() with context 'allowed_company_ids' set to only the main company https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/report/stock_valuation_report.py#L13 But when we click on generate entry, _get_stock_valuation_account_vals() is called with no context modification to 'allowed_company_ids' so when we call stock_value(), https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L238-L239 total_value will be based on both company https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L92 Note that stock_accounting_value() is still rightfully based only on main company because we use self.id in the domain https://github.com/odoo/odoo/blob/dd84309df7fd39e9e97ed02d135d25b211085135/addons/stock_account/models/res_company.py#L105-L108 opw-6168699 Forward-Port-Of: odoo/odoo#263946 Forward-Port-Of: odoo/odoo#262776
This update fixes an issue where the FEC file parser would fail when encountering empty lines. The change now automatically skips these empty lines, ensuring that all valid FEC files are processed correctly and preventing potential data loss. This improves the reliability of the French localization import process.
Original PR description
It could happens that we have some empty lines in the fec files, the parser was returning an error when that happened. We still want to process the file so we will just skip the empty lines. task-6169168 Forward-Port-Of: odoo/enterprise#115758
This update corrects a bug in the French Intrastat export process. Previously, supplementary unit data for products with CN codes wasn't being correctly included in the DEBWEB2 XML file. This fix ensures accurate reporting of product quantities for Intrastat purposes, preventing potential reporting discrepancies.
Original PR description
Steps to reproduce 1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set…
Steps to reproduce
1. In a French company with Intrastat enabled, set up a product whose commodity code has a CN supplementary unit (e.g. 8802 30 00, "p/st") and set `intrastat_supplementary_unit_amount` on it.
2. Post EU customer invoices for that product.
3. Export the DEBWEB2 XML from the Intrastat report.
Issue
The FR export collapses engine rows a second time in `_group_items`, because the DEBWEB2 format groups more aggressively than the SQL. The aggregator only declares `value` and `weight`: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/models/account_intrastat_report.py#L308-L313 Items are then rebuilt as `dict(zip(grouping_key, key_tuple)) | grouped_item_values`. `SU_code` survives (it is in the grouping key), but the numeric `supplementary_units` is in neither side and is silently dropped as soon as two engine rows merge. The template then skips the element because of its `t-if="item.get('supplementary_units')"` guard: https://github.com/odoo/enterprise/blob/6ae5d3df6e9305416e4d6f74259cd01753025f42/l10n_fr_intrastat/data/intrastat_export.xml#L61
opw-6139657
Forward-Port-Of: odoo/enterprise#117357
Forward-Port-Of: odoo/enterprise#117033A flaky test in the Live Chat module has been resolved. The issue stemmed from a race condition during agent joining, causing inconsistent test results. This update simplifies the test to ensure reliable execution and maintain coverage.
Original PR description
The `show looking for help duration in the sidebar` test has been flaky since [1]. The root cause is that the agent joins at the final step, resetting the state to in_progress, then immediately…
The `show looking for help duration in the sidebar` test has been flaky since [1]. The root cause is that the agent joins at the final step, resetting the state to in_progress, then immediately switches it back to `looking_for_help`. This creates several race conditions: - Bus notifications from `join_livechat_need_help`, new message events, and any other notification carrying stale state data. - Channel state fetched after the user joins via `/mail/data`. The mock server makes these races hard to guard against: notifications arrive one by one, and there's no UI signal that guarantees all stale data has been processed. This commit splits the test to preserve coverage while avoiding the problematic rapid state transition. runbot-242278 [1]: https://github.com/odoo/odoo/pull/252738 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264666
This update resolves an issue preventing Envia deliveries in Chile. The problem stemmed from a mismatch between Odoo's state code representation and Envia's API requirements. A recent update to Chile's official state codes was not reflected in the system's mapping, causing delivery errors. This fix ensures accurate address data is sent to Envia, enabling successful deliveries.
Original PR description
### Steps to reproduce: - Install delivery_envia - Website > Configuration > eCommerce > Delivery Methods > Envia - Enable the delivery method, sync the carrier and Publish it - With a portal user >…
### Steps to reproduce:
- Install delivery_envia
- Website > Configuration > eCommerce > Delivery Methods > Envia
- Enable the delivery method, sync the carrier and Publish it
- With a portal user > Shop > Add any product to your cart > Checkout
- Register an address a valid 'Chile' address and confirm say:
'street and Number': Avenida Providencia 1432, Depto 402
'city': Santiago 'zip': 8320000
'country': Chile 'state': Metropolitana
#### > Envia Error: Invalid Option - String is too long at #->properties:destination
### Cause of the issue:
The problem is caused by the fact that Envia's api expects a 2-3 digits to represent state codes: https://docs.envia.com/reference/state-by-code
The mapping from Odoo's code state representation to envia's one is expected ot be performed by this mapping:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L27-L43 when the address is converted here:
https://github.com/odoo/enterprise/blob/75cba6d5a88ebc4e0f35040a173ac1c443638daf/delivery_envia/models/envia_request.py#L535-L542 That being said, the `Chile`'s code states of have been changed in [6694a3942c58ff1a56c9e4b36edbe126dd1e66f8](https://github.com/odoo/odoo/commit/6694a3942c58ff1a56c9e4b36edbe126dd1e66f8) to match the official Iso but not in the Envia's mapping leading a failling match keeping the 4 charracter long `CL-RM` of the `Metropolitan` state provided in to the Envia's api as address data.
opw-6210007
Forward-Port-Of: odoo/enterprise#117280A recent change in the Odoo system caused the remaining time estimates for sales projects linked to sales orders to disappear from the task display. This update restores the necessary context to accurately show the remaining time, ensuring sales teams have the correct information. The fix addresses a minor visual inconsistency.
Original PR description
Steps to Reproduce: - Open any project linked with a sales order - Open task and click on Sale Oder Item dropdown. Issue: - You can see that SOL's with time remaining don't show the amount of time left Reason: - In this PR https://github.com/odoo/odoo/pull/193079 a record (view_task_form2_inherit_sale_timesheet) has been removed. - So the context key `with_remaining_hours` required to show remaining time is missing. Fix: - Add the record back which updates context task-6170953 Forward-Port-Of: odoo/odoo#262746
This update resolves a crash that occurred when users switched to edit mode while an event registration modal was open. The fix ensures the modal is properly cleaned up after the transition, preventing errors related to accessing the modal's style properties. This improves stability and prevents unexpected application behavior.
Original PR description
Steps to reproduce: =================== 1. Go to Event, open an event page 2. Click "Register" & Select a ticket and confirm 3. Switch to edit mode => crash. Cause: ====== The cleanup callback called…
Steps to reproduce: =================== 1. Go to Event, open an event page 2. Click "Register" & Select a ticket and confirm 3. Switch to edit mode => crash. Cause: ====== The cleanup callback called `hide()` followed immediately by `dispose()`. Bootstrap's `hide()` is asynchronous — it registers a `transitionend` callback that fires `_hideModal()` after the CSS transition. `dispose()` nullifies `this._element` synchronously via `BaseComponent`, so when the `transitionend` fires and `_hideModal()` tries to access `this._element.style`, it crashes with: TypeError: Cannot read properties of null (reading 'style') This happened when switching to edit mode while the event registration modal was open: the `public.interactions` service stopped the interaction, triggering the cleanup. Solution: ========= Listen for `hidden.bs.modal` (fired at the end of `_hideModal`) and only `dispose()` inside that handler, ensuring `_element` is still valid throughout the transition. task-6133395 Forward-Port-Of: odoo/odoo#264365
This update corrects a calculation error related to non-investment savings schemes (NISS) for employees in Belgium. The change ensures that NISS contributions are accurately reflected in payroll calculations for Belgian businesses using the Enterprise module. This improves the accuracy of financial reporting and compliance for our Belgian clients.
This update corrects a display issue with the Folder report layout in Odoo when using Right-to-Left (RTL) languages like Arabic. The change adjusts the image styling to ensure proper rendering, preventing the header title from appearing broken. This ensures reports are consistently readable for all users, regardless of their language settings.
Original PR description
Steps: - Enable rtlcss - Install an RTL language (e.g Arabic or change english direction to rtl) - Enable RTL language - Go to settings - Configure report layout document - Select Folder type - Try to print an invoice - The header title style is broken the svg image used in the title should be mirrored to be displayed correctly on RTL opw-6140277 Forward-Port-Of: odoo/odoo#263115 Forward-Port-Of: odoo/odoo#262830
This update resolves a confusing issue where discount codes couldn't be re-applied after being discarded. Now, users can successfully re-apply codes even if no reward line was initially created, ensuring a smoother customer experience and eliminating a potential point of frustration. This improves the usability of our loyalty program.
Original PR description
Issue: --- ### Steps to reproduce: 1- Create a `Discount Code` program. 2- In SO, use `Coupon Code` wizard and use the code. 3- After available rewards are shown, discard the wizard. 4- Re-apply the code. Validation Error: The promo code is already applied. As the reward is not applied, this is functionally confusing. At this point We can see the reward only inside the rewards wizard view. If we allow re-apply the code in case no reward line is created for the `rule.program_id`, we can still see the reward by re-applying the same code, without any side effects. opw-6164198 Forward-Port-Of: odoo/odoo#264105 Forward-Port-Of: odoo/odoo#261950
This update resolves an issue where multi-company orders were incorrectly assigning fiscal positions, leading to 'incompatible companies' errors. The fix ensures the sale order's company is used when calculating the fiscal position, guaranteeing accurate accounting and order confirmation. This improves order processing reliability in our multi-company setup.
Original PR description
Issue: --- Due to this issue, in multi-company environment, wrong fiscal position might be assigned to the order, leading to `incompatible companies` error. Steps to reproduce: 1- On multi-company…
Issue: --- Due to this issue, in multi-company environment, wrong fiscal position might be assigned to the order, leading to `incompatible companies` error. Steps to reproduce: 1- On multi-company setup, assign a website to the second company. 2- Configure pickup method for second company. 3- Configure fiscal positions for both companies. 4- Setup auto invoice for second company. 5- Using public user, add a product to cart and checkout. 6- Use pickup method, and pay. The order is not confirmed. If you enable debug mode after payment, it will show an `incompatible companies` error. Cause: --- https://github.com/odoo/odoo/blob/43f5ceadbc1f7df9898c327bf65bffdbe9860c1c/addons/account/models/partner.py#L247-L279 `_get_fiscal_position` is using environment company to compute the fiscal position. However, `_compute_fiscal_position_id` causing the issue here is triggered inside `report_saleorder` template with user set as odoobot when trying to to send the confirmation. As a result, the odoobot company's fiscal position will be used causing this issue. Fix: --- We should ensure company from sale order is used by setting it as env company. opw-6186296 Forward-Port-Of: odoo/odoo#264123
This update corrects a technical issue where the Odoo payroll calculation process would fail when no payslips were generated for a payrun. The fix ensures the calculation works correctly even with empty payrun data, preventing potential errors and ensuring accurate payroll reporting.
Original PR description
If the payrun does not have any payslips, the _get_payslip_stp is called on an empty recordset, which causes the compute to fail. This commit fixes the _get_payslip_stp compute for empty recordset. task-6215823 Forward-Port-Of: odoo/enterprise#117198
This update fixes an issue where payroll account lines were incorrectly merging employee data, leading to inaccurate allocation of funds across different analytic accounts. The change ensures that each employee's specific analytic distribution is accurately reflected, preventing data loss and maintaining correct financial reporting. This update improves the accuracy of payroll accounting.
Original PR description
Steps to reproduce 1. Enable "Batch Account Move Lines" in the Payroll settings. 2. Configure two employees' versions with an analytic distribution on the same analytic account but with different…
Steps to reproduce
1. Enable "Batch Account Move Lines" in the Payroll settings.
2. Configure two employees' versions with an analytic distribution on the
same analytic account but with different percentages (e.g. {acc: 50}
for the first employee and {acc: 70} for the second).
3. Generate a payslip run containing both employees and validate it.
Issue
The generated account move aggregates the two payslips into a single
line whose analytic_distribution matches only the last employee being
processed; the other employee's percentage is silently lost.
`_get_existing_lines` decides whether an incoming line can merge into an
already accumulated one. When the incoming line has an analytic
distribution, the merge condition delegates to
`_check_partially_matching_accounts`:
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L254-L271
https://github.com/odoo/enterprise/blob/e4a1326c7a8a74da7970aeaa9900c19d01634e31/hr_payroll_account/models/hr_payslip.py#L273-L283
That helper returns True as soon as any analytic account of the new
line appears anywhere in the existing line's distribution dict, without
comparing percentages. Two distributions such as {acc: 50} and
{acc: 70} share the same account, so the helper returns True, the
lines are merged, and whichever distribution ends up on the merged line
overwrites the other — the total amount is correct but the analytic
split is wrong.
The logic introduced in commit https://github.com/odoo-dev/enterprise/commit/e40a3166286a6bc546e9543b935233d2a110dc52 successfully addressed merging for rule-level distributions
with composite keys (e.g., {'13,7,12': 40}). However, that implementation is overly inclusive for employee-specific distributions.
It fails to differentiate between cases where the same analytic account is utilized across various employees but with different percentage allocations.
Because it only checks for an account overlap rather than a perfect distributional match, it incorrectly aggregates distinct financial dimensions into a single journal line
Solution
Compare the full analytic_distribution dict by strict equality. Lines
merge only when the distribution is identical (same keys AND same
percentages), keeping the batch feature anonymizing identically
configured employees while preserving one line per distinct
distribution.
opw-6102508
Forward-Port-Of: odoo/enterprise#114156This update resolves an issue where the payroll report would fail if a new employee didn't have a start date defined. The fix ensures the report checks for a start date before attempting comparisons, preventing errors and improving report reliability. This ensures accurate payroll processing.
Original PR description
If there is no start date on the veriosn, the report will fail as it'll try to compare a bool with a datetime. So we check first that there is a start date
This update ensures the reprint button is consistently visible and functional on all devices sharing the same Point of Sale session. Previously, the reprint button was only available on the device that initially sent the order to the preparation printer. This change improves the user experience and streamlines order fulfillment.
Original PR description
When sending an order to a preparation printer, the reprint button was invisible on any device other than the one that originally sent the order. This happened because `lastPrints` was stored in the order's `uiState`, which is local to each device. Moving it to `last_order_preparation_change` — which is shared across devices in the same session — fixes the issue. The reprint button is now visible and functional on all devices sharing the same session. --- Task: https://www.odoo.com/odoo/project/1737/tasks/6196913 Forward-Port-Of: odoo/odoo#263094
This update ensures that when reserving stock with packaged items, the system correctly considers the total quantity available, regardless of how it's divided into full packaging units. Previously, large stock levels were incorrectly limiting reservation quantities. This fix improves the accuracy of stock availability calculations and prevents over-reservation issues.
Original PR description
Issue ----- Forced full packaging reservation setting is ignored when there is a big quant in stock. Steps to reproduce ----- - Enable packagings - Create a product category "Super Category" -…
Issue
-----
Forced full packaging reservation setting is ignored when there is a big quant in stock.
Steps to reproduce
-----
- Enable packagings
- Create a product category "Super Category"
- Reserve Packagings: Reserve Only Full Packagings
- Create a stored product "AAA"
- Product Category: Super Category
- 50 units on hand
- Packaging: 6-Pack (6 units)
- Create a delivery for 15 units of AAA
> Reservation is made for 15 units
Cause
-----
The rounding to a multiple of the packaging quantity takes the stock quant into account. For our example case, we have 8 full 6-Packs on hand, so the `available_quantity` gets set to 48 when doing
https://github.com/odoo/odoo/blob/5e458236ca2ff2ab92c4893495e7a721be902c40/addons/stock/models/stock_quant.py#L923-L925
This leads to the reservation quantity being min(15, 48) = 15
https://github.com/odoo/odoo/blob/5e458236ca2ff2ab92c4893495e7a721be902c40/addons/stock/models/stock_quant.py#L927
-----
Ticket:
opw-5974333
Forward-Port-Of: odoo/odoo#263114
Forward-Port-Of: odoo/odoo#257342This update fixes an issue where list markers with trailing empty lines weren't correctly styled, and ensures font sizes are applied consistently across list items regardless of how they were created (inline styles, dropdowns, or links). It also resolves conflicts between background and font colors within lists.
Original PR description
### Steps to reproduce: **Issue 1:** - Create a list with multiple items and leave the last item empty. - Press Ctrl + A to select all content. - Apply a text color from the toolbar. - The list…
### Steps to reproduce: **Issue 1:** - Create a list with multiple items and leave the last item empty. - Press Ctrl + A to select all content. - Apply a text color from the toolbar. - The list marker of the last item does not receive the color. **Issue 2:** - Create a list and type some text. - Press Ctrl+A to select all. - Apply a font size via the font-size input (inline style=`font-size: ...`). - Then apply a font size via the font-size dropdown (class-based). - Font size from the dropdown is not applied. **Issue 3:** - Create a list item and type some text. - Convert the text into a link. - Copy the link. - Press Enter and paste the link. - Select the entire list using the mouse. - Apply font size & observe that font size is not applied to some list items. **Issue 4:** - Go to Todo and create a list. - Select all items (Ctrl + A). - Apply a background color class from the toolbar. - Apply a font color using inline styling. - Observe that the font color is not visible. ### Description of the issue/feature this PR addresses: - Full-selection detection relied on Range.isPointInRange() checks on list item leaf nodes. When a list item ended with a trailing empty line, the selection often stopped on the `<li>` element and did not include the `<br>` placeholder. As a result, such list items were not considered fully selected when applying text color, and their markers remained unstyled. - Applying a font-size class on a fully-selected list item could leave existing inline font-size on list item, so new class didn’t take effect. - Creating links inside list items & repeated copy-paste operations left empty text nodes (feff cleanup). Manual selection doesn't include these nodes, `areNodeContentsFullySelected` reports that list item is not fully selected. As a result, some list items were not considered fully selected, and font size was not applied. - Background color `(bg-*)` classes also define a color property. When a font color is applied, the color is set on the `<li>`, but the nested `font.bg-*` element’s color takes precedence, causing the applied font color to be overridden. ### Desired behavior after PR is merged: - List items with trailing empty line are now treated as fully selected, even when selection ends before the `<br>` placeholder. - Clear any existing font-size styles on the list item before applying the new font-size class, so the dropdown font size applies correctly. - Empty text nodes are removed before applying font size, ensuring full list item selection and consistent font-size application. - When a list item (li) has a text color (inline style or text-* class), and nested font element has only a background color class then font element now inherits the color from the li. task - 5454639 Forward-Port-Of: odoo/odoo#264586 Forward-Port-Of: odoo/odoo#241827
This update fixes a UI inconsistency where the ‘Add Property’ button wasn’t reliably visible during property editing, especially when switching between records. Now, the button correctly resets to ‘Edit Properties’ when switching records or creating new ones, ensuring a smoother and more intuitive user experience for property editing.
Original PR description
Before this commit: - The “+ Add Property” button was not visible when switching between notebook pages if it was present initially. - when we are doing edit properties from the cog menu and without doing save properties if we are creating new record or switch to other record at that time button still shows “Save Properties.” leading to inconsistent UI behavior. After this commit: - The “+ Add Property” button remains visible when switching between pages. - When in property edit mode, switching records or creating a new record now correctly resets the button state back to “Edit Properties”, ensuring consistent UI behavior. task-6051322 ENT PR: https://github.com/odoo/enterprise/pull/113248 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a UI inconsistency in the worksheet property editor. Previously, the ‘Add Property’ button would remain visible even when switching between records or creating new ones. Now, the button correctly resets to ‘Edit Properties’ ensuring a smoother and more reliable editing experience for users.
Original PR description
Before this commit: - The “+ Add Property” button was not visible when switching between notebook pages if it was present initially. - when we are doing edit properties from the cog menu and without doing save properties if we are creating new record or switch to other record at that time button still shows “Save Properties.” leading to inconsistent UI behavior. After this commit: - The “+ Add Property” button remains visible when switching between pages. - When in property edit mode, switching records or creating a new record now correctly resets the button state back to “Edit Properties”, ensuring consistent UI behavior. task-6051322
This update clarifies the display of extra prices when customers select combo items in the POS system. Previously, customers were confused about additional costs, leading to inquiries about 'too much' charges. This change ensures transparent pricing and avoids customer confusion, improving the overall checkout experience.
Original PR description
The display for the extra price during the combo selection was not very clear. The customer were not aware of the additional cost that were applied when choosing some elements that were not included but extra. This led to customer asking cashier if there was a problem because they were paying "too much" when the computation was actually correct but not clear enough. task-id: 6142095 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261264 Forward-Port-Of: odoo/odoo#260705
This update fixes an inconsistency in how leave durations are calculated for employees using credit time calendars. Previously, the system miscalculated leave times when attendance was split between regular and credit time periods. This change ensures accurate leave duration tracking, particularly for employees with complex work schedules.
Original PR description
purpose: when creating leaves for employees with credit time calendar, the duration computation is differnet with similar configrations (regular attendance in the morning then credit time in the afternoon and the opposite) backporting the fix done in this commit which overrides `_work_intervals_batch` to exclude intervals that count as absense: https://github.com/odoo/odoo/pull/239420/changes/0168eb28d8986969c30a08ef41de8eff9aaa765a task-id: 6212942 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a performance issue related to payroll processing in Hong Kong. The change moves a key calculation to the standard Odoo environment, streamlining the process and improving overall system speed. This ensures accurate and efficient payroll calculations for Hong Kong users.
Original PR description
backporting the fix done in this commit which moves `_work_intervals_batch` to std: https://github.com/odoo/enterprise/pull/101790/changes/70bfc31c3917d3bd96db63b2543937fb151670a1 task-id: 6212942
This update corrects a bug that prevented users from selecting additional Service-type Sale Order Lines (SOLs) when creating timesheets linked to Sales Orders. The fix ensures that timesheets can now correctly associate with all relevant SOLs, regardless of the default SOL selection. This improves the accuracy and usability of timesheet reporting.
Original PR description
Steps to reproduce: - Install sale_timesheet - Create a Sales Order with multiple Service-type Sale Order Lines - Create a timesheet from the Sales Order stat button or from the Timesheets app Issue: It is not possible to select another SOL. If the default SOL is removed. Cause: The so_line domain does not include SOLs with `qty_delivered_method = 'timesheet'`. Fix: Include timesheet SOLs in the domain. Task-5969200
This update corrects a bug where the 'Purchase Orders' button disappeared when changing an Analytic Account's plan. The fix adjusts how the system identifies purchase orders linked to analytic accounts, ensuring the button remains visible regardless of the plan setting. This ensures users can always access purchase order information related to their accounts.
Original PR description
# How to reproduce - Enable the analytic accounting in the settings - Create a PO - Add a PO line - Set the Analytic Distribution of that PO line to an Analytic Account of your choice - Confirm the…
# How to reproduce
- Enable the analytic accounting in the settings
- Create a PO
- Add a PO line
- Set the Analytic Distribution of that PO line to an Analytic Account of your choice
- Confirm the PO
- Create a Vendor Bill from that PO and confirm the VB
- Go to the Analytic Account chosen before
- Change the Plan of that Analytic Account
# The problem
When the Plan is not set to the "Project Plan", the Purchase Orders smart button disappears
# Why
The Purchases Orders smart button is invisible if the variable purchase_order_count is equal to 0. That field is computed by a function that does a search with the following domain :
```py
[('order_line.invoice_lines.analytic_line_ids.account_id', '=', account.id)]
```
When we change the Plan of the Analytic Account, analytic_line_ids.account_id is set to NULL, so the search return nothing.
Why is that field set to NULL ?
Well, to reference its plan, an Analytic Line does not use a python-defined field. In fact, each time a new Analytic Plan is added to the database, a new column is added to the Analytic Line model. That column's name is x_plan{plan.id}_id or, for the specific case of the "Project Plan", it is account_id
When the Plan of an Analytic Account is changed, it takes every Analytic Line associated with that Plan and switch which column containing the id of the Analytic Account.
Take for exemple the following Analytic Line :
```
(account_id = NULL, x_plan2_id = NULL, x_plan3_id = 1)
```
When the associated Analytic Account's Plan is changed to the "Project Plan", it becomes :
```
(account_id = 1, x_plan2_id = NULL, x_plan3_id = NULL)
```
So, we need to adapt to search so that it uses the right plan's name.
opw-5897037
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#263652
Forward-Port-Of: odoo/odoo#248236This update fixes an issue where the total working hours weren't being displayed correctly in the Planning Gantt view when the view wasn't grouped by resources. The change ensures accurate working hour calculations are reflected in the total row, regardless of grouping settings, improving planning accuracy.
Original PR description
Issue: ---------------------------------------- In the Planning Gantt view when we don't group by resources, the total row is not considering the working hours. Steps to reproduce:…
Issue: ---------------------------------------- In the Planning Gantt view when we don't group by resources, the total row is not considering the working hours. Steps to reproduce: ---------------------------------------- - Open Planning - Remove the default group by resources - Have at least a planning slot for a non-flexible employee - The total row doesn't take the working schedule into account Cause: ---------------------------------------- Since [an improvement,](https://github.com/odoo/enterprise/commit/cc35e1a4729453e4f788034a94402ab048eadfcb) the working hours data in given to the `PlanningGanttRenderer` through the progress bars data. This is an issue because the progress bars are only there if we group by resources. ([src](https://github.com/odoo/enterprise/blob/423ab064847dd41d36778a812390e3bec53ba4dc/planning/models/planning_slot.py#L2669-L2678)) Solution: ---------------------------------------- In this commit we partially revert the commit adding the working intervals in the progress bars. Instead of doing it in `_gantt_progress_bar_resource_id()` we create a new method `_get_gantt_planning_data()` which is called directly in `get_gantt_data()` and returns useful information even when there are no progress bars. opw-5507063 Forward-Port-Of: odoo/enterprise#116824 Forward-Port-Of: odoo/enterprise#112522
This update fixes inconsistencies in the XML structure used for Swedish payments (l10n_se_bban). Specifically, it ensures the correct format for bank identification codes (BIC) and addresses a known issue with bank account data, improving compatibility with Swedish banking systems. This ensures accurate and reliable payment processing.
Original PR description
Here is few fixes added to the swedish iso 20022 XML: - CdtrAgt seems to be always mandatory, change the condition in `_skip_CdtrAgt` to always use the CdtrAgt if payment_method is iso20022_se - The `_is_se_bban` is too restrictive, this should be always True when payment method is swedish iso - The `FinInstnId` node can either contain BIC or ClrSysMmbId. But as ClrSysMmbId seems to change from one bank to another, it's more relevant to always use the BIC. opw-5395736 Forward-Port-Of: odoo/enterprise#114662
This update clarifies the Sale Order process for subcontracted products by hiding a confusing Manufacturing Order button. This prevents users from navigating to unnecessary back-end manufacturing documents, streamlining the workflow managed through Purchase Orders and Subcontracting Receipts.
Original PR description
The Manufacturing Order (MO) smart button on a Sale Order is confusing when the product is subcontracted. In a subcontracting flow, the user manages the process via the Purchase Order and the Subcontracting Receipt. This commit ensures the MO smart button is hidden when the fulfillment is handled through subcontracting to prevent user confusion and unnecessary navigation to back-end manufacturing documents. Task-id: 6173877 Forward-Port-Of: odoo/odoo#263105
This update corrects a technical issue where an approval rule was being applied incorrectly due to a duplicate XML ID. The change ensures that approval rules are applied correctly based on user and manager roles, improving the reliability of the approval process. This resolves a potential inconsistency in how approvals were handled.
Original PR description
The XMLID `approval_approver_manager` was defined twice, causing the rule to be applied with the last evaluated access configuration for both `group_approval_user` and `group_approval_manager`. This commit renames the first occurrence of the duplicated XMLID to `approval_approver_user` to restore the intended separation between user-level and manager-level approval access rules. task-6095010 Forward-Port-Of: odoo/enterprise#113480
This update resolves a restriction in the l10n_mx_edi module, allowing credit notes (out-refunds) to utilize Payment Policies (PPD) as required by Mexican tax regulations (SAT). Previously, this functionality was unavailable, creating a discrepancy between Odoo and the SAT portal. This change ensures compliance and simplifies credit note processing.
Original PR description
Currently, credit notes cannot be PPD (payment_policy), however, SAT portal allows it. **STEP TO REPRODUCE** 1. Install the l10n_mx_edi module. 2. Create an invoice with PPD (either changing it or through payment terms). 3. After send CFDI, generate a credit note and try to set PPD **FIX** Allow move_type = 'out_refund' to be PPD. Task-6049654 Forward-Port-Of: odoo/enterprise#114886
This update resolves an issue where Point of Sale orders would fail if a product used an archived Unit of Measure. We've now implemented a fix to load archived UOMs within the POS, ensuring orders can be processed smoothly regardless of UOM status. This improves the reliability of the POS system for all users.
Original PR description
If a product uses an archived UOM and an order is then created in the POS with this product, an error would occur because it could result in trying to use a UOM that wasn't loaded in the POS since it was archived. To fix this issue, we now load archived UOMs in the POS. --- Task: https://www.odoo.com/odoo/project/1737/tasks/6197465 Forward-Port-Of: odoo/odoo#264837 Forward-Port-Of: odoo/odoo#263838
This update resolves an issue where intercompany invoices were incorrectly flagged with a tax validation error. The fix ensures that taxes are correctly recalculated when processing invoices between companies with different fiscal positions, improving the reliability of intercompany transactions. This prevents disruptions to financial reporting.
Original PR description
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies,…
**Steps to reproduce:** * Install the *Accounting* module. * Install localisation modules for two different regions: * *Belgium* (**l10n_be**) * *Luxembourg* (**l10n_lu**) * Configure two companies, each assigned to one of the above regions. * Create fiscal positions: * In the Belgium company, create a fiscal position for Luxembourg. * In the Luxembourg company, create a fiscal position for Belgium. * Go to *Accounting > Configuration > Settings*. Enable *Inter-Company Transactions*. Enable synchronization of *Vendor Bills and Invoices* for both companies. * Create an invoice in the Luxembourg company. Select a partner belonging to the Belgium company. Add a product with applicable taxes. **Observed behavior:** * A validation error is raised: 'This entry contains taxes that are not compatible with your fiscal position. Please check the country set in the fiscal position and in your tax configuration.' **Cause:** * During intercompany bill creation, a foreign fiscal position is applied before recomputing taxes. * If no mapped foreign taxes exist, the system keeps domestic purchase taxes. * This leads to a mismatch between taxes and fiscal position, triggering the validation error. **Fix:** * Add a safeguard in *_inter_company_create_invoices()*. * After *_inter_company_sync_invoice_line_taxes()* recomputes taxes, *_inter_company_has_incompatible_fiscal_position_taxes()* checks whether the fiscal position is incompatible. * If incompatible, the fiscal position is removed and taxes are recomputed without it. opw-6103671 Forward-Port-Of: odoo/enterprise#117450 Forward-Port-Of: odoo/enterprise#115085
This update enhances how Odoo handles database errors during safe evaluation. By catching and retrying `IntegrityError` exceptions, the system now behaves consistently regardless of the code being executed, preventing unexpected disruptions. This improves overall stability and reliability.
Original PR description
It makes sense to bubble up the `psycopg2.IntegrityError` (as well as the subcase `ConcurrencyError`) so that the retry mechanism can handle this exception. In fact, this exception can be triggered without necessarily a problem with the "logic/business code". This ensures consistent behavior between the business logic and the code executed in `safe_eval`. Task-6215886 Forward-Port-Of: odoo/odoo#264838 Forward-Port-Of: odoo/odoo#264266
This update fixes an error in the Italian Annual VAT Report that was incorrectly calculating the balance amount for line VF25. The fix ensures the report accurately reflects the total taxable base as required by Italian tax regulations. This ensures compliance with Italian tax reporting standards.
Original PR description
### Issue before this commit: In the Italian Annual VAT Report, the balance (base amount) for line VF25 displays incorrect values. Instead of computing the sum of the taxable bases for the passive…
### Issue before this commit: In the Italian Annual VAT Report, the balance (base amount) for line VF25 displays incorrect values. Instead of computing the sum of the taxable bases for the passive operations, the report erroneously mixes tax amounts into the balance column. ### Steps to reproduce the issue: 1. Download Accounting and l10n_it 2. Go to Tax Report and visualize the Annual Tax Report (IT) 3. Go to VF VAT Report 4. See the VF25 is mixing taxes and balances ### Cause of the issue: The root cause lies in the aggregation_formula definition for the tax_annual_report_line_VF25 record. The formula was incorrectly configured to aggregate the .tax expressions for lines VF1 to VF13 (VF1.tax + VF2.tax + ...) instead of their respective .balance expressions, while correctly using .balance for the remaining lines (VF17 to VF24). https://github.com/odoo/odoo/blob/878c08cf522a3278b4e6ff5f3d18444989e9998d/addons/l10n_it/data/tax_report/annual_report_sections/vf.xml#L286-L299 It's just a typo in this commit: https://github.com/odoo/odoo/pull/164064/changes/f292ba119d6376dbfb3c1fac4960c9c56a74d938 ### Reason to introduce the fix: From documentation https://www.agenziaentrate.gov.it/portale/documents/20143/9602686/IVA_ANNUALE_2026_istr.pdf/2a42fb92-1b76-229a-d0f5-06069d79b514?t=1768504755711 : > Rigo VF25, colonna 1, va indicato il totale degli imponibili determinato sommando gli importi riportati ai righi da VF1 a VF23, colonna 1, diminuito dell’importo di cui al rigo VF24. In colonna 2 va indicato il totale delle imposte determinato sommando gli importi delle colonne 2 dei righi da VF1 a VF13. opw-6172791 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264379
This update corrects a previous issue where a customer's order would automatically confirm if a gift card fully covered the cost of multiple events. Now, Odoo requires the standard checkout process to be completed, even with a fully covered order, ensuring accurate order processing and preventing potential errors. This change improves order reliability and customer satisfaction.
Original PR description
**Before this commit** If a gift card balance fully covers a shopping cart containing multiple events, Odoo auto-confirms the order as soon as the last event is added, skipping the final checkout step. **After this commit** Sale orders will no longer be automatically confirmed when a customer registers for a paid event, even if an applied gift card brings the total balance to zero. opw-5896626 Forward-Port-Of: odoo/odoo#264599 Forward-Port-Of: odoo/odoo#246629
This update resolves an issue where POS invoicing was failing due to a mismatch in how lot numbers were handled. The fix ensures that the system correctly identifies and uses stock lot information for invoiced POS orders, preventing crashes and ensuring accurate invoice generation. This improves the reliability of our point-of-sale transactions.
Original PR description
POS order lines store lot/serial numbers as `pos.pack.operation.lot` records, while the shared invoice lot hooks expect `stock.lot` records. When `sale_stock_product_expiry` extends the invoice lot values, it reads `expiration_date` from the received lot. For invoiced POS orders, this crashes because POS passes a `pos.pack.operation.lot`, which has no such field. Resolve the matching `stock.lot` from the POS lot name, product, and company before extracting extra invoice lot values. opw-6193332 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr