Daily updates from Odoo
Tuesday, June 16, 2026
212 changes
21 changes
Resolved issues and error corrections
This update fixes an issue where sale order references were incorrectly linked to the user's company instead of the sale order's company. Now, the system correctly uses the company associated with the sale order or payment transaction, ensuring accurate reference generation and preventing errors in multi-company setups. This improves the reliability of our sales processes.
Original PR description
Description of the issue/feature this PR addresses: Fixes an issue where the sale order reference computation was fetching the invoice journal based on the logged-in user's current company instead of…
Description of the issue/feature this PR addresses: Fixes an issue where the sale order reference computation was fetching the invoice journal based on the logged-in user's current company instead of the company associated with the specific payment provider or transaction context. This caused incorrect reference processing or errors in multi-company environments when a user was logged into one company but processing an order from another. Current behavior before PR: The function searches for the account.journal using self.company_id.id. Since self in this context (likely a payment provider or transaction record) might be evaluated under the active user's environment context, it fetched the journal from the user's currently active company (allowed_company_ids), disregarding the actual company related to the sale order or the transaction. Desired behavior after PR is merged: The invoice journal search uses the correct company context (e.g., order.company_id.id or the specific company linked to the payment record), ensuring that the sale order reference is processed using the appropriate journal from the correct company, regardless of which company the logged-in user is currently switched into. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269558
This update corrects an issue where stock relocation incorrectly swapped the order of reservations for deliveries. After moving stock, reservations were being reassigned in the wrong sequence, leading to incorrect quantity assignments. This fix ensures reservations are maintained in the original order after internal stock movements, improving inventory accuracy.
Original PR description
Version: ---------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Enable `Storage Locations` from Inventory settings - Create a tracked storable product with on-hand 8…
Version: ---------- - 18.0+ Steps to reproduce: ------------------- - Install `stock` module - Enable `Storage Locations` from Inventory settings - Create a tracked storable product with on-hand 8 units in `Shelf 1` - Create Delivery 1 for 5 units and click `Mark as To Do` - Create Delivery 2 for 5 units and click `Mark as To Do` - Verify reservations: - Delivery 1 reserves 5 units - Delivery 2 reserves remaining 3 units - Relocate all 8 units from `Shelf 1` to `Shelf 2` using the `Relocate` action from `stock quant` - Reopen both deliveries Issue: ------ After relocating stock between internal locations, reservations are reassigned in the wrong order: - Delivery 2 becomes fully reserved with 5 units - Delivery 1 is reduced to 3 reserved units This incorrectly swaps the original reservation priority between deliveries. Cause: ------ The relocation wizard starts from: `stock.quant.relocate.action_relocate_quants()` which calls `move_quants()`: https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/wizard/stock_quant_relocate.py#L70 `move_quants()` validates an internal stock move through `_action_done()`: https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/models/stock_quant.py#L1572 During validation, `_synchronize_quant()` moves the stock quantity from `Shelf 1` to `Shelf 2`. However, the already reserved delivery move lines still reference `Shelf 1`. This temporarily makes the source quant negative (`available_qty < 0`), triggering `_free_reservation()`: https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/models/stock_move_line.py#L695-L700 Inside `_free_reservation()`, move lines are ordered using `current_picking_first`: https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/models/stock_move_line.py#L816-L821 Since both deliveries share the same scheduled date, the fallback ordering uses `-cand.id`, causing Delivery 2 (higher id) to be processed before Delivery 1 (lower id). The reservation cleanup therefore happens in this order: - Remove Delivery 2 reservation (3 qty) - Remove Delivery 1 reservation (5 qty) The corresponding moves are then added to `move_to_reassign` in the same order: `[Delivery 2, Delivery 1]` https://github.com/odoo/odoo/blob/d3eebbd1c27e8a039bb55cdf2a82d464e06ffa8c/addons/stock/models/stock_move_line.py#L849 Later, `move_to_reassign._action_assign()` processes the moves in recordset order: - Delivery 2 reserves 5 units first - Delivery 1 only gets the remaining 3 units As a result, reservation priority is unintentionally reversed after relocation. Fix: ---- Before calling `_action_assign()`, reverse `move_to_reassign` This ensures reassignment preserves the original reservation order: - Delivery 1 is reassigned first and recovers 5 units - Delivery 2 receives the remaining 3 units The reservation state therefore remains consistent before and after internal stock relocation. --- opw-6218256 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270061 Forward-Port-Of: odoo/odoo#265169
This update resolves a bug that occurred when sorting financial reports by account code, specifically when a value of 'None' was present. The fix ensures the system handles missing account codes gracefully, preventing crashes and improving the reliability of financial data reporting. This ensures accurate reporting for all users.
Original PR description
If you're grouping by account_code on a line using an account_code
engine, and there's a None value, it will crash.
To get that, you can (with demo data):
- install l10n_be
- set "BE Company COA" as the main, keeping "My Company (San Francisco)"
activated
- go to the profit and loss "Profit and Loss (Abbr) (BE)", set the date
as the current year
- set "Consolidation" filter
- Unfold "60/61 - Goods for Resale,..."
```
Traceback (most recent call last):
...
File "... in _compute_formula_batch_with_engine_account_codes
results_list.sort(key=lambda x: math.inf if x[0] is None else x[0])
TypeError: '<' not supported between instances of 'float' and 'str'
```
Because in case of `None`, we compare with `math.inf` but the account
codes are string.
no-task
Forward-Port-Of: odoo/enterprise#120531This update ensures that data associated with an IoT box isn't lost when it's removed from the system. Previously, deleting an IoT box could result in the loss of linked fiscal data. This change safeguards business data and maintains accurate POS reporting.
Original PR description
Before unlinking an iot.box from the database, we must ensure that its fiscal data module is not currently used in any pos.config. task-id: 5144489 Forward-Port-Of: odoo/enterprise#110099
This update corrects a validation error that occurred when importing Polish VAT (KSeF) invoices. The fix allows invoices without the required `P_9A` and `P_11` fields to be processed correctly, preventing interruption of the invoice workflow. This ensures smoother and more reliable import of Polish VAT invoices.
Original PR description
When importing bills, if `P_9A` and `P_11` are absent or zero, a `UserError` is raised: `No net or gross unit price found in the FA (3) for the line with the product.` **Steps to reproduce:** - Upload the problematic XML file as an attachment via `Settings -> Technical -> Attachments` - Create a `validator` server action with the code provided in the referenced ticket, with the `Add Contextual Action` flag set - Reload the page - Select the attachment in list view - Click the gear icon - Run the newly created server action KSeF FA(3) schema documentation: https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf Ticket [link](https://www.odoo.com/odoo/project.task/6211065) opw-6211065 Forward-Port-Of: odoo/odoo#265228
This update resolves an issue where the barcode inventory count feature would fail when using archived units of measure. The fix ensures that archived UOMs are correctly included in the inventory count cache, allowing accurate counts to be performed. This prevents errors during physical inventory adjustments.
Original PR description
### Steps to reproduce: - In the settings enable: "Units of Measure & Packagings", "Storage Locations" - Create a product in units and register 1 unit in stock - Inventory > Operations > Adjustments…
### Steps to reproduce: - In the settings enable: "Units of Measure & Packagings", "Storage Locations" - Create a product in units and register 1 unit in stock - Inventory > Operations > Adjustments > Physical Inventory - Select your line and request a count > Set Current Value - Inventory > Configurations > units of measures > UOM categories - Select unit and archive it - Go to the barcode app > Click Count inventory ### > Owl error: Uncaught promise ### Cause of the issue: Since the uom used on the quant is archived, it is not found by the search used to fill the barcodeCache: https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/components/main.js#L209-L213 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/models/stock_quant.py#L104-L106 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/components/main.js#L229 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/models/barcode_model.js#L37-L39 However, if the uom is not present in the barcode cache the `BarcodeQautnModel` will fail to createLinesState whihc raises a missing error: https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/models/barcode_quant_model.js#L712 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/lazy_barcode_cache.js#L107-L110 opw-6250090 Forward-Port-Of: odoo/enterprise#120065 Forward-Port-Of: odoo/enterprise#118813
This update significantly speeds up the process of validating field deletions within website forms. Previously, this check took several minutes, causing delays. Now, it completes in just milliseconds by focusing only on fields that actually contain website form markup, improving user experience and system performance.
Original PR description
Summary ======= `_check_if_used_in_website_form`, the ondelete hook on `ir.model.fields` that guards against deleting a field referenced by a website form, performs poorly on realistic databases. It…
Summary
=======
`_check_if_used_in_website_form`, the ondelete hook on
`ir.model.fields` that guards against deleting a field referenced by
a website form, performs poorly on realistic databases. It can take
multiple minutes to validate a single field deletion, blocking user
actions such as removing a Studio field.
This commit restricts the scan to columns that can actually contain
website form markup, bringing the hook from multi-minute to
sub-second without any loss of coverage.
The Problem
===========
Deleting any `ir.model.fields` record triggers this validation hook,
which must ensure the field is not referenced inside any website
form. The implementation iterates every stored HTML column returned
by `website._get_html_fields()` and runs one case-insensitive
`ILIKE '%data-model_name="<model>"%'` search per column against
`<model>.<html_field>`, then parses each match with `lxml` and
validates it with XPath.
Two root issues cause the multi-minute cost:
- **Unbounded scan surface**: all stored HTML columns are scanned
(~95 on realistic databases), even though the vast majority of them
declare `sanitize=True` and `sanitize_form=True` (the defaults).
When both flags are True, `<form>` tags are stripped on write and
the column can never physically contain website form markup.
- **Per-column `ILIKE` cost**: `ILIKE` on large TEXT/JSONB columns
performs a sequential scan. A single large HTML column is enough
to make the hook run for several minutes on its own.
Improvements
============
- Scan only columns that can actually contain forms:
- `ir.ui.view.arch_db` , primary target; all website forms are
stored there.
- HTML fields whose sanitization either is disabled
(`sanitize=False`, e.g. `blog.post.content`,
`website.custom_code_head`) or explicitly allows forms
(`sanitize_form=False`, e.g.
`product.template.website_description`, `hr.job.description`,
`event.event.description`). Any other HTML field strips `<form>`
on write and will never contain a form.
- Batch searches: group the deleted fields by model once and emit a
single `OR`-domain search per candidate column, instead of one
search per (field, column) pair.
- Parse each returned record with `lxml` and validate with XPath
directly. The `ILIKE` domain already filters out non-matching rows
DB-side.
Benchmarks
==========
Profiled on a database containing ~95 stored HTML columns and ~5.2k
views. The hook was invoked read-only via
`field._check_if_used_in_website_form()` on a custom field.
| Metric | Before | After |
| :----------------------------- | ---------: | ---------: |
| Hook wall time | ~444 s | ~173 ms |
| HTML columns scanned | 95 | 5 |
| SQL queries issued | 96 | 6 |
Key results:
- Hook wall time reduced from multi-minute to sub-second
(~2,570× faster on the profiled database).
- Scan surface reduced from ~95 columns to a handful (1 +
the form-capable HTML fields installed on the database, typically
under 10).
opw-6086536
Forward-Port-Of: odoo/odoo#268666
Forward-Port-Of: odoo/odoo#259846This update fixes a problem where Google Calendar attendee information wasn't always syncing correctly when some invitations matched existing email aliases. The change ensures that all Google attendees are properly synchronized, preventing missed invitations and improving the reliability of calendar events. This resolves an internal issue (opw-6086240) that impacted event scheduling.
Original PR description
_get_sync_partner excludes partners whose email matches a configured alias, returning a list shorter than the emails/google_attendees lists. zip() stops at the shortest, silently dropping the last Google attendee instead of the alias-matched one. Fix by replacing the positional zip with a by-email dict lookup, so each attendee is resolved independently and only the unresolvable one is skipped. opw-6086240 Forward-Port-Of: odoo/odoo#263787
This update prevents deleting a batch payment once its linked payments have been marked as 'sent' and an XML export file has been generated. Because we cannot modify the 'sent' status for SEPA payments, this change ensures data integrity and allows continued generation of necessary export files. This avoids potential issues with generating updated payment reports.
Original PR description
When you create a batch payment, linked payments are marked as sent, and an export file is generated (XML). But if you delete the batch payment, the payments will remain marked as sent, meaning you won't be able to re-generate a new XML file for those payments. As we don't want to unmarked them as sent (we can't for SEPA payments), we decided to disallow the batch payment deletion in those cases. task-6117210
This update resolves a bug in the Website Builder module that was causing crashes during testing. By removing unnecessary definitions, the code is now more stable and reliable, ensuring a smoother experience for users building their websites. This fix improves the overall quality and stability of the Odoo website platform.
Original PR description
`this.websiteService` is defined in `WebsiteBuilder`. If it's used inside tests, it's useless to define it in `Builder` and it will crash.
This update fixes a display issue where the AI button appeared inconsistently in the Mass Mailing and Website Builders. The fix redirects patching to the Website Builder, ensuring the AI button is only visible when using the website functionality. This improves the user experience for website builders.
Original PR description
__Problem__ When opening the Mass Mailing builder after the Website Builder, the AI button is still shown. Conversely, if we open the Website Builder after the Mass Mailing builder, the AI button is never shown. This happens because Owl mounts the Builder component only once as long as we don't refresh the page. Since we patch the generic HTML Builder to put the AI button in the sidebar, the state of the first time it's mounted is preserved. __Fix__ Patch the Website Builder directly instead, as we only want the AI button to be available in the website. Community PR: odoo/odoo#270266 task-6189057
This update enhances the security of our AI integrations by moving the API key from a URL parameter to a header. This change reduces the risk of exposing sensitive information and aligns with best practices for API key management. The update primarily affects the AI module.
Original PR description
Task-6306377
This update fixes an issue where holiday pay calculations could exceed an employee's regular wage. The system now ensures the base holiday amount is capped at the employee's standard earnings, ensuring accurate payroll processing and compliance. This change improves the reliability of holiday pay calculations.
Original PR description
The base amount should never be more than the employee's wage. Forward-Port-Of: odoo/enterprise#120681
A previous issue prevented users with limited time-off access from viewing leave information in the Attendances Gantt View. This fix ensures that the Gantt View correctly displays leave requests, even when users have specific access restrictions. The change adds a temporary access layer to ensure accurate calculations.
Original PR description
Version: - 19.0 Steps to reproduce: - Install Attendances and Time Off - Create an internal user. - Give the user: Attendances Officer access & No Time Off Officer/Manager rights - Create an employee…
Version: - 19.0 Steps to reproduce: - Install Attendances and Time Off - Create an internal user. - Give the user: Attendances Officer access & No Time Off Officer/Manager rights - Create an employee linked to the user. - Configure the employee with a Flexible Working Schedule. - Create and approve a Time Off request for the employee. - Open: Attendances -> Gantt View - Navigate to the month containing the employee's approved leave. Issue: - An access error is raised when opening a month that contains the employee's approved leave. Cause: - In `_handle_flexible_leave_interval`, the code accesses `leave.holiday_id` to read fields such as `request_unit_half`, `request_unit_hours`, and `request_hour_from/to` on the `hr.leave` model. - When the current user has Attendances Officer rights but no Time Off access(rare cases), the ORM access check on `hr.leave` raises an AccessError, even though this read is purely for internal calendar computation and does not expose leave data to the user interface. Fix: - Added sudo() on holiday_id to access the employee's leave details and compute the work interval as expected. Task-6264510 Forward-Port-Of: odoo/enterprise#120668 Forward-Port-Of: odoo/enterprise#119116
This update fixes an issue where salary distribution calculations weren't automatically updated when bank accounts were archived or restored. Previously, this could lead to incorrect salary payments. Now, the system correctly recomputes the salary distribution map after these account changes, ensuring accurate payroll processing.
Original PR description
When archiving or unarchiving bank accounts, salary distribution map is not recomputed. Task-6180142 Forward-Port-Of: odoo/odoo#269646 Forward-Port-Of: odoo/odoo#262255
This update ensures that regenerating overtime only affects the selected overtime ruleset, preventing unintended changes to other periods. A confirmation message is now displayed to alert users about resetting manual edits linked to the selected ruleset, increasing data accuracy and reducing potential errors.
Original PR description
When you click on "regenerate overtime", currently, it reset all overtimes of all overtime ruleset, it should only act on the selected one. Second, it should display a confirmation message: "This will reset all manual edit on overtime period linked to those rules. Do you confirm ?" Task-6095714 Forward-Port-Of: odoo/odoo#258103
This update resolves an issue where creating payment sequences in the Accounting module would sometimes trigger a technical error. The fix ensures that date sequences are correctly formatted, preventing the traceback and allowing users to create payment sequences without interruption. This improves the stability and usability of the payment process.
Original PR description
## Issue When trying to call `dt.replace` on a `datetime.time`, a TypeError is raised ``` File "/home/odoo/Documents/src/odoo/190/odoo/addons/base/models/ir_sequence.py", line 270, in _next return…
## Issue
When trying to call `dt.replace` on a `datetime.time`, a TypeError is raised
```
File "/home/odoo/Documents/src/odoo/190/odoo/addons/base/models/ir_sequence.py", line 270, in _next
return seq_date.with_context(ir_sequence_date_range=seq_date.date_from, ir_sequence_date=dt.replace(tzinfo=None))._next()
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'tzinfo' is an invalid keyword argument for replace()
```
## Steps to reproduce
1. Install *Accounting* (`accountant`)
2. Update the `account.payment` sequence:
- Toggle *Use subsequences per date_range* and create a range
3. In Accounting > Customers > Payments, create a payment:
- Payment Type: Receive
- Customer: Any
- Amount: Any
4. **A traceback appears**
## Cause
This error was introduced by https://github.com/odoo/odoo/commit/4b9dd7893f96.
The `AccountPayment._compute_name` method calls `_next_by_code` and passes a date as the `sequence_date`.
https://github.com/odoo/odoo/blob/337efb069f6cf2cb9478a970f075fd139c1e8e0a/addons/account/models/account_payment.py#L420-L422
In the `_next` method, the `dt` variable is set to that date (`datetime.date`), and calling the `.replace` method on that variable raises an error, as there's no tzinfo for `datetime.date`s.
opw-6303885
Forward-Port-Of: odoo/odoo#270283This update fixes a potential instability issue with the PDP registration process. By moving a key function to the company record, we ensure the registration process remains reliable even if the temporary PDP registration object is deleted. This improves the overall robustness of the system.
Original PR description
The aim of this commit is to move _get_iap_url on res.company model instead of pdp.regitration. This move is made for 2 reasons: 1. PDP registration is a transient model which means that the object could be deleted in the time. 2. PDP registration implementation was using the model (api.model) and the record (self.edi_mode) which is a bad implementation. So by moving this function on company, we ensure that we always have a record to call the function and then the function is no longer an api.model. no task id --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270380 Forward-Port-Of: odoo/odoo#270345 Forward-Port-Of: odoo/odoo#270386
This update fixes a potential issue where state deductions exceeding employee income could result in incorrect, negative taxable income calculations on payslips. The change ensures that taxable income defaults to zero in these scenarios, accurately reflecting state tax liabilities and preventing misleading pay statements. This improves payroll accuracy and compliance.
Original PR description
This commit simply defaults the computed taxable income amount to 0 in case the state deductions are greater than their gross income. Otherwise our payslips would imply that these employees are owed money by the state opw-5137280 Forward-Port-Of: odoo/enterprise#119208 Forward-Port-Of: odoo/enterprise#98114
This update resolves an issue where UBL import failed due to a mismatch between the product's and imported unit of measure categories. The fix allows imports to proceed without error, and users can manually correct the UoM after the import is complete. This prevents import failures and improves data accuracy.
Original PR description
The new collected_values UBL import flow sets product_uom_id from the XML unitCode without checking that the resolved UoM category matches the matched product's UoM category. When they diverge, writing the line triggers the incompatible error. Steps to reproduce: - Create a product "XYZ" with UoM "Units" (category "Unit"). - Import a Peppol UBL bill whose line has Item/Name "XYZ" and unitCode="MTK" (uom_square_meter, "Surface"). - Import fails with: "The Unit of Measure (UoM) 'm²' you have selected for product 'XYZ', is incompatible with its category : Unit." This fix will avoid setting the product_uom_id when the UoM category doesn't match the product's UoM category, allowing the line to be imported without error. The user can then manually set the correct UoM after import. opw-6121714 Forward-Port-Of: odoo/odoo#269933 Forward-Port-Of: odoo/odoo#269714
This update corrects a problem where invoice processing for French PEPPOL (electronic invoice) compliance failed when using sub-contacts. The fix ensures that the correct commercial partner is used to retrieve PEPPOL EAS and endpoint information, resolving invoice validation errors and enabling proper compliance.
Original PR description
…cial partner **STEP TO REPRODUCE** 1. Install l10n_fr_pdp. 2. On the demo FR company contact, create a new contact of type invoice address. 3. Create an invoice with this new contact, and try send the invoice. 4. The pdp invoice constraints checking for pdp identifiers fails. **CAUSE** We use the partner to retrieve the peppol_eas and peppol_endpoint field values, but for subcontact, those field are empty. We should use the commercial_partner_id which correspond to the company we try to invoice instead. opw-6235830 Forward-Port-Of: odoo/odoo#270014
19 changes
Resolved issues and error corrections
This update corrects a potential error in the holiday payroll calculation. Previously, the base amount could exceed an employee's wage when calculating holiday pay. This change ensures that the base amount is always capped at the employee's regular wage, aligning with payroll regulations and improving accuracy.
Original PR description
The base amount should never be more than the employee's wage.
This update resolves an issue where users experienced errors when simultaneously editing the names of multiple projects. The fix avoids accessing project names within a multi-record edit, ensuring smoother operation and preventing data inconsistencies. This improves the user experience when managing multiple projects.
Original PR description
Currently, an error will occur when user multi edits name of projects. Steps to replicate: - Install `project` and open projects. - From the list view select multiple projects and edit their name.…
Currently, an error will occur when user multi edits name of projects.
Steps to replicate:
- Install `project` and open projects.
- From the list view select multiple projects and edit their name.
Error:
```
File '/home/odoo/src/odoo/saas-19.3/addons/project/models/project_project.py', line 754, in write
analytic_account_to_update.write({'name': self.name})
File '/home/odoo/src/odoo/saas-19.3/odoo/orm/fields.py', line 1728, in __get__
record.ensure_one()
File '/home/odoo/src/odoo/saas-19.3/odoo/orm/models.py', line 5341, in ensure_one
raise ValueError('Expected singleton: %s' % self)
ValueError: Expected singleton: project.project(8, 9, 10)
```
Cause:
- As multiple records were changed at the moment, `self` had multiple recordsets and trying to access `self.name` [1] causes this error.
Solution:
- Avoided accessing `self.name` on a multi-recordset during multi-edit.
- Updated analytic account names using the name recieved in the vals.
[1]: https://github.com/odoo/odoo/blob/a69ec43f490735f639292d116b0207182c5b2581/addons/project/models/project_project.py#L608
sentry-7452096418
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#269830
Forward-Port-Of: odoo/odoo#267620This update ensures that when multiple project names are edited simultaneously, the linked folder names are also updated correctly. Previously, the system didn't reflect these changes, leading to inconsistencies. This fix corrects a bug in the multi-edit functionality, improving data accuracy.
Original PR description
Currently, when user multi-edits projects names from list view the linked folder name doesnt get updated. Steps to replicate: - Install `documents_project` and open projects. - Select multiple projects and edit their names. Issue: - The project names get updated but their respective linked folder's name doesnt get updated. Cause: - During multi-edit, `self.documents_folder_id` contains the folders of all selected projects. - As a result, `len(self.documents_folder_id.project_ids) == 1` [1] is evaluated on the combined recordset instead of per project, causing the condition to fail whenever multiple projects are renamed. Solution: - Avoided accessing `self.name` on a `multi-recordset` during multi-edit. - Filtered projects individually and updated their document folders using the name in vals. [1]: https://github.com/odoo/enterprise/blob/3c2985ca6011700c271ed14e40e08c89be822753/documents_project/models/project_project.py#L101 sentry-7452096418
This update resolves an issue where Star printers were incorrectly receiving commands. The fix ensures Star printers use the correct protocol and commands, improving their functionality and reliability. This resolves a technical problem that prevented proper communication with these printers.
Original PR description
Currently Star printers were correctly identified and thus were not using the right protocol and esc/pos commands were instead sent to the printers. `device_id` previously used is `""` for Star printers Star printers ignore such commands. This PR fixes the protocol used with Star printers
This update corrects a bug in the stock account closing entry that incorrectly calculated inventory values when multiple companies were involved. The fix ensures that the closing entry accurately reflects the inventory value for each company, resolving discrepancies in initial balances and stock valuations. This ensures accurate accounting reporting across multiple company setups.
Original PR description
**Steps to reproduce on a new db:** (bug also reproducable on runbot but the impact is less easy to compute because of influence of other existing companies) - create a new company as company 2 and…
**Steps to reproduce on a new db:** (bug also reproducable on runbot but the impact is less easy to compute because of influence of other existing companies) - create a new company as company 2 and use the existing default company as company 1. - create a warehouse for both company - for both comp, in settings for the 'fiscal localization' set Package : Generic Chart of account, if not already set (to have account journals). - for both comp, in settings for inventory valuation set 'periodic' and for periodic valuation set 'daily' From company 1 : - create a storable product with standard price method and set a cost of 30 - set an onhand quantity of 1 if you navigate to 'inventory valuation' you'll see that : - initial balance is 0 - ending stock is 30 - the variation lines have a balance of 30 - all of this is expected From company 2 : - change the cost of the product to 10 - set an onhand quantity of 1 if you navigate to 'inventory valuation' you'll see that : - initial balance is 0 - ending stock is 10 - the variation lines have a balance of 10 - all of this is expected From any company : - navigate to 'scheduled actions' and select the action 'Stock Account: Inventory Valuation Closing' - click on 'Run Manually' - navigate to 'inventory valuation' **Current behavior:** with company 1 selected : - the initial balance is now 30 - ending stock still 30 - no variation lines - the initial balance was correctly increased by the closing entry with company 2 selected: - the initial balance is now 40 - the ending stock is still 10 - the variation lines credit 30 in stock valuation In company 2 the closing entry debitted 40 in stock valuation instead of 10 which increased the initial balance to 40 instead of 10 If you open the journal items you'll find the closing amls have a balance of 40 instead of 10 **Cause of the issue:** The _cron_post_stock_valuation() method calls action_close_stock_valuation() on both companies https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/addons/stock_account/models/res_company.py#L143-L144 This methods calls _action_close_stock_valuation with a context modified with only self.env.company.ids in 'allowed_company_ids' https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/addons/stock_account/models/res_company.py#L56 This is needed because inside stock_value() we use the total value of the product https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/addons/stock_account/models/res_company.py#L92 which will be the sum of the values of the product for each company inside allowed_company_id https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/addons/stock_account/models/product.py#L274 So in case action_close_stock_valuation() was called from the 'generate entry' button from the inventory valuation view we need only the main company selected to be in the 'allowed_company_ids' so that the inventory value is computed based only on this company (as is the accounting value). The problem is that this does not work when calling the method from _cron_post_stock_valuation because then there is no 'allowed_company_ids' in the context (because it was called from _process_job() with a new env). so self.env.company will be the company of the user which will be company 1. https://github.com/odoo/odoo/blob/bfa39854e56da4bf23295d62f63d66973ad0d78e/odoo/orm/environments.py#L243 Therefore when _action_close_stock_valuation will be called on company 2, in the context, allowed_company_ids will be company 1. Then, when computing 'products', with_company() will add self (company 2) to the context. https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/models/res_company.py#L151-L152 So stock_value will return the sum of the total_value of each product for company 1 and company 2 which is 40 (instead of 10 for just company 2) https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/models/res_company.py#L242 We then create the closing accounting entry to match the accounting value with the stock value, which explains why the new initial accounting balance of company 2 is 40. **fix:** We set the context using self instead of self.env.companies This makes more sense as both in the cron use case and the generate entry use case the stock value we want is the one of the company in self. - In cron use case, it's obvious as the method is called in a for loop on each company - In the generate entry use case, self will also be the main company, because it's called, in actionGenerateEntry, on this.companyId https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/static/src/stock_valuation/controller.js#L75 which is computed based on the get_report_values https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/static/src/stock_valuation/controller.js#L21 https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/static/src/stock_valuation/controller.js#L28-L30 Which returns the main company https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/report/stock_valuation_report.py#L29 Most importantly, this is also aligned with how the accounting values are computed. https://github.com/odoo/odoo/blob/616e82d7b3a53b1facf481e783baed3e99393d3c/addons/stock_account/models/res_company.py#L103-L105 opw-6237402 Forward-Port-Of: odoo/odoo#269152 Forward-Port-Of: odoo/odoo#266932
This update corrects an issue where Polish VAT invoice imports would fail if certain required fields (P_9A and P_11) were missing or had zero values. The fix allows invoices with these fields absent to be processed correctly, preventing interruptions to the invoice validation process. This ensures smoother import of Polish VAT invoices.
Original PR description
When importing bills, if `P_9A` and `P_11` are absent or zero, a `UserError` is raised: `No net or gross unit price found in the FA (3) for the line with the product.` **Steps to reproduce:** - Upload the problematic XML file as an attachment via `Settings -> Technical -> Attachments` - Create a `validator` server action with the code provided in the referenced ticket, with the `Add Contextual Action` flag set - Reload the page - Select the attachment in list view - Click the gear icon - Run the newly created server action KSeF FA(3) schema documentation: https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf Ticket [link](https://www.odoo.com/odoo/project.task/6211065) opw-6211065 Forward-Port-Of: odoo/odoo#265228
This update ensures accurate product pricing when selling large quantities of items like boxes of screws. Previously, the system rounded base unit counts, leading to incorrect reference prices. Now, the system preserves high-precision values, allowing for correct calculations when selling in bulk packs.
Original PR description
**Description of the issue/feature this PR addresses:** The `Product Reference Price` feature in `website_sale` cannot correctly handle products sold in large packs when the reference quantity…
**Description of the issue/feature this PR addresses:** The `Product Reference Price` feature in `website_sale` cannot correctly handle products sold in large packs when the reference quantity requires a very small `base_unit_count`. For example, a product sold as a `box of 10000` screws should be able to use `0.0001` as its `Base Unit Count`, so the reference price can be computed against the box quantity correctly. **Current behavior before PR:** `base_unit_count` uses the default float precision, so values with more than two decimal places are rounded in the product form. When trying to set `Base Unit Count` to `0.0001`, the value is rounded to `0.00` / `0.01`, which makes the Product Reference Price computation incorrect. Steps to reproduce: 1. Go to Settings > Website and enable Product Reference Price. 2. Create or open a product named `Screws`. 3. Set Sales Price to `$ 1.00`. 4. On the product form, set Base Unit Count to `0.0001`. 5. In Custom Unit of Measure, type `box of 10000` and press Create. <img width="1374" height="740" alt="1" src="https://github.com/user-attachments/assets/2d4f7863-b2cd-4c7c-87e1-11526dc50551" /> **Desired behavior after PR is merged:** `base_unit_count` keeps high-precision values such as `0.0001`. This allows `Product Reference Price` to correctly support large-pack scenarios, such as selling screws in a `box of 10000`, by storing `base_unit_count` with unlimited numeric precision. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262579
The Budget Report was previously timing out on large customer databases due to how it processed data. This update significantly improves performance, allowing users to run the report without delays, even with extensive data. This enhancement ensures the Budget Report remains a reliable tool for financial analysis.
Original PR description
**Description** Opening the Budget Report from any budget record times out on databases with significant data volume. The request to `budget.report/formatted_read_grouping_sets` consistently times…
**Description**
Opening the Budget Report from any budget record times out on databases
with significant data volume. The request to
`budget.report/formatted_read_grouping_sets` consistently times out,
making the Budget Report completely unusable.
**Root cause:**
`budget.report` is an SQL view that consists of 5 UNION ALL branches.
When the list view loads, the ORM translates the `budget_analytic_id`
domain into a WHERE clause on the outer query wrapping the full UNION
ALL subquery. PostgreSQL cannot push this filter through a UNION ALL as
it's a hard optimization barrier. It must fully materialize the subquery
regardless of which budget is being viewed.
**Fix:**
Override _search on budget.report to extract budget_analytic_id and
budget_line_id conditions from the incoming domain using the Domain API.
budget_line_id is rewritten as Domain('id', op, value) so _to_sql()
correctly emits bl.id in the raw SQL. The resulting domain is injected
in context under budget_line_domain and read in _get_bl_query,
_get_aal_query (base module), and _get_pol_query (purchase module) to
filter budget_line rows inside each branch's LEFT JOIN ON clause.
This also removes the budget_report_budget_line_ids context key from
budget_line._compute_all, unifying both filters under one mechanism.
---
On customer DB (568k `account_analytic_line`, 27k `budget_line`,
116k confirmed `purchase_order_line`, 114k posted vendor bill lines
with purchase link):
| Budget | Before | After |
|---|---|---|
| 8 lines, 730d span | timeout | 2.27s |
| 14 lines | timeout | 2.39s |
| 14 lines, 1095d span | timeout | 1.63s |
- Before: https://explain.dalibo.com/plan/ehed5eb8de251426
- After: https://explain.dalibo.com/plan/db8aef35cag9hg6f
opw-6098047
Forward-Port-Of: odoo/enterprise#119728
Forward-Port-Of: odoo/enterprise#114692This update corrects a problem where Google Calendar attendee information was being dropped incorrectly when an email address matched a configured alias. The fix ensures that all Google attendees are accurately synchronized, preventing missed invitations and improving event attendance tracking. This resolves a previous issue impacting event scheduling reliability.
Original PR description
_get_sync_partner excludes partners whose email matches a configured alias, returning a list shorter than the emails/google_attendees lists. zip() stops at the shortest, silently dropping the last Google attendee instead of the alias-matched one. Fix by replacing the positional zip with a by-email dict lookup, so each attendee is resolved independently and only the unresolvable one is skipped. opw-6086240 Forward-Port-Of: odoo/odoo#263787
This update resolves an issue where automatic payment terminal integration blocked users from splitting bills. Now, users can manually set the payment amount or use the original 'Send' button, providing greater flexibility for handling various payment scenarios. This change enhances the user experience for point-of-sale transactions.
Original PR description
Using payment terminals, we automatically send the transaction to the terminal to avoid a click on "Send", but this prevents from setting an amount to send for split bills. We now let the user set an amount, or directly click on "Send". see odoo/enterprise#120672 task-6303855
This update resolves an issue where the barcode inventory count feature would fail when using archived units of measure. The fix ensures that archived UOMs are correctly included in the inventory count cache, allowing users to accurately count stock even when units have been archived. This prevents errors during physical inventory processes.
Original PR description
### Steps to reproduce: - In the settings enable: "Units of Measure & Packagings", "Storage Locations" - Create a product in units and register 1 unit in stock - Inventory > Operations > Adjustments…
### Steps to reproduce: - In the settings enable: "Units of Measure & Packagings", "Storage Locations" - Create a product in units and register 1 unit in stock - Inventory > Operations > Adjustments > Physical Inventory - Select your line and request a count > Set Current Value - Inventory > Configurations > units of measures > UOM categories - Select unit and archive it - Go to the barcode app > Click Count inventory ### > Owl error: Uncaught promise ### Cause of the issue: Since the uom used on the quant is archived, it is not found by the search used to fill the barcodeCache: https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/components/main.js#L209-L213 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/models/stock_quant.py#L104-L106 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/components/main.js#L229 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/models/barcode_model.js#L37-L39 However, if the uom is not present in the barcode cache the `BarcodeQautnModel` will fail to createLinesState whihc raises a missing error: https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/models/barcode_quant_model.js#L712 https://github.com/odoo/enterprise/blob/26546bcd3beebc7f65ce08385441b6284b46598e/stock_barcode/static/src/lazy_barcode_cache.js#L107-L110 opw-6250090 Forward-Port-Of: odoo/enterprise#120065 Forward-Port-Of: odoo/enterprise#118813
This update fixes a visual issue on mobile devices where an unnecessary caret appeared next to the 'Expand' button in the Inbox. It also corrected the alignment of header buttons, preventing them from wrapping onto multiple lines when the messaging menu was opened. This ensures a cleaner and more professional user experience on mobile.
Original PR description
On mobile, an unwanted caret was displayed next to the message 'Expand' button in the Inbox because the messaging menu itself opens a dropdown, causing any nested Dropdown to automatically display a caret. This commit also fixes the alignment of the Inbox header action buttons, which wrapped onto multiple lines when opening the messaging menu on mobile while the Inbox tab was already selected. In this case, the `AutoresizeInput` width was computed at its maximum size, leaving insufficient space for the header action buttons and causing them to wrap onto multiple lines. Task-[6244177](https://www.odoo.com/odoo/project/1519/tasks/6244177) Forward-Port-Of: odoo/odoo#270167 Forward-Port-Of: odoo/odoo#266343
This update optimizes how Odoo retrieves related mailings for testing, addressing a performance bottleneck that occurred when processing large campaigns. The change prevents crashes and significantly improves the speed of mass mailing operations, particularly for campaigns with many mailings. This ensures smoother and more reliable email sending.
Original PR description
**Description of the issue/feature this PR addresses:** The method _get_ab_testing_siblings_mailings currently scans all mailings in a campaign to apply a simple filter, which becomes expensive on databases with many large mailings. **Steps to reproduce bug:** 1) Run this script to get [enough sufficiently large mailings](https://gist.github.com/brcut-odoo/bb0d6d334bfe110afe16021d17d1b443) 2) Open one of the mailings and recieve a crash from the _get_ab_testing_siblings_mailings **Current behavior before PR** https://drive.google.com/file/d/19xftvzsGSQ9DxB67LNiLkKApzsD192ax/view?usp=drive_link **Current behavior after PR** https://drive.google.com/file/d/1apTJ0rWTKaATYa67ZmmN-7bKhrw4KuTx/view?usp=drive_link opw-6245908 Forward-Port-Of: odoo/odoo#268283
This update enhances the stability of the French PDP registration process by moving a key function to the company record. Previously, the registration process relied on a temporary model, which could be deleted. This change ensures a reliable record is always available, improving the overall system's robustness.
Original PR description
The aim of this commit is to move _get_iap_url on res.company model instead of pdp.regitration. This move is made for 2 reasons: 1. PDP registration is a transient model which means that the object could be deleted in the time. 2. PDP registration implementation was using the model (api.model) and the record (self.edi_mode) which is a bad implementation. So by moving this function on company, we ensure that we always have a record to call the function and then the function is no longer an api.model. no task id --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270380 Forward-Port-Of: odoo/odoo#270345
This update corrects a bug in Odoo's payroll calculations for the United Arab Emirates (AE) and Saudi Arabia (SA) localizations. The fix ensures accurate net cost calculations by standardizing how salary rules are processed, preventing negative value aggregation that was previously causing incorrect results.
Original PR description
Steps: - Add a new salary category with the parent_id of company contribution (COMP) in AE - Create a dummy salary rule of that category - Compute a payslip and see the net cost unchanged Or - Create and compute a payslip in SA - Company contributions will be subtracted from each other Issue: - In AE localization, the issue with the rule was dropping salary rules that have a parent of company contribution category - In SA localization, the issue with the NETCOST was the aggregation of individual rules could include negative values which is not the intended flow. Solution: A standardized approach was adopted in both localizations in order to match the calculation of the NETCOST across. This approach will account for the categories with company contribution parent as well as the positive values for the individual salary rules.
A confusing error message related to loyalty discounts has been fixed. The update clarifies the issue for users, ensuring they understand why a discount code wasn't applied. This improves the user experience and reduces support requests related to this specific functionality.
Original PR description
Issue: Error message was ambiguous and left users wondering what was wrong. Steps to reproduce: Set a discount code where the conditional rule is set to "minimum purchase" among specified products. Then, spend an amount larger than this on unrelated products and try to apply the discount code. "A minimum of x(currency) should be purchased to get reward" Cause: Poor error message caused ambiguity Solution: Corrected the error message so that the user can better understand where the issue is. opw-6290514 Forward-Port-Of: odoo/odoo#269319
This update optimizes the MRP work order process by preventing unnecessary BoM calculations for quality points like instructions and pass/fail checks. Previously, these checks were slowing down the system, but now they're handled more efficiently, resulting in a significant performance boost. This change improves overall work order processing speed.
Original PR description
`_compute_component_ids` unconditionally called `bom.explode()` for every product variant on the BoM, even for quality point types (`instructions`, `pass_fail`, etc.) that never use the `component_id` picker. The field is only meaningful for `register_consumed_materials` and `register_byproducts`. Restrict the expensive path to those two types with an `elif` so all other types return `component_ids = False` immediately. | # Input data | Before PR | After PR | |:---:|:---:|:---:| | 10 variants, 10 components, 2 phantom BoMs, 3 ops | 841 ms | 0.1 ms | | 30 variants, 20 components, 5 phantom BoMs, 3 ops | 1,343 ms | 0.1 ms | | 80 variants, 40 components, 12 phantom BoMs, 5 ops | 8,674 ms | 0.1 ms | OPW-6210368 Forward-Port-Of: odoo/enterprise#118470
This update resolves an issue where creating payments using certain accounting sequences would trigger a technical error. The fix ensures that the system correctly handles date-only values when generating sequence numbers, preventing the traceback and ensuring payment creation functions smoothly. This improves stability and reliability for users creating payments.
Original PR description
## Issue When trying to call `dt.replace` on a `datetime.time`, a TypeError is raised ``` File "/home/odoo/Documents/src/odoo/190/odoo/addons/base/models/ir_sequence.py", line 270, in _next return…
## Issue
When trying to call `dt.replace` on a `datetime.time`, a TypeError is raised
```
File "/home/odoo/Documents/src/odoo/190/odoo/addons/base/models/ir_sequence.py", line 270, in _next
return seq_date.with_context(ir_sequence_date_range=seq_date.date_from, ir_sequence_date=dt.replace(tzinfo=None))._next()
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'tzinfo' is an invalid keyword argument for replace()
```
## Steps to reproduce
1. Install *Accounting* (`accountant`)
2. Update the `account.payment` sequence:
- Toggle *Use subsequences per date_range* and create a range
3. In Accounting > Customers > Payments, create a payment:
- Payment Type: Receive
- Customer: Any
- Amount: Any
4. **A traceback appears**
## Cause
This error was introduced by https://github.com/odoo/odoo/commit/4b9dd7893f96.
The `AccountPayment._compute_name` method calls `_next_by_code` and passes a date as the `sequence_date`.
https://github.com/odoo/odoo/blob/337efb069f6cf2cb9478a970f075fd139c1e8e0a/addons/account/models/account_payment.py#L420-L422
In the `_next` method, the `dt` variable is set to that date (`datetime.date`), and calling the `.replace` method on that variable raises an error, as there's no tzinfo for `datetime.date`s.
opw-6303885
Forward-Port-Of: odoo/odoo#270283This update resolves an issue where UBL import failed due to a mismatch between the imported unit of measure and the product's category. The fix allows imports to proceed without error, and users can then manually adjust the UoM after the import is complete. This improves import reliability.
Original PR description
The new collected_values UBL import flow sets product_uom_id from the XML unitCode without checking that the resolved UoM category matches the matched product's UoM category. When they diverge, writing the line triggers the incompatible error. Steps to reproduce: - Create a product "XYZ" with UoM "Units" (category "Unit"). - Import a Peppol UBL bill whose line has Item/Name "XYZ" and unitCode="MTK" (uom_square_meter, "Surface"). - Import fails with: "The Unit of Measure (UoM) 'm²' you have selected for product 'XYZ', is incompatible with its category : Unit." This fix will avoid setting the product_uom_id when the UoM category doesn't match the product's UoM category, allowing the line to be imported without error. The user can then manually set the correct UoM after import. opw-6121714 Forward-Port-Of: odoo/odoo#269933 Forward-Port-Of: odoo/odoo#269714
15 changes
Resolved issues and error corrections
This update prevents a crash during the installation of the Saudi Arabia E-invoicing module (l10n_sa_edi) in Odoo 19.1 and above. The issue occurred when required taxes were missing, and a code change disrupted the previous workaround. The fix ensures a smoother installation process.
Original PR description
Issue: Installing the `l10_sa_edi` E-invoicing module causes an error in versions 19.1 and above if any of the taxes in the `account.tax-sa.csv` are missing. This behavior was previously avoided via the post init function `_l10n_sa_edi_post_init()`, which no longer works due to the change made to ir_module.py fetching the template data during the module installation. Reproduction Steps: - Install Accounting - Configuration > Settings > Change "Fiscal Localization" to Saudi Arabia - Configuration > Taxes > Delete 0% "Not Subject to VAT" tax - Try to install `l10n_sa_edi` Saudi Arabia - E-invoicing Fix: Updated '_get_sa_edi_account_tax()` to filter out taxes that don't already exist on the database. Removed the `_l10n_sa_edi_post_init()` function since it should now be obsolete. Related ticket: opw-6293740
This update fixes a visual issue where portal cards on the customer portal lacked a background color. The issue was caused by a default color setting being incorrectly initialized. Now, all portal cards will have a consistent background color, improving the overall user experience and visual appeal.
Original PR description
Steps to reproduce: 1. Go to the "/my" or "/my/home" page. Issues: Portal cards do not have a background color by default. Cause: The `portal-card` color variable was initialized with a `null` value, preventing any default background color from being applied to portal cards. task-6250258
This update fixes a security vulnerability where users without approval rights could incorrectly interact with approval requests, leading to errors. The change restricts access to 'Accept' and 'Refuse' options within approval activities to only the designated approvers, ensuring proper workflow control.
Original PR description
Currently when a user submits an approval request, an activity is created for the approver who can validate or refuse the request directly from the activity, however these options are also visible to other users who will trigger an error if interacting with the options. This commit removes these options for users who are not the approver. **Steps to reproduce:** - Log in as admin - Go to approvals - Select dropdown menu of General Approval and Edit - Change documents to optionnal - Make sure admin is in the approvers list - Log in as demo - Go to approvals -> General Approval -> New Request - Submit the request - You'll see an activity be created for admin, with Accept and Refuse options - If you select any of these options you will get an access error opw-5423528 Forward-Port-Of: odoo/enterprise#109047
This update corrects a validation error that previously prevented the import of Polish VAT invoices (KSeF) when certain required fields (`P_9A` and `P_11`) were missing or had zero values. The fix allows invoices with these fields absent to be processed correctly, ensuring accurate VAT reporting and avoiding disruptions to the invoice import workflow.
Original PR description
When importing bills, if `P_9A` and `P_11` are absent or zero, a `UserError` is raised: `No net or gross unit price found in the FA (3) for the line with the product.` **Steps to reproduce:** - Upload the problematic XML file as an attachment via `Settings -> Technical -> Attachments` - Create a `validator` server action with the code provided in the referenced ticket, with the `Add Contextual Action` flag set - Reload the page - Select the attachment in list view - Click the gear icon - Run the newly created server action KSeF FA(3) schema documentation: https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf Ticket [link](https://www.odoo.com/odoo/project.task/6211065) opw-6211065 Forward-Port-Of: odoo/odoo#265228
This update optimizes the MRP work order process by preventing unnecessary BoM explosions for quality points like instructions and pass/fail checks. Previously, this process was slow, but now it's significantly faster, improving work order processing times. This change focuses on efficiency and reduces the load on the system.
Original PR description
`_compute_component_ids` unconditionally called `bom.explode()` for every product variant on the BoM, even for quality point types (`instructions`, `pass_fail`, etc.) that never use the `component_id` picker. The field is only meaningful for `register_consumed_materials` and `register_byproducts`. Restrict the expensive path to those two types with an `elif` so all other types return `component_ids = False` immediately. | # Input data | Before PR | After PR | |:---:|:---:|:---:| | 10 variants, 10 components, 2 phantom BoMs, 3 ops | 841 ms | 0.1 ms | | 30 variants, 20 components, 5 phantom BoMs, 3 ops | 1,343 ms | 0.1 ms | | 80 variants, 40 components, 12 phantom BoMs, 5 ops | 8,674 ms | 0.1 ms | OPW-6210368 Forward-Port-Of: odoo/enterprise#118470
This update fixes an issue where the pricing calculation for products sold in large quantities (like boxes of screws) was inaccurate. By allowing higher precision for the ‘Base Unit Count,’ the system now correctly calculates reference prices for these products, ensuring accurate sales pricing. This improves the overall reliability of product pricing in the website sale module.
Original PR description
**Description of the issue/feature this PR addresses:** The `Product Reference Price` feature in `website_sale` cannot correctly handle products sold in large packs when the reference quantity…
**Description of the issue/feature this PR addresses:** The `Product Reference Price` feature in `website_sale` cannot correctly handle products sold in large packs when the reference quantity requires a very small `base_unit_count`. For example, a product sold as a `box of 10000` screws should be able to use `0.0001` as its `Base Unit Count`, so the reference price can be computed against the box quantity correctly. **Current behavior before PR:** `base_unit_count` uses the default float precision, so values with more than two decimal places are rounded in the product form. When trying to set `Base Unit Count` to `0.0001`, the value is rounded to `0.00` / `0.01`, which makes the Product Reference Price computation incorrect. Steps to reproduce: 1. Go to Settings > Website and enable Product Reference Price. 2. Create or open a product named `Screws`. 3. Set Sales Price to `$ 1.00`. 4. On the product form, set Base Unit Count to `0.0001`. 5. In Custom Unit of Measure, type `box of 10000` and press Create. <img width="1374" height="740" alt="1" src="https://github.com/user-attachments/assets/2d4f7863-b2cd-4c7c-87e1-11526dc50551" /> **Desired behavior after PR is merged:** `base_unit_count` keeps high-precision values such as `0.0001`. This allows `Product Reference Price` to correctly support large-pack scenarios, such as selling screws in a `box of 10000`, by storing `base_unit_count` with unlimited numeric precision. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262579
This update corrects a problem where Google Calendar attendee information wasn't syncing correctly when an attendee's email matched a configured alias. The fix ensures that all Google attendees are properly synchronized, preventing data loss and improving the reliability of calendar events. This resolves an internal issue (opw-6086240) impacting event attendance accuracy.
Original PR description
_get_sync_partner excludes partners whose email matches a configured alias, returning a list shorter than the emails/google_attendees lists. zip() stops at the shortest, silently dropping the last Google attendee instead of the alias-matched one. Fix by replacing the positional zip with a by-email dict lookup, so each attendee is resolved independently and only the unresolvable one is skipped. opw-6086240 Forward-Port-Of: odoo/odoo#263787
This update resolves a bug that occurred when propagating delivery carriers from sale orders to purchase order receipts. Specifically, a shared receipt was causing a conflict when different carriers were assigned to sale orders. This fix ensures that carrier assignments are handled correctly, preventing errors and improving the reliability of purchase order creation.
Original PR description
Steps to reproduce 1. Set warehouse to 2-step incoming (Input → Stock) 2. Enable "Propagation of carrier" on the push rule (Input → Stock) 3. On the vendor, set "Purchase Orders Grouping" to "Always"…
Steps to reproduce 1. Set warehouse to 2-step incoming (Input → Stock) 2. Enable "Propagation of carrier" on the push rule (Input → Stock) 3. On the vendor, set "Purchase Orders Grouping" to "Always" 4. Create a storable product with the Buy route and that vendor 5. Create two sale orders for that product, each with a different delivery carrier 6. Confirm both sale orders → a single merged purchase order is created 7. Confirm the purchase order → a receipt (Vendors → Input) is created 8. Validate the receipt → ValueError: Expected singleton: delivery.carrier(1, 3) Issue In `_get_new_picking_values`, when the push rule fires to create the internal transfer (Input → Stock), the carrier is fetched from the referenced sale orders: carrier_id = self.reference_ids.sale_ids.carrier_id.id https://github.com/odoo/odoo/blob/5fb0c1f1460949043aa23ddbed09bdbfdc4a8482/addons/stock_delivery/models/stock_move.py#L45 Because both sale orders share the same merged receipt, the receipt move references both. When those SOs have different carriers, `self.reference_ids.sale_ids.carrier_id` returns a multi-record recordset and calling `.id` raises `ValueError: Expected singleton: delivery.carrier(1, 3)`. opw-6126760 Forward-Port-Of: odoo/odoo#262671
This update resolves an issue where changing a company's country caused errors in Time Off functionality due to linked leaves and allocations. The change restricts company country updates unless there are no related Time Off records, ensuring smoother operation after a country modification. This improves data consistency and prevents disruptions to Time Off processes.
Original PR description
When a Time Off Type is created, it inherits the country of the current company. If there are leaves or allocations created from this Time Off Type and the company's country is then changed, various…
When a Time Off Type is created, it inherits the country of the current company. If there are leaves or allocations created from this Time Off Type and the company's country is then changed, various parts of Time Off will throw access errors as the leaves and allocations are still tied to the former country. The goal of this PR is to constrain the company country from being changed unless there are no such leaves or allocations. **Steps to Reproduce on Runbot:** 1. Ensure the current company has a `country` set, e.g. "My Company (San Fransisco)" has country set to "United States". 2. Access Time Off as Mitchell Admin. 3. Create a new Time Off Type, for simplicity's sake without a need for allocation or approval, ex: "Gone Fishing". Note this Time Off Type will have the `country` set to the company country by default. 4. Take "Gone Fishing" time off. 5. Change or set blank the company's `country` value. 6. Ensure the record rules cache is flushed. 7. Try to access Time Off. opw-6206359, opw-6140496 closes #263950 Forward-Port-Of: odoo/odoo#263950
This update fixes an issue where overtime details weren't correctly displayed in attendance records. The visibility condition for overtime information was reversed, preventing accurate reporting. This change ensures that overtime hours are now correctly shown when creating attendance records, providing more reliable tracking of employee time.
Original PR description
Steps: * Create an extra-hours attendance for an employee that has overtime ruleset OR * Create an extra-hours attendance for an employee that has no overtime ruleset Issue: * The overtime details in the attendance view visibility condition was flipped Solution: * Reverse the visibility condition of the XML element Task: 6295710 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#269744
A confusing error message related to loyalty discount codes has been resolved. The fix clarifies the issue for users, ensuring they understand why a discount wasn't applied when a minimum purchase requirement wasn't met. This improves the user experience and reduces potential frustration.
Original PR description
Issue: Error message was ambiguous and left users wondering what was wrong. Steps to reproduce: Set a discount code where the conditional rule is set to "minimum purchase" among specified products. Then, spend an amount larger than this on unrelated products and try to apply the discount code. "A minimum of x(currency) should be purchased to get reward" Cause: Poor error message caused ambiguity Solution: Corrected the error message so that the user can better understand where the issue is. opw-6290514 Forward-Port-Of: odoo/odoo#269319
This update simplifies accessing employee profiles from the avatar card. Previously, a confirmation dialog forced users to activate inactive companies. Now, a 'View Profile' dropdown offers two options: directly opening the employee profile (activating the company) or accessing the contact profile without company activation. This provides a smoother user experience while addressing potential concerns about broad company scope.
Original PR description
When opening a profile from the avatar card, the employee's company may not be in the user's active companies. Until now this popped a confirmation dialog that only let the user either activate the…
When opening a profile from the avatar card, the employee's company may not be in the user's active companies. Until now this popped a confirmation dialog that only let the user either activate the other company or cancel, with no way to reach the still-accessible contact profile. Replace the dialog with a less intrusive "View Profile" dropdown, shown only when the employee's company is allowed but not active. It offers two choices: - Open Employee Profile (activates the company) - Open Contact Profile (no company activation) Activating an extra company widens the active-company scope for the whole session, which is not always desirable, so keeping a non-mutating path to the contact profile is useful. In every other case (no employee, company already active, or company not allowed) the plain "View Profile" button is unchanged. task-6074597 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264073
This update resolves a requirement from Luxembourg auditors regarding the classification of partners in our SAFT reports. Specifically, it ensures that less than 30% of transactions with payable or receivable accounts have missing supplier or customer IDs. The changes add partners to the relevant lists based on transaction types and maintain compatibility with older report formats.
Original PR description
This PR is one of many triggered by responses from Luxembourg auditors. See PR #113316 for a full list of these PRs. As described in PR #117799, the \CustomerID and \SupplierID elements on…
This PR is one of many triggered by responses from Luxembourg auditors. See PR #113316 for a full list of these PRs. As described in PR #117799, the \CustomerID and \SupplierID elements on \Transaction\Line elements is determined by a partner's `customer_rank` and `supplier_rank`. This is a binary designation, one or the other. The Luxembourg FAIA report requires that less than 30% of \Transaction\Line elements with payable accounts (class 6) can not have \SupplierID. The same applies for \Transaction\Line elements with receivable accounts (class 7) and the \CustomerID element. TSB clarified that any partner on an receivable or payable line should be added to the Customer list or Supplier list respectively https://github.com/odoo/enterprise/pull/100749#issuecomment-3655127511. In addition, I verified that Luxembourg's analysis of four separate FAIA files (from ticket 5427296) aligns with this expectation. <img width="1322" height="690" alt="image" src="https://github.com/user-attachments/assets/1a82f99e-5b32-4dbb-96e1-1b25bab2629b" /> This commit adds partners to the \Supplier and \Customer lists if they have any payable or receivable lines, respectively. It also picks between the \CustomerID and \SupplierID based on a line's `account_type`. This logic is applied to `account_saft` and updates the other, country-specific SAFT reports where appropriate. It also retains the previous `customer_rank` and `supplier_rank` logic as a fallback for older XML reports and for accounts other than `asset_receivable` or `liability_payable`. opw-6118024 Forward-Port-Of: odoo/enterprise#120131 Forward-Port-Of: odoo/enterprise#118714
This update resolves an issue where UBL import failed due to a mismatch between the product's and imported unit of measure categories. The fix allows imports to proceed without error, and users can manually adjust the UoM after the import is complete. This improves the reliability of UBL invoice processing.
Original PR description
The new collected_values UBL import flow sets product_uom_id from the XML unitCode without checking that the resolved UoM category matches the matched product's UoM category. When they diverge, writing the line triggers the incompatible error. Steps to reproduce: - Create a product "XYZ" with UoM "Units" (category "Unit"). - Import a Peppol UBL bill whose line has Item/Name "XYZ" and unitCode="MTK" (uom_square_meter, "Surface"). - Import fails with: "The Unit of Measure (UoM) 'm²' you have selected for product 'XYZ', is incompatible with its category : Unit." This fix will avoid setting the product_uom_id when the UoM category doesn't match the product's UoM category, allowing the line to be imported without error. The user can then manually set the correct UoM after import. opw-6121714 Forward-Port-Of: odoo/odoo#269933 Forward-Port-Of: odoo/odoo#269714
This update resolves a problem where invoice sending with the l10n_fr_pdp module failed due to incorrect retrieval of PEPPOL identifiers. The fix ensures that the correct commercial partner is used to obtain these identifiers, guaranteeing compliance with French PEPPOL requirements for invoices.
Original PR description
…cial partner **STEP TO REPRODUCE** 1. Install l10n_fr_pdp. 2. On the demo FR company contact, create a new contact of type invoice address. 3. Create an invoice with this new contact, and try send the invoice. 4. The pdp invoice constraints checking for pdp identifiers fails. **CAUSE** We use the partner to retrieve the peppol_eas and peppol_endpoint field values, but for subcontact, those field are empty. We should use the commercial_partner_id which correspond to the company we try to invoice instead. opw-6235830 Forward-Port-Of: odoo/odoo#270014
8 changes
Resolved issues and error corrections
This update resolves an issue where the 'Fill' option on the /shop page didn't correctly adjust product image sizes. The fix ensures that product thumbnails now accurately reflect the selected 'cover' or 'contain' fill mode, improving the visual presentation of products.
Original PR description
**Problem:** On the /shop page, the "Fill" option in the web editor (cover/contain toggle on product card images) appears clickable but has no visible effect on the product thumbnails. **Steps to…
**Problem:**
On the /shop page, the "Fill" option in the web editor (cover/contain toggle on product card images) appears clickable but has no visible effect on the product thumbnails.
**Steps to reproduce:**
1. Install website_sale and open /shop.
2. Open the web editor and select the shop page.
3. Locate the "Fill" button group in the right panel (with the two svg icons).
4. Click the alternate option to switch between cover and contain.
5. Observe that the product card thumbnails do not change appearance.
**Current behavior:**
The toggle flips the `o_wsale_context_thumb_cover` class on the products table (and the activation of the `products_thumb_cover` view), but the product images keep rendering with `object-fit: contain` regardless of the toggle state.
**Expected behavior:**
The image fill mode follows the toggle:
- "cover" option active → product image uses `object-fit: cover`
- "cover" option inactive → product image uses `object-fit: contain`
**Cause of the issue:**
The product image template renders the img with the `object-fit-contain` utility class, and the local SCSS rule declares
`.object-fit-contain { object-fit: contain !important; }`. The CSS variable `--o-wsale-card-thumb-fill-mode` (set to `cover` by `.o_wsale_context_thumb_cover`) does cascade down to the img, but the non-variable, `!important` rule on the utility class always wins, so the variable-driven rule
`object-fit: var(--o-wsale-card-thumb-fill-mode, contain)` is silently overridden and the toggle becomes inert.
**Fix:**
Making the `.object-fit-contain` rule read the same CSS variable lets the existing toggle mechanism take effect without changing any template or removing the utility class. Outside the `.o_wsale_context_thumb_cover` context the variable is undefined, so the `var(..., contain)` fallback preserves the prior `contain` behavior for any other consumer of the class. This keeps the change to a single SCSS line, with no XML touched and no other CSS class semantics altered.
opw-6231432
Forward-Port-Of: odoo/odoo#268302
Forward-Port-Of: odoo/odoo#266717This update fixes an issue where refund calculations in the Point of Sale (PoS) system were inaccurate when multiple refunds were applied to a partially paid order. Previously, the total and line amounts incorrectly reflected the entire original order total. This change ensures accurate refund processing, preventing financial discrepancies and improving the reliability of PoS transactions.
Original PR description
When refunding an order that has already been partially refunded, the line amount and total amount where incorrect. They would be the total amount of the original order. Steps to reproduce: ------------------- * Open PoS and make an order with 3 quantity of a product. * Close the session * In the backend, refund 1 quantity of the order and validate the refund * Refund again the same order with the 2 remaining quantities > Observation: The total amount and line amount are not correct opw-6215019 Forward-Port-Of: odoo/odoo#269605 Forward-Port-Of: odoo/odoo#265322
This update corrects a validation error that occurred when importing Polish VAT (KSeF) invoices. Previously, the system required specific fields (`P_9A` and `P_11`) to be present, even if they contained zero values. This change relaxes this requirement, allowing invoices without these fields to be processed correctly, ensuring smoother VAT compliance.
Original PR description
When importing bills, if `P_9A` and `P_11` are absent or zero, a `UserError` is raised: `No net or gross unit price found in the FA (3) for the line with the product.` **Steps to reproduce:** - Upload the problematic XML file as an attachment via `Settings -> Technical -> Attachments` - Create a `validator` server action with the code provided in the referenced ticket, with the `Add Contextual Action` flag set - Reload the page - Select the attachment in list view - Click the gear icon - Run the newly created server action KSeF FA(3) schema documentation: https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf Ticket [link](https://www.odoo.com/odoo/project.task/6211065) opw-6211065 Forward-Port-Of: odoo/odoo#265228
This update ensures that text searches using the `unaccent` function in the HR recruitment module can be properly indexed in the database. Previously, the system wasn't correctly recognizing the `unaccent` function's capabilities, leading to potential performance issues with text searches. This fix guarantees optimal search performance for text-based data.
Original PR description
PostgreSQL's `unaccent` function must be marked as `IMMUTABLE` before it can be used in a functional index. The ORM usually handles this when the `unaccent` extension is missing and `odoo-bin` is…
PostgreSQL's `unaccent` function must be marked as `IMMUTABLE` before it can be used in a functional index.
The ORM usually handles this when the `unaccent` extension is missing and `odoo-bin` is started with the `--unaccent` flag during database creation.
However, it is also possible to start `odoo-bin` with an existing database where the `unaccent` extension is already installed, but the function was never marked as `IMMUTABLE`.
In that case, `unaccent` can still be used in conditions such as `WHERE` clauses, but it cannot be used in functional indexes.
`has_unaccent()` actually has three possible states:
```py
class FunctionStatus(IntEnum):
MISSING = 0 # function is not present (falsy)
PRESENT = 1 # function is present but not indexable (not immutable)
INDEXABLE = 2 # function is present and indexable (immutable)
```
Therefore, checking only `if has_unaccent()` before creating an index using `unaccent` is not enough. The index should only be created when `has_unaccent()` returns `FunctionStatus.INDEXABLE`.
task-6307060
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where fully settled customers were incorrectly prevented from generating Customer Statements. The change ensures that customers with past pay-later payments are still shown, regardless of their current outstanding balance. This improves the user experience and accuracy of reporting.
Original PR description
The override of _compute_has_moves was checking `total_due != 0` to set `has_moves` on for PoS pay_later customers. Once the customer is fully settled however, `total_due` is 0 and the check does not pass anymore, so `has_moves` goes back to `False` and the Customer Statement button hides for them, even though they had past pay_later payment lines. The fix is to check directly for any past pay_later `pos.payment` instead, which covers the cases where partner had used pay_later payment methods before, regardless if they have settled their total due or not. opw-6173760
This update corrects a problem where Google Calendar attendee information was sometimes lost when an email address matched a configured alias. The fix ensures that all attendees are correctly synchronized, preventing data loss and improving the reliability of calendar events. This resolves an internal issue (opw-6086240) that impacted event accuracy.
Original PR description
_get_sync_partner excludes partners whose email matches a configured alias, returning a list shorter than the emails/google_attendees lists. zip() stops at the shortest, silently dropping the last Google attendee instead of the alias-matched one. Fix by replacing the positional zip with a by-email dict lookup, so each attendee is resolved independently and only the unresolvable one is skipped. opw-6086240 Forward-Port-Of: odoo/odoo#263787
This update resolves an issue where validating rental orders for kit products (specifically when using rented components) would trigger a 'record not found' error. The fix ensures that the system correctly handles the explosion of bills when a rental order involves a kit, preventing this validation error and ensuring proper rental tracking.
Original PR description
### Steps to reproduce: - Enable rental transfer - Create a rentable product R - Create and confirm a rental order for 1 unit of R - Create a kit bom for R: 1 x COMP - Validate the delivery of your…
### Steps to reproduce:
- Enable rental transfer
- Create a rentable product R
- Create and confirm a rental order for 1 unit of R
- Create a kit bom for R: 1 x COMP
- Validate the delivery of your unit of R
#### > Missing Error: Record does not exist or has been deleted.
### Cause of the issue:
Confirming your rental order will generate a confirm moves of R. However, since at this point the product was not a kit, these will not be exploded. Now, the issue is that at validation The move will be exploded and deleted in the super call:
https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L550-L555 https://github.com/odoo/odoo/blob/0f2f222a431627a672daf10c86ec2578a27f97bb/addons/mrp/models/stock_move.py#L591-L593 However, since the overrides of the sale_{mrp,stock}_renting modules call self rather than the result of the super call, they still expect to work with the original move rather than its exploded result: https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_mrp_renting/models/stock_move.py#L10-L13 https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/sale_stock_renting/models/stock_move.py#L61-L65
opw-6191841
Forward-Port-Of: odoo/enterprise#120051This update resolves an issue where UBL import failed due to a mismatch between the product's and imported unit of measure categories. The fix allows imports to proceed without error, and users can then manually adjust the UoM after the import is complete. This improves the reliability of UBL invoice imports.
Original PR description
The new collected_values UBL import flow sets product_uom_id from the XML unitCode without checking that the resolved UoM category matches the matched product's UoM category. When they diverge, writing the line triggers the incompatible error. Steps to reproduce: - Create a product "XYZ" with UoM "Units" (category "Unit"). - Import a Peppol UBL bill whose line has Item/Name "XYZ" and unitCode="MTK" (uom_square_meter, "Surface"). - Import fails with: "The Unit of Measure (UoM) 'm²' you have selected for product 'XYZ', is incompatible with its category : Unit." This fix will avoid setting the product_uom_id when the UoM category doesn't match the product's UoM category, allowing the line to be imported without error. The user can then manually set the correct UoM after import. opw-6121714 Forward-Port-Of: odoo/odoo#269933 Forward-Port-Of: odoo/odoo#269714
1 change
Resolved issues and error corrections
A recent issue causing the Documents view to crash when accessed through an activity has been resolved. This was due to a timing problem with how the system handles data updates, specifically a race condition in the code. This fix ensures the Documents view functions reliably for all users.
Original PR description
### Description When navigating to Documents via an activity, the list view crashes with a TypeError on setting 'COMPANY'. ### Root Cause An asynchronous race condition occurs between parent and child `onWillStart` hooks. The child finishes an await before the parent's hook runs `expandDefaultValue()`. Thus, `this.state.expanded[sectionId]` is undefined when the child tries to write to its nested keys. ### Solution Await `sectionsPromise` first in the child hook. opw-6276003 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#119634
17 changes
Resolved issues and error corrections
This update prevents users from sending receipts directly from the Ticket Screen when the Blackbox BE feature is active. This change ensures data consistency and accuracy, particularly in scenarios where Blackbox BE is used for enhanced transaction tracking. It addresses a potential issue related to redundant receipt generation.
Original PR description
In this commit: ------------------- - Restrict the send-receipt functionality on the Ticket Screen when Blackbox BE is enabled. Task- 6139558 Related PR - https://github.com/odoo/odoo/pull/260596
This update resolves a bug that was causing a warning related to minimum wage calculations for Belgian employees. The fix ensures the system correctly identifies the appropriate job category and wage scale, preventing inaccurate reporting. This ensures compliance and accurate payroll processing for our Belgian clients.
Original PR description
**Description:** Select Belgium company, employee, select student and make its contract as 1st of January. Error appears. For repetition look to the provided link. **Implemntation:** . Add a check for l10n_be_job_category_id, as it is required to determine the minimum wage scale. . Add corresponding tests task-6302901
This update fixes an issue where removing a BoM operation left behind unnecessary data in manufacturing quality checks. By automatically deleting related quality points and ECO changes, the system now provides cleaner, more accurate manufacturing data. This improves the reliability of production reporting and reduces data clutter.
Original PR description
Deleting a BoM operation removes the linked `mrp.routing.workcenter` record, but its instruction steps could remain in the database. Those steps are stored as `quality.point` records linked through `operation_id`. Since that relation did not cascade on deletion, removing an operation left orphaned quality points behind, creating unnecessary noise in manufacturing quality checks. This commit's change: - Set the `quality.point`'s operation_id relation to cascade on delete - Set the `mrp.eco.routing.change`'s operation_id relation to cascade on delete - Set the `mrp.eco.routing.change`'s quality_point_id to cascade on delete task-6079838
This update fixes an issue where long-term sick leave payments weren't correctly calculated for existing employee data. The change ensures that legacy sick leave records are handled properly, preventing incorrect unpaid sick leave payouts. This maintains accurate payroll processing for Belgian employees.
Original PR description
Following this task: https://www.odoo.com/odoo/project/1251/tasks/5942163, sick time offs are automatically split between paid/unpaid when the leave is created. However, existing data was not upgraded, and might result on sick leaves not being unpaid when they should. This commit re-introduces the method to ensure legacy compatibility with existing sick leaves. Upgrading the data by splitting/creating new sick leaves would be too heavy. task-6297274 Forward-Port-Of: odoo/enterprise#120546
This update fixes an issue where the Balance Sheet report export was incorrectly including all accounts instead of the selected one when changing date filters. The fix removes a filtering mechanism that was unintentionally introduced, ensuring the report accurately reflects the user's chosen account selection.
Original PR description
Steps: - Open Balance Sheet report and unfold lines - Open the General Ledger from a line with an account - On GL report, change date filter - Export XLSX report -> We export all accounts instead of the one selected in the search bar Cause: Since f8dceec74e44ffe4aef67655be8811c96da91eba we filter out the filter if a default account is defined in the context which is the case in the `caret_option_open_general_ledger` method Fix: Remove the filtering as the behavior that was fixed by the mentioned commit does not happen anymore. opw-6234427 Forward-Port-Of: odoo/enterprise#119588 Forward-Port-Of: odoo/enterprise#119156
This update resolves an issue where demo leave allocations wouldn't correctly validate during an Odoo upgrade from 17.0 to 18.0. The fix ensures that the approval process is executed during upgrades, preventing data inconsistencies and ensuring accurate leave tracking.
Original PR description
Steps: - Install an Odoo 17.0 database with the Indian Payroll module and demo data. - Upgrade the database to 18.0. Issue: - The Indian payroll demo data creates leave allocations and approves them…
Steps: - Install an Odoo 17.0 database with the Indian Payroll module and demo data. - Upgrade the database to 18.0. Issue: - The Indian payroll demo data creates leave allocations and approves them through an XML function call. - During a fresh installation, demo files are loaded in 'init' mode, so the approval function is executed and the allocations move from 'confirm' to 'validate'. - However, during a 17.0 >>> 18.0 upgrade, demo files are loaded in 'update' mode. Odoo automatically loads demo files with 'noupdate=True' from the load_demo() >> load_data() function: - This value is passed to the XML importer and becomes the default noupdate state for the file. Since the demo XML file does not explicitly override this value, the function tag uses 'noupdate=True'. - When the XML parser reaches the approval function, _tag_function() skips its execution because of noupdate = 'True' and mode = 'update' condition. - As a result, the approval function is not executed during the upgrade and the leave allocations remain in 'confirm' state. Subsequent demo payroll data expects validated allocations and fails during loading. Fix: - Explicitly set 'noupdate=0' on the demo XML file. This overrides the default 'noupdate=True' value applied to demo files, making the parser evaluate the section with 'noupdate=False'. - As a result, '_tag_function()' executes the approval method during upgrades, the demo leave allocations are validated in both fresh/new db installations and 17.0 >>> 18.0 upgrade scenarios. runbot error-https://runbot.odoo.com/odoo/error/230430 task-6268381 Forward-Port-Of: odoo/enterprise#119217
This update resolves an issue where HR users without payroll access couldn't view employee type configurations. The change adds HR Manager permissions to the field, allowing all users to access this setting. This ensures consistent functionality across the system.
Original PR description
**Steps to Reproduce** 1. Create a database on v19.3. 2. Install `hr` and `hr_payroll`. 3. Create or log in as a user who only has access rights for the Employee app (`hr`) and no Payroll access. 4.…
**Steps to Reproduce**
1. Create a database on v19.3.
2. Install `hr` and `hr_payroll`.
3. Create or log in as a user who only has access rights for the Employee app (`hr`) and no Payroll access.
4. Go to **Employees → Configuration → Employee → Employee Types**. Opening the Employee Types menu raises the following error:
```python
You do not have enough rights to access the field "employee_type_id" on
Employee Contract (hr.version). Please contact your system administrator.
Operation: read
User: 2
Groups: allowed for groups 'Payroll / Assistant'
```
**Issue Description:**
The field `employee_type_id` is defined in both modules with different group restrictions:
* In `hr/models/hr_version.py`, the field is restricted to **HR Managers**. [field](https://github.com/odoo/odoo/blob/f7e87637d5c47047ebffda0f3c929c25022c3f27/addons/hr/models/hr_version.py#L184)
* In `hr_payroll/models/hr_version.py`, the field is extended with the **Payroll / Assistant** group.
[field](https://github.com/odoo/enterprise/blob/acd831acd0f59f7b8c15bccfb6da0c3969fc3f6d/hr_payroll/models/hr_version.py#L41) When both modules are installed, access to `hr.version.employee_type_id` requires Payroll permissions.
In v19.3, PR #241780 introduced the `employee_count` [computation](https://github.com/odoo/odoo/blob/f7e87637d5c47047ebffda0f3c929c25022c3f27/addons/hr/models/hr_employee_type.py#L25) on `hr.employee.type`. During this computation, `_read_group()` is executed on `hr.employee` using the domain.
[pr] : https://github.com/odoo/odoo/pull/241780/changes
HR-only users (without hr_payroll.group_hr_payroll_user) cannot read the field, causing below traceback.
**Solution**
added `group_hr_manager` group to the field `employee_type_id` so both groups can view employee_type.
**Traceback**
```python
File "/home/odoo/src/odoo/saas-19.3/addons/hr/models/hr_employee_type.py"
line 25, in _compute_employee_count
employee_count_by_employee_type = dict(self.env['hr.employee']._read_group(
...
File "/home/odoo/src/odoo/saas-19.3/odoo/orm/models.py", line 2732, in
check_field_access
raise AccessError(error_msg)
odoo.exceptions.AccessError: You do not have enough rights to access the field
"employee_type_id" on Employee Contract (hr.version).
Operation: read
User: 8
Groups: allowed for groups 'Payroll / Assistant'
```
opw-6246367
upg- 4302826
tgb- 2751
Forward-Port-Of: odoo/enterprise#120233This update adjusts the certification checksum to align with recent changes to the core Odoo system. Specifically, a new scale driver was implemented to reduce exception handling, necessitating this checksum update for accurate certification verification. This ensures continued compliance and proper operation of the l10n_eu_iot_scale_cert module.
Original PR description
As we updated the scale driver to reduce the amount of exception caught, we need to update the certification checksum. see odoo/odoo#268796 Forward-Port-Of: odoo/enterprise#119683
This update ensures that all properties from records – previously missing from spreadsheet exports – are now included. This change aligns the export behavior across different views (kanban, list, spreadsheet) and resolves a previous limitation, ensuring complete data transfer for spreadsheet users. It’s a fix to improve data consistency.
Original PR description
* = [documents_spreadsheet] When exporting properties from records in the web kanban and list views, sub-properties created within a record were previously not supported. Support for exporting these sub-properties has now been added. However, in spreadsheet this should only be enabled from saas-19.2 onwards (where it is already available). To keep the behavior aligned with the usual flow on earlier versions, this filters out the sub-properties exported from the record in `spreadsheet_edition`. community: https://github.com/odoo/odoo/pull/264267 task-6123524 Forward-Port-Of: odoo/enterprise#119675 Forward-Port-Of: odoo/enterprise#118913
This update ensures that changes made to leave requests within the popover form are now correctly saved. Previously, modifications weren't persisted, leading to data inconsistencies. The fix automatically saves changes with a slight delay to handle rapid input, while maintaining accessibility to key actions like 'Refuse' and 'Delete'.
Original PR description
Steps:- - Navigate Payroll > Time Offs. - Create a leave of any type (STO, PTO etc...) - Click on the pill after creating leave. - Try to change values on popover. - Changed values are not saved!! Cause:- There is no save action trigger on popover form. Fix:- - Hooked `debounceAutoSave` method on every field value changes. - `debounceAutoSave` will save record with 500ms debounce to batch rapid changes. - Set popover form to readonly mode for validated leaves (validate/validate1 states) - Remove readonly condition from action buttons footer to keep Refuse/Delete accessible task-[6117310](https://www.odoo.com/odoo/project/1251/tasks/6117310) Forward-Port-Of: odoo/enterprise#120634 Forward-Port-Of: odoo/enterprise#114445
This update fixes an error that occurred when downloading the asset template, specifically when a user removed the account code from their Fixed Assets account. The change allows for optional account codes, ensuring the system correctly identifies the asset account name instead of throwing an error. This prevents disruption to the asset template download process.
Original PR description
Currently, an error occurs when downloading the asset template. **Steps to Reproduce:** - Install the `account_asset` module without demo data. - Go to `Accounting` > `Configuration` > `Accounting` >…
Currently, an error occurs when downloading the asset template. **Steps to Reproduce:** - Install the `account_asset` module without demo data. - Go to `Accounting` > `Configuration` > `Accounting` > `Chart of Accounts`. - Open the `Fixed Assets` account, set a `Depreciation` value, and remove the `account code`. - Go to `Accounting` > `Accounting` > `Assets & Liabilities` > `Assets`. - Click `With our template` on the screen. `TypeError: startswith first arg must be str or a tuple of str, not bool` After this [recent commit], account codes became optional and can be removed. As a result, when the code is removed from the Fixed Assets account and when donloading the asset template, the system checks whether the account name starts with the account code [1]. Since the account code is `False`, it raises an error. This commit ensures that the check is only performed when the account code exists; otherwise, the account name is used directly for the asset account. [recent commit]: https://github.com/odoo/odoo/commit/c3313b336b9f1305c363097745926f2bdf61e277 [1]- https://github.com/odoo/enterprise/blob/421fce171dc158faa3b13406b6cea5c1c907ee49/account_asset/controller/asset_template_controller.py#L46-L49 sentry-7487406857 Forward-Port-Of: odoo/enterprise#117580
This update ensures that if a warning card fails to load on the payroll dashboard, the user will see an error message instead of a traceback. Crucially, the remaining warning cards will still load and display, providing a more complete and accurate view of potential issues. This enhances the user experience and data visibility.
Original PR description
Prior to this, if loading a warning caused a traceback, the loading of the remaining warnings would be stopped and the user would only see the traceback. Now, if loading a warning card fails, the error will be shown, but the remaining cards will keep loading and be displayed as well. task-6298866
This update fixes a payroll calculation error that occurred when employees had multiple contract versions active simultaneously. Previously, the system incorrectly calculated out-of-contract deductions. The fix ensures that all worked days across all contract versions are considered, leading to accurate wage deductions.
Original PR description
…rsions on same contract **Steps to reproduce**: - Create a contract version from May 1 to May 14. - Create another contract version starting on May 15, then create an amendment version from May 20. - Generate a payslip for May using the May 20 version. - The employee receives the full monthly wage. The out of contract period (May 1 to May 14) is not deducted. **Reason**: - OUT worked days are linked to the first version of the contract starting on May 15. - When computing the OUT ratio, the system only considers worked days linked to the exact version being processed. - As a result, the May 20 amendment version does not see the OUT worked days and no deduction is applied. **Fix**: - Compute the OUT ratio using the contract start date instead of the current version, ensuring OUT worked days are correctly taken into account across all versions of the same contract. Task: 6259341 Forward-Port-Of: odoo/enterprise#120462 Forward-Port-Of: odoo/enterprise#119893
This update fixes a potential issue in the Belgian HR payroll module where the base amount for holiday pay could exceed an employee's regular wage. The change ensures that holiday pay calculations are accurately capped at the employee's standard earnings, improving payroll accuracy and compliance. This resolves a previous error that could have resulted in overpayment.
Original PR description
The base amount should never be more than the employee's wage. Forward-Port-Of: odoo/enterprise#120681
This update ensures that data isn't lost when an IoT box is removed from a point-of-sale system. Previously, deleting an IoT box could result in the loss of associated fiscal data. Now, the system verifies that the IoT box isn't currently linked to a POS configuration before deletion, safeguarding important business information.
Original PR description
Before unlinking an iot.box from the database, we must ensure that its fiscal data module is not currently used in any pos.config. task-id: 5144489 Forward-Port-Of: odoo/enterprise#110099
A technical issue prevented users with limited time-off permissions from accessing the Attendances Gantt View when viewing leave requests. This fix ensures that the Gantt View correctly displays leave information for all users, regardless of their specific access rights. The change involved a minor code adjustment to improve data access.
Original PR description
Version: - 19.0 Steps to reproduce: - Install Attendances and Time Off - Create an internal user. - Give the user: Attendances Officer access & No Time Off Officer/Manager rights - Create an employee…
Version: - 19.0 Steps to reproduce: - Install Attendances and Time Off - Create an internal user. - Give the user: Attendances Officer access & No Time Off Officer/Manager rights - Create an employee linked to the user. - Configure the employee with a Flexible Working Schedule. - Create and approve a Time Off request for the employee. - Open: Attendances -> Gantt View - Navigate to the month containing the employee's approved leave. Issue: - An access error is raised when opening a month that contains the employee's approved leave. Cause: - In `_handle_flexible_leave_interval`, the code accesses `leave.holiday_id` to read fields such as `request_unit_half`, `request_unit_hours`, and `request_hour_from/to` on the `hr.leave` model. - When the current user has Attendances Officer rights but no Time Off access(rare cases), the ORM access check on `hr.leave` raises an AccessError, even though this read is purely for internal calendar computation and does not expose leave data to the user interface. Fix: - Added sudo() on holiday_id to access the employee's leave details and compute the work interval as expected. Task-6264510 Forward-Port-Of: odoo/enterprise#120668 Forward-Port-Of: odoo/enterprise#119116
This update resolves a bug that occurred when sorting financial reports by account code. The issue was caused by attempting to compare numeric and string values, leading to a crash. The fix ensures correct sorting even when account codes are missing (None), improving the reliability of financial reports.
Original PR description
If you're grouping by account_code on a line using an account_code
engine, and there's a None value, it will crash.
To get that, you can (with demo data):
- install l10n_be
- set "BE Company COA" as the main, keeping "My Company (San Francisco)"
activated
- go to the profit and loss "Profit and Loss (Abbr) (BE)", set the date
as the current year
- set "Consolidation" filter
- Unfold "60/61 - Goods for Resale,..."
```
Traceback (most recent call last):
...
File "... in _compute_formula_batch_with_engine_account_codes
results_list.sort(key=lambda x: math.inf if x[0] is None else x[0])
TypeError: '<' not supported between instances of 'float' and 'str'
```
Because in case of `None`, we compare with `math.inf` but the account
codes are string.
no-task
Forward-Port-Of: odoo/enterprise#120641
Forward-Port-Of: odoo/enterprise#12053110 changes
Resolved issues and error corrections
This update corrects a bug that occurred when a subformula was removed from a report without resetting its value. This prevented errors during record processing, ensuring reports could be generated correctly. The change resets subformula values to 'False' to avoid future issues.
Original PR description
The subformula was [removed](https://github.com/odoo/enterprise/pull/117601) without resetting its value to False, leaving existing values in the database. This causes errors when processing records that still contain a subformula value. ```.py Invalid subformula in expression "balance" of line "Treasury shares": -sum ``` To prevent these errors, existing subformula values are reset to False opw-6297901
This update corrects a bug where selection fields in Odoo's web studio were incorrectly flagged as required, even when not explicitly marked so. The change ensures that required fields are only applied when explicitly set to 'true', preventing unexpected behavior and improving the usability of the studio for users creating and editing forms.
Original PR description
Before: any studio property using a SelectMenu (selection) component, without a `required: false` in the childProps, was implicitly required because the check used `required !== false`, which evaluates `undefined` as truthy. After: `required` is only applied when explicitly set to `true`. task-5226503
This update resolves an error that prevented Manufacturing Administrators from canceling Manufacturing Orders (MOs) due to access restrictions. The fix adds sudo privileges to allow cancellation, streamlining the process for administrators without requiring full accounting permissions. This improves efficiency and reduces potential disruptions.
Original PR description
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo…
Currently, when a user without accounting permissions attempts to cancel a Manufacturing Order (MO), an Access Error is raised. ## Steps to produce: - Install Manufacturing and Accounting with demo data. - Users > Marc Demo > Remove Accounting Permissions and give Admin permissions for Manufacturing - Login as Marc Demo - Create an MO for` [D_0045_G] Stool (Green) `and try to cancel it. ## Observed Behavior: Failed to read field mrp.workorder.employee_analytic_account_line_ids ## Root cause: After PR [1], version 19.0 introduced access checks when reading many2many fields. As a result, if a user lacks read access to a model field, an access error is raised. During cancellation, `action_cancel` [2] is called, and the error occurs when unlinking, since the user does not have read access to the account.analytic.line records the system throws an access error. **Why does this error not occur in 19.3+?** Commit [3] added `sudo` to allow cancellation of workorder [2]: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder_hr_account/models/mrp_workorder.py#L24-L26 ## Solution: Manufacturing Administrators often need to cancel MOs and WOs, but granting them accounting rights solely for this purpose is not always necessary. A practical solution is to allow MO cancellation through sudo privileges, which can be achieved by backporting [3]. [1]: https://github.com/odoo/odoo/pull/217277 [3]: https://github.com/odoo/enterprise/commit/31cf5f014c48b97158042e64ad0b8e9827a6c0d5 Related Community PR: https://github.com/odoo/odoo/pull/264925 opw-6204049
This update resolves an error preventing users from accessing the 'Due' report within the account reports module. The issue stemmed from a missing configuration setting ('cellIndex') in a key component. This fix ensures the 'Due' button now functions correctly, allowing users to generate the report as intended.
Original PR description
**Steps to reproduce:** - Install the `account_reports` module and enable developer mode. - Navigate to Invoicing > Customers > Customers. - Open the `Acme Corporation` record. - Click the `Due`…
**Steps to reproduce:** - Install the `account_reports` module and enable developer mode. - Navigate to Invoicing > Customers > Customers. - Open the `Acme Corporation` record. - Click the `Due` smart button. **Error:** `OwlError: Invalid props for component 'PartnerLedgerFollowupLineCell': 'cellIndex' is missing (should be a number)` **Root Cause:** In commit [1], `cellIndex` was added as a required props to `AccountReportLineCell`. However, `PartnerLedgerFollowupLineCell` at [2] was not updated to pass this props, causing an error. **Fix:** This commit prevents the error and ensures that users can open the `Follow-up` Report. [1]: https://github.com/odoo/enterprise/commit/ae3e71164bea8883417793bad0bfa5ef72db758f [2]: https://github.com/odoo/enterprise/blob/3c4e2259ec8fb67d799806d94ffe40ab6a40f25e/account_reports/static/src/components/partner_ledger_followup/line/line.xml#L7 opw-6296374 opw-6299717 opw-6300704 opw-6301870 opw-6245448 opw-6302816 opw-6298215 opw-6303774 opw-6301046 opw-6304518 opw-6305071 opw-6306193 opw-6306219 opw-6308514 opw-6308957 opw-6312342 opw-6312746 opw-6313506 opw-6314075 opw-6315101
This update fixes a critical issue where leave schedules were incorrectly preventing resource allocation, now only applying to resources with matching calendars. Additionally, tests have been reorganized and improved to ensure accurate functionality, particularly related to shift rental planning.
Original PR description
## [FIX] sale_renting_planning: check global leaves working schedule Before this commit: any `resource.calendar.leaves` with no `resource_id` created would prevent all resources from being allocated…
## [FIX] sale_renting_planning: check global leaves working schedule
Before this commit: any `resource.calendar.leaves` with no `resource_id` created would prevent all resources from being allocated during the leave date.
After this commit: any `resource.calendar.leaves` with `no resource_id` would be applied only to resources with the same `calendar_id` as the leave.
if the leave has no `calendar_id` then the leave applies to all `resource.calendars`
if a resource has no `calendar_id` then leaves with no `calendar_id` apply to it as well
## [IMP] {website_}sale_renting_planning: move tests from industry and fix existing ones
This commit moves the tests from [odoo/industry#1980](vscode-file://vscode-app/snap/code/237/usr/share/code/resources/app/out/vs/code/electron-browser/workbench/workbench.html) to their respective standard modules.
It also fixes the logic behind some tests as they weren't testing a `planning.role` with `sync_shift_rental` enabled.
task-6179505This update corrects a rounding issue in overtime calculations, ensuring accurate payment for fractional hours. Previously, overtime durations were rounded to 3 decimal places, leading to potential inaccuracies in payroll. The fix now maintains 4 decimal place precision for overtime durations, guaranteeing correct monetary calculations.
Original PR description
Overtime duration computed as fractional hours was rounded to 3 decimal places before being stored on the overtime line. Since 1 decimal hour = 3600 seconds, this gives only 3.6 seconds of precision and the rounding can go in the wrong direction due to floating-point representation. The fix consists in replacing the duration rounding to 4 decimals when building overtime work entries so stored durations keep sub-second precision needed for money computation. task-6212231
This update resolves an issue where Intrastat CSV exports were failing due to incorrect formatting of numerical data. The fix ensures that data is properly converted to a standard numeric format before calculations, preventing errors and improving the reliability of export reports. This ensures accurate reporting for Dutch Intrastat data.
Original PR description
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g.,…
During Intrastat CSV export, fields `supplementary_units` formatted using [formatLang](https://github.com/odoo/enterprise/pull/81711/changes), which converts numeric values into strings (e.g., '84,0'). These string values are later reused in computations, leading to errors like:
```.py
File "/home/odoo/src/enterprise/19.0/l10n_nl_intrastat/models/account_intrastat_report.py", line 163, in l10n_nl_export_to_csv
supp_unit = str(round(res['supplementary_units'])).zfill(10) if res['supplementary_units'] else '0000000000'
TypeError: type str doesn't define __round__ method
```
https://github.com/odoo/enterprise/blob/2bfe0f32c0cec426fc7345ef716395146cc569ca/l10n_nl_intrastat/models/account_intrastat_report.py#L164 This occurs because the export logic expects numeric values, but receives localized strings or None.
Cause:
`formatLang` is applied at the report data level, converting floats into locale-formatted strings. These values are then used directly in arithmetic operations without normalization.
Fix:
Normalize values before computation by:
- Converting input to string
- Replacing locale-specific decimal separators (',' -> '.')
- Casting to float
- Falling back to 0 when value is None or empty
opw-6182286This update adjusts how the product list appears on tablets. Previously, it was always displayed in a smaller format. Now, it will display at its full size on tablets with screens between 768px and 991px, providing a better user experience on these devices. This ensures a more consistent and user-friendly product browsing experience.
Original PR description
Previously, the product list was rendered in "small display" mode for all screen sizes below the medium breakpoint (< 992px). However, some small tablets are able to fully display the product list at the medium breakpoint (≥ 768px and ≤ 991px). After this fix, "small display" mode is only applied when the screen width is below 768px. Task.6251934 Community: https://github.com/odoo/odoo/pull/266704
This update resolves two key issues related to attaching documents to employee records. Previously, attachments were created in the root 'Employees' folder, which was inconvenient. Additionally, creating sick leave attachments didn't always generate a document. This fix ensures attachments are correctly created in the appropriate folder and that all attachment types are properly recorded.
Original PR description
Before this commit, when adding an attachment to a leave or a employee version the mixin was configured to create the document in the root folder of Employees which was not very convenient. In addition, when creating a Sick leave with an attachment, no document was ever created. This commit fix both those bugs. Task-6095811 Forward-Port-Of: odoo/enterprise#119417 Forward-Port-Of: odoo/enterprise#112993
This update resolves two issues related to USPS shipping rates. Firstly, it now displays the correct unit of measurement (inches) for USPS package dimensions, eliminating confusion. Secondly, it ensures that rates are calculated based on the specific USPS service selected, not just whether the shipment is domestic or international.
Original PR description
Issue ----- There are 2 issues with USPS rest: 1. USPS packagings do not have their size UOM displayed. This leads to confusion as users input in inches but the dimensions are treated as feet. 2.…
Issue ----- There are 2 issues with USPS rest: 1. USPS packagings do not have their size UOM displayed. This leads to confusion as users input in inches but the dimensions are treated as feet. 2. USPS returns the same rate regardless of the package type. Steps to reproduce ----- - Set USPS up - Open the Package Type form > go to its' Dimensions tab > Issue 1 - Set USPS up (domestic) - Select a `Domestic Rating Indicator` (eg LF - Flat Rate Box) - Create a SO with some product - Open the delivery widget and add a rate with USPS - Discard the changes - Go to the delivery method and change the rating (eg SP - Single Piece) - Go back to the SO - Open the delivery widget and add a rate with USPS > Issue 2, rate is the same as before Issue 1 ----- By default, there is no displayed UOM on the form because of https://github.com/odoo/odoo/blob/38c737c2a4cc29b48235a100cfa9d6152af73826/addons/stock_delivery/models/stock_package_type.py#L20-L33 We can change this behaviour for USPS specifically as done in Envia https://github.com/odoo/enterprise/blob/20cc61e69aa3f6a59de1e962b25ce11fa402bf22/delivery_envia/models/stock_package_type.py#L37-L46 Issue 2 ----- In `usps_rest_rate_shipment`, we request rates for every package of the delivery, which we receive as lists. We then iterate over the list to find the rate matching the `mail_class`. The problem is that this only filters over whether the delivery is domestic or international. We don't filter based on the actual service selected on the carrier (`usps_domestic_rating_indicator` for domestic and `usps_international_rating_indicator` for international). https://github.com/odoo/enterprise/blob/20cc61e69aa3f6a59de1e962b25ce11fa402bf22/delivery_usps_rest/models/delivery_usps.py#L224-L236 ----- Ticket: opw-6224918
8 changes
Resolved issues and error corrections
This update fixes a bug that prevented receipts from printing correctly for Italian POS systems. The issue stemmed from a race condition when printing receipts, causing a printer deadlock. Now, receipt printing is tied to the 'Skip Preview Screen' option, ensuring reliable receipt generation.
Original PR description
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview…
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview Screen"; - Disable "ePos Printer"; - Set up an Italian Fiscal Printer; - Open a POS session and process a first order. Issue: After the first receipt, no other messages (price display, receipt, open register) are sent to the fiscal printer. A page reload is required. Issue: After the first receipt, no other messages (price display, receipt, open register) are sent to the fiscal printer. A page reload is required. Cause: When "Automatic Receipt Printing" is true but "Skip Preview Screen" is false, a race condition occurs. `afterOrderValidation` triggers a print job while simultaneously transitioning to the `ReceiptScreen`. When the `ReceiptScreen` mounts, it triggers a second fiscal print job before the first has resolved. This creates a deadlock in `toHtml` of `renderService`, permanently blocking the printer queue. Solution: Since the italian localisation sending the receipt to the fiscal printer is mandatory, the printing route is now tied to the "Skip Preview Screen" option. Enterprise PR: https://github.com/odoo/enterprise/pull/112654 [opw-5979212](https://www.odoo.com/odoo/project/49/tasks/5979212) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a bug that prevented receipt printing after the initial order in the Italian POS module. The fix ensures that receipts are consistently printed via the payment screen, eliminating a printer deadlock caused by conflicting print triggers. The UI has also been updated to simplify settings for Italian fiscal printers.
Original PR description
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview…
Module: l10n_it_pos Steps to reproduce: - In the POS settings, enable "Automatic Receipt Printing"; - Enable "ePos Printer" to make the "Skip Preview Screen" option appear; - Disable "Skip Preview Screen"; - Disable "ePos Printer"; - Set up an Italian Fiscal Printer; - Open a POS session and process a first order. Issue: After the first receipt, no other messages (price display, receipt, open register) are sent to the fiscal printer. A page reload is required. Cause: When "Automatic Receipt Printing" is true but "Skip Preview Screen" is false, a race condition occurs. `afterOrderValidation` triggers a print job while simultaneously transitioning to the `ReceiptScreen`. When the `ReceiptScreen` mounts, it triggers a second fiscal print job before the first has resolved. This creates a deadlock in `toHtml` of `renderService`, permanently blocking the printer queue. Solution: Since the italian localisation sending the receipt to the fiscal printer is mandatory, the printing route is now tied to the "Skip Preview Screen" option. UI settings are adjusted to hide the redundant auto-print checkbox when an IT fiscal printer is configured. Community PR: https://github.com/odoo/odoo/pull/256932 [opw-5979212](https://www.odoo.com/odoo/project/49/tasks/5979212)
This update resolves a technical issue in Odoo's Studio that caused errors when deleting the last column from a report table. The fix ensures the system handles the scenario of deleting the final column gracefully, preventing tracebacks and improving the user experience. This ensures Studio remains stable and reliable for report customization.
Original PR description
Problem: When deleting the last column in a table in studio we get a traceback. Cause: `firstCell` will be null if we delete the last cell in the table. Fix: Added a null check on `firstCell` before calling `setCursorEnd`, so the cursor is only repositioned when the table still has remaining cells. Steps to reproduce: - Edit a report with a table. - Remove all columns. - Traceback will occur when deleting the last one. opw-6263696
This update resolves an error in point-of-sale cash handling when a default tax is applied to the 'Cash Difference Gain' account. The fix ensures accurate journal entries by pre-calculating the tax split, preventing unbalanced entries and subsequent errors during session closure. This improves the reliability of cash reconciliation in supported countries.
Original PR description
Steps to reproduce ------------------ 1. Set a default tax on the "Cash Difference Gain" account (e.g. a 25% sales tax) -- required in some countries like Denmark (cf 5972690). 2. Open a PoS session,…
Steps to reproduce ------------------ 1. Set a default tax on the "Cash Difference Gain" account (e.g. a 25% sales tax) -- required in some countries like Denmark (cf 5972690). 2. Open a PoS session, count more cash than expected at closing. 3. Try to close the session. -> Error message shows up "The journal entry reached an invalid state..." ... "The journal entry must always have exactly one journal item involving the bank/cash account" What's happening ---------------- PoS creates a bank statement line with the gain account as counterpart, resulting in 2 lines: cash +10, gain -10. Since the gain account has a default tax, `_sync_tax_lines` adds a tax line of -2.5 on top, which makes the move unbalanced by 2.5. Then `_sync_unbalanced_lines` adds a 4th line to fix it, on the line returned by `_get_automatic_balancing_account`, which is `journal.default_account_id`, i.e. the cash account itself for a cash journal. So we end up with 2 lines on that same cash account, which a bank statement line move doesn't allow -> Error. The fix ------- In `_post_statement_difference`, precompute the base and tax split ourselves and build the statement line's `line_ids` directly (e.g. for +10 and a 25% tax: cash +10, gain -8, tax -2). The move is balanced from creation, so `_sync_tax_lines` and `_sync_unbalanced_lines` don't have to touch it. Note that we force the tax computation to be in 'force_price_include' mode, as the counted cash difference is a gross amount (physical money in the drawer). This way the tax is always extracted from the cash amount, regardless of how the tax is configured (included or excluded in price). Same pattern is already used by `hr_expense` (cf `hr_expense.models.account_move_line._compute_totals`). opw-5972690
This update significantly speeds up inventory adjustments when processing large delivery orders with reserved packages. Previously, adjustments were slow and could freeze the user interface. Now, inventory adjustments are much faster and more responsive, improving warehouse efficiency.
Original PR description
Behavior before: Adjusting physical inventory quantities for reserved packages takes time when linked to large delivery orders (e.g., 400+ lines). The user interface freezes, causing a poor warehouse…
Behavior before: Adjusting physical inventory quantities for reserved packages takes time when linked to large delivery orders (e.g., 400+ lines). The user interface freezes, causing a poor warehouse user experience during stock counts. Behavior after: Inventory adjustments on reserved packages process faster. The UI remains responsive, and package records are updated instantly without performance degradation. Root Cause: When an inventory adjustment triggers '_free_reservation', it processes move lines sequentially. Inside this loop, Odoo recursively runs '_check_entire_pack()', forcing a full database evaluation of all 400+ delivery lines for every single line adjusted. This results in heavy, redundant processing. Fix: Used a context flag `bypass_entire_pack=True` to silence the '_check_entire_pack()' validation while looping through individual line adjustments. Once the loop completes, the package validation is called exactly once in batch for all affected pickings, preserving data integrity while eliminating redundant database queries. Steps to Reproduce: 1. Have a product tracked by Lot and Package. 2. Have an open delivery order in Ready state (stock reserved) containing 400 or more lines of this product, one package per line. 3. Go to Inventory → Physical Inventory. 4. Set the counted quantity of any reserved bag to 0. 5. Click Apply. 6. Observe that the system takes time to process this single change. 7. Unreserve the delivery order. 8. Perform the same steps as mentioned above. 9. Inventory adjustment is much faster. opw-6234885 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a problem where Google Calendar attendee information wasn't syncing correctly when an email address matched a configured alias. The change ensures that all Google attendees are properly synchronized, preventing missed invitations and improving event accuracy. This resolves a previous bug impacting event attendance.
Original PR description
_get_sync_partner excludes partners whose email matches a configured alias, returning a list shorter than the emails/google_attendees lists. zip() stops at the shortest, silently dropping the last Google attendee instead of the alias-matched one. Fix by replacing the positional zip with a by-email dict lookup, so each attendee is resolved independently and only the unresolvable one is skipped. opw-6086240 Forward-Port-Of: odoo/odoo#263787
This update significantly speeds up how Odoo groups email messages, particularly when dealing with large volumes of data. The change optimized a key process that was slowing down email operations, resulting in a dramatic performance improvement. The database now processes these groupings much faster, enhancing overall system responsiveness.
Original PR description
## The Problem When grouping messages, the code was accumulating recordsets using the `|=` union operator inside a loop. Since each union call internally builds an `OrderedSet` over all previously…
## The Problem When grouping messages, the code was accumulating recordsets using the `|=` union operator inside a loop. Since each union call internally builds an `OrderedSet` over all previously accumulated IDs, the performance degraded quadratically relative to the number of document records. This caused bottlenecks on databases with large message volumes. ## The Solution * Replaced the `|=` recordset accumulation with a plain Python dictionary of ordered sets to store IDs per operation, while keeping same behavior. * Deferred the `browse()` call until after the loop is complete. * Reduced the overall complexity from **$O(N^2)$** to **$O(N)$**. --- ## Benchmarks *Tested on a customer database grouping by "Created By" and "Created On":* | Record Count | Before | After | Improvement | | :--- | :--- | :--- | :--- | | **300k records** | 83.00s | **1.00s** | **-99%** | | **30k records** | 0.60s | 0.25s | (Minor) | **Note:** The performance gains become exponentially more significant as the record count grows. **OPW-6123758** Forward-Port-Of: odoo/odoo#260147
This update resolves a bug that prevented the translate button from working correctly when adding new records within nested fields (like survey answers). The fix ensures that the translate button is hidden for these new records, preventing database errors and improving the user experience. This change ensures data integrity and prevents users from encountering errors when translating new content.
Original PR description
The translate button next to a translatable field saves the record before opening the translation dialog for its id. Since https://github.com/odoo/odoo/commit/a85ca9679e3855936afc66b034d05d75f672dd26…
The translate button next to a translatable field saves the record before opening the translation dialog for its id. Since https://github.com/odoo/odoo/commit/a85ca9679e3855936afc66b034d05d75f672dd26 it saves record.model.root rather than the record itself. When the field belongs to a new record still edited inside an x2many, for example an answer added in the survey question popup, saving the root only saves the parent and the new line keeps no database id. The dialog then opens with the id set to false and calls update_field_translations on it, which builds WHERE id = false and the database rejects it with operator does not exist: integer = boolean. Such a record gets no id of its own, and after a save and reload there is no reliable way to match the saved line back to the one that was clicked, so the dialog can never open for it. A canTranslate getter in TranslationButton returns false for a new record whose model root is another record, which is exactly a line still edited inside an x2many, and the template only renders the button when it is true. The variant in editable lists, where model.root is a list rather than a record, was handled in https://github.com/odoo/odoo/commit/cb34b318004c3ca9db755d8dbbad429609220df3. Steps to reproduce: 1. Activate a second language in Settings > Translations > Languages 2. Open the Surveys app and create a survey 3. Add a question, then in the Answers tab add a line and type a value 4. Click the EN button next to the answer, fill the second language, and Save => RPC error operator does not exist: integer = boolean from WHERE id = false Ticket [link](https://www.odoo.com/odoo/project.task/6260427) opw-6260427
1 change
Resolved issues and error corrections
This update fixes an issue where manufacturing orders weren't being displayed correctly when viewed through the statsbutton. Previously, users wouldn't see the full details of manufactured orders. Now, the statsbutton will accurately show all manufactured manufacturing orders, improving reporting and order tracking accuracy.
Original PR description
* Following https://github.com/odoo/odoo/pull/261438/ we also need to show correct MOs when view from statsbutton 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