Monday, March 2, 2026
15 changes · saas-19.1
Enhancements to existing features
This update enhances how Odoo identifies partners in Saudi Arabia. Previously, partner identification relied solely on VAT. Now, it also considers the Identification Scheme and Identification Number, leading to more accurate distinctions between companies and individuals, especially when VAT information is unavailable.
Original PR description
Before this commit: - Partner identification relied only on the VAT field. After this commit: - Partner identification in Saudi Arabia also considers Identification Scheme and Identification Number. - This improves detection of companies vs individuals when VAT is missing. task-5866942 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update integrates an AI agent ('Odoo agent') to automatically create partner records during account creation. To ensure data accuracy, a new feature will be added to exclude specific partners from this automated retrieval process. This enhancement improves the efficiency of partner onboarding within the accounting system.
Original PR description
This commit: https://github.com/odoo/enterprise/commit/84d84687ac09abad698b1b00a445f69a0d896e5f introduce a new ai agent called "Odoo agent" and in the create method a partner is created from it. We will add a new function to blacklist some partner from the retrieve partner functionality task-5973417 Forward-Port-Of: odoo/enterprise#108871
Resolved issues and error corrections
This update resolves a bug that caused inventory valuation reports to fail when stock moves associated with subcontracting had multiple destination receipts. The fix limits the record considered during valuation to the last 'done' receipt, ensuring accurate inventory reporting. This improves the reliability of inventory valuation processes.
Original PR description
With older subcontracting MOs, a singleton error will be thrown when the MO has more than one `move_dest_ids` and we try to do an inventory valuation Steps to reproduce: 1. A product with…
With older subcontracting MOs, a singleton error will be thrown when the MO has more than one `move_dest_ids` and we try to do an inventory valuation
Steps to reproduce:
1. A product with `qty_available`, that is not `lot_valuated`
2. The product has a stock move with a `production_id` where `is_in` is true
3. The stock move has more than 1 `move_dest_ids` where `done` and `is_subcontract` is true
4. Open an inventory valuation report from any date in the past. One can access inventory valuation reports from Accounting app > Review menu
> Inventory > Inventory Valuation. You will get a singleton error
Issue:
Followup to previous fix: dae71a2ba5a51ad5a07c4294ecdd6192d8752b07
Because older subcontracting MOs may have multiple destination receipts, a singleton error will occur if there are more than one of these `last_subcontract_done_receipt` records. This is due to the recordset calling `_get_value_from_account_move` on itself, which expects only 1 record and results in a singleton access error when it reaches: https://github.com/odoo/odoo/blob/e7ebe07e1d60659f3d468255808a305e7423741b/addons/purchase_stock/models/stock_move.py#L184
Solution:
Limit `last_subcontract_done_receipt` to 1 record. Because we have no way of knowing which receipt move is the absolute last done receipt, we assume it is the last one created that is also 'done'.
This solution was taken from @kihy-odoo on the PR https://github.com/odoo/odoo/pull/245662
opw-5489433
opw-5416006
Forward-Port-Of: odoo/odoo#250920This update resolves an issue where overtime calculations failed when an employee had multiple versions with differing rulesets. The fix ensures that only the correct ruleset is used during overtime generation, preventing errors and guaranteeing accurate compensation. This improves the reliability of our attendance tracking system.
Original PR description
_ ## Short functional explanation of the error When we generate overtime for an employee who has 2 different versions. If each version has a different overtime ruleset and an attendance exists during…
_ ## Short functional explanation of the error When we generate overtime for an employee who has 2 different versions. If each version has a different overtime ruleset and an attendance exists during the time frame of each version. When trying to generate overtime for the ruleset of the first version, a traceback occurs. ## Reproduction Steps 1. Create an employee. Create 2 different versions for this employee. On each version, set a different overtime ruleset. 2. Create 2 attendances: one during the time frame on which the first version applies, and one during the time frame on which the second version applies. 3. Go to overtime rulesets. Click on the ruleset you applied on the first version and click Reenerate Overtimes. ### Expected behavior The overtimes are regenerated correctly. ### Unexpected behavior A traceback occurs: `ValueError: Expected singleton: hr.attendance.overtime.ruleset(7, 6) ` ## Origin of the issue In the code, we retrieve the version applying to the attendance for which we want to compute overtimes, to get the ruleset with which we will compute the compensation for overtimes: https://github.com/odoo/odoo/blob/347c46f8ecff7ae97c2a686bf5750374b6c3e2d3/addons/hr_attendance/models/hr_attendance.py#L303-L306 However, `version = inter._items[0][2]` returns both versions, thus obtaining both rulesets and creating the error when trying to accss the field `self.ruleset_id.rate_combination_mode` later, as self.ruleset_id will contain both rulesets. __ opw-5443700 Forward-Port-Of: odoo/odoo#249736
This update corrects a bug where custom analytic distribution settings on sales order lines were being overwritten when using product-partner combinations with Analytic Distribution Models. Now, user-defined distributions are preserved, ensuring accurate tracking of costs associated with project sales. This improves financial reporting and compliance.
Original PR description
*: project_purchase, sale_project --- Decription of the issue this commit addresses: When confirming a sales order with a product-partner combination that has an Analytic Distribution Model assigned,…
*: project_purchase, sale_project --- Decription of the issue this commit addresses: When confirming a sales order with a product-partner combination that has an Analytic Distribution Model assigned, any custom analytic distribution done on the line of the product will be lost, resetting the analytic distribution to the default value set on the Analytic Distribution Model. --- Steps to reproduce: 1. Install sale_project,project_purchase. 2. Activate "Analytic Accounting" in the settings. 3. Create a new Product "test"; Type: Service, Create on Order: Project. 4. Create a new Analytic Distribution Models; Partner: Acme, Product: test, Analytic Distribution: anything but blank. 5. Create a new Quotation in the Sales apps; Partner: Acme. 6. Assign the Product test to the first order line. This will automatically set the analytic distrib of the Analytic Distribution Model. 7. In the Analytic Distribution cell, add a line with any non null distribution. 8. Confirm the Quotation. 9. The analytic distribution that was anually added has been removed. Only the default analytic distribution of the model remains. --- Desired behavior after this commit is merged: Any custom analytic distribution done on a line is never lost. The Analytic Distribution Model's distribution serves as a template but never overrides the values set by the user. --- opw-4934291 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#250707 Forward-Port-Of: odoo/odoo#249747
This update resolves an error that occurred when generating the Reception Report through Odoo's Web Studio. The issue stemmed from an incorrect data type being passed to a database query, preventing the report from loading. The fix removes problematic data types to ensure proper report generation.
Original PR description
Currently an error occurs when user tries to open reception report through web studio. Steps to replicate: - Install stock, web_studio with demo. - Open receipts and turn on studio mode. - Go to…
Currently an error occurs when user tries to open reception report through web studio. Steps to replicate: - Install stock, web_studio with demo. - Open receipts and turn on studio mode. - Go to reports and try to open `Reception Report`. Error: ``` psycopg2.ProgrammingError: can't adapt type 'NewId' ``` Cause: - Error occurs after this [PR] that prevents passing of falsy ids to orm. - As a result the [line] passes `api.NewId()` that is received as `docids` in the function `_get_docs()` performs search using the `NewId` [here] which causes this error to occur. - In the previous version the id passed was passed a static list `[0]` and then changed to `api.NewId()` which works perfectly fine with `browse()` but with any other operation that fires direct queries like `search()` or `_read_group()` it will cause this error to occur. Solution: - Removed NewIds from docids before the search. [PR]: https://github.com/odoo/enterprise/pull/95117/changes#diff-cf8f46a54f86279b4d773f0d39b23d22f046eb6d33a39c851f2a86dcd2b5b202R645 [line]: https://github.com/odoo/enterprise/blob/431d1b513f26188f693abd949f78a893514205f0/web_studio/controllers/report.py#L649 [here]: https://github.com/odoo/odoo/blob/3263a7f54948d57f13176cf0416b1419150e9d87/addons/stock/report/report_stock_reception.py#L190 sentry-7236339558 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where users weren't receiving clear guidance when a previous payslip was missing for after departure payments. Now, a helpful error message is displayed, guiding users to add a required reference payslip. This ensures accurate payment processing and avoids technical errors.
Original PR description
For after departure payment to work, a previous payslip is required in the system. So, instead of having a traceback, display an informative message to the user. task-5933607 Forward-Port-Of: odoo/enterprise#108980 Forward-Port-Of: odoo/enterprise#107386
This update fixes an issue where the shipping weight for deliveries wasn't accurately calculated when products were placed into packages. The fix ensures that the total weight of items in a package is correctly reflected in the delivery's shipping weight, improving order accuracy and fulfillment.
Original PR description
Steps to reproduce: - Enable “Packaging” in Inventory settings. - Create a storable product “P1” with: - weight: 10 kg - Create a delivery picking: - Add one unit of P1 - Mark as “To Do” - Set…
Steps to reproduce:
- Enable “Packaging” in Inventory settings.
- Create a storable product “P1” with:
- weight: 10 kg
- Create a delivery picking:
- Add one unit of P1
- Mark as “To Do”
- Set quantity to 1 → the move becomes assigned and the picking weight is correctly computed to 10
- Click “Put in Pack” → a package is created with `shipping_weight = 0`, and the picking weight incorrectly computed to 0
Problem:
- `picking.shipping_weight` is computed as: `weight_bulk` + sum(`pack.shipping_weight or pack.weight`) https://github.com/odoo/odoo/blob/17.0/addons/stock_delivery/models/stock_picking.py#L72-L79
- Once the product is placed in a package:
- `weight_bulk` becomes 0 (because Total weight of products which are not in a package). https://github.com/odoo/odoo/blob/17.0/addons/stock_delivery/models/stock_picking.py#L96
- `pack.shipping_weight` is 0 on creation.
- The fallback `pack.weight` is 0 because its compute depends on the `picking_id` in context. Without this context, the compute uses only quants https://github.com/odoo/odoo/blob/f7c033eff7b7bc83d6d18fc5e4df320f43ae5021/addons/delivery/models/stock_quant_package.py#L11-L13
opw-5357843
Forward-Port-Of: odoo/odoo#249029
Forward-Port-Of: odoo/odoo#238917This update resolves a bug where hiding the price on an invoice section caused that section to disappear from the preview and PDF. The fix also addresses a related issue where removing tax on a product duplicated the subsection. This ensures invoices render correctly regardless of price hiding.
Original PR description
**STEP TO REPRODUCE** 1. Create an invoice, with: - Section A - Subsection 1 - product a, with tax Click on hide price on section A, and preview the invoice. Notice the Section A is missing from the preview/pdf. If you remove the tax on product a, there will also be a bug where Subsection 1 is duplicated, with one copy with no children lines below it. opw-5927563 Forward-Port-Of: odoo/odoo#249808
This update fixes an issue where the 'hours_per_day' and 'hours_per_week' fields weren't correctly recalculated when a Working Schedule was set to 'Define Amount of Hours per day'. The change ensures these values update dynamically when the schedule duration is modified, providing accurate time management.
Original PR description
### Issue: When creating a Working Schedule, and choosing the option "Define Amount of Hours per day" then the fields `hours_per_day` and `hours_per_week` are not recomputed correctly. ### Steps to…
### Issue: When creating a Working Schedule, and choosing the option "Define Amount of Hours per day" then the fields `hours_per_day` and `hours_per_week` are not recomputed correctly. ### Steps to reproduce: - Create a new Working Schedule - Tick the option "Define Amount of Hours per day" - Change the duration on a line - Hours per day and hours per week are not updated ### Cause: This [commit](https://github.com/odoo/odoo/commit/77f860f5d3757e5a56861ac1de95b9ad29ea0dff) introduced the possibility of defining `resource.calendar.attendance` with `duration_hours` instead of `hour_from`/`hour_to`. The fields `hours_per_week`/`hours_per_day` are recomputed when changing `hour_from`, `hour_to` or `duration_hours`. This recompute is done because an onchange is triggered and will recompute all compute fields displayed in the form view. As the fields `hour_from`/`hour_to` are not computed, they are not changed when changing `duration_hours` on the form view but they are when saving because of `_inverse_duration_hours()`. The compute method of `hours_per_week` only takes into account `hour_from`/`hour_to`. So if `duration_based` is False, then changing `hour_from` will recompute `hours_per_week` but changing `duration_hours` will not as `hour_from`/`hour_to` still have the previous values. ### Solution: We need the recomputation to be made on `duration_hours` when `duration_based` is True. As `duration_hours` is recomputed via `_compute_duration_hours()` when `hour_from`/`hour_to` change, we only use `duration_hours`. opw-5942240 Forward-Port-Of: odoo/odoo#249446
This update fixes inaccurate calculations of worked days and work entries for new employees, particularly those with contracts starting in the current month. The change ensures that attendance and work entry data aligns with the employee's contract start date, resolving issues with incorrect day counts and preventing unnecessary work entry generation when no contract exists.
Original PR description
Problems: ------- 1. For a new employee, with a contract starting in the current month but before today: in the payslip for the current month number of days of attendance and days of out of contract…
Problems: ------- 1. For a new employee, with a contract starting in the current month but before today: in the payslip for the current month number of days of attendance and days of out of contract are not correct Same for an employee, with a contract ending in the current month (before today) 2. In both cases above worked entries are not generated correctly (from today to the end of month) 3. Additional bug: If we create an employee with no contract and create a payslip draft for him for the current month, work entries with type "Attendance" will be created Objective: --------- Problems 1 and 2 : date_version was equal to today (date of the employee's creation), so number of attendance days was calculated as ( end_of_payslip_month - today ) or ( today - start_of_payslip_month ) Problem 3 : Work entries are generated even when there is no active contract Solution: --------- Problems 1 and 2: This commit adds an additional part (already exists in v19) in the method write() of hr.version which sets date_version = contract_date_start Problem 3: by generating work entries check if contract_date_start is filled Tests ware added in odoo/hr: test_hr_version.py and in enterprise/hr_payroll: test_new_employee_worked_days, test_payslip_empty_contract.py task-5430759 Forward-Port-Of: odoo/odoo#250722 Forward-Port-Of: odoo/odoo#241978
This update fixes an error in how Odoo calculates worked days for employees without contracts or when contracts don't fully align with pay periods. The change ensures accurate attendance and out-of-contract day reporting, particularly for new hires and those with contracts starting or ending during a pay period.
Original PR description
Problem: ------- In several scenarios, Worked Days are incorrectly computed when the employee has no contract or when the contract does not fully overlap with the payslip period. Case 1: - Create an…
Problem: ------- In several scenarios, Worked Days are incorrectly computed when the employee has no contract or when the contract does not fully overlap with the payslip period. Case 1: - Create an employee without a contract - Create a payslip for this employee for the current month: You'll see X days of attendance (= today until the end of the payslip period) and Y days of out of contract (= number of days from the start of the payslip period until today) - Create a payslip for this employee for the previous month: you'll see ( Z_prev + Y ) days out of contract ( Z_prev = number of working days in the previous month) - Create a payslip for this employee for the next month: you'll see Z_next days of attendance (Z_next = number of working days in the next month) Case 2: - Create a new employee with a contract starting during the current month - Create a payslip for this employee for the previous month - Out-of-Contract days are incorrectly computed as: contract_start_date - previous_month_start. Case 3: - Create an employee with a contract ending during this month - Create a payslip for this employee for the next month - Out-of-Contract days are incorrectly computed as: next_month_end - contract_end_date. Solution: -------- When generating work days lines: - Explicitly handle employees without a contract. - Use adjusted date bounds when the contract does not overlap the payslip period. Several tests were added to cover these scenarios, as well as the tests the corresponding commit in odoo/odoo (PR odoo: 241978) task-5430759 Forward-Port-Of: odoo/enterprise#108783 Forward-Port-Of: odoo/enterprise#103207
This update fixes an issue where the system incorrectly predicted taxes on imported invoices. Previously, it relied on customer history, even if the XML invoice contained only one tax rate. Now, the system accurately uses the tax information directly from the imported XML file, ensuring correct tax calculations.
Original PR description
Context: When importing an XML invoice or vendor bill, the tax prediction was based on the customer’s invoice history. Example: if the imported invoice contains an item found in the history with two taxes (6% and 21%), the prediction would return both taxes (6% and 21%), even though only one tax is present in the XML file. The actual tax data present in the imported XML was not taken into account. After this commit, the prediction is more rigorous and correctly relies on the tax information provided in the XML (restricted search domain) task-5503126 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#249930 Forward-Port-Of: odoo/odoo#246308
This update fixes an issue where dropshipped components to subcontractors were incorrectly categorized as expenses. Now, these components are properly valued within the stock valuation account, aligning with how ordered quantities are handled. This ensures accurate inventory tracking and reporting for subcontracting operations.
Original PR description
A component bought from a vendor and dropshipped to a subcontractor should the valued into the stock valuation account and not the expense one. In case this component have its "Invoice Policy" set to…
A component bought from a vendor and dropshipped to a subcontractor should the valued into the stock valuation account and not the expense one. In case this component have its "Invoice Policy" set to "ordered quantity", the `_eligible_for_stock_account` method will test if the related stock move are dropshipped https://github.com/odoo/odoo/blob/7436e0cfaf8d4b0c0e0390e8d6a3df404ba240f6/addons/stock_account/models/account_move_line.py#L31-L35 The value `is_dropship` is only set at the validation of the stock move. Due to the invoice policy, the receipt is not validated yet. close #243015 This commit will rather use the helper `_is_dropshipped()` that only rely on the location and not on the state. This commit also clean and reenable the related tests. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245930
This update fixes a bug where employees with scheduled future attendances couldn't check out. The fix ensures that only past attendances are considered when determining the employee's status, preventing the checkout error. This improves the usability of the kiosk mode and attendance tracking.
Original PR description
### Issue: When having an attendance in the future, the employee cannot checkout anymore. ### Steps to reproduce: - In Attendances, create an attendance in the future for an employee - Go in the kiosk mode - Manually select the employee to check in - Do the same to check out - An error pops up ### Cause: The field `last_attendance_id` of the employee contains his future attendance. The field `attendance_state` use `last_attendance_id` in its computation, so it's always "checked_out", even if an attendance is curently open for the employee. So when trying to check out an exception is raised in [`_check_validity()`](https://github.com/odoo/odoo/blob/fee6b32a8a57577bd8229c80dff6f93964f9f556/addons/hr_attendance/models/hr_attendance.py#L224-L234). ### Solution: Add a condition in the domain of `_compute_last_attendance_id()` to only consider the last **past** attendance. opw-5491867 Forward-Port-Of: odoo/odoo#248875