Daily updates from Odoo
Monday, May 11, 2026
234 changes
18 changes
Resolved issues and error corrections
This update resolves a problem preventing the demo data for the MRP Subcontracting module from loading correctly in Odoo 19. The fix ensures that the correct product template record is used, which was previously mismatched. This ensures demo data loads properly and allows users to test the module's functionality.
Original PR description
Steps to reproduce: - Initialize an empty database with demo data enabled - Install mrp_subcontracting Problem: The product.product `product_delivery_02` record does not share the same #ID as the product.template `product_delivery_02_product_template` record. This leads to an error when loading the demo data. This errors only started with Odoo v19. Solution: Use the right product.template `product_delivery_02_product_template` record. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263387 Forward-Port-Of: odoo/odoo#262949
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 resolves an issue where error messages from the Danish tax reporting system (l10n_dk_reports) could cause unexpected errors. The fix ensures the system correctly handles error messages, preventing crashes and improving the reliability of tax report generation. This change was driven by a technical update to the underlying system.
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 fixes an issue where subscription delivery dates were incorrectly displayed as the previous day due to timezone differences. The fix ensures delivery dates are accurately calculated based on the company's timezone, resolving a potential scheduling problem for subscription orders. This improves the reliability of delivery planning.
Original PR description
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm…
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm it. 3. Open the generated delivery order and check its Scheduled Date. Issue The scheduled date on the first delivery renders as the previous day. `_prepare_procurement_values` writes `date_planned` as `current_period_start`, which is a plain `fields.Date` value (https://github.com/odoo/enterprise/blob/ba41d7de3c0474286e3e9319710fdacfb95d3e2c/sale_subscription_stock/models/sale_order_line.py#L156). When a `date` is stored in the `Datetime` column `stock.move.date`, Odoo anchors it at midnight UTC; in any negative-offset timezone this renders as the previous day (e.g. `2022-03-02 00:00 UTC` shows as `2022-03-01 21:00` in UTC-3). The non-subscription path does not hit this because it resolves `date_planned` through `_expected_date()`, which returns `order_id.date_order` — a full `Datetime` set to `fields.Datetime.now()` at confirmation (https://github.com/odoo/odoo/blob/996702b0d5c518db2ac6f0b144e7835b27c29736/addons/sale/models/sale_order_line.py#L1398). The same midnight-UTC drift also affects later recurrences, where `current_period_start` falls back to `last_invoice_date` — another `Date`. Solution Split the two cases explicitly: - First delivery (`last_invoice_date` unset): set `date_planned` to `order_id.date_order`, matching the non-subscription flow. - Subsequent deliveries: localize `last_invoice_date` at `00:00` in the company timezone before converting back to UTC, reusing the pattern already applied to reordering rules (https://github.com/odoo/odoo/blob/20a0eee2d03293564320c268252a0353781d99ea/addons/stock/models/stock_orderpoint.py#L722). opw-6133831 Forward-Port-Of: odoo/enterprise#116593 Forward-Port-Of: odoo/enterprise#115100
This update fixes an issue where Peppol invoices were incorrectly sending data from branch companies instead of the designated parent company. The change ensures that the XML invoice accurately reflects the parent company's information, complying with Peppol regulations and improving data consistency. This resolves a prior reporting discrepancy.
Original PR description
### Issue before this commit: The XML export for branch companies incorrectly identified the branch as the sender, even when a Peppol parent company was configured. ### Steps to reproduce the issue:…
### Issue before this commit: The XML export for branch companies incorrectly identified the branch as the sender, even when a Peppol parent company was configured. ### Steps to reproduce the issue: 1. Download Accounting, Contacts and l10n_be 2. Create a branch for a Belgium company 3. Enable Peppol sending on the parent company 4. Enable Peppol sending on the branch company using the parent company endpoint 5. Switch to branch company 6. Create a customer invoice in the branch company using a customer who is on the Peppol network (meaning insert a valid VAT number and then verify button in the Accounting tab) 7. Confirm and send the invoice via Peppol 8. Download the resulting xml file and check the "AccountingSupplierParty" nodes. It contains the data of the branch and not the ones of the parent company ### Cause of the issue: The EDI export logic was fetching the supplier data directly from the invoice's company record without checking for a delegated Peppol parent company, ignoring the hierarchical relationship defined in the settings. ### Reason to introduce the fix: This fix ensures that the AccountingSupplierParty in the UBL/CII file correctly reflects the parent company's data when applicable. opw-6030526 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260389
This update corrects a technical issue preventing the correct display of IP salary rules on employee payslips. The underlying calculation has been adjusted to ensure accurate reporting of IP contributions. This ensures payroll data aligns with Belgian tax regulations.
Original PR description
-**Issue**: The IP salary rule was not visible on payslip. -**Fix**: Computation has been adjusted to include the correct field. Forward-Port-Of: odoo/enterprise#112711 Forward-Port-Of: odoo/enterprise#110936
This update resolves a problem where invoices weren't correctly processing extra components within kit products when automatic accounting was enabled. Specifically, the system was misinterpreting the unit of measure, leading to invoicing errors. The fix ensures accurate accounting for these components during the invoicing process.
Original PR description
### Steps to reproduce: - In the settings Enable: "Automatic accounting" - Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time')…
### Steps to reproduce:
- In the settings Enable: "Automatic accounting"
- Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time') inventory valuation.
- Create a kit product with a component invoiced on delivered qty
- Create and confirm a sale order for 1 units of your kit
- On the delivery add a new move for 1 unit of your kit and save
#### > The new line should be exploded into the component
- Set the quantity on both moves and validate
- On the sale order > Create draft invoice > confirm
#### > User Error: The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure False defined on the product. Please correct the unit of measure defined on the order line or on the product. They should belong to the same category.
### Cause of the issue:
The issue occurs when the `_stock_account_get_anglo_saxon_price_unit` is launched on the account move line created for the extra component because the moves where generated from a kit and hence are associated with a `bom_line_id` but the the product it self is not a kit so that no bom will be found here:
https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L12-L23 In particular, the rest of the call that tries to treat it as a kit will fail because no bom is and should be provided to this line: https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L34
opw-6041375
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#261878
Forward-Port-Of: odoo/odoo#258141This update ensures that a unique transaction ID, provided by the Italian tax authority (SDI), is saved when vendor bills are received in Odoo. Previously, this ID was lost during the import process. This enhancement improves the traceability and reporting capabilities for Italian tax 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 automatically selected courses for multi-category restaurant items always chose the lowest sequence number, regardless of the active category filter. Now, the system correctly picks the course linked to the currently selected category, ensuring accurate order processing. Additionally, a new feature prevents the creation of unnecessary courses when adding items to orders with `use_course_allocation` enabled.
Original PR description
When a product belongs to multiple categories, each linked to a different course, the automatic course selection was always picking the one with the lowest sequence, regardless of context. The expected behavior is to pick the course tied to the currently active category filter, not an arbitrary one. This commit implements that logic. In addition, when `use_course_allocation` is enabled, adding a first course to an order that already contains products no longer creates an extra course. --- Task: https://www.odoo.com/odoo/project/1737/tasks/6187108 Forward-Port-Of: odoo/odoo#262683
This update fixes an issue where preparation print requests for point-of-sale (ePOS) orders were not being processed correctly. Now, users can easily retry printing by clicking a 'Retry' button, ensuring that receipts are always generated as intended, preventing duplicate prints in the kitchen.
Original PR description
When ePOS preparation print fails, user can click on the "Retry" button to resend the request. Due to the logic of preparation receipts reprints, made to avoid duplicate prints in the kitchen, the changes were considered as already printed and the request was never made. We now provide only the printers with failures to the retry callback and a flag to mark them as failing in order to force reprint. Forward-Port-Of: odoo/odoo#263487
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 resolved to ensure consistent and accurate date presentation on all payslips. This improves the user experience and data accuracy for payroll reports.
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 resolves an issue where a unit test for LDAP authentication was leaving temporary data in the database. Switching to a simpler `HttpCase` approach has corrected this and paves the way for adding another test to address a related bug. This ensures the stability and reliability of our LDAP integration.
Original PR description
The unit test is tagged `-standard` and `database_breaking` because it was leaving left overs in the database. Using an `HttpCase` over a `BaseCase` solves that issue in addition to make the code way simpler. We want to resurrect this unit test class because we plan to add another unit test in that class for a bug fix. Forward-Port-Of: odoo/odoo#263417 Forward-Port-Of: odoo/odoo#261743
This update resolves an issue where uninstalling the l10n_ar_edi module caused database instability and prevented reinstallations. The problem stemmed from an inconsistent state within the module's configuration, specifically the currency provider field. A manual step is now required to restore the database, ensuring smoother module management.
Original PR description
since : https://github.com/odoo/enterprise/commit/de8c92290ca17f69b5cefa686fc743df7c645f32 Step to reproduce the crash: 1. Create a database with l10n_ar_edi installed 2. Uninstall currency_rate_live Result: Registry is crashed, database inaccessible Attempts to reinstall the module also crash due to the inconsistent state of the l10n_ar_edi application (specifically due to the currency_provider field) Required manual step to bring back the database to a valid state; 1. in SQL: mark the l10n_ar_edi module as uninstalled 2. ./odoo-bin -i currency_rate_live,l10n_ar_edi --stop-after-init opw-6124819 Forward-Port-Of: odoo/enterprise#115082
This 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 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 now accurately displays total due and overdue amounts. This fix addresses a technical issue where empty dashes were shown instead of calculated totals when specific columns were added. This ensures accurate reporting of customer financial information.
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 automatically populate product descriptions in order forms caused unintended side effects, specifically preventing users from manually editing these descriptions. To avoid further disruption, the change has been reverted. This impacts product descriptions across multiple order types.
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 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 the user experience. 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 a previous limitation in the Helpdesk system where returns for dropshipped orders couldn't be processed directly from tickets. Now, the 'Returns' button is visible for dropshipped transfers, allowing users to manage returns seamlessly and improving the efficiency of handling customer returns. This ensures consistent return functionality regardless of order type.
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
22 changes
Resolved issues and error corrections
This update resolves a technical issue where the payroll amount calculation wasn't working correctly when a default value was set for a specific field. The fix ensures that the calculation is triggered properly, regardless of the default value chosen, leading to accurate payroll processing. This improves the reliability of the HR payroll module.
Original PR description
The compute is not triggered when a default value is assigned to a field. So all property inputs default to 'fix' for amount_select. This removes the default parameter from the field and adds the default value to the compute method. task-6126332 Forward-Port-Of: odoo/enterprise#113102
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 and icon 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 bug where the PDF viewer field didn't save the uploaded file's name. Now, when you upload a PDF, the correct filename is stored, improving file management and organization within Odoo. This ensures users can easily identify and access their 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 resolves an issue where removing a recruiter from a job position would corrupt links between employees and their user accounts within Odoo. The fix ensures that recruiter assignments are correctly updated across all related applications, preventing data inconsistencies and errors when managing users and job positions.
Original PR description
**Steps to Reproduce:** 1. Click on configure on one of the job positions having a recruiter assigned. 2. Remove the recruiter from the form 3. Now try to go to Settings App > Manage Users. (You will…
**Steps to Reproduce:**
1. Click on configure on one of the job positions having a recruiter assigned.
2. Remove the recruiter from the form
3. Now try to go to Settings App > Manage Users. (You will stuck with an error)
4. Navigate to users using the menu, and open Mitchell Admin → He is no longer an employee.
**Bug Cause:**
In HrJob.write(), when recruiter_id changes, the code attempts to update ongoing applications' recruiter by writing:
application_ids.recruiter_id.user_id = job.recruiter_id.user_id
This traverses the relational chain and writes user_id directly on the existing recruiter employee record instead of reassigning the recruiter on the applications. When recruiter_id is cleared, job.recruiter_id.user_id resolves to False, effectively setting user_id = False on the previous recruiter's hr.employee record, breaking the link between the employee and their user account.
**Bug Solution:**
Directly reassign recruiter_id on the ongoing applications instead of mutating the employee's user_id: application_ids.recruiter_id = job.recruiter_id
**Task:** 6102209
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update enhances Point of Sale error tracking by automatically saving critical IndexedDB errors to local storage. Previously, these errors were lost if the underlying IndexedDB system was unavailable. This change ensures that developers can more easily diagnose and resolve issues with the Point of Sale functionality, improving overall system stability.
Original PR description
Add a `persistToStorage` flag to `logPosMessage` that mirrors critical IndexedDB errors to `localStorage["pos_idb_errors"]` in addition to the posLogger. This ensures error traces are preserved even when the IndexedDB daemon itself is unavailable. opw-6150816 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263093
This update resolves a crash issue that occurred when creating Point of Sale (POS) orders with the pos_avatax module installed. The fix re-enabled a previous method to correctly identify the customer's shipping information, ensuring POS order creation remains stable. This improves the reliability of the POS system for our retail customers.
Original PR description
Before this commit, when pos_avatax was installed, creating a pos order could crash because the pos order does not have the partner_shipping_id field. This commit re-adds the _get_avatax_ship_to_partner method as it was before the refactor https://github.com/odoo/enterprise/commit/0404086db567ee0595414263d36a3b7dceaa0dbe, which returns the partner_id for the pos order. The `_get_avatax_ship_to_partner` is overridden in `pos_avatax`. Since a `pos.order` does not have a `partner_shipping_id`, the overridden function only reads the partner_id. opw-6122280 Forward-Port-Of: odoo/enterprise#115840
This update fixes an issue where subscription delivery dates were incorrectly displayed as the previous day due to timezone differences. The change ensures delivery dates are accurately calculated based on the company's timezone, resolving a potential scheduling problem for subscription orders. This improves the reliability of delivery planning.
Original PR description
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm…
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm it. 3. Open the generated delivery order and check its Scheduled Date. Issue The scheduled date on the first delivery renders as the previous day. `_prepare_procurement_values` writes `date_planned` as `current_period_start`, which is a plain `fields.Date` value (https://github.com/odoo/enterprise/blob/ba41d7de3c0474286e3e9319710fdacfb95d3e2c/sale_subscription_stock/models/sale_order_line.py#L156). When a `date` is stored in the `Datetime` column `stock.move.date`, Odoo anchors it at midnight UTC; in any negative-offset timezone this renders as the previous day (e.g. `2022-03-02 00:00 UTC` shows as `2022-03-01 21:00` in UTC-3). The non-subscription path does not hit this because it resolves `date_planned` through `_expected_date()`, which returns `order_id.date_order` — a full `Datetime` set to `fields.Datetime.now()` at confirmation (https://github.com/odoo/odoo/blob/996702b0d5c518db2ac6f0b144e7835b27c29736/addons/sale/models/sale_order_line.py#L1398). The same midnight-UTC drift also affects later recurrences, where `current_period_start` falls back to `last_invoice_date` — another `Date`. Solution Split the two cases explicitly: - First delivery (`last_invoice_date` unset): set `date_planned` to `order_id.date_order`, matching the non-subscription flow. - Subsequent deliveries: localize `last_invoice_date` at `00:00` in the company timezone before converting back to UTC, reusing the pattern already applied to reordering rules (https://github.com/odoo/odoo/blob/20a0eee2d03293564320c268252a0353781d99ea/addons/stock/models/stock_orderpoint.py#L722). opw-6133831 Forward-Port-Of: odoo/enterprise#116593 Forward-Port-Of: odoo/enterprise#115100
This update prevents a frustrating error that occurred when users left live chat channels after being invited. The fix ensures the channel leaving process is handled correctly, eliminating access issues and improving the live chat experience. This resolves a technical bug impacting channel functionality.
Original PR description
When a non-livechat user leaves a livechat channel after being invited, an access error occurs. This is due to `leaveChannelRpc` being called twice: once in `_onClose`and again in `leaveChannelProcess`. The first call removes the membership, while the second attempts to access the channel without proper rights, triggering the error. This commit fixes the issue by ensuring that `leaveChannelRpc` is only called once when leaving the channel. Task-[6072247](https://www.odoo.com/odoo/project/1519/tasks/6072247) Forward-Port-Of: odoo/odoo#257328
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 display across all payslips. This ensures accurate and professional payslip documentation 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 resolves an issue where purchase orders merged with sale orders didn't correctly link to both sale orders. The fix ensures that all related sale orders are properly connected during the merging process, improving data accuracy and preventing discrepancies in purchase order management. This impacts the reliability of inventory tracking and order fulfillment.
Original PR description
### Steps to reproduce: - In the settings Enable: "Multi-Steps Routes" - Unarchive the MTO route - Create a storable product with MTO enabled and a set vendor - Create and confirm two sale orders for…
### Steps to reproduce: - In the settings Enable: "Multi-Steps Routes" - Unarchive the MTO route - Create a storable product with MTO enabled and a set vendor - Create and confirm two sale orders for 1 unit of that product - Go to the purchase order view, select both PO > Actions > Merge RFQs #### > The un-cancelled Purchase order is only linked to one of the 2 SOs ### Cause of the issue: The sale orders linked to a PO in this flow are linked through the stock references: https://github.com/odoo/odoo/blob/fb79136e259e2b56746afda64b2536bddf6755c0/addons/sale_purchase/models/purchase_order.py#L60-L61 https://github.com/odoo/odoo/blob/fb79136e259e2b56746afda64b2536bddf6755c0/addons/sale_purchase_stock/models/purchase_order.py#L14-L15 However, the references of the PO merged to the present one are not merged as well. opw-6150636 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263016 Forward-Port-Of: odoo/odoo#261578
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 traceability and compliance with Italian tax regulations.
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 error in the calculation of basic salaries for Mexican employees, ensuring accurate payments based on total calendar days worked. Previously, unpaid leave wasn't correctly factored in; now, the system accurately calculates the basic salary considering both worked and non-worked days, aligning with Mexican regulations.
Original PR description
In Mexico, the basic salary must be calculated based on the total calendar days of the period. This ensures that both worked days and non-working days (e.g. Sundays) contribute equally to the total…
In Mexico, the basic salary must be calculated based on the total calendar days of the period. This ensures that both worked days and non-working days (e.g. Sundays) contribute equally to the total payment. This calculation also applies to the daily schedule, as the proportional daily wage must be divided equivalently across the hours of the day. Current behavior: When an employee has an unpaid leave, the basic salary is incorrectly prorated using only the registered days/hours. Example: For a monthly wage of 30,000 MXN in a month with 22 scheduled days (21 attendances + 1 unpaid leave), the implicit daily rate becomes 1,363.63 (30,000 / 22). This leads to an incorrect basic salary of 28,636.36 MXN for the days worked. This also happens with unpaid leave for x hours, e.g., for 2 hours, the unpaid leave is calculated as 2 hours * (30,000 / (22 days * 8 hours)) = 340.90 MXN, which is incorrect. Expected behavior: The basic salary should be derived from the full period (e.g., 30 days for a month, 15 for a bi-weekly period). Example: For a 30,000 MXN wage, the daily rate should be 1,000 MXN (30,000 / 30 days). If there is 1 unpaid leave, the basic salary should be 29,000 MXN (29 days * 1,000 MXN), regardless of the number of scheduled working days in the calendar. For unpaid leaves by hours, e.g., for 2 hours, the unpaid leave should be calculated as 2 hours * (30,000 / (30 days * 8 hours)) = 250.00 MXN. To achieve this, the calculation of out of period days in `_get_worked_day_lines` was adjusted: * Create a new function to define how to calculate the out of period days. This avoids overriding the entire _get_worked_day_lines method and ensures that the multi-version logic remains intact. * The overridden behavior considers the calendar days. To ensure consistency in total period days, we must adjust/limit the days for irregular periods. For instance, in monthly payslips involving months with 28, 29, or 31 days, the paid days should align with the schedule_pay parameter (e.g., 30 days). This logic also applies to bi-weekly pay schedules. To achieve this, worked hours are adjusted in `_preprocess_work_hours_data` under the following conditions: * An associated payslip is required to determine how to limit worked hours. For example, when `get_work_hours` is called by the `l10n_mx_regular_pay_holidays_on_time_sub` rule for a specific period, the adjustment is not applied because the period is not linked to a payslip and it follows the standard behavior. * Adjustments are not applied when calling from a recordset, only a singleton, because each version could contain different configurations (e.g., `schedule_pay`, `employee_id`, `calendar_id`). In such cases, we fall back to the standard behavior. This does not mean a payslip cannot have multiple versions. The worked hours calculation is triggered for each version independently; meaning for a payslip with two versions, the preprocess function is executed twice (once per version). If the preconditions are met, the adjustment is applied to the Attendance entries based on the difference between the `effective_days` and the `work_time` calculated from the `work_data`. ### Case: payslip does not cover the complete pay period Current behavior: If a payslip is created for a partial period, the total amount is the full period wage. Expected behavior: The total amount should be pro-rated based on the days of the period. For example, if a payslip is created for 25 days(with a monthly schedule pay), the total amount should be the daily salary multiplied by 25 days. To achieve this, `_compute_amount` is updated to calculate the wage based on the `l10n_mx_daily_salary`. Changes on tests: * Add: * `test_monthly_payslip_with_partial_leave`, `test_partial_payslip`, `test_partial_payslip_new_hire_month_31_days` and `test_partial_payslip_new_hire_month_28_days`. * `test_hourly_payslip_by_attendance` to validate when `Work Entry Source` is set to "attendance". * Update: * `test_hourly_payslip`, `test_monthly_payslip` and `test_partial_payslip_new_hire` to align with the new calculation. * Adjust payslips dates to match the `schedule_pay` in `test_regular_payslip_subsidy` and `test_weekly_schedule_pay_no_code` * Fix a one-day difference in `TestMxEdiHrPayrollCommon`(16 days instead of 15 days for a bi-weekly schedule), and update the corresponding CFDI values. * Refactor tests and add new helpers. ### Error on [warning issues generation][1] and [`_compute_is_wrong_duration`][2] The warning: `"The duration of the payslip is not accurate according to the structure type."` appears with these custom periods for Mexican Payroll, although the period is correct: * `10_days` * `14_days` * `bi-weekly` Steps to replicate: * Install `l10n_mx_hr_payroll` module. * Switch to "INNOVACION VALOR Y DESARROLLO SA SA" company. * Go to Employees and open "Cesar Osbaldo Cruz Solorzano". * Click on "Payroll" tab, change the "Pay Schedule" to any option listed above, for example "Bi-weekly". * Go to Payroll > Payslips > Payslips and create a new pay run. * Select Salary Structure 'Mexico: Regular Pay', Pay Schedule 'Bi-weekly' and the Period '01/01/2026 -> 01/15/2026'. * Click on "Continue", select Cesar and click on "Select". * It appears the warning issue. Problem: The warning is raised because of `slip.date_from + slip._get_schedule_timedelta() != slip.date_to` condition, because `_get_schedule_timedelta` function calls [`self._schedule_timedelta(schedule, self.date_from)`][3] without the `country_code` argument. In the Mexican Payroll [_schedule_timedelta is overriden][4] but it is necessary to call it with the country code to use the custom periods; similar to how the [`date_end` is computed][5]. Solution: Call `_get_schedule_timedelta` passing the `country_code` [1]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/hr_payroll/models/hr_payslip.py#L1367 [2]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/hr_payroll/models/hr_payslip.py#L1454 [3]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/hr_payroll/models/hr_payslip.py#L275 [4]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/l10n_mx_hr_payroll/models/hr_payslip.py#L58 [5]: https://github.com/odoo/enterprise/blob/1666ac87b6cb40e904210fecd159df3ac5b6b33a/hr_payroll/models/hr_payslip_run.py#L211 target: 19.0 task-6073601 Forward-Port-Of: odoo/enterprise#114811 Forward-Port-Of: odoo/enterprise#112524
This update adjusts the NSSF (National Social Security Fund) payroll deductions to stop when an employee reaches 60 years of age. The deduction stop will align with the employee's birthday, starting in the following month. This ensures compliance with Kenyan regulations regarding pension contributions for older workers.
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 a crash issue that occurred in the Odoo graph view when using widget-based formatters. The fix ensures that necessary data is always available before processing, preventing errors and improving the stability of graph visualizations. This enhances the user experience and data reliability.
Original PR description
**Current behavior before PR:** In graph rendering, `formatValue()` delegates to widget formatters (e.g., formatPercentage), which call `extractOptions()` (from formatFloat). That function directly accesses `attrs.digits`, assuming `attrs` is defined. Here, `extractOptions()` could be called without `attrs`, leading to a traceback when accessing `attrs.digits`. **Desired behavior after PR is merged:** This commit ensures `attrs` is always defined when calling `extractOptions()`, avoiding the crash. task-[6023555](https://www.odoo.com/odoo/project/1519/tasks/6023555) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a bug where the 'Add a line' button was unresponsive at the top of mobile grid views (like Timesheets). The fix adjusts how elements are sized on mobile devices, ensuring the button is always clickable regardless of the employee's position in the list.
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 errors from the Danish tax reporting system (l10n_dk_reports) could cause the entire system to fail. The fix ensures that error messages are handled correctly, preventing exceptions and improving the stability of the reporting process. This change was driven by a technical update to properly manage data types within the system.
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 resolves an issue where the HR system might fail if no active versions were available. The change provides a fallback mechanism, ensuring that core HR functions continue to operate smoothly. This improves system stability and prevents potential 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, including overdue balances, are accurately calculated and displayed, providing users with reliable 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 unexpectedly broke the functionality of manually entered product descriptions. To prevent further disruption, the change has been reverted. This impacts how product information is presented in 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 with Lazada is disabled (as is common), tracking stock levels is unnecessary. This change allows businesses to list a wider range of product types on Lazada without impacting synchronization.
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 the user experience. 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 a previous limitation in the Helpdesk system where returns couldn't be processed for orders shipped via dropshipping. Now, Helpdesk tickets will correctly display the 'Returns' button for dropshipped transfers, allowing users to manage returns seamlessly. This improves the efficiency of handling returns for all order types.
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
18 changes
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
4 changes
Resolved issues and error corrections
This update fixes a previous limitation in the Helpdesk system, allowing returns to be processed for orders that were shipped via dropshipping. Previously, returns were only possible for outgoing customer orders. Now, users can manage returns for dropshipped transfers directly from the Helpdesk ticket, streamlining the returns process and improving customer service.
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 improves the speed of stock reconciliation by optimizing how the system filters account move lines. Previously, a slow process was used to exclude valuation accounts, but a new index has been added to significantly reduce the time it takes to process these records, leading to faster reporting.
Original PR description
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts…
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts while including them in a first condition in the method we override.
This is not very efficient as it prevents the use of indexes on that second NOT IN condition.
Indeed PostgreSQL prioritizes the use of the index on the IN condition and then applies the NOT IN condition in a filtering step, which is very costly when there are many account_move_line records belonging to the inventory valuation accounts.
Here is an example of the before after on a database with 87 million account_move_line records total and 9.5 million account_move_line records matching the first IN condition via an index while only 1 million remain after applying the filtering of the NOT IN condition.
All measures are performed with a warmed up cache
[Explain Before](https://explain.dalibo.com/plan/d0d14efbe51ch359)
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~9s</td>
<td>~1.5s</td>
</tr>
</tbody>
</table>
[Explain After](https://explain.dalibo.com/plan/e882cf62d1ga6955)
## Potential further improvement:
Add a partial index:
```SQL
CREATE INDEX CONCURRENTLY idx_aml_company_id_account_id_unreconciled_posted
ON account_move_line (company_id, account_id)
WHERE parent_state = 'posted'
AND (reconciled IS NULL OR reconciled = FALSE)
AND (display_type IS NULL OR display_type NOT IN ('line_section', 'line_note'));
```
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~1.5s</td>
<td>~900ms</td>
</tr>
</tbody>
</table>
[Explain After + Index](https://explain.dalibo.com/plan/56dfdh554668ed43)
Part of https://github.com/odoo/odoo/pull/261931
Forward-Port-Of: odoo/enterprise#116524
Forward-Port-Of: odoo/enterprise#115581This update corrects inaccuracies in the data used for payroll calculations in the Odoo Enterprise application for Belgium. Specifically, it addresses missing codes related to leave types (LEAVE280 and LEAVE115) to ensure accurate reporting and compliance. This resolves a previous issue impacting payroll processing.
Original PR description
Issue: ---------------------------------------- Some prisma codes are wrong. Solution: ---------------------------------------- Change the data files. There are some subtilities that were not implemented: - LEAVE280: 0304 (if less than a year) and 0345 (if more) - LEAVE115: 0820 (Work accident) and 0830 (Occupational Disease) opw-6090081 Forward-Port-Of: odoo/enterprise#116642 Forward-Port-Of: odoo/enterprise#112949
This update resolves an issue where the 'Add a line' button was unresponsive at the top of mobile grid views (like Timesheets). The fix adjusts how elements are sized on mobile devices, ensuring the button is always clickable regardless of the employee's position in the list. This improves usability 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
10 changes
Resolved issues and error corrections
This update fixes a bug where the PDF viewer field didn't 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 users can easily identify and access their uploaded 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 a previous issue where Helpdesk tickets couldn't process returns for orders that were shipped via dropshipping. Now, users can correctly initiate returns for dropshipped transfers, streamlining the returns process and improving customer service. This ensures all order types, including dropshipped ones, can be managed within the Helpdesk system.
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 optimizes how accounts are excluded from reconciliation processes. Previously, a workaround involved inefficient database operations that hindered performance. Now, developers can directly override account conditions, leading to faster and more reliable reconciliation results.
Original PR description
See https://github.com/odoo/enterprise/pull/115581 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263207 Forward-Port-Of: odoo/odoo#261931
This update significantly speeds up the stock reconciliation process by optimizing how the system identifies and excludes valuation accounts. The previous method was inefficient, leading to slow performance, but this change creates a more efficient database index, dramatically reducing processing time.
Original PR description
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts…
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts while including them in a first condition in the method we override.
This is not very efficient as it prevents the use of indexes on that second NOT IN condition.
Indeed PostgreSQL prioritizes the use of the index on the IN condition and then applies the NOT IN condition in a filtering step, which is very costly when there are many account_move_line records belonging to the inventory valuation accounts.
Here is an example of the before after on a database with 87 million account_move_line records total and 9.5 million account_move_line records matching the first IN condition via an index while only 1 million remain after applying the filtering of the NOT IN condition.
All measures are performed with a warmed up cache
[Explain Before](https://explain.dalibo.com/plan/d0d14efbe51ch359)
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~9s</td>
<td>~1.5s</td>
</tr>
</tbody>
</table>
[Explain After](https://explain.dalibo.com/plan/e882cf62d1ga6955)
## Potential further improvement:
Add a partial index:
```SQL
CREATE INDEX CONCURRENTLY idx_aml_company_id_account_id_unreconciled_posted
ON account_move_line (company_id, account_id)
WHERE parent_state = 'posted'
AND (reconciled IS NULL OR reconciled = FALSE)
AND (display_type IS NULL OR display_type NOT IN ('line_section', 'line_note'));
```
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~1.5s</td>
<td>~900ms</td>
</tr>
</tbody>
</table>
[Explain After + Index](https://explain.dalibo.com/plan/56dfdh554668ed43)
Part of https://github.com/odoo/odoo/pull/261931
Forward-Port-Of: odoo/enterprise#116524
Forward-Port-Of: odoo/enterprise#115581This update corrects a flaw in how missing transactions are identified for online statements. Previously, the system only checked transactions from the last sync date, potentially missing transactions before that date. Now, the system prioritizes the provided starting date, ensuring a more complete and accurate retrieval of online statement data.
Original PR description
When you want to find missing transactions, you have to put a starting date. But we don't use this starting date to find the last statement line, we only use the last sync date, which is wrong, because if the last sync date is after the starting date, the online transaction identifier will have the wrong date. It means we will only fetch the transactions from last sync date to today. This commit makes sure we take the start date first if it exists, then the last sync date. task-6197277 Forward-Port-Of: odoo/enterprise#116624
This update fixes an issue where contacts sharing common courses were incorrectly merged within the Odoo system. Now, attempts to merge these contacts will be blocked, preventing duplicate course information and ensuring data accuracy. This improves the reliability of our contact management features.
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 adjusts payroll deductions for employees 60 or older. The system now automatically stops NSSF (National Social Security Fund) contributions when an employee's birthday passes, aligning with Kenyan regulations. A new test has been added to ensure this functionality works correctly.
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 the 'Add a line' button was unresponsive on the top part of mobile grid views, such as the Timesheets grid. The fix adjusts how elements are sized on mobile devices, ensuring the button is always clickable. This improves the user experience for mobile users accessing these grids.
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 fixes a technical issue causing warnings when using filters on the job listings page. The change ensures that comparisons between filter values and record data are handled correctly, improving the stability and performance of the recruitment process. This resolves a potential source of errors and enhances the user experience.
Original PR description
Since templates refactoring in odoo/odoo@9a267abb9afe, when some filters are enabled on the /jobs page, a warning is logged for *each comparaison* with a reccord. Ex. when enabling the "Countries" filter: `py.warnings: <20856>:103: UserWarning: unsupported operand type(s) for "==": 'res.country()' == ''all''` This commit ensure we compare value of compatible types. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where product revaluations incorrectly included default tax lines in journal entries. The fix ensures that tax lines are only generated when explicitly defined, addressing compatibility problems with localization modules that use default tax accounts. This improves the accuracy of financial reporting.
Original PR description
Issue ----- If the account on which stock revaluation is registered has a default tax, the account moves generated by changing the price of the product include the tax. For context, the issue was…
Issue ----- If the account on which stock revaluation is registered has a default tax, the account moves generated by changing the price of the product include the tax. For context, the issue was reported because some l10n modules use accounts with default taxes (eg l10n_de). Steps to reproduce ----- - Install a localisation to have default accounts set up - Create a product category (Cat1) - Set Inventory Valuation to "Automated" - Set a default tax on the Expense Account - Create a product Prod1 - Storable - Category set to Cat1 - Cost set to 500 - Update the on hand quantity of Prod1 to 1 - Change the price of Prod1 to 300 - Go to Accounting > Accounting > Journal > Journal Entries --> There is an AM for 200 + tax instead of just 200 Discussion ----- When manually changing the cost of the product, we call https://github.com/odoo/odoo/blob/09c366dcfa5fe550a1afef813faa79f43767d0a5/addons/stock_account/models/product.py#L354 Where we create the AMs https://github.com/odoo/odoo/blob/09c366dcfa5fe550a1afef813faa79f43767d0a5/addons/stock_account/models/stock_valuation_layer.py#L294 This creates the corresponding debit/credit AMLs. Afterwards, we go through https://github.com/odoo/odoo/blob/09c366dcfa5fe550a1afef813faa79f43767d0a5/addons/account/models/account_move.py#L3210 Which calls `_sync_tax_lines` where AMLs are created for the taxes https://github.com/odoo/odoo/blob/09c366dcfa5fe550a1afef813faa79f43767d0a5/addons/account/models/account_move.py#L3088 Solution ----- The AML's `tax_ids` field is precomputed https://github.com/odoo/odoo/blob/09c366dcfa5fe550a1afef813faa79f43767d0a5/addons/account/models/account_move_line.py#L192-L198 and takes the taxes from the account https://github.com/odoo/odoo/blob/09c366dcfa5fe550a1afef813faa79f43767d0a5/addons/account/models/account_move_line.py#L894 By explicitly stating an empty value when we create the AM in `_change_standart_price_accounting_entries`, we avoid the compute so tax lines don't get created. ----- Ticket: opw-5929774 Forward-Port-Of: odoo/odoo#256024
2 changes
Resolved issues and error corrections
This update fixes a limitation in the Helpdesk system where returns for dropshipped orders couldn't be processed. Now, users can correctly initiate returns for dropshipped transfers directly from the Helpdesk ticket, streamlining the returns process and improving customer service. This ensures all order types, including dropshipped ones, can be managed effectively.
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 corrects a flaw in how missing transactions are identified for online statements. Previously, the system only checked transactions from the last sync date, potentially missing transactions before that date. Now, the system prioritizes the provided starting date, ensuring a more complete and accurate retrieval of online statement data.
Original PR description
When you want to find missing transactions, you have to put a starting date. But we don't use this starting date to find the last statement line, we only use the last sync date, which is wrong, because if the last sync date is after the starting date, the online transaction identifier will have the wrong date. It means we will only fetch the transactions from last sync date to today. This commit makes sure we take the start date first if it exists, then the last sync date. task-6197277 Forward-Port-Of: odoo/enterprise#116624
6 changes
Resolved issues and error corrections
This update addresses minor visual inconsistencies in the calendar event views across different forms. Specifically, the resource selection field now takes up the full width of the modal, and a cropping issue with user counts in the Kanban view has been resolved. These changes enhance the overall user experience and consistency of the appointment scheduling system.
Original PR description
Purpose ======= Fix some small UI issues accross multiple calendar.event views Specification ============= In the quick create form view, extend the resources input so that it takes all the width of the modal like other fields. .o_tags_input elements are mw-100 but not w-100 like other inputs making them shorter than intended. In the kanban view, remove fixed width on "+ ..." users/resources count so that higher numbers aren't cropped. When calendar.event records has no name and a single attendee which is not a staff user, the event was renamed "attendee name - appointment type name". Changing that to name the event with the attendee name only, a filter/group by on the appointment types makes it easy to know which appointment type it's linked to. Task-6191731 Forward-Port-Of: odoo/enterprise#116420
This update resolves an issue where users couldn't edit documents after removing their ownership, even with editor permissions. The fix allows editing from the company folder and enables users to correct incorrect ownership assignments, improving document management flexibility.
Original PR description
How to reproduce: - Login as Marc Demo (not as admin) - Upload a document at the root of "My Drive" - Remove the owner of this document The document is no longer editable in the details view panel while the user has been added as editor. To solve the problem, we change the readonly condition in the detail panel to allow edition in the company folder also (even if not a manager). We also change the following: - we allow to move non folder document from company root folder (user_can_move) while the "protection" was applied also to non folder before. - we change the condition to update the owner. Now when there is no owner, a user with edit permission can change it. This allows to correct a wrong manipulation. Task-5881531 Forward-Port-Of: odoo/enterprise#116559 Forward-Port-Of: odoo/enterprise#106192
This update fixes an issue where subscription delivery dates were incorrectly displayed as the previous day due to timezone differences. The fix ensures delivery dates are accurately calculated based on the company's timezone, resolving a potential scheduling problem for subscription orders. This improves the reliability of delivery planning.
Original PR description
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm…
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm it. 3. Open the generated delivery order and check its Scheduled Date. Issue The scheduled date on the first delivery renders as the previous day. `_prepare_procurement_values` writes `date_planned` as `current_period_start`, which is a plain `fields.Date` value (https://github.com/odoo/enterprise/blob/ba41d7de3c0474286e3e9319710fdacfb95d3e2c/sale_subscription_stock/models/sale_order_line.py#L156). When a `date` is stored in the `Datetime` column `stock.move.date`, Odoo anchors it at midnight UTC; in any negative-offset timezone this renders as the previous day (e.g. `2022-03-02 00:00 UTC` shows as `2022-03-01 21:00` in UTC-3). The non-subscription path does not hit this because it resolves `date_planned` through `_expected_date()`, which returns `order_id.date_order` — a full `Datetime` set to `fields.Datetime.now()` at confirmation (https://github.com/odoo/odoo/blob/996702b0d5c518db2ac6f0b144e7835b27c29736/addons/sale/models/sale_order_line.py#L1398). The same midnight-UTC drift also affects later recurrences, where `current_period_start` falls back to `last_invoice_date` — another `Date`. Solution Split the two cases explicitly: - First delivery (`last_invoice_date` unset): set `date_planned` to `order_id.date_order`, matching the non-subscription flow. - Subsequent deliveries: localize `last_invoice_date` at `00:00` in the company timezone before converting back to UTC, reusing the pattern already applied to reordering rules (https://github.com/odoo/odoo/blob/20a0eee2d03293564320c268252a0353781d99ea/addons/stock/models/stock_orderpoint.py#L722). opw-6133831 Forward-Port-Of: odoo/enterprise#116593 Forward-Port-Of: odoo/enterprise#115100
A recent change removed configuration files used by the l10n_in_hr_payroll module, but the system continued to attempt to access them. This pull request corrects the code to remove these references, resolving an error that occurred when the 'Reset' button was clicked. This ensures the payroll module functions correctly.
Original PR description
Versiopn: - saas-19.3 Steps to reproduce: - Install the l10n_in_hr_payroll module - Create or update a rule parameter - Save it and click on “Reset” Issue: - A traceback (error) occurs Cause: - After this PR: https://github.com/odoo/enterprise/pull/107884 the files hr_salary_rule_ind_emp_data.xml and hr_salary_rule_worker_data.xml were removed. - However, the code still tries to use these files, which causes the error Fix: - Remove the references to these file paths from the code Task-6175296 Forward-Port-Of: odoo/enterprise#115616
This update adjusts payroll deductions for employees 60 or older. The system now stops NSSF contributions when an employee reaches 60 years, aligning with Kenyan regulations. A new test has been added to ensure this change functions correctly, particularly around the timing of the deduction stop.
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 ensures canteen cost calculations are accurate, even when employees don't have traditional worked day data. The change adds a simulation context, allowing the system to correctly estimate canteen costs based on employee configurations. This improves payroll accuracy for users in Belgium.
Original PR description
We add simulation context in the canteen cost condition, since we dont have worked day lines in that case Forward-Port-Of: odoo/enterprise#113907
9 changes
Resolved issues and error corrections
This update improves the speed of stock reconciliation by optimizing how the system filters account move lines. Previously, a slow process was used to exclude valuation accounts, but a new index has been added to dramatically reduce the time it takes to process these reconciliations, especially with large datasets.
Original PR description
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts…
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts while including them in a first condition in the method we override.
This is not very efficient as it prevents the use of indexes on that second NOT IN condition.
Indeed PostgreSQL prioritizes the use of the index on the IN condition and then applies the NOT IN condition in a filtering step, which is very costly when there are many account_move_line records belonging to the inventory valuation accounts.
Here is an example of the before after on a database with 87 million account_move_line records total and 9.5 million account_move_line records matching the first IN condition via an index while only 1 million remain after applying the filtering of the NOT IN condition.
All measures are performed with a warmed up cache
[Explain Before](https://explain.dalibo.com/plan/d0d14efbe51ch359)
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~9s</td>
<td>~1.5s</td>
</tr>
</tbody>
</table>
[Explain After](https://explain.dalibo.com/plan/e882cf62d1ga6955)
## Potential further improvement:
Add a partial index:
```SQL
CREATE INDEX CONCURRENTLY idx_aml_company_id_account_id_unreconciled_posted
ON account_move_line (company_id, account_id)
WHERE parent_state = 'posted'
AND (reconciled IS NULL OR reconciled = FALSE)
AND (display_type IS NULL OR display_type NOT IN ('line_section', 'line_note'));
```
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~1.5s</td>
<td>~900ms</td>
</tr>
</tbody>
</table>
[Explain After + Index](https://explain.dalibo.com/plan/56dfdh554668ed43)
Part of https://github.com/odoo/odoo/pull/261931
Forward-Port-Of: odoo/enterprise#116524
Forward-Port-Of: odoo/enterprise#115581This update addresses a security vulnerability where users without proper access could view sensitive financial data during expense creation. The change restricts access to key financial fields within the reinvoicing process, ensuring only authorized sales, accounting, and invoicing users can see this information. This improves data protection and compliance.
Original PR description
Some financial data were visible to users with no access rights through the customer to reinvoice advanced search when creating an expense. This commit ensures that these fields are invisible if the user doesn't have sales nor accounting nor invoicing access rights. task-5993099
This update fixes a limitation in the Helpdesk system where returns for dropshipped orders couldn't be processed. Now, the 'Returns' button is visible for Helpdesk tickets linked to dropshipped transfers, allowing users to manage returns for all orders, regardless of their shipping method. This improves efficiency and ensures accurate return processing.
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 a reporting issue where the 'Quantity Produced' in the Production Analysis was incorrectly displayed in millions. The fix adjusts the calculation to accurately reflect the actual produced quantity, ensuring more reliable production data. This improves the accuracy of manufacturing reports.
Original PR description
### Steps to reproduce: - Download 'Manufacturing' app - Create a product and set its UoM to kg - Create a BoM for the product with the UoM in grams and the 'Quantity' is 1000+. The components can be…
### Steps to reproduce: - Download 'Manufacturing' app - Create a product and set its UoM to kg - Create a BoM for the product with the UoM in grams and the 'Quantity' is 1000+. The components can be in kgs - Create and produce 2 MOs, one in grams and one in kgs, for the new product - From the 'Reporting' > 'Production Analysis', choose pivot view > 'Quantity Produced' is in *millions* ### Cause of Issue: The issue was produced by PR:https://github.com/odoo/enterprise/pull/50398. https://github.com/odoo/enterprise/blob/5db870f93d8e2f5a4480561c483142eb99f3d0fe/mrp_account_enterprise/reports/mrp_report.py#L269-L270 the calculation above divides quantity produced by `uom.factor` which represents the stock move's UoM relative to the reference UOM (in this case 1 -> 1g = 1 Units). Then, the result is multiplied by `uom_prod.factor` which represents the stock move's UoM relative to the product's UOM (in this case 1000 -> 1000g = 1 kg), which results in the 'Quantity Produced' being in millions. opw-5955893
This update resolves an issue preventing the POS scale integration to work correctly with the latest IoT box versions. The IoT box is now sending data differently, and this fix adjusts the software to handle the new data format. This ensures accurate weight readings are processed within the POS system.
Original PR description
Steps to reproduce - Use a localisation other than a european one (l10n_eu_iot_scale_cert must not be installed) - Setup the scale for the POS - Open the POS - Add a product to be weighted by scale to the order - Sell one of the weighted product Error: value.toFixed is not a function Cause: New versions of the IoT box send response status via data.status instead of data.status.status. [opw-6121011](https://www.odoo.com/odoo/project/49/tasks/6121011) Forward-Port-Of: odoo/enterprise#116579
This update resolves an issue where users were occasionally redirected to outdated contract versions after signing multiple times. The fix prioritizes active contract versions during the 'Signed Contract' button click, ensuring users always access the correct, current agreement. This improves the user experience and prevents confusion.
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
This update corrects inaccuracies in the data used for calculating payroll in Belgium (l10n_be_hr_payroll_prisma). Specifically, it addresses missing calculations for certain leave types (LEAVE280 and LEAVE115) related to work accidents and occupational diseases. This ensures accurate payroll processing for Belgian employees.
Original PR description
Issue: ---------------------------------------- Some prisma codes are wrong. Solution: ---------------------------------------- Change the data files. There are some subtilities that were not implemented: - LEAVE280: 0304 (if less than a year) and 0345 (if more) - LEAVE115: 0820 (Work accident) and 0830 (Occupational Disease) opw-6090081 Forward-Port-Of: odoo/enterprise#116642 Forward-Port-Of: odoo/enterprise#112949
This update adjusts payroll calculations to automatically stop NSSF (National Social Security Fund) deductions for employees aged 60 or older. The change ensures compliance with Kenyan regulations, specifically halting deductions when an employee reaches 60, starting the following month. A new unit test has 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 the 'Add a line' button was unresponsive on the top part of mobile grid views, like the Timesheets list. 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
10 changes
Resolved issues and error corrections
This update fixes an issue where the cost of service sale order lines wasn't being calculated correctly. The change ensures that the product's cost is accurately applied when a new sale order line is added to a confirmed order, regardless of whether timesheets are associated or the product has a standard price.
Original PR description
Steps to reproduce: --------------------------------------- 1. Install the `sale_timesheet_margin` module 2. Create a product as follows: * Type: Service * Invoicing Policy: Prepaid/Fixed Price *…
Steps to reproduce:
---------------------------------------
1. Install the `sale_timesheet_margin` module
2. Create a product as follows:
* Type: Service
* Invoicing Policy: Prepaid/Fixed Price
* Create on order: Nothing
* Cost: Add some cost to the product (e.g., 30)
3. Create and Confirm Sale Order with Product (Add Cost field in SOL from the optional field)
4. Now add a new Sales Order Line (SOL) with the same product
Observation:
---------------------------------------
The cost of the recently created Sales Order Line (SOL) is 0.0, which is not correctly calculated based on the product's cost.
Issue:
---------------------------------------
The `_compute_purchase_price` method has a filter (`service_non_timesheet_sols`) that excludes certain sale order lines from the parent's purchase price computation. When a new sale order line is added to an already confirmed sale order (state='sale'), the new line inherits the parent SO's state immediately. That means, the new line matches the filter criteria and gets excluded from parent computation. The `purchase_price` is never calculated from the product's `standard_price`
Solution:
---------------------------------------
The added condition, like EITHER:
1. Has timesheets recorded (`sol.timesheet_ids` is truthy) → Preserve existing cost
2. OR product has NO standard price (`not sol.product_id.standard_price`) → Use timesheet-based costing
Code intentionally skips the computation of `service_non_timesheet_sols` lines to preserve existing values
opw-5351724
Forward-Port-Of: odoo/odoo#253860This update improves the speed of exporting the general ledger to an Excel file. The previous process included unnecessary calculations, causing significant delays. The change optimizes the export process, resulting in a much faster export time – now around 22 seconds instead of over 900 seconds.
Original PR description
**Description:** In version 17, when we export the general ledger to an xls file, we now iterates over accounts fetched with `_get_accounts_with_move_lines` and perform a sum of the related amls balance, credit and debit. Source of this change: [103329](https://github.com/odoo/enterprise/pull/103329) Those sums are calculated through an SQL query built in `_get_query_sum`. However, it's currently inefficient because the query also computes the unaffected earnings of the company on each iteration, even though that information in only meant to be used if the account_type = 'equity_unaffected' in `_query_values`. **Benchmark:** | accounts | amls | before | after | |:---|:---|:---|:---| | 696 | 2819556 | >900s | 22.4s | **Reference:** opw-5904527 Forward-Port-Of: odoo/enterprise#112882
This update resolves an issue where test emails sent through the Email Marketing app would incorrectly appear in contact records' chatter history. Previously, test emails were not properly removed after sending, leading to clutter. Now, test emails are automatically unlinked, ensuring a cleaner and more accurate chatter view.
Original PR description
**Steps to reproduce:** - Go to Email Marketing app - Create a mailing campaign - Set its recipients to Contact - Upload a file in Settings > Attach a file - Click on the test button to send a test mail to any mail - Go to the first contact record - Related attachment appears in the chatter **Issue:** Before 18.2, messages created for testing were ignored by the Chatter as they were empty (and not unlinked). But if an attachment was provided, it was linked to the test message and not deleted afterwards (which means it shows up in the record chatter). **Fix:** Ensure the related messages are unlinked at the same time as the test mail in `send_mail_test` by setting `is_notification` to False to trigger the `unlink` logic and remove the related attachments at the same time. backport of: https://github.com/odoo/odoo/commit/526b3d73886558315f2435714b2ed82fec313e78 opw-6168632 Forward-Port-Of: odoo/odoo#262152
This update fixes an issue where contacts sharing common courses were incorrectly merged within Odoo. Now, attempts to merge these contacts will be blocked, preventing duplicate course information and ensuring data accuracy. This change improves data consistency and avoids potential confusion for users.
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 ensures that NSSF (National Social Security Fund) payroll deductions automatically stop for employees aged 60 or older. The change takes effect in the following month after the employee's 60th birthday, aligning with Kenyan regulations. A new test has 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 fixes a bug in the mobile version of the grid view, specifically the 'Add a line' feature. Previously, clicking this button on the first row of employees wouldn't work until scrolling down. The fix adjusts how elements are sized to ensure the button is always clickable on mobile devices.
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 fixes an issue where the correct fiscal position (Domestic) wasn't being applied for sales transactions within the EU. The change ensures that VAT is correctly calculated based on the partner's location, regardless of their VAT prefix, improving accuracy for intra-EU business operations. This resolves a discrepancy in how VAT was being processed.
Original PR description
With l10n_nl: - Set the fiscal positions in this order: 1. Domestic 2. EU Intra B2B - Create a contact with: - German address - Dutch delivery address - Dutch VAT - Create a second contact with: - German address - Dutch delivery address - No VAT - Create a Sales Order for each contact: - For the first contact, the applied fiscal position is EU Intra B2B - For the second contact, the applied fiscal position is Domestic The detected fiscal position should be Domestic in both cases In _get_fiscal_position vat_exclusion is computed using the VAT prefix of the partner and our company. But if the prefix of the VAT does not match the country of the partner, it's delivery address will still be overriden. opw-5892138
This update optimizes the import process for Peppol documents, which often contain many lines. By caching frequently accessed tax and product information, the system avoids redundant searches, resulting in faster import times and reduced strain on the system. This enhancement improves the overall efficiency of the account management process.
Original PR description
When retreiving Peppol documents with many lines, the system was performing redundant ORM queries for taxes and products. Each line triggered individual searches even when the same tax or product had already been retrieved. To fix this, a cache dictionary is now passed along the import flow for both taxes and products. Each unique (tax_type, amount) pair and product (default_code, name, barcode, company) is only searched once per document. task-6018392 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a minor error in the Norwegian tax settings. The tax rate for code 32 was incorrectly set to 11.0. This change ensures that Odoo accurately reflects the latest official Norwegian tax rates, improving financial reporting accuracy.
Original PR description
The tax rate(`amount`) for code 32 was mistakenly set to '11.0'. To properly align with the official Norwegian tax rates, it needs to be updated to '11.11'. Related Enterprise PR: https://github.com/odoo/enterprise/pull/110792 task-6033027 Forward-Port-Of: odoo/odoo#258390
This update resolves issues preventing Odoo's Norwegian VAT XML reports from passing validation by Skatteetaten. The changes ensure correct decimal formatting, mathematical calculations, and required legal notes are included, guaranteeing accurate VAT returns and avoiding delays.
Original PR description
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal…
Before commit: The Norwegian VAT XML export fails Skatteetaten validation due to incorrect decimal formatting, mathematical rounding mismatches between base and tax amounts, missing mandatory legal notes, and invalid KID number formats. Fix: To strictly follow Skatteetaten validation rules for the Norway VAT XML, the following changes were implemented: - Ensured standard rates drop the decimal (e.g, `25.0` to `25`), and formatted fractional rates like `11.11` to `11,11` in XML. - Rounded down the `tax_amount` to align precisely with government mathematical expectations. - `base_amount` converted into absolute value to ensuring the calculation (`base * rate = tax`) resolves perfectly. - Add the mandatory `<merknad>` explaining the reverse charge method for codes 81, 83, 86, 88, and 91. - Clean the `company_kid` by safely stripping the 'NO' prefix, and 'MVA' suffix. Expect: The generated XML payload now adheres perfectly to Skatteetaten's strict structural and mathematical rules, allowing the VAT return to pass government validations successfully. Related Community PR: https://github.com/odoo/odoo/pull/258390 Task-6033027 Forward-Port-Of: odoo/enterprise#110792
1 change
Resolved issues and error corrections
This update fixes a potential crash during bank statement imports by ensuring the correct journal is selected based on currency and IBAN. The system now validates and automatically finds the appropriate journal, preventing errors and improving data accuracy for users importing financial statements.
Original PR description
Behavior before: The import flow could crash with an "Expected singleton" error if multiple journals shared an IBAN. Additionally, the system blindly accepted the current context ('self') as the…
Behavior before:
The import flow could crash with an "Expected singleton" error if multiple
journals shared an IBAN. Additionally, the system blindly accepted the
current context ('self') as the target journal, even if its currency or
bank account mismatched the statement, often leading to avoidable
UserErrors.
Behavior after:
The system now validates 'self' against the statement's currency and IBAN
before assignment. If a mismatch is found, it automatically searches for
the correct journal. The search is now restricted by currency and includes
a limit=1 to prevent crashes and ensure accurate selection.
Root Cause:
In _find_additional_data(), 'journal = self' was assigned without validation.
Furthermore, the fallback search lacked a record limit and currency matching
logic, allowing multiple records to be returned when duplicates or
multi-currency setups existed.
Fix:
- Added validation for the initial 'self' candidate (currency and IBAN match).
- Refined the search domain to include currency matching (journal or
company fallback).
- Added limit=1 to the search to guarantee a singleton recordset.
opw-5462037