Daily updates from Odoo
Tuesday, May 12, 2026
296 changes
32 changes
Resolved issues and error corrections
This update resolves a visual glitch in the knowledge article editor where the table of contents would incorrectly display the TOC of the previously viewed article. The fix ensures the TOC accurately reflects the current article's structure, improving the user experience when creating and editing knowledge content. This prevents confusion and ensures consistent article navigation.
Original PR description
### Steps to reproduce 1. Open knowledge 2. Create a new empty article 3. Click on Templates 4. Close the modal ------> Current article's side panel TOC shows the TOC of the previewed article. ### Technical The side panel's TOC is managed by the TOC service. When opening/updating any article, the side panel's TOC is updated according to the current article. When the article picker is previewing the article using the `HtmlViewer`, it also updates the side panel's TOC using the previewed article. Then if we close the dialog without loading the article, the side panel's TOC doesn't get updated. Therefore, opening the side panel's TOC shows the last previewed article's TOC. After this commit, we add a cleanup inside the `HtmlViewer` and the `KnowledgeTableOfContent` to restore the previous TOC manager when it is destroyed. Task-6186675 Forward-Port-Of: odoo/enterprise#116615
This update fixes an issue where changing the delivery date for Hungarian invoices incorrectly recalculated journal entries, leading to financial discrepancies. The fix ensures that the correct exchange rate is applied when the delivery date is modified, maintaining accurate accounting records. This improves the reliability of financial reporting for Hungarian transactions.
Original PR description
### Issue: When changing the delivery date (used as the Hungarian exchange rate date), some journal lines could be recomputed incorrectly, leading to unbalanced entries ### Cause:…
### Issue: When changing the delivery date (used as the Hungarian exchange rate date), some journal lines could be recomputed incorrectly, leading to unbalanced entries ### Cause: `expected_currency_rate` was recomputed when `delivery_date` changed, but the new value was never automatically applied In addition, after https://github.com/odoo/odoo/pull/225407, `_sync_tax_lines` partially updated the lines: https://github.com/odoo/odoo/blob/f5501e5c8dcf60444077912db4c87e7a3f2654a6/addons/account/models/account_move.py#L3029-L3031 https://github.com/odoo/odoo/blob/f5501e5c8dcf60444077912db4c87e7a3f2654a6/addons/account/models/account_move.py#L1633-L1637 These methods reapply the previous tax rate, causing base and tax lines to be updated inconsistently As a result, when the base amount increases, the tax amount decreases, and vice versa ### Steps to reproduce: - Install `l10n_hu_edi` and `accountant` with demo data, then switch to the `HU company` - Go to Currencies → USD and add two rates: April 5: HUF per Unit = 100 April 6: HUF per Unit = 150 - Create an Invoice: (Any customer, Currency: USD, Line: Price = 1000, Tax = 27%) - Open the Journal Items and duplicate the browser tab for comparison - In the duplicated tab, change the Delivery Date to April 5 and save - Change the Delivery Date back to today and compare both tabs ### Before the fix: The values differ between both tabs because the tax lines keeps the old exchange rate opw-5801126 Forward-Port-Of: odoo/odoo#263694 Forward-Port-Of: odoo/odoo#258310
This update fixes several issues within the spreadsheet component, ensuring a smoother and more reliable experience for users. The changes include improvements to the installation process and addressing permissions related to OpenID Connect. This ensures the spreadsheet functionality continues to operate correctly within Odoo.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/14395f75f1 [REL] 19.3.2 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/14395f75f1 [REL] 19.3.2 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/62a64fd1b4 [FIX] package: husky should run at post install [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/38b1f8ca83 [FIX] workflow: fix the tag definition [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/e5d20dd4ff [FIX] Workflow: fix missing permission to use OpenID Connect [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/33f3342c49 [FIX] workflow: Split the workflow in parallel jobs [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/a22b83d2ed [FIX] composer: remove forced reflow in content editable [Task: 6199661](https://www.odoo.com/odoo/2328/tasks/6199661) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update resolves an issue that occurred when users attempted to merge a single mailing list. The fix addresses a technical error related to empty recordsets, preventing a syntax error and ensuring the merge function operates correctly.
Original PR description
Currently, error occurs when user tries to merge a mailing list. Steps to replicate: - Install `mass_mailing`. - Open Email Marketing > Mailing Lists > Mailing Lists and switch to list view. - Select…
Currently, error occurs when user tries to merge a mailing list.
Steps to replicate:
- Install `mass_mailing`.
- Open Email Marketing > Mailing Lists > Mailing Lists and switch to list view.
- Select a single record and Click merge.
Error:
```
psycopg2.errors.SyntaxError: syntax error at or near ")"
LINE 8: AND src_sub.list_id IN ()
^
ValueError: SyntaxError('syntax error at or near ")"\nLINE 8: 'AND src_sub.list_id IN ()\n'
^\n') while evaluating 'action = records.action_mailing_lists_merge()'
```
Cause:
- Error occurs due to a recent [PR].
- When the user selects only a single record, `self - dest` [1] evaluates to an empty recordset. As a result, `action_merge()` receives an empty `src_lists`.
- Later, this is used [here] and converted into an empty tuple, producing an invalid SQL clause like `src_sub.list_id IN ()`, which leads to this error.
Solution:
- When `src_lists` is an empty recordset, we early return from `action_merge()`.
[PR]: https://github.com/odoo/odoo/pull/72156
[1]: https://github.com/odoo/odoo/blob/4193b3735d64518290613f5c8132f1fd07afa229/addons/mass_mailing/models/mailing_list.py#L218
[here]: https://github.com/odoo/odoo/blob/4193b3735d64518290613f5c8132f1fd07afa229/addons/mass_mailing/models/mailing_list.py#L266
sentry-7447326420
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#262404This update fixes a bug in the bank reconciliation process that prevented users from correctly selecting multiple lines for actions. The change ensures accurate filtering and comparison of related records, improving the reliability of this key financial function. This resolves an issue where the system wasn't properly handling multiple selections.
Original PR description
In this commit: https://github.com/odoo/enterprise/commit/fa8fedc4e2501a273e7f8f3f7f4462b2b58907b9 We introduce a way for user to select multiple lines and perform an action out of it. In the dropdown, there should be an intersection of all reco model of the selected lines but it wasn't working properly in two cases: - When only one selected lines, remainingRecoModels was empty and the filter was filtering everything, added a early return for that - When multiple lines, we compare the first list of reco model with all the others but we compare object which is not working in js. Now we will compare the id. no task id Forward-Port-Of: odoo/enterprise#115770
This update adjusts the default date range for the Lead and Pipeline dashboards to 'Last 30 days'. This change ensures users consistently see the most recent data, providing a clearer and more relevant view of sales performance. It resolves a previous issue where the default date range was not clearly defined.
Original PR description
This commmit fixes the date filter default value to `Last 30 days`. Task: 5902231 Forward-Port-Of: odoo/enterprise#114560
This update resolves a visual glitch where the status bar appeared twice for sub-tasks. The fix ensures that the status bar accurately reflects the task's project association, preventing a confusing and inconsistent user experience. This change improves the overall usability of the project management tool.
Original PR description
Steps: - Create a task inside any project. - Create a sub-task under that parent task. - Open the sub-task and remove the project (clear the project field). - Look at the status bar at the top of the form view. Issue: - The status bar is displayed twice (both the Project stages and Personal stages - are visible simultaneously). Cause: - When the project field is cleared from a sub-task in the UI, conflicting visibility rules or residual stage data can cause the status bar widget to render twice. Fix: - To resolve this, an `onchange` event is added to the `project_id` field. If the user removes the project from a sub-task, the system now instantly falls back to the parent task's project and sets `display_in_project = False`. This syncs the frontend UI with the intended backend behavior, preventing the interface from entering the broken state and removing the duplicate status bars. task-6033970 Forward-Port-Of: odoo/odoo#255319
A recent update caused shifts created from the Gantt day view to be incorrectly delayed by an hour. This was due to a change in how timezone information was handled. This fix ensures that shift times are accurately reflected, resolving this scheduling issue.
Original PR description
Steps to reproduce:
-
- Open Planning
- Switch to Gantt day view
- Select a time slot from 1 PM to 3 PM for a resource
Issue:
-
- When creating a planning shift from the Gantt day view, the created shift has a 1 hour time lag compared to the selected slot.
Cause:
-
- In saas-19.2, the timezone field was removed from the resource calendar.
- _work_intervals_batch was called without resources_per_tz, causing it to default to {UTC: resource} instead of the correct resource timezone.
Solution:
-
- Pass the resource timezone when calling _work_intervals_batch so attendance times are stamped with the correct resource timezone instead of defaulting to UTC.
task-5966733
Forward-Port-Of: odoo/enterprise#111122This update resolves an error in the FAIA report XML export for Luxembourg customers. The issue stemmed from a missing 'TVA' TaxType element, as required by Luxembourg tax regulations. This fix ensures accurate report generation and compliance.
Original PR description
This is one of several commits fixing the FAIA xml export. The customer in ticket [opw-5427296](https://www.odoo.com/odoo/unassigned-tasks/5427296) received several errors which mention that the `TaxType` element should be 'TVA'. This is corroborated by one of these elements in the XSD files for the FAIA report. The XSD files can be found at the link below. https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip opw-6118272 [link](https://www.odoo.com/odoo/project.task/6118272) *For future techs or functional support agents: updating `l10n_lu_reports` may not automatically apply the fix. You may need to go to the relevant Views model and select ⚙️ > Compare/Reset, then Hard Reset.* Forward-Port-Of: odoo/enterprise#116344 Forward-Port-Of: odoo/enterprise#113720
This update fixes an issue where users were incorrectly directed to a standard form view when opening documents linked through Studio. Now, when accessing documents from Many2One fields, the system opens the appropriate Kanban or List view, allowing users to directly preview and navigate the document content.
Original PR description
Problem: When opening a linked `documents.document` record from a Many2One field added via Studio, the user is redirected to the standard form view. This is problematic because the form view does not allow the user to preview the actual document or navigate into it if the record is a folder. Solution: override `get_formview_action` to open the Kanban/List/Activity views. task-6068437 Forward-Port-Of: odoo/enterprise#116675 Forward-Port-Of: odoo/enterprise#113149
This update resolves a test failure in the MRP module related to how manufacturing routes are configured. The fix ensures that the test setup correctly identifies and utilizes available routes, preventing errors when running tests in environments without demo data. This improves the reliability of our manufacturing test suite.
Original PR description
The setup in `TestMultistepManufacturingWarehouse` was failing with: ``` AssertionError: field 'route_ids' is not visible ``` This happens because the `route_ids` field on the product form view is only visible when `has_available_route_ids` is True, which depends on having at least one `product_selectable` route. This commit enables `product_selectable` on those routes in the test setup, so that `route_ids` becomes visible and the Form helper can access it safely. [RB-232576](https://runbot.odoo.com/odoo/error/232576) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#259036 Forward-Port-Of: odoo/odoo#237293
This update resolves an issue where the correct fiscal position (Domestic) wasn't being applied for sales within the EU. The change ensures that VAT prefixes are properly considered, leading to accurate sales reporting and compliance with VAT regulations, particularly for intra-EU B2B transactions. This fix impacts how VAT is calculated and processed for sales orders.
Original PR description
With l10n_nl: - Set the fiscal positions in this order: 1. Domestic 2. EU Intra B2B - Create a contact with: - German address - Dutch delivery address - Dutch VAT - Create a second contact with: - German address - Dutch delivery address - No VAT - Create a Sales Order for each contact: - For the first contact, the applied fiscal position is EU Intra B2B - For the second contact, the applied fiscal position is Domestic The detected fiscal position should be Domestic in both cases In _get_fiscal_position vat_exclusion is computed using the VAT prefix of the partner and our company. But if the prefix of the VAT does not match the country of the partner, it's delivery address will still be overriden. opw-5892138 Forward-Port-Of: odoo/odoo#258899
This update fixes an issue where purchase order lines didn't correctly display the associated analytic distribution when a project was assigned. The fix ensures that the product's original analytic distribution, along with the project's, is consistently shown on new order lines. This improves accuracy in tracking costs by project.
Original PR description
__ ## Short functional explanation of the error When creating a Purchase Order. We add a line containing a product that has an analytic distribution. After setting a project on this PO, when we add…
__ ## Short functional explanation of the error When creating a Purchase Order. We add a line containing a product that has an analytic distribution. After setting a project on this PO, when we add another line containing the same product, the analytic distribution of the product isn't added anymore, only leaving it with the analytic distribution of the project. ## Reproduction Steps 1. Go to settings and enable Analytic Accounting. 2. Go to Accounting > Configuration > Analytic Distribution model. Create a model with a product (prd) you remember, and add an analytic distribution (ad). 3. Go to Project. On a given project (p), select the Hamburger menu and click Settings. Then, in the Settings tab, under Analytic, make sure the Project field is filled. 4. Create a new Purchase Order. Select a vendor and add a line with the product (prd). On the top right of the Form, click on the view button and select Analytic Distribution to show it on the form. There, we should see the product (prd) with its corresponding Analytic Distribution (ad) on the form. 5. Click on the Other Information tab and select the project (p). Click on the Product tab. There, under Analytic Distribution field, you should see (ad) and the Analytic Distribution of the project (p). 6. Click on save and add another line with the exact same product. ### Expected behavior Under Analytic Distribution, we should see (ad) and the Analytic Distribution of the project (p), as for the first order line ### Unexpected behavior Under Analytic Distribution, we only see the Analytic Distribution of the project (p). ## Origin of the issue When we add another line, we trigger the compute method of the Analytic Distribution. However, due to this piece of code: https://github.com/odoo/odoo/blob/eed303b9926062eb71be6cf8dc95165efc413ed8/addons/project_purchase/models/purchase_order_line.py#L14 when we create a new order line, we never compute its analytic distribution: `self` will contain only `project_lines`, and `empty_project_lines` is empty as well. Therefore, we call the super method with nothing, so when we get in the super method: https://github.com/odoo/odoo/blob/eed303b9926062eb71be6cf8dc95165efc413ed8/addons/purchase/models/purchase_order_line.py#L249-L259 we never compute the analytic distribution of the newly created line. This piece of code was added in this commit: https://github.com/odoo/odoo/commit/c1ea8446259bd3338c004e88d48ad77ded7ef2ae to fix the issue that when a user enters manually an analytic distribution, this entry will be lost when triggering the compute of the analytic distribution. However, due to the agency of the code, we cannot prevent losing *both* manually added analytic distributions and product analytic distribution. After consulting the product owner, we concluded that there was no perfect solution in this case, but we'd rather keep the product analytic distribution, as it is much harder to add it again after its removal. Therefore, this commit reverts the previously mentioned commit, while keeping the refactor it introduced. __ opw-6063418 Forward-Port-Of: odoo/odoo#257558
This update resolves a technical issue preventing on-the-fly product creation in the SOL editable form test. Specifically, the system was failing a test due to an incorrect initial value for 'reinvoice_policy'. The fix ensures this field is correctly initialized with its default value ('no') during product creation, preventing errors and ensuring data integrity.
Original PR description
When creating an on-the-fly product in the SOL editable form test,
reinvoice_policy was not initialized to its default value ('no') on the
transient record created with `new()`.
This happens because `new()` only initializes defaults for fields needed
by the current form view (required fields, modifiers, onchanges, etc.),
and reinvoice_policy is not part of them in this flow.
Also Since `product_id.reinvoice_policy` is also not a dependency of
`qty_delivered_method`, the compute keeps using the incorrect initial
value, causing the readonly assertion on `qty_delivered` to fail.
Fix by explicitly passing the reinvoice_policy's default value in the product
creation values.
runbot error-239939
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#263042This update significantly reduces memory usage during the installation of the stock account module, particularly in large databases. By disabling prefetching, the module now uses 55% less memory, preventing potential performance issues. The change resulted in a slight (10%) increase in installation time, which is considered an acceptable tradeoff.
Original PR description
## The Problem During the initialization of `stock_account`, the logic creating `product.value` instances triggered cache misses on `product.product`, accessing fields (`company_id` and…
## The Problem During the initialization of `stock_account`, the logic creating `product.value` instances triggered cache misses on `product.product`, accessing fields (`company_id` and `standard_price`) inside `_create_product_value`, and field `uom_id` inside `_run_fifo_get_stack`. Due to prefetching, this loaded all product data into memory, causing significant memory usage on large databases. ## The Solution Disabled prefetching in the full flow. Didn't go with fetching only the needed fields instead of disabling for two main reasons: - Field `standard_price` accessed in the loop is company dependent, so it needs to be fetched inside, which would be a bit verbose. - Fetching `company_id` outside the loop, `standard_price` inside the loop, and `uom_id` which is accessed down the stack in the `.create` call on `product.value` won't be an explicit/robust solution for the long term. --- ## Benchmarks *Tested on a SaaS database with 500k products:* | | Before | After | Note | | :--- | :--- | :--- | :--- | | **Memory** | 3.6GB | 1.6GB | **-55%** (fits in memory limit) | | **Time** | 10m | 11m | **+10%** (acceptable tradeoff) | **OPW-6173153** Forward-Port-Of: odoo/odoo#262702
This update corrects a misleading validation error that appeared when using the translation button on Sale Order Templates, particularly in multi-language setups. The fix ensures the system correctly handles nested records, preventing unnecessary error messages and improving the user experience. This resolves a previous issue impacting template creation.
Original PR description
Steps to reproduce: * Enable multiple languages * Go to Sale Order Templates and create a new template * Add a product line, then click the translate button on the description field * A confusing…
Steps to reproduce: * Enable multiple languages * Go to Sale Order Templates and create a new template * Add a product line, then click the translate button on the description field * A confusing validation error appears for missing `sale_order_template_id` Issue: * Instead of highlighting the missing required fields on the sale order template form view, it raises a misleading validation error on `sale_order_template_id` Cause: * `useTranslationDialog` always attempts to save the passed record directly. In O2M list views, the field can belong to a nested relational record, so the correct behavior is to save the root record instead. Affected Version: 17.0 Before: <img width="1919" height="1014" alt="image" src="https://github.com/user-attachments/assets/cd61381d-289a-4df4-bdf2-7881fa851939" /> After: <img width="1920" height="887" alt="image" src="https://github.com/user-attachments/assets/5218c74b-c024-4994-b816-cb7ae69b420f" /> --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262988 Forward-Port-Of: odoo/odoo#262755
This change corrects a bug where the gross salary line was missing from the salary configurator when the user interface was set to a non-English language (like French). The fix ensures that the gross salary is always displayed, regardless of the selected language, by updating how the system generates salary categories.
Original PR description
**Problem:** On a Belgian company with the UI set to French (or any non English language), the gross line never appears in the salary configurator sidebar when opening an offer. **Steps to…
**Problem:**
On a Belgian company with the UI set to French (or any non English language), the gross line never appears in the salary configurator sidebar when opening an offer.
**Steps to reproduce:**
1. Create a Belgian company.
2. Install French and set the admin user to French.
3. Go to an applicant (e.g Laurie Poiret), create a salary offer, save.
4. Open the offer link (salary configurator).
**Cause:**
The base `_get_compute_results` uses the translated `category_id.name` ("Salaire mensuel" in french) as the dictionary key when writing entries into `resume_lines_mapped`. The payroll override function `_get_period_name`, which for monthly schedules returned the hard coded english string `"Monthly Salary"` instead of the translated category name. This caused a key mismatch: the gross line was stored under the translated key, while the override rebuilt `resume_categories` with the english key so when the template iterates over categories and looks up `lines[category]`, the whole "Monthly Salary" bucket was invisible in every non english language.
**Solution:**
We should now return the `category_id.name` directly (the translated name coming from the record itself). This keeps all keys consistent between `resume_categories` and `resume_lines_mapped` regardless of the language used.
also because in https://github.com/odoo/enterprise/blob/1845042ff388593c4cdf547d47c018f42bd02c7c/l10n_be_hr_contract_salary/controllers/main.py#L450
We use `resume = result['resume_lines_mapped']['Monthly Salary']`
We need to re-design this by using the actual translated names, and building `result` keys based on the language selected (the same should be applied for "Yearly benefits").
opw-6009711
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/enterprise#116657
Forward-Port-Of: odoo/enterprise#110676This update resolves a technical error that was preventing the MRP Kanban module from functioning correctly. The change ensures that JavaScript code related to the Kanban interface is properly defined, improving overall system stability and performance. This fix addresses a reported runbot error and ensures consistent operation.
Original PR description
js_class defined in mrp_workorder should have been defined in mrp. This solves runbot error 242288 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a technical issue within the MRP Work Order Kanban module, resolving a run-time error. The fix ensures that JavaScript classes are correctly defined, improving the overall stability and performance of the Kanban interface. This change addresses a reported bug and enhances the user experience.
Original PR description
js_class defined in mrp_workorder should have been defined in mrp. This solves runbot error 242288
This update corrects a bug where the 'Ledger' group was incorrectly displayed in multi-company reports. Previously, when multiple companies were selected, the report only considered the active one. Now, the report correctly uses the selected companies based on the 'companies' option, ensuring accurate reporting across different business entities.
Original PR description
The "Ledger" horizontal group is (among other possible criteria) supposed to be displayed when there is more than one company considered by the report. Before this commit, when opening a report with filter_multi_company set to 'tax_units' with more than one non-branch company in self.env.companies and no tax unit set, "Ledger" was shown. This was wrong, since, in this case, the report will only consider the active company, disregarding the other selected ones. All in all, _init_options functions should only rely on options['companies'] to check the active companies, for consistency.
This update resolves an issue where users experienced an error when accessing the sitemap after installing the website. The fix corrects a code error that resulted in the system incorrectly handling the sitemap attachment, ensuring smoother website functionality.
Original PR description
Currently an exception is generated when the user tries to open the `/sitemap.xml` page twice after installing the website. Error: ``` Error on request: Traceback (most recent call last): ``` This is because the code line [1] tries to access the site map twice; code line [1] gets the `raw` from the existing sitemap attachment, and the contains the `LocalBinaryFile` object due to recent changes with [2]. This commit will fix the above issue by using `sitemap.raw.content` instead of `sitemap.raw` which returns the actual content from the sitemap attachment, instead of `LocalBinaryFile` object instead. [1]: https://github.com/odoo/odoo/blob/93b39025009c80ead3337738443fed7df5b6f51e/addons/website/controllers/main.py#L323 [2]: https://github.com/odoo/odoo/commit/41fe2ebdb9cc37341362d7af829c087a5f72f9f1 Sentry-5691330773
This update fixes an issue where product variants added through the product matrix on purchase orders weren't showing the correct product descriptions. The change restores a previous helper function to ensure product descriptions, including attribute values, are displayed accurately. This improves the clarity and usability of purchase orders.
Original PR description
From 7e553d25890d1, the `product_label_section_and_note_field` has been split into a mixin in `product` and an override in `account`. In this split. the `get label()` helper has been slightly modified in a way the product template is not extracted from the label to keep only the additional description (usually filled with product attribute values). This lead to having only the product template name displayed on the purchase order line if the product variant was added via the matrix widget. This commit brings back the old `label` helper only for the product matrix widget. Task: 6042382 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#262735
A recent issue caused the first line of product descriptions in quotation templates to be cut off when creating sales orders. This update adds a test to prevent this regression, ensuring that all product descriptions are fully displayed in sales orders. This improves the clarity and accuracy of sales order information.
Original PR description
Issue: --- When using quotation template, the first line of description is always removed. Steps to reproduce: 1- Create a quotation template and add a description to the line. 2- Create a SO from quotation template. As you see the first line of description is removed in SO. Cause: --- This regression is introduced after aba778538c2032a2924f99258c5c75e463296d21 which was done under the assumption that the description always starts with product name. This breaking commit is reverted by: a702a4989fc53ccc43f57213e0db3e62e7b69e8f However it's better to have a test in order to prevent this issue being introduced in the future. opw-6178360 Forward-Port-Of: odoo/odoo#262563
The Point of Sale's category grouping feature has been updated to accurately filter out products designated as 'special' that should not be included in the grouped listings. This change ensures that sales staff see only the relevant product categories, improving the accuracy of sales reports and reducing potential errors.
Original PR description
The group products by category feature in the POS was not filtering out the products marked as special and that should not be displayed. It is now the case by extracting the filtering logic and applying it to the grouped products as well. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#257845
This update fixes an issue where partners sharing the same VAT number but with individual turnovers below €250 were incorrectly excluded from VAT reports. The change groups partners by VAT number and includes them in the report if their combined turnover exceeds the threshold, ensuring accurate reporting for Belgian businesses.
Original PR description
When having different partners with the same vat number and their individual turnover values are less than the threshold they were not included in the partner vat listing report even though if the total turnover for their vat number is above the threshold. This commit handles this case by grouping by vat number and if the total turnover for a vat number is above the threshold then it will be shown in the report with another level beneath it to show the partners having this vat number even if their individual turnovers are below the threshold. task-6133010 Forward-Port-Of: odoo/enterprise#116495 Forward-Port-Of: odoo/enterprise#115251
This update resolves a bug where pressing backspace in the HTML editor, specifically at the button's edge, would cause an error. The fix ensures backspace correctly deletes characters and prevents the crash, improving the editor's stability and user experience.
Original PR description
**Description of the problem** Pressing backspace when the cursor is positioned at the very left edge of a button could trigger a traceback. Additionally, even if the crash did not occur, the…
**Description of the problem** Pressing backspace when the cursor is positioned at the very left edge of a button could trigger a traceback. Additionally, even if the crash did not occur, the backspace behavior would be incorrect, because the cursor would move across a zero-width non-breaking space (Zwnbsp) without deleting the first character to the left. **How to reproduce** In the `html_editor`, create a button. Click on its very left edge, then press backspace. An error is thrown. **Why the problem happens** 1. Traceback when backspace is pressed `LinkPlugin.handleDeleteBackward` assumes that `previousSibling` is an element node, and calls the `matches` method. However, when clicking on the very left edge of a button, the cursor is positioned such that the left sibling (`previousSibling`) is a text node. Text nodes do not implement `.matches()`, leading to the crash. 2. No deletion of the character to the left of the cursor `DeletePlugin.isVisibleChar` handles the edge cases where backspace is pressed while the cursor is positioned to the side of a button, and defines the visibility of Zwnbsp to determine how much is deleted. The padding Zwnbsp to the left of a button are considered as visible, such that the user can delete an empty button without removing also the first character on its left. Anyway, the current code does not actually check if the button is empty, thus it applies to more cases than necessary. Probably this has never been observed before, because it takes a very precise click to the left edge to position the cursor between a button and its left Zwnbsp. **Fix** 1. Prevent the crash in `LinkPlugin` `LinkPlugin.handleDeleteBackward` now ensures that `previousSibling` is an element node before calling `matches`, otherwise it returns. 2. Fix backspace behavior in `DeletePlugin` `deletePlugin.isVisibleChar` now considers as visible only the Zwnbsp positioned to the left of an empty button. This way, if the user clicks on the very left edge of a button (which moves the cursor outside the button, to the left), pressing backspace actually deletes the character on the left. task-6102282 Forward-Port-Of: odoo/odoo#258858
This update resolves an error that occurred when users attempted to mark payslips as paid, specifically when the 'Include Unpaid' option was enabled. The change ensures that the system correctly handles unpaid payslips during this process, preventing a technical error and improving the reliability of the payroll reporting feature.
Original PR description
Currently, an error occurs when a user attempts to mark a payslip as paid. **Steps to Reproduce:** - Install the `hr_payroll` module without demo data. - Go to `Payslips` and click on `New…
Currently, an error occurs when a user attempts to mark a payslip as paid. **Steps to Reproduce:** - Install the `hr_payroll` module without demo data. - Go to `Payslips` and click on `New Off-cycle`. - Create a record > `Compute` > `Validate`, and Pay. - In the wizard, enable `Include Unpaid` and select `CSV` mode. - Click `Mark as Paid`. **Error:** `UnboundLocalError: cannot access local variable 'rows' where it is not associated with a value` The error occurs when a user tries to mark a payslip as paid with Include Unpaid enabled. When the wizard is created from here [1], the default unpaid payslips are empty. In this case, the system assigns an empty set of payslips to process [2].and the rows variable is not defined because there are no payslips to work on, which raises the error [3]. This commit ensures that when the wizard is created, the matched unpaid payslips are passed to the wizard. If the Include Unpaid option is enabled, the unpaid payslips are assigned for processing, similar to [4]. The unpaid payslips cannot be empty, as they always include the currently processed payslip. Also, the rows are redefined for each payslip case and updated accordingly. Therefore, this commit ensures that the rows are created at the end from grouped payments. [1] https://github.com/odoo/enterprise/blob/a784d118e076724b02e5c59d9ce5d1815c42b0bf/hr_payroll/models/hr_payslip.py#L792-L809 [2] https://github.com/odoo/enterprise/blob/e971fca0d09e564ae9029f3d7e166e078c44dcbb/hr_payroll/wizard/hr_payroll_payment_report_wizard.py#L56 [3] https://github.com/odoo/enterprise/blob/e971fca0d09e564ae9029f3d7e166e078c44dcbb/hr_payroll/wizard/hr_payroll_payment_report_wizard.py#L97 [4]: https://github.com/odoo/enterprise/blob/a784d118e076724b02e5c59d9ce5d1815c42b0bf/hr_payroll/models/hr_payslip_run.py#L274-L288 sentry-7436885639 Forward-Port-Of: odoo/enterprise#115090
This update resolves an error that occurred when posting journal entries using accounts shared between companies during an open audit period. The issue stemmed from a permissions problem preventing users in one company from accessing audit status information, which blocked the posting process. This fix ensures accurate reporting across shared accounts.
Original PR description
Posting a journal entry using an account shared between multiple companies during an open audit period raises an AccessError. Steps to reproduce: - Configure an account to be shared between Company A and Company B. - Add Company A and Company B in 'Companies' - In the mapping tab, add a code for each company - In Company A, create a tax audit for a specific fiscal period. - Switch to Company B and keep just Company B selected. - Create and post a journal entry using the shared account within the same date period. Issue: An AccessError is raised when posting the move. The system attempts to check the status of the audit records linked to the shared account, to which the user in Company B does not have read access. opw-5993450 Forward-Port-Of: odoo/enterprise#116912 Forward-Port-Of: odoo/enterprise#115454
This update removes redundant logging messages within the account_edi_ubl_cii module. Previously, similar log entries were repeated multiple times, which didn't provide valuable insights. This change streamlines logging for better clarity and efficiency.
Original PR description
Before this commit, we had repeated logs (n-times if we had similar lines) but this doesn't help too much. To avoid this we decided to remove duplicated messages Task-None --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263779
This update fixes an issue where currency rates were incorrectly calculated for VAT reports. Previously, the system used any invoice line, even non-product lines, leading to inaccurate rates. Now, the system prioritizes the first actual product line to ensure correct rate derivation, improving the reliability of VAT reporting.
Original PR description
The currency rate was previously computed using the first invoice line, regardless of its type. This caused incorrect rate calculation when the first line was not a product line (e.g., section, note, or display-only lines). This fix filters invoice_line_ids to use the first actual product line when extracting amount_currency and balance, ensuring that the derived rate reflects a valid monetary line. opw-5208724 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#239920 Forward-Port-Of: odoo/odoo#237535
This update fixes an issue where contacts enrolled in the same courses were incorrectly merged. Now, the system prevents this merge, displaying an error message to the user, ensuring data accuracy and preventing duplicate course information. This improves the reliability of our contact management system.
Original PR description
Expected Behaviour: Contacts enrolled in common courses should not be merged and the merge should fail. Steps to reproduce: 1- Go to one of the courses 2- Add two attendees to the course 3- Go to Contacts App 4- Select the two attendees you added to the course 5- Try merging the two contacts Actual Behaviour before the Fix: Contacts enrolled in common courses are getting merged and the common courses are kept in the destination contact. Behaviour with the Fix: Contacts enrolled in common courses are blocked from being merged and an error message is shown to the user saying that the reason the merge is blocked is a duplicate course. opw-5417223 Forward-Port-Of: odoo/odoo#263196 Forward-Port-Of: odoo/odoo#244500
This update resolves an issue where the 'Add a line' button was unresponsive at the top of mobile grid views (like Timesheets). The fix adjusts how elements are sized on smaller screens, ensuring the button is always clickable. This improves the user experience for mobile users.
Original PR description
**Steps to reproduce** On mobile: - Open a grid view (e.g. Timesheets > All timesheets) - Try to click on "Add a line" for the first employee - Issue: nothing happens. Notice that by scrolling down the list to employees at the bottom, it becomes possible to click on "Add a line". **Cause** `o_grid_cell_overlay` elements (with `h-100`) were taking more than the expected height in mobile, because the `o_grid_section_title` divs only have `position: sticky` on larger viewports. With the default `position: static`, the child element's height was exceeding its parent's height. opw-5853489 Forward-Port-Of: odoo/enterprise#113400
28 changes
Resolved issues and error corrections
This update fixes a usability issue where calls in inactive channels weren't easily visible in the sidebar. Now, updating the channel's last interest date when a call starts ensures it remains prominent. This improves the user experience by making call initiation more noticeable and reducing confusion.
Original PR description
Starting a call in an inactive channel could leave it hidden from the sidebar when the channel had no recent messages, which was confusing for users. To make call initiation more visible, update the channel's last interest date when the first participant joins the call, similar to call notification messages. Subsequent participants joining the same call do not update it again. task-6185134 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update addresses several technical issues within the spreadsheet component of Odoo. It includes fixes related to installation, workflow processes, and permissions, ensuring the spreadsheet functionality remains stable and reliable. This change is a routine maintenance update.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/7fa6ba6291 [REL] 19.2.11 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/7fa6ba6291 [REL] 19.2.11 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/4ddf97f4ca [FIX] package: husky should run at post install [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/958ae7d17c [FIX] workflow: fix the tag definition [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/5ec347d6eb [FIX] Workflow: fix missing permission to use OpenID Connect [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/a939d63d5c [FIX] workflow: Split the workflow in parallel jobs [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/31baa52ff4 [FIX] composer: remove forced reflow in content editable [Task: 6199661](https://www.odoo.com/odoo/2328/tasks/6199661) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update resolves an error that prevented users from generating Balance Sheet comparisons with specific date ranges. The fix ensures that date types are correctly handled, allowing the comparison feature to function as intended. This improves the reliability of balance sheet reporting.
Original PR description
Step to reproduce - Install the accountant module. - create a fiscal year (for 01/01/26 to 30/06/26) from setting and enable it - Navigate to Accounting > Report > Balance Sheet - Click the…
Step to reproduce
- Install the accountant module.
- create a fiscal year (for 01/01/26 to 30/06/26) from setting and enable it
- Navigate to Accounting > Report > Balance Sheet
- Click the `Comparison` smart button and set `Previous Period` to `2 periods`.
Observation:
- we face a traceback
``` File "/home/odoo/odoo/codebase/enterprise/saas-19.2/account_reports/models/account_report.py", line 5739, in _get_annotations
period_date_from = self._adjust_date_for_joined_comparison(options, period_date_from)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/odoo/odoo/codebase/enterprise/saas-19.2/account_reports/models/account_report.py", line 5695, in _adjust_date_for_joined_comparison
return min(period_date_from, comparison_date_from)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'datetime.date' and 'str'
```
Cause:
- `_get_period_dates` return string in case we have date which falls in
`custom_range_match`, when `get_report_information` is called, while
`period_date_from` is of type date
- hence there is mismatch between types
Fix:
- `_get_period_dates` is supposed to return date object always, hence fixed the
return type in case we have match for custom range
opw-6185629This update corrects a minor coding issue within the Odoo payroll module (l10n_be_hr_payroll). The change ensures the code functions more reliably by avoiding an unnecessary reference to 'self' within loop structures. This improves the stability and efficiency of the payroll calculations.
Original PR description
Don't use `self` in loop body. Oversight of 724edab8d5be8e774f00ae84e9ebeb5a70f4fa93.
This update resolves an issue where the Knowledge article's table of contents would incorrectly display the TOC of the last previewed article. The fix ensures the TOC accurately reflects the current article, improving the user experience when creating and editing knowledge content. This prevents confusion and ensures users see the correct article structure.
Original PR description
### Steps to reproduce 1. Open knowledge 2. Create a new empty article 3. Click on Templates 4. Close the modal ------> Current article's side panel TOC shows the TOC of the previewed article. ### Technical The side panel's TOC is managed by the TOC service. When opening/updating any article, the side panel's TOC is updated according to the current article. When the article picker is previewing the article using the `HtmlViewer`, it also updates the side panel's TOC using the previewed article. Then if we close the dialog without loading the article, the side panel's TOC doesn't get updated. Therefore, opening the side panel's TOC shows the last previewed article's TOC. After this commit, we add a cleanup inside the `HtmlViewer` and the `KnowledgeTableOfContent` to restore the previous TOC manager when it is destroyed. Task-6186675 Forward-Port-Of: odoo/enterprise#116615
This update fixes an issue where changing the delivery date for Hungarian invoices incorrectly recalculated journal entries, leading to financial discrepancies. The fix ensures that exchange rates are accurately applied when the delivery date is modified, resolving potential imbalances in tax and base amounts.
Original PR description
### Issue: When changing the delivery date (used as the Hungarian exchange rate date), some journal lines could be recomputed incorrectly, leading to unbalanced entries ### Cause:…
### Issue: When changing the delivery date (used as the Hungarian exchange rate date), some journal lines could be recomputed incorrectly, leading to unbalanced entries ### Cause: `expected_currency_rate` was recomputed when `delivery_date` changed, but the new value was never automatically applied In addition, after https://github.com/odoo/odoo/pull/225407, `_sync_tax_lines` partially updated the lines: https://github.com/odoo/odoo/blob/f5501e5c8dcf60444077912db4c87e7a3f2654a6/addons/account/models/account_move.py#L3029-L3031 https://github.com/odoo/odoo/blob/f5501e5c8dcf60444077912db4c87e7a3f2654a6/addons/account/models/account_move.py#L1633-L1637 These methods reapply the previous tax rate, causing base and tax lines to be updated inconsistently As a result, when the base amount increases, the tax amount decreases, and vice versa ### Steps to reproduce: - Install `l10n_hu_edi` and `accountant` with demo data, then switch to the `HU company` - Go to Currencies → USD and add two rates: April 5: HUF per Unit = 100 April 6: HUF per Unit = 150 - Create an Invoice: (Any customer, Currency: USD, Line: Price = 1000, Tax = 27%) - Open the Journal Items and duplicate the browser tab for comparison - In the duplicated tab, change the Delivery Date to April 5 and save - Change the Delivery Date back to today and compare both tabs ### Before the fix: The values differ between both tabs because the tax lines keeps the old exchange rate opw-5801126 Forward-Port-Of: odoo/odoo#263694 Forward-Port-Of: odoo/odoo#258310
This update adjusts the default date range for the Lead and Pipeline dashboards to 'Last 30 days'. This change ensures users consistently see the most recent data, providing a clearer and more actionable view of sales performance. The update resolves a previous issue with outdated default filter settings.
Original PR description
This commmit fixes the date filter default value to `Last 30 days`. Task: 5902231 Forward-Port-Of: odoo/enterprise#114560
This update fixes an issue where users could still edit protected company folders within the document management system. The change ensures that protected folders, specifically the company root, display as read-only in the details panel, preventing accidental modifications. This maintains data integrity and security.
Original PR description
In odoo/enterprise#106192, we have modified the function userPermissionViewOnly that was preventing the user from editing document he cannot: we have removed the condition preventing user to edit…
In odoo/enterprise#106192, we have modified the function userPermissionViewOnly that was preventing the user from editing document he cannot: we have removed the condition preventing user to edit protected document (mainly folder at the company root). That was an error as even if the user has "edit" access (which is ensured in that method), the document can still be protected and the form to edit it should be in readonly then. We ensure here that the form in the details panel is in readonly in that case. How to reproduce: - log as demo and go to Document - Click on Inbox folder - Open details panel - Change for example the contact of the document You get an error while you shouldn't be able to edit it (as the folder is protected). Technical note: we re-add the condition in the method userPermissionViewOnly: (!this.documentService.userIsDocumentManager && this.record.data?.user_folder_id === "COMPANY") that we slightly modify to limit the protected document to folder only: (!this.documentService.userIsDocumentManager && this.record.data?.user_folder_id === "COMPANY" && this.record.data?.type === "folder") Task-5881531 Forward-Port-Of: odoo/enterprise#116709
This update fixes an issue where changes to quiz answers weren't immediately displayed in the question overview. The fix restores a necessary field to allow the web client to update its data display correctly, preventing the need for a full page reload. This ensures quiz data is always accurate for users.
Original PR description
After adding new answers or editing existing ones in a quiz question and clicking 'Save & Close', the question overview displays incorrect data. New answers appear as empty tags, and modified answers continue to show their old values. The correct data only appears after a full page reload. This regression was introduced in commit 8ceea093, where invisible fields were removed during code cleanup. The `display_name` field is required in the `answer_ids` list view for the web client to correctly update its local cache. Without this field, the client cannot refresh the display names of the tags immediately after modification. This commit restores the `display_name` field as `column_invisible` in the `slide.question` form view. Task-5449335 Forward-Port-Of: odoo/odoo#244460
This update resolves an issue where newly created analytic distribution records would disappear. The fix ensures the widget's data is properly synchronized with the database before saving, preventing data loss when users interact with the distribution models. This improves data reliability and prevents disruptions to accounting processes.
Original PR description
Steps to reproduce 1. Go to Accounting → Configuration → Analytic Distribution Models 2. Create a new model, name it, and in the distribution column pick an analytic account 3. Click outside the row…
Steps to reproduce 1. Go to Accounting → Configuration → Analytic Distribution Models 2. Create a new model, name it, and in the distribution column pick an analytic account 3. Click outside the row and reload the page Issue The newly created record vanishes because `web_save` received `analytic_distribution: false`. The single click that closes the popover also triggers the editable list's `leaveEditMode`, which calls `record.save()`. That save runs before the widget has flushed the user's pick into `record.data`, so the write goes out with stale/empty data. This became reliably reproducible after [37d78a47bb20], which moved the list renderer's outside-click listener from `document` (bubble) to `window` (capture). Because the list is mounted before the widget, its capture-phase listener now fires first: `leaveEditMode` → `record.save()` is already in flight by the time the widget's own window click handler runs, so the widget's commit loses the race. Solution `record.save()` awaits `_askChanges()` before writing: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/web/static/src/model/relational_model/record.js#L268-L271 `_askChanges()` triggers `NEED_LOCAL_CHANGES` on the model bus and awaits any proms handlers push onto it: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/web/static/src/model/relational_model/relational_model.js#L249-L253 This is the framework's standard hook for widgets that hold uncommitted local state; `ace_field` and `domain_field` already use it. Subscribe the analytic distribution widget to the same event and, when the dropdown is open, push a `commitChanges()` prom that awaits the existing `save()`. Because `record.save()` awaits these proms before running `_save`, the widget's pending distribution is guaranteed to be on `record.data` by the time the write payload is built, regardless of click-listener ordering. opw-6106309 Forward-Port-Of: odoo/odoo#260421
This update corrects a technical issue where partners with VAT information were incorrectly flagged in the annual VAT listing report. The fix ensures that these partners are no longer displayed in the warning, improving the accuracy and usability of the report for accounting and tax purposes. This resolves a minor reporting inconsistency.
Original PR description
Partners with / in VAT shouldn't be displayed in the warning for the annual VAT listing. task-6081162 Forward-Port-Of: odoo/enterprise#113839
This update fixes an issue where the rental report was displaying incorrect dates. The fix ensures that each row in the report accurately reflects the start and return dates of a rental order, providing more reliable reporting data. This improves the accuracy of rental tracking and analysis.
Original PR description
The rental report is a daily report with x rows by rental order, with x the days between the start and return dates. With generate_series inside the select, the query was creating x rows with the same id, resulting in the date field not being correctly displayed (one unique date, the start date). This fix corrects the generation of the report to display the real date on each row. opw-5266525 Forward-Port-Of: odoo/enterprise#106235 Forward-Port-Of: odoo/enterprise#104764
This update resolves a bug that caused Purchase Orders to fail when quantities were below the vendor's minimum order quantity. The fix ensures a supplier is always identified, preventing crashes and allowing for accurate price calculations, even with small order sizes. This improves the reliability of procurement processes.
Original PR description
FIX] purchase_stock: handle missing seller during PO line update (min_qty) **Steps to Reproduce:** - Install Sale, Inventory, Manufacturing, and Purchase. - Enable MTO, Units of Measure, and Routes.…
FIX] purchase_stock: handle missing seller during PO line update (min_qty)
**Steps to Reproduce:**
- Install Sale, Inventory, Manufacturing, and Purchase.
- Enable MTO, Units of Measure, and Routes.
- Create a product:
Set a vendor price with min_qty = 1.0.
Enable MTO route.
Add a BoM with a component product.
Set quantity to 0.1 (less than vendor min_qty).
- Create a Sale Order with the same product added twice.
- Confirm the Sale Order.
**Issue:**
During procurement:
- First procurement correctly fetches the supplier.
- On PO line update (_update_purchase_order_line), seller is recomputed.
Due to min_qty filtering, no seller is returned when quantity is low.
This results in: Missing seller, Missing product_uom, Invalid price
computation, And finally causes a crash when confirming the Purchase Order,
in _get_stock_move_price_unit: ZeroDivisionErroR
Root Cause:
- _select_seller filters suppliers using min_qty.
During merge/update flow, recomputed quantity may not satisfy min_qty.
Existing valid supplier (from initial procurement) is ignored.
No fallback handling in _update_purchase_order_line.
**Solution:**
- Add fallback logic when _select_seller returns no result: Use
_prepare_sellers() to fetch a valid supplier ignoring min_qty.
- Ensure a supplier is always available for: UoM resolution, Price computation
Prevents crash and ensures consistent PO line updates.
**Result:**
- No traceback when quantity < vendor min_qty
Supplier, UoM, and price are properly set
**OPW-6106487**
Forward-Port-Of: odoo/odoo#259894This update fixes a bug preventing users from selecting custom date ranges in accounting reports (Profit & Loss). The recent date filter refactor caused a mismatch in how date modes were handled, leading to the missing options. This change ensures the full range of comparison filters is available.
Original PR description
**Problem:** The "Custom Dates" and "Specific Date" comparison options are missing from the Comparison dropdown in accounting reports. **Steps to reproduce:** 1. Go to Accounting > Reporting > Profit…
**Problem:** The "Custom Dates" and "Specific Date" comparison options are missing from the Comparison dropdown in accounting reports. **Steps to reproduce:** 1. Go to Accounting > Reporting > Profit & Loss 2. Click the Comparison dropdown 3. Only "No Comparison", "Previous Period", and "Same Period Last Year" are visible — "Custom Dates" is missing **Current behavior:** Custom date comparison options are not rendered. **Expected behavior:** "Custom Dates" (for range reports) and "Specific Date" (for single date reports) should appear in the Comparison dropdown. **Cause of the issue:** The date filter refactor (40484f985f5) restructured how the date mode is stored in options. Previously, `options.date.mode` held 'range' or 'single'. After the refactor, this key no longer exists — the mode is now stored as a boolean in `options.filter_date.range_mode`. The comparison filter template still checks `controller.cachedFilterOptions.date.mode`, which is now undefined, so both the range and single conditions always evaluate to false and the custom comparison options are never rendered. **Fix:** The comparison template was the only consumer not updated during the refactor. Aligning it to the new data path restores the options without any behavioral change. opw-6070402
This update fixes an issue where selecting multiple lines in the bank reconciliation process didn't function correctly. The change ensures that the dropdown accurately displays the intersection of relevant record models, resolving a bug that caused incorrect filtering. This improves the user experience when managing multiple transactions.
Original PR description
In this commit: https://github.com/odoo/enterprise/commit/fa8fedc4e2501a273e7f8f3f7f4462b2b58907b9 We introduce a way for user to select multiple lines and perform an action out of it. In the dropdown, there should be an intersection of all reco model of the selected lines but it wasn't working properly in two cases: - When only one selected lines, remainingRecoModels was empty and the filter was filtering everything, added a early return for that - When multiple lines, we compare the first list of reco model with all the others but we compare object which is not working in js. Now we will compare the id. no task id Forward-Port-Of: odoo/enterprise#115770
This update resolves a visual glitch where the status bar displayed twice for sub-tasks. The fix ensures that the status bar accurately reflects the task's project association, preventing a confusing and inconsistent user experience. This improvement maintains a clean and professional interface for users managing tasks.
Original PR description
Steps: - Create a task inside any project. - Create a sub-task under that parent task. - Open the sub-task and remove the project (clear the project field). - Look at the status bar at the top of the form view. Issue: - The status bar is displayed twice (both the Project stages and Personal stages - are visible simultaneously). Cause: - When the project field is cleared from a sub-task in the UI, conflicting visibility rules or residual stage data can cause the status bar widget to render twice. Fix: - To resolve this, an `onchange` event is added to the `project_id` field. If the user removes the project from a sub-task, the system now instantly falls back to the parent task's project and sets `display_in_project = False`. This syncs the frontend UI with the intended backend behavior, preventing the interface from entering the broken state and removing the duplicate status bars. task-6033970 Forward-Port-Of: odoo/odoo#255319
This update resolves an error in the LU VAT reports generated for the FAIA report, ensuring the correct 'TVA' TaxType is used. This was triggered by customer feedback and confirmed by XSD files, preventing report generation failures. This ensures compliance with Luxembourg VAT regulations.
Original PR description
This is one of several commits fixing the FAIA xml export. The customer in ticket [opw-5427296](https://www.odoo.com/odoo/unassigned-tasks/5427296) received several errors which mention that the `TaxType` element should be 'TVA'. This is corroborated by one of these elements in the XSD files for the FAIA report. The XSD files can be found at the link below. https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip opw-6118272 [link](https://www.odoo.com/odoo/project.task/6118272) *For future techs or functional support agents: updating `l10n_lu_reports` may not automatically apply the fix. You may need to go to the relevant Views model and select ⚙️ > Compare/Reset, then Hard Reset.* Forward-Port-Of: odoo/enterprise#116344 Forward-Port-Of: odoo/enterprise#113720
This update fixes an issue where users were incorrectly directed to a standard form view when opening documents linked through Studio. Now, users can directly access the document's Kanban view, allowing them to preview and navigate the document content as intended. This enhances the user experience for document management.
Original PR description
Problem: When opening a linked `documents.document` record from a Many2One field added via Studio, the user is redirected to the standard form view. This is problematic because the form view does not allow the user to preview the actual document or navigate into it if the record is a folder. Solution: override `get_formview_action` to open the Kanban/List/Activity views. task-6068437 Forward-Port-Of: odoo/enterprise#116675 Forward-Port-Of: odoo/enterprise#113149
This update fixes an issue where the correct fiscal position (Domestic) wasn't being applied to sales orders in certain EU scenarios. The change ensures that VAT prefixes are properly considered, leading to accurate fiscal position detection and improved sales order processing, particularly for intra-EU B2B transactions. This resolves a discrepancy in how VAT was being handled.
Original PR description
With l10n_nl: - Set the fiscal positions in this order: 1. Domestic 2. EU Intra B2B - Create a contact with: - German address - Dutch delivery address - Dutch VAT - Create a second contact with: - German address - Dutch delivery address - No VAT - Create a Sales Order for each contact: - For the first contact, the applied fiscal position is EU Intra B2B - For the second contact, the applied fiscal position is Domestic The detected fiscal position should be Domestic in both cases In _get_fiscal_position vat_exclusion is computed using the VAT prefix of the partner and our company. But if the prefix of the VAT does not match the country of the partner, it's delivery address will still be overriden. opw-5892138 Forward-Port-Of: odoo/odoo#258899
This update fixes an issue where purchase order lines weren't correctly displaying the associated analytic distribution when a project was assigned. The fix ensures that the product's original analytic distribution, along with the project's, is consistently shown on new order lines. This improves accuracy in tracking costs by project.
Original PR description
__ ## Short functional explanation of the error When creating a Purchase Order. We add a line containing a product that has an analytic distribution. After setting a project on this PO, when we add…
__ ## Short functional explanation of the error When creating a Purchase Order. We add a line containing a product that has an analytic distribution. After setting a project on this PO, when we add another line containing the same product, the analytic distribution of the product isn't added anymore, only leaving it with the analytic distribution of the project. ## Reproduction Steps 1. Go to settings and enable Analytic Accounting. 2. Go to Accounting > Configuration > Analytic Distribution model. Create a model with a product (prd) you remember, and add an analytic distribution (ad). 3. Go to Project. On a given project (p), select the Hamburger menu and click Settings. Then, in the Settings tab, under Analytic, make sure the Project field is filled. 4. Create a new Purchase Order. Select a vendor and add a line with the product (prd). On the top right of the Form, click on the view button and select Analytic Distribution to show it on the form. There, we should see the product (prd) with its corresponding Analytic Distribution (ad) on the form. 5. Click on the Other Information tab and select the project (p). Click on the Product tab. There, under Analytic Distribution field, you should see (ad) and the Analytic Distribution of the project (p). 6. Click on save and add another line with the exact same product. ### Expected behavior Under Analytic Distribution, we should see (ad) and the Analytic Distribution of the project (p), as for the first order line ### Unexpected behavior Under Analytic Distribution, we only see the Analytic Distribution of the project (p). ## Origin of the issue When we add another line, we trigger the compute method of the Analytic Distribution. However, due to this piece of code: https://github.com/odoo/odoo/blob/eed303b9926062eb71be6cf8dc95165efc413ed8/addons/project_purchase/models/purchase_order_line.py#L14 when we create a new order line, we never compute its analytic distribution: `self` will contain only `project_lines`, and `empty_project_lines` is empty as well. Therefore, we call the super method with nothing, so when we get in the super method: https://github.com/odoo/odoo/blob/eed303b9926062eb71be6cf8dc95165efc413ed8/addons/purchase/models/purchase_order_line.py#L249-L259 we never compute the analytic distribution of the newly created line. This piece of code was added in this commit: https://github.com/odoo/odoo/commit/c1ea8446259bd3338c004e88d48ad77ded7ef2ae to fix the issue that when a user enters manually an analytic distribution, this entry will be lost when triggering the compute of the analytic distribution. However, due to the agency of the code, we cannot prevent losing *both* manually added analytic distributions and product analytic distribution. After consulting the product owner, we concluded that there was no perfect solution in this case, but we'd rather keep the product analytic distribution, as it is much harder to add it again after its removal. Therefore, this commit reverts the previously mentioned commit, while keeping the refactor it introduced. __ opw-6063418 Forward-Port-Of: odoo/odoo#257558
This update optimizes the installation of the stock_account module, significantly reducing memory usage during database initialization. By disabling prefetching, the module now uses 55% less memory, preventing potential database overload. While installation time increased slightly (10%), this is an acceptable tradeoff for improved stability and performance.
Original PR description
## The Problem During the initialization of `stock_account`, the logic creating `product.value` instances triggered cache misses on `product.product`, accessing fields (`company_id` and…
## The Problem During the initialization of `stock_account`, the logic creating `product.value` instances triggered cache misses on `product.product`, accessing fields (`company_id` and `standard_price`) inside `_create_product_value`, and field `uom_id` inside `_run_fifo_get_stack`. Due to prefetching, this loaded all product data into memory, causing significant memory usage on large databases. ## The Solution Disabled prefetching in the full flow. Didn't go with fetching only the needed fields instead of disabling for two main reasons: - Field `standard_price` accessed in the loop is company dependent, so it needs to be fetched inside, which would be a bit verbose. - Fetching `company_id` outside the loop, `standard_price` inside the loop, and `uom_id` which is accessed down the stack in the `.create` call on `product.value` won't be an explicit/robust solution for the long term. --- ## Benchmarks *Tested on a SaaS database with 500k products:* | | Before | After | Note | | :--- | :--- | :--- | :--- | | **Memory** | 3.6GB | 1.6GB | **-55%** (fits in memory limit) | | **Time** | 10m | 11m | **+10%** (acceptable tradeoff) | **OPW-6173153** Forward-Port-Of: odoo/odoo#262702
This update fixes an issue where product variants added through the product matrix widget on purchase orders weren't displaying the correct product description. The change restores a previous helper function to ensure the full product description, including attributes, is shown. This ensures accurate product information is visible when using the matrix feature.
Original PR description
From 7e553d25890d1, the `product_label_section_and_note_field` has been split into a mixin in `product` and an override in `account`. In this split. the `get label()` helper has been slightly modified in a way the product template is not extracted from the label to keep only the additional description (usually filled with product attribute values). This lead to having only the product template name displayed on the purchase order line if the product variant was added via the matrix widget. This commit brings back the old `label` helper only for the product matrix widget. Task: 6042382 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#262735
A recent issue caused the first line of product descriptions in quotation templates to be cut off when creating sales orders. This update adds a test to prevent this problem, ensuring that all description content is correctly displayed in sales orders. This improves the clarity and accuracy of sales order information.
Original PR description
Issue: --- When using quotation template, the first line of description is always removed. Steps to reproduce: 1- Create a quotation template and add a description to the line. 2- Create a SO from quotation template. As you see the first line of description is removed in SO. Cause: --- This regression is introduced after aba778538c2032a2924f99258c5c75e463296d21 which was done under the assumption that the description always starts with product name. This breaking commit is reverted by: a702a4989fc53ccc43f57213e0db3e62e7b69e8f However it's better to have a test in order to prevent this issue being introduced in the future. opw-6178360 Forward-Port-Of: odoo/odoo#262563
This change fixes an issue where products were incorrectly displayed on the website when viewed through Company B. The update ensures product searches respect the user's current company setting, preventing sales order errors. This improves data accuracy and prevents incorrect product visibility.
Original PR description
# Setup Have 2 companies : A & B # How to reproduce - Set your website's company to Company B - Create product X : - Company : Company A - Published - Name : xyz - Go to Users > Any User > Acces…
# Setup
Have 2 companies : A & B
# How to reproduce
- Set your website's company to Company B
- Create product X :
- Company : Company A
- Published
- Name : xyz
- Go to Users > Any User > Acces Rights > Allowed Companies => leave only Company A
- Connect as that user on the website
- Go to the Shop tab and search xyz
# The problem
The product X is displayed, even though we currently use the company B's website and the product is limited to company A.
This causes problem later when Sales Order are created using that product.
If you set the Allowed Companies of the user to both Company A and Company B, then the product is correctly hidden
# Why
When you search something in the search bar, the server does a `_search_with_fuzzy()` that ends up calling a simple `model.search()`.
In our case, this search should not return product X because there is an `ir.rule` that hides product not in the current company :
https://github.com/odoo/odoo/blob/0bb5ac6c1a87367c1ebb343ad6e6e6e56188cf13/addons/product/security/product_security.xml#L34-L38
But the `website` module has some particular rule about setting the current company :
https://github.com/odoo/odoo/blob/0bb5ac6c1a87367c1ebb343ad6e6e6e56188cf13/addons/website/models/ir_http.py#L249-L261
So, in our case, since the user does not have company B in its allowed companies, then
`allowed_company_ids` = Company A. So `('company_id', 'parent_of', company_ids)` is trucy and the product is displayed
# Proposed solution
Doing the search with `with_company` raise an AccessError because the company is not present in the allowed_companies. Chaging the allowed companies logic seems risky because it
may lead to unintended side effects.
We instead enforce the website's company in the search's domain
opw-6115647
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#262366
Forward-Port-Of: odoo/odoo#260138This update fixes an issue where partners sharing the same VAT number were incorrectly excluded from VAT reports if their individual turnover was below a threshold. The change groups partners by VAT number and includes them in the report if their combined turnover exceeds the threshold, ensuring accurate reporting of VAT data. This improves compliance and reporting accuracy for Belgian businesses.
Original PR description
When having different partners with the same vat number and their individual turnover values are less than the threshold they were not included in the partner vat listing report even though if the total turnover for their vat number is above the threshold. This commit handles this case by grouping by vat number and if the total turnover for a vat number is above the threshold then it will be shown in the report with another level beneath it to show the partners having this vat number even if their individual turnovers are below the threshold. task-6133010 Forward-Port-Of: odoo/enterprise#116495 Forward-Port-Of: odoo/enterprise#115251
This update corrects a visual issue in the Project Gantt view where flexible employees were incorrectly marked as unavailable during weekends and off-hours. The fix ensures that flexible employees only appear grayed out for approved leaves and public holidays, improving the accuracy of project timelines. This resolves a previous bug that impacted how availability was displayed.
Original PR description
Steps to Reproduce --- - Assign a flexible working schedule to an employee (no leaves) - Open Project > Tasks > Gantt view grouped by Assignee - The employee's weekends and off-hours are grayed out…
Steps to Reproduce --- - Assign a flexible working schedule to an employee (no leaves) - Open Project > Tasks > Gantt view grouped by Assignee - The employee's weekends and off-hours are grayed out Current Behavior --- Flex employees with no approved leaves in the viewed date range have incorrect grayed-out days in the Project Gantt view. Expected Behavior --- Flex employees should have no grayed-out days except approved leaves and public holidays. Issue --- When a flex employee has no leaves in the viewed period, `_get_unavailable_intervals()` returns an empty dict for that resource. `_gantt_unavailability()` then falls back to `company_leaves`, producing incorrect gray intervals. The same case is already handled in `planning` (ref PR), but `project_enterprise` was not covered. Fix --- Add a guard in `_gantt_unavailability()` to return no unavailabilities for flexible resources absent from `leaves_mapping`. Related : https://github.com/odoo/odoo/commit/5f1cd39944134ffa2c30c331f8a5daca56446d78 task - 5063071 Forward-Port-Of: odoo/enterprise#113247
This update ensures that right-clicking on links within email messages displays the standard browser context menu, rather than the email-specific actions. Previously, this wasn't working correctly due to how email messages were structured within the application, and this fix resolves that issue.
Original PR description
Before this commit, when right-clicking on a link in a message of type email, this shows the message actions rather than the browser context menu. We expect to display the browser context menu, as…
Before this commit, when right-clicking on a link in a message of type email, this shows the message actions rather than the browser context menu. We expect to display the browser context menu, as there are many handful feature of browser context menu for links. This was handled in earlier fixes [1][2], but these fixes were not working with messages of type email. This didn't work because messages of type email are inside a shadow DOM, so `ev.target` is necessarily the shadow root and not the specific targeted element. This commit fixes the issue by using `ev.composedPath()` to pick the 1st element, so that this exposes the inner-most element inside the shadow DOM that has been right-clicked. This lets us ignore the showing of message actions in right-click when this comes from a link. opw-6110949 [1]: https://github.com/odoo/odoo/pull/244252 [2]: https://github.com/odoo/odoo/pull/258681 Before / After <img width="441" height="243" alt="before" src="https://github.com/user-attachments/assets/f274e8d2-66af-442e-9a31-27ea1ce4d9bd" /> <img width="605" height="513" alt="after" src="https://github.com/user-attachments/assets/3e241e83-93d0-47e6-970c-b5e5f339417d" /> Forward-Port-Of: odoo/odoo#263622
This update resolves an issue where credit notes related to returned stock weren't accurately calculating the cost of goods sold (COGS). The fix ensures that the correct price unit – either the original invoice price or the returned move value – is used, regardless of how the credit note was created. This ensures accurate financial reporting for returns and adjustments.
Original PR description
**Steps to reproduce:** Problem A) - create a storable product avco perpetual - add 2 unit in stock and set a cost of 10 - set the invoicing policy as "delivered quantities" - create and confirm a SO…
**Steps to reproduce:** Problem A) - create a storable product avco perpetual - add 2 unit in stock and set a cost of 10 - set the invoicing policy as "delivered quantities" - create and confirm a SO for 2 quantities - validate the delivery - click on "Create Invoice" and confirm the invoice - from the delivery, create and validate a return for 1 unit. - from the product form, change the cost to 15 - from the sale order, click on "Create Invoice" - confirm the Credit Note Problem B) - create a storable product with fifo perpetual - confirm a PO for 1 unit at 10 and validate receive - confirm a PO for 1 unit at 20 and validate receive - confirm a PO for 1 unit at 60 and validate receive - create a SO for 3 unit - deliver 1 unit with backorder - deliver another unit with backorder - deliver the last unit - create and confirm invoice - return the second delivery - from the invoice click on 'credit note' and validate the credit note with a quantity of 1 **Current behavior:** Problem A) the cogs is 25 Problem B) the cogs is 30 **Expected behavior:** Problem A) it should be 10 Problem B) the cogs should be 20 cause the move returned had a value of 20 **Cause of the issue:** Inside \_get\_cogs_value(), if there is an original invoice linked to the credit note we take the unit_price from this invoice. But, if the credit note is not created from the invoice (via the Credit Note button) but via the sale order (via create invoices), the account\_move has no reverse\_entry_id so we won't use the price_unit from the original line. https://github.com/odoo/odoo/blob/686a0cf67bb1e818baf43309fc94f3f0462097ed/addons/stock_account/models/account_move_line.py#L56-L58 So basically what we do for now is: If the credit note was created from invoice we use the unit price from original invoice in all cases. If the credit note was created from sale order we use get\_price\_unit in all cases (which will work for fifo because we'll use the value of the returned move but fail for avco if the standard price has changed cause we use the standard price) https://github.com/odoo/odoo/blob/dccd2256660b1e211707b740074f5fbba95ae149/addons/stock_account/models/stock_move.py#L261-L265 **Fix:** Regardless of how the credit note is created, if it's fifo we use get\_price\_unit to adapt to the value of the moves, if not we use the unit_price from original invoice opw-6097090 Forward-Port-Of: odoo/odoo#259630
11 changes
Resolved issues and error corrections
This update eliminates redundant logging messages within the account_edi_ubl_cii module. Previously, similar log entries were repeated multiple times, which didn't provide useful information. This change streamlines logging for better clarity and efficiency.
Original PR description
Before this commit, we had repeated logs (n-times if we had similar lines) but this doesn't help too much. To avoid this we decided to remove duplicated messages Task-None --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263779
This update resolves an issue where users were experiencing errors when opening account records. The fix corrects a flaw in how payment IDs were retrieved, ensuring that users only see payments they have permission to view. This improves overall system stability and prevents data access problems.
Original PR description
the computed fields _compute_reconciled_payment_ids return payment ids with a sql request that by pass the access rule. This lead in an error while opening some account.move as for https://github.com/odoo/enterprise/pull/99410 invoice_ids in sale.order the result return by the sql query should be filtered according to the access right. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261595
This update ensures that when reserving stock with packaged items, the system correctly considers the total available quantity, regardless of how it's divided into full packaging units. Previously, a large stock level was incorrectly limiting reservations. 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 currency rates were incorrectly calculated for VAT reports. Previously, the system used any invoice line, even non-product lines, to determine the rate. This change ensures the rate is derived from the first valid product line, guaranteeing accurate VAT calculations. This improves the reliability of VAT reporting.
Original PR description
The currency rate was previously computed using the first invoice line, regardless of its type. This caused incorrect rate calculation when the first line was not a product line (e.g., section, note, or display-only lines). This fix filters invoice_line_ids to use the first actual product line when extracting amount_currency and balance, ensuring that the derived rate reflects a valid monetary line. opw-5208724 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#239920 Forward-Port-Of: odoo/odoo#237535
This update resolves an issue where scanning packaging barcodes (like '6-Pack') intermittently added quantities to the wrong line in the stock picking process. The fix ensures the barcode scan correctly identifies and updates the intended packaging unit, eliminating the alternating quantity behavior. This improves the accuracy of stock management.
Original PR description
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a…
Issue ----- When there are 2 lines for a single product and different packaging uoms, scanning a packaging barcode alternates between lines. Steps to reproduce ----- - Enable packagings - Create a product AAA - barcode 1 - Create a packaging 6-Pack - 6 units - barcode for AAA set to 6 - Create a PO - one line for 30 units of AAA - one line for 5 6-Pack of AAA - Confirm PO and open picking in barcode - Scan "6" multiple times > Quantity increases on both lines, alternating for each scan Cause ----- Both lines can be found as matching lines when doing https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1426 The reason it alternates between the lines is because we set the currently selected line first in the array - and since both lines match, the `foundLine` returned ends up being the non-selected line. https://github.com/odoo/enterprise/blob/d279632db25713dd639a51385cad197dfdbd2bdc/stock_barcode/static/src/models/barcode_model.js#L1823-L1832 We can avoid this y refining the `break` condition of the loop to also match the packaging uom. ----- Ticket: opw-6034572 Forward-Port-Of: odoo/enterprise#112578
This update prevents unauthorized users from viewing or modifying assets linked to invoices. Previously, users on lower access groups could access asset information, creating a potential security vulnerability. Now, only users in specific accounting groups have access, ensuring data integrity and security.
Original PR description
Only groups `account.group_account_readonly`, `account.group_account_invoice` or higher have access to model `account.asset`, therefore if an user goes to see an invoice with assets and they are not on either group, they will receive an error and won't be able to access said invoice. How to reproduce: - Create a vendor bill - Create an account.asset and link it to said account.move - Go to the form view with an user that it's on group "Purchase: User" for example --> They get a traceback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#115053 Forward-Port-Of: odoo/enterprise#112890
This update corrects inaccuracies in the data used for calculating payroll in Belgium using the Prisma system. Specifically, it addresses missing or incorrect codes related to leave types (LEAVE280, LEAVE115, and LEAVE231), ensuring accurate tax and benefit calculations. This resolves a previous issue impacting Belgian employee payroll.
Original PR description
Issue: ---------------------------------------- Some prisma codes are wrong. Solution: ---------------------------------------- Change the data files. There are some subtilities that were not implemented: - LEAVE280: 0304 (if less than a year) and 0345 (if more) - LEAVE115: 0820 (Work accident) and 0830 (Occupational Disease) opw-6090081 Forward-Port-Of: odoo/enterprise#116642 Forward-Port-Of: odoo/enterprise#112949
This update resolves issues with note replies using the HTML composer, ensuring correct formatting and spacing are maintained. Previously, replies lost formatting and introduced extra line breaks. Now, replies preserve existing formatting and add trailing spaces correctly.
Original PR description
Before this PR, Replying to a note with the HTML composer enabled had several issues. - The mention added did not include a trailing space. - If the composer already contained formatted content, reply action discarded all formatting because the content was overwritten using composerText, which is not formatting-aware. - the composer sometimes showed extra spacing between lines because the base container used a `<p>` tag instead of a `<div>`. This PR fixes these issues by - inserting the mention directly into composerHtml with an editable trailing space instead of mutating composerText. This preserves existing formatting, and correctly adds spacing after mentions. - The base container always use a `<div>`, preventing unwanted line spacing task-[5454785](https://www.odoo.com/odoo/project/1519/tasks/5454785) Forward-Port-Of: odoo/odoo#242748
This update resolves a bug where price changes within the Blackbox POS module didn't consistently apply correctly, depending on the user's language settings (specifically, the decimal separator). The fix ensures accurate price calculations regardless of the user's locale, preventing incorrect order totals.
Original PR description
Before this commit, when changing the price of an orderline with the blackbox installed, if the decimal separator of the user language was not a dot and was used during the price change, the price was not changed. This was due to the fact that we were comparing a string with a number, the string would be implicitly be converted to a number and, when there was a comma for example, it would return a NaN which would cause the discount to not be applied and thus the price to not change. Forward-Port-Of: odoo/enterprise#113341 Forward-Port-Of: odoo/enterprise#113151
This update resolves an issue preventing accurate inventory counts when scanning pack-in-pack items. The fix ensures the system correctly identifies and updates quantities during inventory adjustments, allowing for reliable tracking of stock levels. This improves the accuracy of inventory management.
Original PR description
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent…
### Steps to reproduce: - In the settings enable "Packages" - Create a storable product A and put 1 unit in a package P in stock - Inventory > Products > Packages > open your package P - Set a parent package PP as container - Inventory > Operations > Adjustments > Physical Inventory - Select you product line for A > Request a count (from the control panel button) - Enable Show Expected Quantity and confirm - Go to the barcode app > Count Inventory (1) - scan your parent package PP #### > traceback: Uncaught Promise > Cannot create property 'inventory_quantity' on boolean 'false' ### Cause of the issue: When the Package scan is processed, we loop over all quants related to it: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L566-L569 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L602-L617 And for each of these we try to find an existing line representing the quant to update or we do create a new line. Now, the issue, is that the subpackages of the quant are not provided to find the quant candidate line to update. As such, no line is found we enter the else clause and try to createa a NewLine: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L617-L627 This time however, the appropriate subpackage (the one of the quant) is provided to the arguments. And, since the line representing this quant is already existing, the `_createNewLine` will return False: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L393-L399 https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L423 This leads to a traceback at the end of the else close since `false.inventory_quantity` doe not make sense (Cannot create property 'inventory_quantity' on boolean 'false') https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_quant_model.js#L626-L627 Fix: We adapt the `_processPackage` of the `BarcodeQuantModel` to mimic the existing 'update' behavior on the `BarcodePickingModel`: https://github.com/odoo/enterprise/blob/30a28e28f8dd27cf2c88df65e5ff47eab59360c7/stock_barcode/static/src/models/barcode_picking_model.js#L2110-L2133 Note that UOM converstion should not be required since quants are already uniformly expressed in the product uom: https://github.com/odoo/odoo/blob/30b4edace6b0859cb1b1ba4f7f2ea80ba5398e3d/addons/stock/models/stock_quant.py#L52-L54 opw-5864591 Forward-Port-Of: odoo/enterprise#116715
This update resolves an issue where subsections remained visible on invoices even after the 'Hide Composition' feature was enabled. The fix adjusts how invoice reports display information, ensuring consistency between invoices and quotations. This improves the user experience by accurately hiding detailed invoice components as intended.
Original PR description
### Steps to reproduce: - Download 'Sales' app and create a product - Create an invoice with a section and a subsection - Set `Hide Composition` on the section - Add a product line under the subsection - Confirm and preview the invoice report > The subsection is still visible _Same issue occurs when activating 'Hide Prices'_ ### Cause of Issue: The `report_invoice.xml` file didn't include the right conditions to display the subtotals and unit prices in case of 'Hide Composition'/'Hide Prices'. Also, taxes were returned in `account_move_line` when they shouldn't be visible in case of 'Hide Prices'. ### Fix: Altered the conditions for sections and subsections, so that the information showing in 'Quotations' and 'Invoices' are consistent. opw-6069334 Forward-Port-Of: odoo/odoo#258628
4 changes
Resolved issues and error corrections
This update fixes an issue where the sale average price calculation was incorrect due to handling tax inclusion/exclusion. Now, the sale average price uses the net amount (price_subtotal) after discounts, ensuring accurate pricing calculations for sales invoices. This improves the reliability of sales reporting and financial data.
Original PR description
The price_unit of a account.move.line can be with or without tax. The sale_avg_price should be either incl. or excl. tax. To ensure the avg price is always excl. tax the price_subtotal can be used. Forward-Port-Of: odoo/odoo#226994 Forward-Port-Of: odoo/odoo#199209
This update corrects a bug where the 'Purchase Orders' button disappears when changing the plan of an analytic account. The fix adjusts how the system identifies purchase orders linked to analytic accounts, ensuring the button remains visible regardless of the account plan. 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#263330
Forward-Port-Of: odoo/odoo#248236This update eliminates redundant logging messages within the Account EDI UBL Cii module. Previously, similar log entries were repeated multiple times, which wasn't providing valuable insights. This change streamlines logging for better clarity and efficiency.
Original PR description
Before this commit, we had repeated logs (n-times if we had similar lines) but this doesn't help too much. To avoid this we decided to remove duplicated messages Task-None --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263779
This update resolves an issue where the Italian tax withholding reports were incorrectly including certain payments. By adding a specific method within the l10n_it_edi_withholding module, the system now accurately excludes payments related to the 'pens fund' tax return, ensuring compliance with Italian tax regulations. This prevents potential overpayment and reporting errors.
Original PR description
Adding the method _get_amount_to_pay_additional_tax_domain inside the l10n_it_edi_withholding module to avoid dependency issues Issue from commit: 29868850b03373b9235308563d0dcd7218c62f1d runbot-242217 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
5 changes
Resolved issues and error corrections
This update resolves an issue where changes to the CC partners in the sign request wizard were incorrectly updating the associated sign template. The fix ensures that changes made in the wizard remain isolated, preventing unintended modifications to the template. This improves data consistency and simplifies the sign request process.
Original PR description
Version: - saas-19.4 Steps to reprouce: - Create a sign template. - Click on send button and inside wizard set value in cc field. Issue: - When a user adds or removes a partner in the CC field on the sign send request wizard, it was also updating the CC partners on the sign template. Cause: - The cc_partner_ids field on the wizard was declared as a related field pointing to template_id.cc_partner_ids, which caused any changes made in the wizard to be written back to the template directly. Solution: - Replaced the related field with a `compute` + `store=True` + `readonly=False` field so that the template value is only used as a default and any changes made in the wizard stay on the wizard without affecting the template. task-6196052
This update resolves an error in the FAIA report XML export caused by a missing 'TVA' TaxType element. The customer reported this issue, and the fix ensures the report complies with Luxembourg tax regulations. This prevents export failures and ensures accurate reporting.
Original PR description
This is one of several commits fixing the FAIA xml export. The customer in ticket [opw-5427296](https://www.odoo.com/odoo/unassigned-tasks/5427296) received several errors which mention that the `TaxType` element should be 'TVA'. This is corroborated by one of these elements in the XSD files for the FAIA report. The XSD files can be found at the link below. https://pfi.public.lu/dam-assets/backup/FAIA/FAIA/XSD_Files.zip opw-6118272 [link](https://www.odoo.com/odoo/project.task/6118272) *For future techs or functional support agents: updating `l10n_lu_reports` may not automatically apply the fix. You may need to go to the relevant Views model and select ⚙️ > Compare/Reset, then Hard Reset.* Forward-Port-Of: odoo/enterprise#116344 Forward-Port-Of: odoo/enterprise#113720
This update fixes an issue where opening documents linked through a Many2One field redirected users to the standard form view instead of the Kanban or List view. Now, users can directly preview documents and navigate folders, providing a better and more functional document management experience.
Original PR description
Problem: When opening a linked `documents.document` record from a Many2One field added via Studio, the user is redirected to the standard form view. This is problematic because the form view does not allow the user to preview the actual document or navigate into it if the record is a folder. Solution: override `get_formview_action` to open the Kanban/List/Activity views. task-6068437 Forward-Port-Of: odoo/enterprise#116675 Forward-Port-Of: odoo/enterprise#113149
This update resolves a critical issue where the rental website would crash when overlapping closed days and public time off periods were selected. The fix simplifies the availability check to focus solely on time ranges, ensuring a stable and reliable rental availability display for customers. This improves the overall user experience and prevents lost sales.
Original PR description
Steps to reproduce: - Install website_sale_renting_planning. - Create a rental service product linked to a planning role. - Enable Sync Shifts and Rental Orders on that role. - Add a two-day public time off on the working calendar. - Open the product on the website with overlapping dates. Current behavior: The shop crashes when the selected dates overlap a closed day and a public time off. Expected behavior: The website should show rental availability without crashing when both cases overlap. Issue: The availability flow mixed two kinds of calendar data while it only needed time ranges, so the overlap broke the website flow. Fix: Keep the unavailability check focused on time ranges for closed days and public time off so both cases can be combined safely. Ref: odoo/enterprise#98165 odoo/enterprise#102070 odoo/enterprise#102076 task-6164218 Forward-Port-Of: odoo/enterprise#116835 Forward-Port-Of: odoo/enterprise#115480
This update fixes an issue where partners sharing the same VAT number and with individual turnovers below €250 were incorrectly excluded from VAT listing reports. The change groups partners by VAT number and includes them in the report if their combined turnover exceeds the threshold, ensuring accurate reporting of VAT obligations.
Original PR description
When having different partners with the same vat number and their individual turnover values are less than the threshold they were not included in the partner vat listing report even though if the total turnover for their vat number is above the threshold. This commit handles this case by grouping by vat number and if the total turnover for a vat number is above the threshold then it will be shown in the report with another level beneath it to show the partners having this vat number even if their individual turnovers are below the threshold. task-6133010 Forward-Port-Of: odoo/enterprise#116495 Forward-Port-Of: odoo/enterprise#115251
7 changes
Resolved issues and error corrections
This update fixes a display issue where the number of ECOs listed on a Bill of Materials (BoM) was incorrect. The fix ensures that only ECOs directly associated with the current BoM version are counted, resolving a mismatch in the displayed ECO count. This improves the accuracy of BoM information for production planning.
Original PR description
Steps to Reproduce (Fresh Database): -------------------------------------- 1. Install `Manufacturing` (mrp) and `PLM` (mrp_plm) modules 2. Create a product > New -- Name: "Test Product" > Save 3.…
Steps to Reproduce (Fresh Database):
--------------------------------------
1. Install `Manufacturing` (mrp) and `PLM` (mrp_plm) modules
2. Create a product > New -- Name: "Test Product" > Save
3. Create BoM v1
- Go to Manufacturing > Products > Bills of Materials > New --Product: Test Product
- Add component: any
4. Create and apply ECO 1 on BoM v1
- Go to PLM > ECOs > New-- Product: Test Product | Apply on: Bill of Materials
- BoM: Test Product (v1) > Confirm > Apply Changes
- This creates BoM v2 (previous_bom_id = BoM v1)
5. Create and apply ECO 2 on BoM v2
- Same as step 4 but select BoM v2
- This creates BoM v3 (previous_bom_id = BoM v2)
6. Create a separate unrelated BoM for the same product
- Go to Manufacturing > Bills of Materials > New
- Product: Test Product | Component: "Component B" > Save
7. Create ECO 3 on the separate BoM
- Go to PLM > ECOs > New - Product: Test Product | Apply on: Bill of Materials
- BoM: select the separate BoM from step 6 > Confirm
Observed Bug:
-------------
- Open BoM v3 > ECO(s) stat button shows count = 2
- Click the button > opens 3 records (ECO 3 incorrectly included)
Explain:-
----------
The ECO stat button on the BoM form was showing a mismatched count vs
the actual records opened when clicking it. This happened because
[button_mrp_eco](https://github.com/odoo/enterprise/blob/55bfd499660d3eda0abfc9e8ed8c9a2befbd394b/mrp_plm/models/mrp_bom.py#L56) was using all keys from [_get_previous_boms](https://github.com/odoo/enterprise/blob/55bfd499660d3eda0abfc9e8ed8c9a2befbd394b/mrp_plm/models/mrp_bom.py#L67)() as the
domain, which includes BoMs from unrelated lineages of the same product
template, while [_compute_eco_data](https://github.com/odoo/enterprise/blob/55bfd499660d3eda0abfc9e8ed8c9a2befbd394b/mrp_plm/models/mrp_bom.py#L20) only counts ECOs belonging to the
current BoM's version lineage.
Fixed by filtering the domain to only include BoM IDs whose lineage set
contains the current BoM ID, making the opened records consistent with
the displayed count.
Before Fix
<img width="1901" height="875" alt="image" src="https://github.com/user-attachments/assets/3208aed5-ebd3-47a3-a457-a7d61b7743cb" />
```
In [24]: labo = self.env['mrp.bom'].browse(710)
In [25]: previous_boms_mapping = labo._get_previous_boms()
In [26]: Test = ['&', ('bom_id', 'in', list(previous_boms_mapping.keys())), ('type', '=', 'bom')]
In [27]: Test
Out[27]:
['&',
('bom_id',
'in',
[710,
1991,
2049,
1913,
1840,
1823,
1676,
1759,
1794,
1651,
1604,
1544,
1537,
1527,
1506,
1460,
1265,
1259,
1196,
1221,
1223,
1060,
1029,
960,
858,
850,
791,
739,
723,
698]),
('type', '=', 'bom')]
```
With My Fix
<img width="1824" height="947" alt="image" src="https://github.com/user-attachments/assets/0d68fdbc-7e42-4ce4-a326-2fb030ba1d06" />
```
In [15]: labo = self.env['mrp.bom'].browse(710)
In [16]: previous_boms_mapping = labo._get_previous_boms()
In [17]: previous_boms_mapping
Out[17]:
{710: {710},
1991: set(),
2049: set(),
1913: set(),
1840: set(),
1823: set(),
1676: set(),
1759: set(),
1794: set(),
1651: set(),
1604: set(),
1544: set(),
1537: set(),
1527: set(),
1506: set(),
1460: set(),
1265: set(),
1259: set(),
1196: set(),
1221: set(),
1223: set(),
1060: set(),
1029: set(),
960: set(),
858: set(),
850: set(),
791: set(),
739: set(),
723: set(),
698: {710}}
In [18]: relevant_bom_ids = [
...: bom_id
...: for bom_id, current_bom_set in previous_boms_mapping.items()
...: if labo.id in current_bom_set
...: ]
In [19]: relevant_bom_ids
Out[19]: [710, 698]
```
Task-6065020This update fixes inconsistencies and errors related to timesheet timers within the Odoo Enterprise system. Specifically, the timer display was inaccurate and could reset or run backward, and multiple timers could run simultaneously. This fix ensures timers function correctly and reliably.
Original PR description
## Issues When starting a timer from a task within a project, the timer appears in two locations: the page header, and the task's *Timesheets* tab. The latter does not behave as expected: when…
## Issues When starting a timer from a task within a project, the timer appears in two locations: the page header, and the task's *Timesheets* tab. The latter does not behave as expected: when opening the *Timesheets* tab, the timer resets to 00:00, and if the timer was started more than a minute earlier, it begins counting down (00:00, then -00:59, and so on). (**I1**) A second issue (**I2**), introduced at the same time, is that two timers can run simultaneously if the database is reloaded while a timer is active. A third issue (**I3**) happens after starting and stopping a timer from the Project app: the timer seems to still be running in the Timesheet app. ## Steps to reproduce 1. Install *Timesheets* (`timesheet_grid`) 2. Create a Project P and a Task T 3. Start the timer for Task T, wait a few seconds, then open the *Timesheets* tab 4. **The timer from the _Timesheets_ tab does not match the one on top of the page** 5. Wait for the timer in the header to reach 00:01:00, then open the *Timesheets* tab again 6. **The timer is going backward** For the second issue (**I2**), after executing the steps above: 7. Do not stop the timer, but stop the database and start it again 8. Create a new Project P2 and a Task T2 9. Start the timer for Task T2 10. **The timer in the header blinks between the timer from T1 and the newly started timer for T2**  For the third issue (**I3**): 1. In the project app, (create a project and a task and) start then stop a timer. Log the time 2. Open the timesheet app 3. **A timer is running** ## Cause The issues are introduced by the following commit: https://github.com/odoo/enterprise/commit/f4c7115fdf. The commit aimed to resolve an issue in which timers for sample data would start automatically, and the *Stop* button would throw an error. The issue was addressed by updating the condition that defines the `timerRunning` variable, which controls whether the *Stop* button in the Timesheets app is displayed. https://github.com/odoo/enterprise/blob/ac186aa71cd7e1b80b307ea12c7eaca246afd649/timesheet_grid/static/src/components/timesheet_display_timer/timesheet_display_timer.js#L57-L64 Issue **I1** is a side effect of this change in the Project app, where the `timerRunning` variable is evaluated to `true`, causing the timer to be displayed when it should not. The multiple timers running simultaneously (**I2**) stems from the `timerRunning` variable being initiated to false by default in the props. https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/timesheet_grid/static/src/components/timesheet_display_timer/timesheet_display_timer.js#L47-L50 The *Stop* button appearing after logging a task (**I3**) stems from the condition of the patch using `is_timer_running` over `timer_start`. https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/timesheet_grid/static/src/hooks/sample_server_patch.js#L9-L15 ## Fix This commit reverts the problematic segments from the previous commit. opw-5870756 opw-5879176 opw-5961764
This update corrects a reporting issue where employees with overlapping flexible shifts were shown with double the hours worked. The fix ensures that the attendance analysis accurately reflects the actual planned time for shifts, regardless of overlap. This improves the accuracy of time tracking data.
Original PR description
__ ## Short functional explanation of the error When for an employee with a Flexible schedule, we set a shift overlapping on two days. The attendance report displays twice the worked hours. ##…
__ ## Short functional explanation of the error When for an employee with a Flexible schedule, we set a shift overlapping on two days. The attendance report displays twice the worked hours. ## Reproduction Steps 1. Create an employee with a flexible schedule and with Work Entry Source set at Planning. 2. Go to Planning. Create a Planning Slot for this employee from 9 pm to 5 am, then Send and Publish it. 3. Click on the Reporting tab > Planning / Attendance Analysis. ### Expected behavior The total for this Month for this employee under the Planned Time field should be equal to 8 hours, which is the duration of the planning slot. ### Unexpected behavior The total for this Month for this employee under the Planned Time field is equal to 16 hours. ## Origin of the issue This report is a view, for which the SQL is defined starting this line: https://github.com/odoo/enterprise/blob/7362f1c5be7f496bdab660ed8fad37a6dd283616/planning_attendance/report/planning_attendance_analysis_report.py#L27 the issue stems from here: https://github.com/odoo/enterprise/blob/7362f1c5be7f496bdab660ed8fad37a6dd283616/planning_attendance/report/planning_attendance_analysis_report.py#L56 where we don't select distinct the planning entries based on their ID. As our shift overlaps 2 days, there will be only one entry for this shift in the `planning_slot`, but because of that, it will be duplicated. __ opw-6146052
This update resolves an issue where invoice section lines were misaligned when prices were hidden and the country of origin was displayed. The fix ensures that tax and amount information within hidden sections are correctly formatted, improving invoice presentation and accuracy. This change impacts the visual consistency of invoices generated with the account_intrastat module.
Original PR description
The content of an invoice's section lines is not aligned with the columns when the prices of the section are hidden and the country of origin is displayed in the invoice Steps to reproduce: 1.…
The content of an invoice's section lines is not aligned with the columns when the prices of the section are hidden and the country of origin is displayed in the invoice Steps to reproduce: 1. Install account_intrastat module 2. Go to Invoicing > Customers > Products and create a new product with name "test" and in the Accounting tab, set the Country of Origin to Afghanistan 3. Go to Invoicing > Customers > Customers and change Acme Corporation's country to United Kingdom 4. Go to Invoicing > Customers > Invoices and create a new invoice for partner Acme Corporation, add a section line and in that section, add product "test" 5. Click on the three dots at the end of the section line and click on Hide Prices 6. Confirm the invoice and print it 7. The content of the section line in the invoice pdf are not aligned (the tax is in column Unit Price and the amount is in column Taxes) Issue: When a section is hidden, no column is added in the section to display the origin, resulting in a misalignment of the tax and the amount of the section Solution: Add a column for the origin country in hidden section lines and add the origin country in product lines of `_get_child_lines` opw-6147929
This update simplifies a confusing error message related to GST registrations, specifically for businesses using multiple GST numbers within the same organization. The new message clearly asks users to verify the connection between their GST username and number, reducing support requests and inaccurate reports. This change improves the user experience and streamlines troubleshooting.
Original PR description
Users operating with multiple GST registrations (GST-wise branches/companies) could encounter a misleading error when the GST username belonged to a different GST number within the same organization. Previously, the system raised an error directly received from the server: [AUTH4041] Invalid Parameter state-cd in request header This message was confusing and led to unnecessary support tickets and false reports, as the issue was actually a mismatch between GST username and number. The error message has been updated to be more explicit and user-friendly: Please confirm that <gst_username> is associated with <gst_number>. Additionally, refactored duplicated logic by extracting the common code into a single helper function and reusing it across all occurrences. task-6041510
This update resolves an issue where creating two overtime shifts on a Saturday (ending at midnight) would trigger an error. The fix addresses a timing discrepancy in how overtime start and end times are calculated, preventing the 'Expected singleton' error. This ensures overtime is correctly recorded for employees working multiple shifts on non-working days.
Original PR description
__ ## Short functional explanation of the error When we create 2 shifts for the same day for an employee, on a non-working day for their schedule. When trying to create the second one after setting…
__ ## Short functional explanation of the error When we create 2 shifts for the same day for an employee, on a non-working day for their schedule. When trying to create the second one after setting the end date to midnight, we get the error: `ValueError: Expected singleton: hr.attendance.overtime.line(2, 3)` ## Reproduction Steps 1. Create an Employee. In the Payroll tab, Make sure they have an active contract. Set their Working Hours to a fixed schedule, where they have saturdays as non-working days. In the Settings tab, set an Overtime Ruleset. 2. Click on the overtime ruleset. Then, for each rule, under Action, set the Work Entry Type To Use as Overtime Hours. 3. Go to Attendances. In Configuration > Settings, under Extra Hours, set the Extra Hours Validation as Approved By Manager. 4. Create an attendance for your Employee on a Saturday, from 12h to 18h. 5. Create a second attendance for your Employee on that same Saturday, from 18h to 00h00. Try to Save. Note: the timezone of your computer, the working schedule and the employee should be set at Brussels time. ### Expected behavior The Overtime is registered. ### Unexpected behavior An error occurs: `ValueError: Expected singleton: hr.attendance.overtime.line(2, 3)` ## Origin of the issue The end time of the overtime is defined as follows: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L54-L56 However, in the case where our shift ends after the computed end of the day (in our case, the end time of the shift is 00:00:00 and the end of the day is set at 23:59:59), it creates some problems. The end time of the overtime is set 1 second too early. Later we compute the start time of the overtime as follows: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L57 Thus, the time start of the overtime is also set one second too early. As our second shift starts right after the first one, after the execution of this code, we will get a second shift that starts before the end of the first one. Then, we add these values in a list: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L59 which will contain overlapping timeframes, and with which we create an Interval: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L60 But when we create an Interval with overlapping timeframes, we obtain only one interval as the timeframes are merged. https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L173 As a result, `overtime_intervals` will contain only one time frame with 2 different corresponding overtimes, which causes a singleton error when reaching: https://github.com/odoo/enterprise/blob/47faff7d6c9da5572e3bad3ff5a55b40c2ba81ac/hr_work_entry_attendance/models/hr_version.py#L179 __ opw-6096454
This update fixes a minor visual issue in the Odoo Enterprise PDF Manager by removing an unnecessary styling class from action names. This ensures action names are displayed correctly and professionally, improving the user experience. The change is a simple refinement of the existing design.
Original PR description
Previously, pdf_manager actions used class "text-uppercase". Action names looked awkward. In this commit, we remove the class and properly display action names. task-6159317 Forward-Port-Of: odoo/enterprise#116382
12 changes
Resolved issues and error corrections
This update resolves an issue with the stock printing process by switching to a 'soft reload' instead of a hard refresh. This change ensures data is updated more reliably after printing and validation, leading to more accurate stock information. The change was prompted by a reported problem (odoo/enterprise#116210).
Original PR description
We now use `soft_reload` instead of a hard refresh to update the data after validating and printing. see odoo/enterprise#116210
This update fixes a translation issue within the Odoo web editor, specifically related to the ChatGPT alternatives dialog. The change ensures that all text within this dialog is accurately translated into the user's preferred language, improving the user experience for international users. This is a routine maintenance fix.
This update fixes an issue where duplicated leave types were causing incorrect allocation statistics to be displayed in the Time Off request wizard. The fix ensures that each leave type's allocation data is accurately calculated, regardless of shared names, by using unique record IDs for matching.
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-6105759This update fixes an issue where the project timesheet forecasting report incorrectly included public holidays from different companies. The fix ensures that only public holidays associated with the employee's company are considered, resulting in more accurate planned hour calculations. This improves the reliability of the report for business forecasting.
Original PR description
## Steps to reproduce: - Install project_timesheet_forecast module - Create a public holiday in one company - In another company create a planning slot for an employee that overlaps with the holiday - Go to Timesheets/Planning analysis report - Notice the report is not showing planned hours for the employee on the day of the public holiday ## Cause: When filtering the resource_calendar_leaves we don't check for the company so any public holiday in any company will be taken into account even if it doesn't affect the employee ## Fix: Exclude holidays that has different company than the planning slot opw-5027070 Forward-Port-Of: odoo/enterprise#116263
This update resolves an issue where Swedish account names were being incorrectly imported from SIE files due to encoding differences. The fix ensures that account data is correctly interpreted, preventing data loss and ensuring accurate financial reporting for Swedish businesses using the Odoo Enterprise system.
Original PR description
Issue: Non-ASCII charatcter from sie file were lost on import. Steps to reproduce: - in a Swedish company - import the SIE4 exemple file from sie website: https://sie.se/wp-content/uploads/2024/01/SIE4-Exempelfil-Sample-file-1.zip Current behavior: - The account 1090 is imported as "vriga imm anl tillg" instead of "Övriga imm anl tillg" Expected behavior: - The account 1090 is imported as "Övriga imm anl tillg" Cause: CP437 uses 8 bits to represent data. Ö is \x99. However, file was imported using either UTF-8 or ISO-8859-1, where Ö is \xC396 and \x99 doesn't link to anything. This commit update the test file as it was save in cp437 but read as UTF-8. opw-6167408 Forward-Port-Of: odoo/enterprise#116722
This update fixes an issue where the currency rate for VAT calculations was incorrectly determined. Previously, it relied on the first invoice line, even if it wasn't a product. Now, the system uses the first *actual product line* to ensure accurate rate calculations, improving the reliability of VAT reporting.
Original PR description
The currency rate was previously computed using the first invoice line, regardless of its type. This caused incorrect rate calculation when the first line was not a product line (e.g., section, note, or display-only lines). This fix filters invoice_line_ids to use the first actual product line when extracting amount_currency and balance, ensuring that the derived rate reflects a valid monetary line. opw-5208724 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#237535
This update resolves a confusing issue where users couldn't re-apply discount codes after discarding the initial coupon code wizard. Now, users can successfully re-apply the code, even if no reward line was created, providing a smoother customer experience. This ensures consistent reward application and avoids unnecessary frustration.
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#261950
This update fixes an issue where equity reporting rates were based on historical data instead of the current year's average. This ensures more accurate financial reporting and aligns with current accounting practices, improving the reliability of equity-related reports.
Original PR description
The rate of the 'equity_unaffected' accounts type is currently at historical, while it should be the average rate of the current year. task-5424428
This update resolves a portal crash that occurred when a salesperson lacked an email address. The fix prevents a technical error from triggering an Internal Server Error, ensuring that portal pages remain accessible to all users, regardless of whether a salesperson has an email listed.
Original PR description
Description of the issue/feature this PR addresses: Portal crashes with Internal Server Error if the assigned salesperson does not have an email address. Current behavior before PR: When opening /my/home with a portal user linked to a salesperson without an email, the view portal.portal_contact tries to concatenate a False value with a string while building the mailto: link. This raises a TypeError: can only concatenate str (not "bool") to str. Desired behavior after PR is merged: Portal pages should render normally even if the salesperson has no email address. The link is only generated when the field is available, avoiding the crashink, preventing the crash and ensuring portal pages remain accessible even if a salesperson does not have an email. Fixes #223677 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#223968
This update corrects a duplication issue where the contract type ID was appearing twice in the offer form view for the Belgian localization of HR contracts. The code was updated to ensure consistent contract type definitions, preventing errors and improving data accuracy. This ensures proper offer generation and reporting within the Odoo Enterprise system.
Original PR description
[IMP] hr_contract_salary: fix contract_type_id definition The definitions of the contract_type_id in hr_contract_salary_offer and l10n_be_hr_contract_salary/hr_contract_salary_offer should be same I converted the definition of contract_type_id in the base module to the Belgium one. Also, the contract_type_id was inserted to the view in Belgium one as well, I deleted that part to prevent double appearance. **This task is only for version 18.0 -> 19.2, the forward porting should be stopped in master. (It shouldn't be forwarded to master).** task - 6101717
This update fixes an issue where early payment discounts on invoices using cash rounding weren't calculating correctly. The change ensures that tax amounts are accurately added when cash rounding is applied, leading to more precise early payment discount calculations. This improves financial reporting accuracy.
Original PR description
Issue: When creating a payment with an early payment discount, on an invoice using a cash rounding with a strategy of “Modify tax amount”, the early payment discount lines on the payment journal…
Issue: When creating a payment with an early payment discount, on an invoice using a cash rounding with a strategy of “Modify tax amount”, the early payment discount lines on the payment journal entry will be far off from the correct amount Steps to reproduce: 1. Create a sales tax for 8.1% 2. Create a cash rounding record for 0.05 as the rounding precision, “Modify tax amount” as the rounding strategy, and “Nearest” as the rounding method 3. Create a payment term with early payment discount of 2% if paid within 18 days. And reduced tax on early payment. With a due term of 100% 30 days after the invoice date 4. Create an invoice on 1/1 with a subtotal of 339.60 and the tax of 8.1% and add the cash rounding method and payment term created earlier 5. Create a payment for it 9 days later on 1/10 for the full amount after the early payment discount is applied Cause: tax_amounts is grabbing the amount for a certain tax from the last line on the invoice with the same tax_repartition_line_id. Usually there is only one tax line representing a certain tax on an invoice. However, when a cash rounding is applied to the invoice with a strategy of “Modify tax amount”, the cash rounding line that is created will also have the same tax_repartition_line_id. In that case, it will grab the amount on the cash rounding line instead of adding the first tax amount with the cash rounding line amount Solution: In tax_amounts, add to the accumulating value if a tax repartition line id already exists as a key otherwise, insert it into tax_amounts opw-5998497
This update resolves an issue where discounts on sales orders were incorrectly reset to zero after changing product details or quantities. The fix ensures that discounts remain accurate even after modifications to the order line, improving the reliability of sales calculations. This change impacts how discounts are applied to sales orders.
Original PR description
Description of the issue/feature this PR addresses: This issue updates the discount to 0 after changing a product, a quantity... Discounts must be activated Go to sale order and create a new one. Select a product and apply a discount. Save the changes. Change product quantity and the discount will be setted to 0. https://github.com/user-attachments/assets/a9afe999-b1c2-4f72-a8b2-a81f62bd91bf Current behavior before PR: Right now when you save an order line with discount and then you update the product or the quantity it computes the discount to 0. Desired behavior after PR is merged: This PR fixes this bug so it now doesn't update it after changes. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
1 change
Resolved issues and error corrections
This update resolves an issue where the SDWorx export process incorrectly flagged freelancer employees as missing SDWorx codes. The change removes a previous check and adds a filter to exclude freelancers, ensuring accurate export functionality for this employee type. This prevents users from encountering error messages during the SDWorx export process.
Original PR description
Steps to reproduce: ------------------------------- 1. Install `l10n_be_hr_payroll_sd_worx` module 2. Switch the active company to a Belgian company 3. Go to Employees and create a new employee. Set the Employee Type to Freelancer from HR Settings page. 4. Navigate to Payroll > Reporting > Export Work Entries to SDWorx Observation: ------------------------------- A user error is raised stating: ``` There is no SDWorx code defined for the following employees ``` Issue: ------------------------------- In https://github.com/odoo/enterprise/pull/106065/changes/c19009c776349c3f5d8aebf99aff8efe987b54db The Check for Freelance Employee type was removed, which was earlier added in the fix https://github.com/odoo/enterprise/pull/102211/changes/96724c3cc55725e87e618443b96069921b8f3bda Solution: ------------------------------- Add a condition to the employee filter to exclude freelance employees from the SDWorx code validation. opw-5387342