Daily updates from Odoo
Monday, May 11, 2026
37 changes · saas-19.1
Resolved issues and error corrections
This update fixes an issue where the PDF viewer field didn't properly save the uploaded file's name. Now, when you upload a PDF, the correct filename is stored, improving file management and organization within the system. This ensures accurate tracking and retrieval of documents.
Original PR description
When uploading a file using the PDF viewer field, the filename was not stored in the corresponding filename field. This commit updates the PdfViewerField to support a filename field via the `filename` attribute. task-4825728 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262767 Forward-Port-Of: odoo/odoo#259795
This update fixes an issue where the navbar menu items and app icon would disappear when users zoomed out or increased the screen width. The fix ensures the navbar dynamically adjusts to display the full menu when sufficient screen space is available, improving the user experience across different devices.
Original PR description
**Issue:** In the navbar view, when a user starts in mobile view (narrow width) and then increases the screen width (e.g., by zooming out or resizing), the menu items and app icon do not reappear.…
**Issue:** In the navbar view, when a user starts in mobile view (narrow width) and then increases the screen width (e.g., by zooming out or resizing), the menu items and app icon do not reappear. The navbar remains stuck in mobile mode even when there is enough space to display the full layout. **Fix:** The navbar was relying on `env.isSmall`, which is only set during initialization and does not react to window resizing. This has been updated to use `this.ui.isSmall`, which is reactive and updates dynamically when the viewport size changes. **Before:** After resizing from mobile to a larger width, the navbar continued to behave as if it were still in mobile view, keeping menu items and the app icon hidden. **After:** When the screen width increases, the navbar correctly detects the change and re-renders, restoring the menu items and app icon as expected. opw-6107660 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263482 Forward-Port-Of: odoo/odoo#263039
This update fixes a previous issue where helpdesk returns weren't available for orders shipped through dropshipping. Now, users can process returns for dropshipped transfers directly from the helpdesk ticket, streamlining the returns process and improving customer service. This ensures consistent return functionality regardless of order fulfillment method.
Original PR description
### Steps to Reproduce: - Enable dropshipping in Inventory settings - Create a product with inventory tracking enabled - Enable dropship under the Inventory tab for the product - Add a vendor and…
### Steps to Reproduce: - Enable dropshipping in Inventory settings - Create a product with inventory tracking enabled - Enable dropship under the Inventory tab for the product - Add a vendor and quantity under the Purchase tab - Create a sale order for the product - Go to the Purchase stat button and confirm the order - Click on the Dropship stat button and validate the transfer - Open Helpdesk and create a new ticket for the same partner ### Issue: The "Returns" stat button is not visible for dropshipped deliveries. ### Current behaviour: - The helpdesk ticket allows returns of customer orders only if the order is outgoing. However, this does not cover the usecase where the order was dropshipped and still needs to be returned to the vendor. - With the current behavior, the user needs to find the customer's order to return the transfer as it is not possible to do from the ticket. ### Expected behaviour: Helpdesk tickets should also allow returns of dropshipped transfers (done and linked to the SO). ### Fix: The helpdesk return logic was limited to only 'outgoing' pickings. This commit extends the 'return' button should be visible if there is at least one delivery or dropship order linked to the partner of the ticket Issue:https://github.com/odoo/enterprise/pull/81378 task-4881338 Forward-Port-Of: odoo/enterprise#91402
This update fixes an issue where the end date on generated payslip PDFs was displayed incorrectly. The problem stemmed from a formatting error in the XML file, which has now been corrected to ensure consistent date presentation. This ensures accurate and professional payslip documents for employees.
Original PR description
ٍSteps: - Go to the payslip tabs under payroll app - Create a payslip and preview the generated PDF - The end date format is messed up Cause: The format was different because the end date was being overriden in the xml file and being displayed in the xml through t-out tag instead of span and t-field tags. Solution: Matching the format of the start date and end date of the payslip template. Task: 6168607 Forward-Port-Of: odoo/enterprise#115317
This update ensures that a unique transaction ID, provided by the Italian tax authority (SDI), is consistently saved for vendor bills. Previously, this ID was lost during the import process. This enhancement improves the traceability and accuracy of financial records related to Italian VAT compliance.
Original PR description
A unique transaction id is provided by the SDI for every document. This transaction was saved on document sending, but discarded for received one. --- For each unwrapped attachment, the _unwrap_attachments method extend the origin filename with `_<number>`. This mechanism allow finding what transaction id does each move correspond to. opw-6111186 Forward-Port-Of: odoo/odoo#261970
This update fixes an issue where changing the delivery date for Hungarian invoices caused incorrect journal line calculations and unbalanced entries. The fix ensures that exchange rates are correctly applied when the delivery date is modified, resolving discrepancies in tax calculations and improving financial accuracy.
Original PR description
### Issue: When changing the delivery date (used as the Hungarian exchange rate date), some journal lines could be recomputed incorrectly, leading to unbalanced entries ### Cause:…
### Issue: When changing the delivery date (used as the Hungarian exchange rate date), some journal lines could be recomputed incorrectly, leading to unbalanced entries ### Cause: `expected_currency_rate` was recomputed when `delivery_date` changed, but the new value was never automatically applied In addition, after https://github.com/odoo/odoo/pull/225407, `_sync_tax_lines` partially updated the lines: https://github.com/odoo/odoo/blob/f5501e5c8dcf60444077912db4c87e7a3f2654a6/addons/account/models/account_move.py#L3029-L3031 https://github.com/odoo/odoo/blob/f5501e5c8dcf60444077912db4c87e7a3f2654a6/addons/account/models/account_move.py#L1633-L1637 These methods reapply the previous tax rate, causing base and tax lines to be updated inconsistently As a result, when the base amount increases, the tax amount decreases, and vice versa ### Steps to reproduce: - Install `l10n_hu_edi` and `accountant` with demo data, then switch to the `HU company` - Go to Currencies → USD and add two rates: April 5: HUF per Unit = 100 April 6: HUF per Unit = 150 - Create an Invoice: (Any customer, Currency: USD, Line: Price = 1000, Tax = 27%) - Open the Journal Items and duplicate the browser tab for comparison - In the duplicated tab, change the Delivery Date to April 5 and save - Change the Delivery Date back to today and compare both tabs ### Before the fix: The values differ between both tabs because the tax lines keeps the old exchange rate opw-5801126 Forward-Port-Of: odoo/odoo#262915 Forward-Port-Of: odoo/odoo#258310
This update ensures that NSSF (National Social Security Fund) payroll deductions automatically stop for employees aged 60 or older. The change aligns with regulations requiring deductions to cease when an employee reaches retirement age, starting the following month after the age threshold is met. Unit tests have been added to verify this functionality.
Original PR description
[IMP] l10n_ke_payroll: stop NSSF deductions after 60
When the user is creating a payslip and if the age of employee is >=60 the NSSF deductions must stop
(If the 60 years is finished in 10th of March -> it will stop in April (deduction stop starts from next month))
Test:
Unit test is written to check stopping NSSF deductions with dynamic birthday.
task - 6074658
Forward-Port-Of: odoo/enterprise#115236This update resolves an issue where non-administrator users were unable to update their profiles due to a change in how user records were accessed. The fix restores the necessary sudo access, ensuring all users can correctly manage their profile information. An additional check was added to maintain proper access controls.
Original PR description
Following commit [1], sudo access was removed when fetching the user record. As a result, non-admin users encounter an access error when updating their profile. Previously, admin users were handled via an explicit `browse(user_id)`, while other users relied on `request.env.user`, which is always sudoed. This commit restores the expected behavior by explicitly sudoing the user. To prevent unintended privilege escalation, an explicit access check is added to ensure the linked partner can still be edited by the current customer. [1]:https://github.com/odoo/odoo/commit/a816d151ae16afc62d7980cedc492942bc181884 Task-5407884
This update resolves an issue where the 'Add a line' button was unresponsive in the mobile version of grid views (like Timesheets). The fix adjusts how elements are sized on mobile devices, ensuring the button is always clickable, regardless of the scroll position. This improves the user experience for mobile users.
Original PR description
**Steps to reproduce** On mobile: - Open a grid view (e.g. Timesheets > All timesheets) - Try to click on "Add a line" for the first employee - Issue: nothing happens. Notice that by scrolling down the list to employees at the bottom, it becomes possible to click on "Add a line". **Cause** `o_grid_cell_overlay` elements (with `h-100`) were taking more than the expected height in mobile, because the `o_grid_section_title` divs only have `position: sticky` on larger viewports. With the default `position: static`, the child element's height was exceeding its parent's height. opw-5853489 Forward-Port-Of: odoo/enterprise#113400
This update resolves an issue where error messages from the Danish tax reporting system (l10n_dk_reports) were causing unexpected errors. The fix ensures that error messages are handled correctly, preventing system crashes and improving the reliability of tax report generation. This change was driven by a technical update to handle data type mismatches.
Original PR description
before this commit, if the SKU server was returning an error message, the error handler would raise an exception because of the lazyTranslate. The reason is that `join()` expects an actual sting as argument, not a lazy string. This commit adds some tests for the error case and fixes the error due to the lazytranslate in the error codes. opw-6171466 Forward-Port-Of: odoo/enterprise#115887 Forward-Port-Of: odoo/enterprise#115515
This update optimizes how the system removes old device log entries, preventing performance slowdowns. By using a more targeted approach, the system avoids scanning the entire table, which improves efficiency and reduces the load on the database. This change enhances the overall stability and responsiveness of the application.
Original PR description
The current query to delete unnecessary records from `res.device.log` must be run on all records in the table. This means that the entire table will be placed in the psql buffer. This can degrade…
The current query to delete unnecessary records from `res.device.log` must be run on all records in the table.
This means that the entire table will be placed in the psql buffer. This can degrade performance if autovacuum is very frequent.
This commit introduces a fix so that a seq scan does not have to be performed on the table to carry out the cleanup.
We can use an `USING` if the condition on the joined table (L2) significantly reduces the volume before the join.
This will avoid having the corresponding rows from the first table (L1).
Pseudo query:
```sql
DELETE FROM L1
USING L2
WHERE
<L2_selective_filter>
AND L1.<device> = L2.<device>
AND L1.last_activity < L2.last_activity
```
If `<L2_selective_filter>` is very selective, PostgreSQL will use L2 as the "base" table for the join.
PostgreSQL will therefore not place the entire table in the buffer.
With:
```
d: device
c: cron
t: time
```
```
d t1 - insert
d t2 - insert
d t3 - insert
c t4 - cleanup (delete d t1 and d t2)
d t3
d t5 - insert
d t6 - insert
c t7 - cleanup (delete d t3 and d t5)
d t6
d t8 - insert
c t9 - cleanup (delete d t6)
d t8
c t10 - cleanup
d t8
...
```
In the example, cron t9 cannot look at the time window between the moment it runs and the last cron t7. The proof is that the device inserted in t6 must be deleted because a device t8 has been inserted.
It is not possible to cleanup between two crons because older lines can still be deleted by a later cron if a more recent line has been inserted after the previous cron.
So if a device is inserted between the time of the current cron (t0) and the previous cron (t-x), it is necessary to scan the entire table to cleanup the previous devices.
Therefore, it is possible to create a filter so that devices for which there has been no new insertion in the table between the two crons (t0 and t-x) do not need to be checked.
Pseudo query becomes:
```sql
DELETE FROM L1
USING L2
WHERE
L2.last_activity >= <last_cron_time>
AND L1.<device> = L2.<device>
AND L1.last_activity < L2.last_activity
```
Task-5951999
Forward-Port-Of: odoo/odoo#249738This update resolves an issue where the HR system might fail if no active versions of data were available. The change provides a fallback mechanism, ensuring that core HR functions continue to operate smoothly. This improves system stability and prevents disruptions to employee management processes.
Original PR description
Forward-Port-Of: odoo/odoo#263324
The customer list view was displaying incorrect total calculations (showing dashes instead of numbers) when certain columns were enabled. This fix ensures that total amounts are displayed accurately, providing reliable reporting on customer balances. This update resolves a display issue impacting financial reporting.
Original PR description
In the partner list view, enabling the "Total Due" and "Total Overdue" columns results in empty aggregates (—) at the bottom of the list. Steps to reproduce: - Navigate to Accounting -> Customers -> Customers - Add columns 'Total Due' and 'Total Overdue'. - Check the computed totals. Issue: The totals displays dashes (—) instead of the numbers. Analysis: The web client list renderer requires a currency field to be present in the view to correctly format and display aggregate sums for monetary fields, otherwise empty dashes are shown as fallback. opw-6169513 Forward-Port-Of: odoo/odoo#263585 Forward-Port-Of: odoo/odoo#261820
A recent update intended to improve product name display in order forms has unexpectedly broken the functionality of manually editing product descriptions. To avoid further disruption, the change has been reverted. This impacts how users can describe products within purchase orders and sales orders.
Original PR description
**Steps to reproduce:** 1- Create a new PO/SO/Invoice. 2- Add a new order line and select a product. 3- Click on the UI dropdown to hide the Product column/field. 4- In the Description column (stored…
**Steps to reproduce:**
1- Create a new PO/SO/Invoice.
2- Add a new order line and select a product.
3- Click on the UI dropdown to hide the Product column/field.
4- In the Description column (stored as name in the model), the product name appears by default. Delete it and write a manual description.
5- Enable the Product column once again.
**Issue:**
The description no longer appears under the product name in the form view
**Why this happens:**
Commit https://github.com/odoo/odoo/commit/bd5b86e1596e0058ff8f46a79b7c1a918f1d4adc introduces the new logic below:
`this.currentProductName = this.productName ? label.split("\n")[0] : "";`
which assumed the label will always come from the backend in the form [Product Name] + [Product Translation]
So when the following condition was checked, it evaluated to true and the description was truncated:
`else if(this.currentProductName && label.startsWith(this.currentProductName))`
However, a customer can manually edit the description like mentioned above, removing the product name from the description (`name`) column.
Additionally, the fix affected another flow. When you create a product with a Vendor Product Name/Code for vendor X and then create a RFQ for vendor X with that product, the Vendor Product Name/Code no longer appears in the description.
**Resolution:**
Since the fix for the initial problem is causing significant side effects across multiple flows, we decided to revert
the fix.
opw-6189252
Forward-Port-Of: odoo/odoo#263305This update removes a restriction that previously required Lazada products to be 'storable'. When stock synchronization is off (as is common for Lazada integrations), tracking stock isn't needed, so this restriction is no longer necessary. This simplifies product setup for Lazada listings.
Original PR description
Lazada items previously required products to be of type 'storable'. This restriction is unnecessary when stock synchronization is disabled, since no stock tracking is performed in that case. opw-6173986 Forward-Port-Of: odoo/enterprise#116543
This update resolves an issue where the composer field in the portal chatter wouldn't automatically focus after an emoji was added. The fix ensures the composer always receives focus, improving user experience and preventing delays in composing messages. This was caused by a missing default value for the composer's autofocus property.
Original PR description
Before this commit, after adding an emoji via the emoji picker in the portal chatter, the composer would not be focused. This is due to the `autofocus` prop of the composer being optional and not having a default value, leading to `NaN` when being incremented while `undefined`. This commit fixes the issue by giving it a default value of 0. task-6204911 Forward-Port-Of: odoo/odoo#263494
This update fixes an issue where contacts enrolled in the same courses were incorrectly merged. Now, the system prevents this merge, displaying an error message to the user, ensuring data accuracy and preventing duplicate course information. This improves the reliability of our attendee tracking.
Original PR description
Expected Behaviour: Contacts enrolled in common courses should not be merged and the merge should fail. Steps to reproduce: 1- Go to one of the courses 2- Add two attendees to the course 3- Go to Contacts App 4- Select the two attendees you added to the course 5- Try merging the two contacts Actual Behaviour before the Fix: Contacts enrolled in common courses are getting merged and the common courses are kept in the destination contact. Behaviour with the Fix: Contacts enrolled in common courses are blocked from being merged and an error message is shown to the user saying that the reason the merge is blocked is a duplicate course. opw-5417223 Forward-Port-Of: odoo/odoo#244500
This update resolves a problem where setting a maximum package weight in Sendcloud prevented accurate shipping rate calculations. The fix ensures that package splitting is handled correctly, allowing rates to be generated even when order weights exceed the maximum deliverable weight. This improves the reliability of shipping estimates.
Original PR description
Issue ----- Putting a max weight on a package type causes getting a rate with Sendcloud to fail. Steps to reproduce ----- - Setup Mondial Relay using Sendcloud - Set a default package type with max…
Issue ----- Putting a max weight on a package type causes getting a rate with Sendcloud to fail. Steps to reproduce ----- - Setup Mondial Relay using Sendcloud - Set a default package type with max weight 2kg - Create a product with a 500g weight - Create a SO with the product - Add delivery - Sendcloud Mondial Relay - Get rate > Impossible to get a rate Cause ----- When retrieving the shipping method to use when retrieving a rate, we use the real weight of the order. https://github.com/odoo/enterprise/blob/cca1433f5a064673b8e007530e20e8a9fe72949b/delivery_sendcloud/models/sendcloud_service.py#L67 https://github.com/odoo/enterprise/blob/cca1433f5a064673b8e007530e20e8a9fe72949b/delivery_sendcloud/models/sendcloud_service.py#L81 However, when making the rate call, we use the value returned by `_split_shipping` https://github.com/odoo/enterprise/blob/cca1433f5a064673b8e007530e20e8a9fe72949b/delivery_sendcloud/models/sendcloud_service.py#L91 which is equal to the maximum weight of the package. This is blocking in some cases, like if - the real weight is 750g - the package max is 2kg - Sendcloud returns a shipping method for [500g;1kg] Asking a rate for this method & a 2kg package will fail (rightfully so). Solution ----- The shipment should be split into packages before retrieving the shipping methods. Otherwise the problem might be the other way around where we retrieve a shipping method for the whole order, only to split it into multiple packages because they don't fit in one. Also, the `shipping_weight` returned by `_split_shipping` should only be different from the order's total weight if it is higher than the maximum deliverable weight. ----- Ticket: opw-5947199 Forward-Port-Of: odoo/enterprise#108315
This update resolves an issue where the gross salary line was missing in the salary configurator when the user interface was set to a non-English language (like French). The fix ensures that the correct translated category name is used consistently, displaying the gross salary accurately for all users regardless of their language settings.
Original PR description
**Problem:** On a Belgian company with the UI set to French (or any non English language), the gross line never appears in the salary configurator sidebar when opening an offer. **Steps to…
**Problem:**
On a Belgian company with the UI set to French (or any non English language), the gross line never appears in the salary configurator sidebar when opening an offer.
**Steps to reproduce:**
1. Create a Belgian company.
2. Install French and set the admin user to French.
3. Go to an applicant (e.g Laurie Poiret), create a salary offer, save.
4. Open the offer link (salary configurator).
**Cause:**
The base `_get_compute_results` uses the translated `category_id.name` ("Salaire mensuel" in french) as the dictionary key when writing entries into `resume_lines_mapped`. The payroll override function `_get_period_name`, which for monthly schedules returned the hard coded english string `"Monthly Salary"` instead of the translated category name. This caused a key mismatch: the gross line was stored under the translated key, while the override rebuilt `resume_categories` with the english key so when the template iterates over categories and looks up `lines[category]`, the whole "Monthly Salary" bucket was invisible in every non english language.
**Solution:**
We should now return the `category_id.name` directly (the translated name coming from the record itself). This keeps all keys consistent between `resume_categories` and `resume_lines_mapped` regardless of the language used.
also because in https://github.com/odoo/enterprise/blob/1845042ff388593c4cdf547d47c018f42bd02c7c/l10n_be_hr_contract_salary/controllers/main.py#L450
We use `resume = result['resume_lines_mapped']['Monthly Salary']`
We need to re-design this by using the actual translated names, and building `result` keys based on the language selected (the same should be applied for "Yearly benefits").
opw-6009711
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/enterprise#110676This update fixes an issue where users were incorrectly directed to a standard form view when opening documents linked through a Studio-added Many2One field. Now, users can directly access the document's Kanban or List view, allowing them to preview and navigate the document content as intended. This enhances the user experience for document management.
Original PR description
Problem: When opening a linked `documents.document` record from a Many2One field added via Studio, the user is redirected to the standard form view. This is problematic because the form view does not allow the user to preview the actual document or navigate into it if the record is a folder. Solution: override `get_formview_action` to open the Kanban/List/Activity views. task-6068437 Forward-Port-Of: odoo/enterprise#116425 Forward-Port-Of: odoo/enterprise#113149
This update resolves an issue where self-billing invoices were incorrectly processed as standard invoices, impacting Peppol compliance. The fix ensures the correct document type ('credit_note') is used when generating UBL invoices for self-billing transactions, improving accuracy and adherence to PEPPOL standards. A demo setup has also been added for testing.
Original PR description
To reproduce: - Activate Peppol - Activate selfbilling on your purchase journal - Create a Vendor Refund - Generate the UBL => The InvoiceTypeCode is 389, meaning it's considered a selfbilling invoice, not a selfbilling credit note. The issue is that we never put the document type of credit_note for selfbilling documents as it wasn't expected. invoice was, due to a else encompassing invoices and bills. Also add a handle demo to be able to create selfbilling documents in demo mode. opw-6132226 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263128 Forward-Port-Of: odoo/odoo#260941
This update resolves an error that occurred when posting journal entries using accounts shared between companies during an open audit period. The fix prevents AccessErrors by ensuring users have the correct permissions to access audit status information, allowing for consistent reporting across all companies.
Original PR description
Posting a journal entry using an account shared between multiple companies during an open audit period raises an AccessError. Steps to reproduce: - Configure an account to be shared between Company A and Company B. - Add Company A and Company B in 'Companies' - In the mapping tab, add a code for each company - In Company A, create a tax audit for a specific fiscal period. - Switch to Company B and keep just Company B selected. - Create and post a journal entry using the shared account within the same date period. Issue: An AccessError is raised when posting the move. The system attempts to check the status of the audit records linked to the shared account, to which the user in Company B does not have read access. opw-5993450 Forward-Port-Of: odoo/enterprise#115454
This update resolves an error that occurred when calculating overtime deductions for employees with specific filing statuses (other than 'single' or 'jointly'). The fix ensures the system correctly handles a wider range of employee statuses, preventing unexpected crashes. It also includes minor improvements to testing.
Original PR description
Issue: ---------------------------------------- When having an employee with `l10n_us_filing_status` not in `['single', 'jointly']` and evaluating the rule parameter…
Issue: ---------------------------------------- When having an employee with `l10n_us_filing_status` not in `['single', 'jointly']` and evaluating the rule parameter `l10n_us_qualified_overtime_deduction_cap` an error occurs. Cause: ---------------------------------------- `l10n_us_filing_status` can have 5 values: `['single', 'jointly', 'separately', 'head', 'survivor']` But only `['single', 'jointly']` are defined for `l10n_us_qualified_overtime_deduction_cap` ([src](https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/l10n_us_hr_payroll/data/hr_rule_parameters_data.xml#L48)). When running the rule "Qualified Overtime", the custom Python crashes because we read a key that is not there: https://github.com/odoo/enterprise/blob/2d2056766441157dc45ebc37b677841c44e5c513/l10n_us_hr_payroll/data/hr_salary_rule_data.xml#L56 Solution: ---------------------------------------- In the custom Python condition, we first check if the key is there. The custom Python computation also tries to read the key, but it is run only if the condition is validated. So we don't need to change it. Also fixed indentation of test 069. opw-6129657 Forward-Port-Of: odoo/enterprise#115754
This update fixes an issue where the total row in the Planning Gantt view wasn't displaying accurate working hours data when the view wasn't grouped by resources. The change ensures that all working hour information is correctly calculated and displayed, regardless of grouping settings, improving planning accuracy.
Original PR description
Issue: ---------------------------------------- In the Planning Gantt view when we don't group by resources, the total row is not considering the working hours. Steps to reproduce:…
Issue: ---------------------------------------- In the Planning Gantt view when we don't group by resources, the total row is not considering the working hours. Steps to reproduce: ---------------------------------------- - Open Planning - Remove the default group by resources - Have at least a planning slot for a non-flexible employee - The total row doesn't take the working schedule into account Cause: ---------------------------------------- Since [an improvement,](https://github.com/odoo/enterprise/commit/cc35e1a4729453e4f788034a94402ab048eadfcb) the working hours data in given to the `PlanningGanttRenderer` through the progress bars data. This is an issue because the progress bars are only there if we group by resources. ([src](https://github.com/odoo/enterprise/blob/423ab064847dd41d36778a812390e3bec53ba4dc/planning/models/planning_slot.py#L2669-L2678)) Solution: ---------------------------------------- In this commit we partially revert the commit adding the working intervals in the progress bars. Instead of doing it in `_gantt_progress_bar_resource_id()` we create a new method `_get_gantt_planning_data()` which is called directly in `get_gantt_data()` and returns useful information even when there are no progress bars. opw-5507063 Forward-Port-Of: odoo/enterprise#112522
This update resolves an issue where the automatic checkout feature would fail when an employee had multiple overtime entries on the same day, particularly when one entry lacked a defined checkout time. The fix ensures accurate calculation of overtime durations, preventing validation errors and ensuring correct checkout times are applied.
Original PR description
__ ## Short functional explanation of the error When an employee has multiple overtimes for the same day, including one that doesn't have a check-out date. When running the scheduled action…
__ ## Short functional explanation of the error When an employee has multiple overtimes for the same day, including one that doesn't have a check-out date. When running the scheduled action `Attendance: Automatically check-out employees`, an error occurs: `odoo.exceptions.ValidationError: Duration must be positive and cannot exceed 24 hours.` ## Reproduction Steps 1. Create an employee. Set their timezone to UTC and the Overtime Ruleset to Default Ruleset in the settings tab. In the Payroll tab, set a contract start date. 2. Set their Working Hours to a fixed 40 hours/week. Set the timezone of the Working Schedule to UTC. 3. Go to attendances and create 2 attendances on a Sunday: one from 06:00 to 06:01 and a second that starts at 06:02 but that doesn't have a checkout date. 4. Go to Settings and enable Automatic Checkout. Leave the Tolerance to 2 hours. 5. Enable debug mode and go to Scheduled Actions. Look for `Attendance: Automatically check-out employees` and run it manually. ### Expected behavior As the tolerance is 2 hours, the second attendance check-out time should be set at 08:01. ### Unexpected behavior An error occurs: `odoo.exceptions.ValidationError: Duration must be positive and cannot exceed 24 hours.` ## Origin of the issue We retrieve overtime intervals with the domain: https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/hr_work_entry_attendance/models/hr_version.py#L34-L42 This will make us retrieve all the overtimes for a given day, even if overtimes belong to different attendances. However, this means that we will retrieve several times the same overtimes, as this piece of code is executed in this context: https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/hr_work_entry_attendance/models/hr_attendance.py#L35 https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/hr_work_entry_attendance/models/hr_attendance.py#L43 This results in the generation of intervals containing multiple times the same overtimes. We then sum their duration to later create work entries: https://github.com/odoo/enterprise/blob/64f813dab727d76286c1ff6c80c08cb6a6737b49/hr_work_entry_attendance/models/hr_attendance.py#L47 As we try to create a work entry with too much overtime, that exceeds 24 hours, it raises a validation error. Moreover, as the overtime hours are always stored in UTC, it makes sense to always keep the timezone as UTC when performing a `_read_group` . __ opw-6036064 Forward-Port-Of: odoo/enterprise#116194
This update fixes an issue where products added to a sales order catalog were appearing in the wrong order. The fix ensures products are added to the catalog in the intended sequence, improving the user experience when managing product selections for sales orders. This resolves a bug related to how new order lines are added to the catalog.
Original PR description
# How to reproduce
- Create product n1 & n2
- Create a SO
- Add a section to that SO
- Go to the catalog
- Ensure the section is selected, then add product n1 followed by n2
# The problem
The orders of the product are reversed. n2 is before n1 in the SO
# Cause
Clicking on the Add button will trigger an RPC call to "/product/catalog/update_order_line_info"
that will endup adding a new sale order line :
https://github.com/odoo/odoo/blob/c7f05ae216de64d1f8e76e332bc6dd9cf11ce657/addons/sale/models/sale_order.py#L2222-L2227
To determine the sequence of this new order line, we call `_get_new_line_sequence`.
Since a section_id is given, the new order line is inserted right after, before any
product under the same section :
https://github.com/odoo/odoo/blob/c7f05ae216de64d1f8e76e332bc6dd9cf11ce657/addons/account/models/product_catalog_mixin.py#L59-L63
opw-6175704
Forward-Port-Of: odoo/odoo#262556A bug causing spreadsheet image inserts to fail due to excessive data loading has been resolved. The fix bypasses a security check within the database, allowing for more efficient attachment retrieval and preventing memory-related crashes. This ensures stable image insertion, especially in spreadsheets with many attachments.
Original PR description
To reproduce: ============= - In a db with a large amount of attachments - Insert an image in a spreadsheet - Observe the request hanging then ending with an error Problem: ======== - `ir.attachment._search` is overridden to apply security rules by building a domain based on public, `res_model`, `res_id` and `create_uid` fields - When no `res_model` restriction is present, the fallback path ORs in `res_model != False`, which matches nearly every attachment in the database - All matching records are then loaded into memory for Python-side access filtering via `_filtered_access`, causing the request to time out and crash with a memory error Solution: ========= - Set `bypass_search_access=True` on the many2many field definition so the ORM skips the `_search` override and relies on the SQL join to restrict returned records opw-6152979
This update fixes an issue where quiz answers weren't updating correctly after saving. Previously, a full page reload was needed to see the changes. The fix restores a key field to ensure the web client accurately reflects updated answer data, improving the quiz experience.
Original PR description
After adding new answers or editing existing ones in a quiz question and clicking 'Save & Close', the question overview displays incorrect data. New answers appear as empty tags, and modified answers continue to show their old values. The correct data only appears after a full page reload. This regression was introduced in commit 8ceea093, where invisible fields were removed during code cleanup. The `display_name` field is required in the `answer_ids` list view for the web client to correctly update its local cache. Without this field, the client cannot refresh the display names of the tags immediately after modification. This commit restores the `display_name` field as `column_invisible` in the `slide.question` form view. Task-5449335
This update ensures that right-clicking on links within email messages displays the standard browser context menu, rather than the previous message actions. Previously, a technical issue within Odoo's email display prevented this functionality. This change improves the user experience by aligning with expected browser behavior.
Original PR description
Before this commit, when right-clicking on a link in a message of type email, this shows the message actions rather than the browser context menu. We expect to display the browser context menu, as…
Before this commit, when right-clicking on a link in a message of type email, this shows the message actions rather than the browser context menu. We expect to display the browser context menu, as there are many handful feature of browser context menu for links. This was handled in earlier fixes [1][2], but these fixes were not working with messages of type email. This didn't work because messages of type email are inside a shadow DOM, so `ev.target` is necessarily the shadow root and not the specific targeted element. This commit fixes the issue by using `ev.composedPath()` to pick the 1st element, so that this exposes the inner-most element inside the shadow DOM that has been right-clicked. This lets us ignore the showing of message actions in right-click when this comes from a link. opw-6110949 [1]: https://github.com/odoo/odoo/pull/244252 [2]: https://github.com/odoo/odoo/pull/258681 Before / After <img width="441" height="243" alt="before" src="https://github.com/user-attachments/assets/f274e8d2-66af-442e-9a31-27ea1ce4d9bd" /> <img width="605" height="513" alt="after" src="https://github.com/user-attachments/assets/3e241e83-93d0-47e6-970c-b5e5f339417d" />
This update provides pre-configured Italian accounting data to simplify testing and demonstrations of the Odoo Italian localization. The data includes sample partners, bank accounts, invoices, and bills, along with necessary e-invoicing fields, ensuring accurate representation during localization validation.
Original PR description
Purpose: Load a pre-configured set of Italian accounting sample data to facilitate localization testing and demonstrations. Specifications: This commit introduces comprehensive sample data for the Italian localization, configuring the following: * Partners * Bank Accounts * Invoices & Bills * Dynamic Dates: All generated moves use a relative date format to ensure testing data remains relevant and doesn't expire on runbot. * EDI Data: Populates necessary e-invoicing fields (`l10n_it_codice_fiscale`, `l10n_it_pa_index`) for the created partners. task-6103257 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix ensures that website product searches accurately reflect the company a user is logged into. Previously, users could see products restricted to a different company, leading to potential issues with sales orders. The change enforces the website's company setting during searches, resolving this inconsistency.
Original PR description
# Setup Have 2 companies : A & B # How to reproduce - Set your website's company to Company B - Create product X : - Company : Company A - Published - Name : xyz - Go to Users > Any User > Acces…
# Setup
Have 2 companies : A & B
# How to reproduce
- Set your website's company to Company B
- Create product X :
- Company : Company A
- Published
- Name : xyz
- Go to Users > Any User > Acces Rights > Allowed Companies => leave only Company A
- Connect as that user on the website
- Go to the Shop tab and search xyz
# The problem
The product X is displayed, even though we currently use the company B's website and the product is limited to company A.
This causes problem later when Sales Order are created using that product.
If you set the Allowed Companies of the user to both Company A and Company B, then the product is correctly hidden
# Why
When you search something in the search bar, the server does a `_search_with_fuzzy()` that ends up calling a simple `model.search()`.
In our case, this search should not return product X because there is an `ir.rule` that hides product not in the current company :
https://github.com/odoo/odoo/blob/0bb5ac6c1a87367c1ebb343ad6e6e6e56188cf13/addons/product/security/product_security.xml#L34-L38
But the `website` module has some particular rule about setting the current company :
https://github.com/odoo/odoo/blob/0bb5ac6c1a87367c1ebb343ad6e6e6e56188cf13/addons/website/models/ir_http.py#L249-L261
So, in our case, since the user does not have company B in its allowed companies, then
`allowed_company_ids` = Company A. So `('company_id', 'parent_of', company_ids)` is trucy and the product is displayed
# Proposed solution
Doing the search with `with_company` raise an AccessError because the company is not present in the allowed_companies. Chaging the allowed companies logic seems risky because it
may lead to unintended side effects.
We instead enforce the website's company in the search's domain
opw-6115647
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#262366
Forward-Port-Of: odoo/odoo#260138This update corrects a problem where applicants signing an offer multiple times would sometimes be redirected to an outdated contract version. The fix prioritizes active contract versions during the 'Signed Contract' button click, ensuring users always access the correct, current agreement. This improves the applicant experience and data accuracy.
Original PR description
Steps to reproduce: 1- Create an offer for an applicant 2- Sign the offer as an applicant multiple times 3- Counter sign only one of them 4- Click on the "Signed Contract" smart button Issue: In some cases, the smart button will redirect to an archived version. Cause: The search for the version allows for archived versions and has a limit of 1, so sometimes that 1 version turns out to be one of the signed contracts that weren't counter signed. Fix: Add a sort to the search to prioritize active versions. Task-6144381 Forward-Port-Of: odoo/enterprise#115505
This update resolves an issue where the knowledge article's table of contents would incorrectly display the TOC of the last previewed article. The fix ensures the TOC accurately reflects the current article, improving the user experience when creating and editing knowledge content. This prevents confusion and ensures consistent navigation.
Original PR description
### Steps to reproduce 1. Open knowledge 2. Create a new empty article 3. Click on Templates 4. Close the modal ------> Current article's side panel TOC shows the TOC of the previewed article. ### Technical The side panel's TOC is managed by the TOC service. When opening/updating any article, the side panel's TOC is updated according to the current article. When the article picker is previewing the article using the `HtmlViewer`, it also updates the side panel's TOC using the previewed article. Then if we close the dialog without loading the article, the side panel's TOC doesn't get updated. Therefore, opening the side panel's TOC shows the last previewed article's TOC. After this commit, we add a cleanup inside the `HtmlViewer` and the `KnowledgeTableOfContent` to restore the previous TOC manager when it is destroyed. Task-6186675
This update fixes a minor issue where the 'Plan' button appeared in the Gantt view even when there were no Sales Order Lines to plan. The fix ensures the button only appears when there's a valid SOL available, streamlining the user experience and preventing unnecessary dialogue opening. This improves efficiency and reduces potential user confusion.
Original PR description
Steps to reproduce: === - Go to Planning → Gantt view. - Click on an empty cell where no Sale Order Line (SOL) exists. - Observe that the Plan button appears in the multi-selection toolbar. Issue: === The Plan button is shown even when there are no SOL to plan, and clicking it opens the planning form dialogue, which should not happen in this scenario. Cause: === The visibility of the Plan button relies solely on whether `onPlan` is defined. There is no built-in validation to check whether any SOL actually exists for the selected cell before exposing the 'onPlan' action. Fix: === Introduce a new reactive prop `hasAvailableSOL` and compute it before `onPlan` is used. The Plan button is now shown only when an SOL actually exists. task- 5163638
This update resolves a bug that caused Purchase Orders to fail when the quantity ordered was less than the vendor's minimum quantity requirement. The fix ensures a valid supplier is always selected, preventing crashes and allowing for accurate price calculations, even with small order volumes.
Original PR description
FIX] purchase_stock: handle missing seller during PO line update (min_qty) **Steps to Reproduce:** - Install Sale, Inventory, Manufacturing, and Purchase. - Enable MTO, Units of Measure, and Routes.…
FIX] purchase_stock: handle missing seller during PO line update (min_qty)
**Steps to Reproduce:**
- Install Sale, Inventory, Manufacturing, and Purchase.
- Enable MTO, Units of Measure, and Routes.
- Create a product:
Set a vendor price with min_qty = 1.0.
Enable MTO route.
Add a BoM with a component product.
Set quantity to 0.1 (less than vendor min_qty).
- Create a Sale Order with the same product added twice.
- Confirm the Sale Order.
**Issue:**
During procurement:
- First procurement correctly fetches the supplier.
- On PO line update (_update_purchase_order_line), seller is recomputed.
Due to min_qty filtering, no seller is returned when quantity is low.
This results in: Missing seller, Missing product_uom, Invalid price
computation, And finally causes a crash when confirming the Purchase Order,
in _get_stock_move_price_unit: ZeroDivisionErroR
Root Cause:
- _select_seller filters suppliers using min_qty.
During merge/update flow, recomputed quantity may not satisfy min_qty.
Existing valid supplier (from initial procurement) is ignored.
No fallback handling in _update_purchase_order_line.
**Solution:**
- Add fallback logic when _select_seller returns no result: Use
_prepare_sellers() to fetch a valid supplier ignoring min_qty.
- Ensure a supplier is always available for: UoM resolution, Price computation
Prevents crash and ensures consistent PO line updates.
**Result:**
- No traceback when quantity < vendor min_qty
Supplier, UoM, and price are properly set
**OPW-6106487**
Forward-Port-Of: odoo/odoo#259894This update resolves an issue where newly created analytic distribution records would disappear after a page reload. The fix ensures the widget's changes are properly saved to the database, preventing data loss when updating distribution models. This improves data integrity and reliability for users managing analytic accounts.
Original PR description
Steps to reproduce 1. Go to Accounting → Configuration → Analytic Distribution Models 2. Create a new model, name it, and in the distribution column pick an analytic account 3. Click outside the row…
Steps to reproduce 1. Go to Accounting → Configuration → Analytic Distribution Models 2. Create a new model, name it, and in the distribution column pick an analytic account 3. Click outside the row and reload the page Issue The newly created record vanishes because `web_save` received `analytic_distribution: false`. The single click that closes the popover also triggers the editable list's `leaveEditMode`, which calls `record.save()`. That save runs before the widget has flushed the user's pick into `record.data`, so the write goes out with stale/empty data. This became reliably reproducible after [37d78a47bb20], which moved the list renderer's outside-click listener from `document` (bubble) to `window` (capture). Because the list is mounted before the widget, its capture-phase listener now fires first: `leaveEditMode` → `record.save()` is already in flight by the time the widget's own window click handler runs, so the widget's commit loses the race. Solution `record.save()` awaits `_askChanges()` before writing: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/web/static/src/model/relational_model/record.js#L268-L271 `_askChanges()` triggers `NEED_LOCAL_CHANGES` on the model bus and awaits any proms handlers push onto it: https://github.com/odoo/odoo/blob/cdf8aaec82ee387c8f29b8327efbc95fd17e2cb8/addons/web/static/src/model/relational_model/relational_model.js#L249-L253 This is the framework's standard hook for widgets that hold uncommitted local state; `ace_field` and `domain_field` already use it. Subscribe the analytic distribution widget to the same event and, when the dropdown is open, push a `commitChanges()` prom that awaits the existing `save()`. Because `record.save()` awaits these proms before running `_save`, the widget's pending distribution is guaranteed to be on `record.data` by the time the write payload is built, regardless of click-listener ordering. opw-6106309
This update corrects a bug where a project field was incorrectly displaying a warning due to an outdated database query. The fix ensures the warning is now consistently set to 'false' for all projects, streamlining the system. This change is considered low impact.
Original PR description
Prior to this commit, the `compute` method was getting all the projects that had missing employee sale order line mappings through an SQL query. The result of the query is supposed to be a tuple but was treated as an array of `Integer` ids causing trouble while browsing and then later writing the value for the field. Since the field `warning_employee_rate` is not used in the views we can assume that the warning will be `False` for all projects and remove this field later on Master. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263866