Daily updates from Odoo
Friday, March 28, 2025
16 changes · 18.0
New functionality added to Odoo
Adds a dedicated Libro Giornale report for Italian accounting, making it easier to produce a structured, chronologically ordered journal report with debit and credit totals. The report includes required dates and PDF generation details to support Italian compliance needs.
Original PR description
- Introduces a custom report handler for the Italian "Libro Giornale" variant of journal report. - Fetches and processes journal entry data, including date, journal name, labels, debit, credit, and account details. - Builds an SQL query to retrieve and structure accounting transactions in chronological order. - Groups journal entries, formats columns, and calculates total debit and credit values. - Ensures proper date formatting (`YYYY-MM-DD`) and structured report output for compliance with Italian accounting standards. - Adds the report generation date to the PDF upon extraction - I have added display_type in the query of journal report to use it in sorting task-4502158
Resolved issues and error corrections
This fix prevents manufacturing orders from switching to the wrong final product variant when a bill of materials is updated. It protects production accuracy by keeping the selected product variant stable during BoM refreshes, especially in customized workflows.
Original PR description
### Issue: Tldr: If a field A depends on an other computed field B and if the value of A is used in the computation of the field B, the ORM will consider that the value of A is false (or empty record…
### Issue:
Tldr: If a field A depends on an other computed field B and if the value of A is used in the computation of the field B, the ORM will consider that the value of A is false (or empty record set) in the computation of B.
On the `mrp.production` model, the `product_tmpl_id` is a related non stored field:
https://github.com/odoo/odoo/blob/4cb362fcc3c2ba2489ef1de7c20c9a4fd8921ab8/addons/mrp/models/mrp_production.py#L82 depending on the `product_id` field. This means that if we need to access the value of that field, we will first need to access the value of the `product_id` field. However, the `product_id` field is a computed field: https://github.com/odoo/odoo/blob/4cb362fcc3c2ba2489ef1de7c20c9a4fd8921ab8/addons/mrp/models/mrp_production.py#L62-L66 So that if its value is marked as dirty in the cache at the moment we try to access the value of the `product_tmpl_id` of the we will launch a call of its compute method. This is problematic because the 'related' that launched the compute is used inside the compute method: https://github.com/odoo/odoo/blob/4cb362fcc3c2ba2489ef1de7c20c9a4fd8921ab8/addons/mrp/models/mrp_production.py#L397 This is probelmatic because it would technically lead to an infinite recursion loop. So, to avoid any of these situation, when the computation of the `mrp.production.product_tmpl_id` has been started the filed has been marked as protected and is used as "False" in each of the subsequent computations:
https://github.com/odoo/odoo/blob/4cb362fcc3c2ba2489ef1de7c20c9a4fd8921ab8/odoo/fields.py#L1295-L1299 In particular, we will compute the `product_id` of the mrp.production considering that the `product_tmpl_id` is false and we will therefore set a wrong value on the bom.
### Steps to reproduce:
Using studio, you can create a set of fields linked to the 'product.template' and `mrp.production` models and an automated rule that will force a situation where the above situation will be triggered with the following flow:
- Create a product with 2 variants.
- Create a bom for the template of these products and one bom line:
- 1 x COMP
- Create and confirm an MO for 1 unit of variant 2.
- Change the bom line to 2 x COMP.
#### > Return to the MO and click on update bom, the `product_id` of the MO has been altered to variant 1.
The details of the set up are the following:
1. Create a new field with the following configuration: Name: x_studio_1 Model: Product Field Type: many2one Stored: True Related Model: res.partner
2. Create a new field with the following configuration: Name: x_studio_2 Model: Manufacturing Order Field Type: char Stored: True Readonly: True Related Field Definition: product_tmpl_id.x_studio_1.name
3. Create an automation rule on the manufacturing order model that trigger on save and that trigger's the action of updating the record responsible to Joel willis.
### Fix:
We should not rely on the related field `mrp.production.product_tmpl_id` inside the compute method of the `mrp.production.product_id`. Particularly since we can access this value using the direct path to this value. This avoids any recursion issue.
opw-4658754
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis fix ensures accounting records update their sequence gap status correctly when multiple users or processes post entries at the same time. It prevents records from being incorrectly marked as having a numbering gap after posting, improving accuracy in financial records.
Original PR description
The computed fields were not correctly triggered when there was some concurrency issues. One of those fields is `made_sequence_gap`, which was then set to `True` after being posted because it was still holding the value of when it wasn't posted.
Time Off allocations can now be opened and created even when the current company has no employee linked to the logged-in user. The system uses a safe fallback for hours-per-day calculations, preventing confusing error screens for managers.
Original PR description
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
Purchase orders now show the total amount in the company currency when the order uses a different currency. This restores a previously available view so buyers can quickly compare purchase costs without manual currency conversion.
Original PR description
## Versions: 18.0 Reset feature from saas-17.4 ## Issue: In saas-17.4, the user could see the Purchase Order total amount in the selected company's currency if it differs from the PO's currency. This doesn't exist in 18 anymore. ## Steps to reproduce: Ensure there are at least 2 currencies available in the `Settings` app - Create a new purchase order; - Change the selected `Currency` for any other; - Look at the subtotal part that does not include the equivalent amount in the company's currency. ## Cause: The saas-17.4 feature has not been forwarded entirely and an important part of it is missing. The company currency total amount is not updated correctly ## Fix: Forward-port the complete feature of https://github.com/odoo/odoo/commit/202af7c12a768005df3bd97f595ead0a4c4c02b9 Include the fix from https://github.com/odoo/odoo/pull/186464/commits/7467d68309c039c50e39b6ec0b8645ef7ff42ad4 opw-4416711
This fix prevents the Point of Sale from crashing when calculating prices for combo items with a zero original total. It keeps the order summary usable in edge cases and avoids showing invalid price values.
Original PR description
there was a divide by zero in the price unit computation when the originalTotal is 0 which lead to infinity price unit and a crash in the POS order summary result. opw-4650315
Customers using in-store pickup will no longer see an incorrect product availability error after completing payment. This prevents a confusing checkout interruption when the item was available before the order was confirmed.
Original PR description
Steps: 1. Create a Storable product and update quantity to 1 2. Buy the product in shop and go to checkout page 3. Select pick up in store and pay Issue: - "Some products are not available in the selected store" error on payment validate page Cause: - `_get_shop_payment_error` check for product's availability on shop_payment and shop_payment_validate page where in former stock is available but in later since the order is confirmed stock is unavailable Fix: - `_get_shop_payment_error` will only check for stock related errors on confirmed orders opw-4647225 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixed an issue in Point of Sale loyalty where adding balance to a physical gift card failed if no expiry date was selected. Gift card balances now apply correctly, and any selected expiry date is saved properly.
Original PR description
Steps to reproduce: -------------------------- - Install the pos_loyalty module. - Open register & add physical giftcard to the cart. - On configuration popup don't set the expiry date & click on Add Balance. Issue: -------- - There is a tb instead of adding the balance to giftcard. - The selected expiration date is not set on the backend. Cause: --------- - Trying to serialize null expiration date value. - Not set from the correct variable. Fix: ----- - Expiration date should be serialized only if selected. - Correctly mapped the value of expiration date from right variable. Task: 4664094
This fixes a Point of Sale issue where enabling restricted categories without choosing any allowed categories caused products to be loaded but not shown. Products now remain visible in that setup, preventing unnecessary disruption for cashiers and store operations.
Original PR description
Before this commit, when restricted categories were enabled but no category was added to the allowed list, all products were loaded but none were displayed due to a recent code change. opw-4680158 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Odoo now blocks users from starting another module install, upgrade, or uninstall while one is already in progress. This reduces the risk of failed operations, registry loading errors, and database issues caused by concurrent changes.
Original PR description
Before this commit, a user could start a module installation, abandon the loading page due to impatience, and attempt to start another installation. This could lead to various errors, such as…
Before this commit, a user could start a module installation, abandon the loading page due to impatience, and attempt to start another installation. This could lead to various errors, such as `SERIALIZATION_FAILURE`, "Failed to load registry," or even a broken database. Module operations (install/upgrade/uninstall) are executed in multiple transactions: 1. Dependency Check & State Update: - A transaction checks module dependencies, determines which modules need updating, and marks them as 'to install', 'to upgrade', or 'to remove'. 2. Registry Reload & Module Update: - The registry is reloaded, and modules are updated one by one in their own transactions, changing their states to 'installed' or 'uninstalled'. This commit introduces two additional checks in step (1): a. If any module is already in an updating state, raise a `UserError` to prevent concurrent module operations in step (2). b. If the transaction fails to acquire a `SELECT ... FOR UPDATE` lock on all `ir_module_module` records, raise a `UserError`, as this indicates another concurrent operation of step (1) has either acquired the lock or already modified some module states and committed. related PR for backport https://github.com/odoo/odoo/pull/203667 abandoned PR https://github.com/odoo/odoo/pull/125586 These checks ensure proper concurrency control, preventing concurrent module operations 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
This update resolves several user-facing issues, including incorrect sales order line amounts on mobile, saved Stripe cards failing on later purchases, and browser slowdowns when multiple tabs are open. It also improves wording, event registration reliability, follower display names, and translation coverage, making daily Odoo use more accurate and stable.
Original PR description
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
Returns for exchange on purchase receipts now create the replacement transfer right away instead of triggering a new purchase process. This reduces user confusion, avoids unnecessary vendor or route setup errors, and keeps the original receipt, return, and exchange linked to the purchase order when applicable.
Original PR description
Currently, a return for exchange made on an incoming transfer (receipt) creates a procurement, which usually ends up with a purchase of the exchanged products. After the "Return" popup is closed, the…
Currently, a return for exchange made on an incoming transfer (receipt) creates a procurement, which usually ends up with a purchase of the exchanged products. After the "Return" popup is closed, the exchange transfer is not created; instead, Odoo creates a PO that needs to be approved first in order to create the exchange transfer. That is a bit confusing for the users, who might expect the exchange to be created immediately. Also, the procurement process requires the product to have a "Buy" route enabled (in "Inventory" tab) and at least one vendor configured in the "Purchase" tab. Without this configuration, the return for exchange process shows an error message. After this commit, a return for exchange made on a receipt will ignore the procurement process, and instead it will create the exchange picking immediately. That way users will see the exchange transfer immediately after closing the "Return" popup. Also, all 3 transfers (original, return, exchange) will be linked to the initial PO (if a PO was created). Additionally, the exchange picking will be shown as a return of the return picking. Task: 4453571
Fixed a subscription invoicing issue where eligible subscriptions could remain marked as being processed, preventing payments from being completed and blocking future invoices. The scheduled billing process now counts only subscriptions that can actually be invoiced, so recurring billing continues reliably.
Original PR description
Issue: ======== There is an issue during the generation of invoices from subscription that causes the is_invoice_cron field on the sale order to remain `True`. This prevents the processing of…
Issue: ======== There is an issue during the generation of invoices from subscription that causes the is_invoice_cron field on the sale order to remain `True`. This prevents the processing of transactions and, as a result, does not mark the invoices as paid. Furthermore, this issue blocks the generation of subsequent invoices. To reproduce: ============= 1. Create a subscription that does not require initial client payment, (can generate an invoice on the next invoice date). 2. Create 30 other subscriptions (equal to the batch size value) that cannot generate invoice until the client has made a payment. 3. Run the scheduled action “Sale Subscription: generate recurring invoices and payments.” 4. You will notice that the first Sale Order remains to “is_invoice_cron” as True Problem: ======== the condition to trigger the cron to invoice subscriptions is based on the number of subscriptions that can be invoiced in a batch. But we are taking all the subscriptions while it should be only the subscriptions that can be invoiced. Solution: ========= filter the subscriptions that can be invoiced before checking the condition to trigger the cron to invoice subscriptions. opw-4559250
Users can once again download folders from the Documents interface, including in spreadsheet-related document views. The update also improves test coverage and supporting data behavior so folder navigation and details panels work more reliably.
Original PR description
Somehow we lost the frontend interface to the backend-ready downloading of folder. Also fix testing helpers to make the details panel usable without crashing, and to make non-root folders appear as children of their parents in the search panel. While we're here, linting test code introduced in this version allows to be ready to limit diffs in future fixes & FW ports. Task-4677814
This fix prevents purchase orders from incorrectly creating rental sales orders during inter-company transactions. It avoids a crash when users open the generated sales order, helping cross-company purchase and sales workflows complete reliably.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Have purchase & sale_stock_renting installed; 2. create a 2nd company; 3. enable inter-company transactions for Sale/Purchase Orders for both; 4. enable…
Versions -------- - 18.0+ Steps ----- 1. Have purchase & sale_stock_renting installed; 2. create a 2nd company; 3. enable inter-company transactions for Sale/Purchase Orders for both; 4. enable Warehouse storage locations; 5. enable multi-step routes; 5. enable dropshipping; 6. enable rental transfers; 7. create a dropshipping route assigned to the 1st company; 8. create a purchasable, rental product, tracked by quantity; 9. add dropship route to its operations; 10. add 2nd company as vendor; 11. create a rental order with the product; 12. confirm the rental order; 13. go to the generated purchase order via the smart button; 14. confirm the purchase order; 15. switch to the 2nd company; 16. try to open the generated sale order. Issue ----- > TypeError: '>' not supported between instances of 'datetime.datetime' and 'bool' Cause ----- On confirming the purchase order, the sale order it generates gets created as a rental order, due to the `in_rental_app` context value being set. When trying to open the rental order, it attempts to compute the quantity available for the tracked rental products during the rental period. The rental order was generated based on purchase order data, which lacks any kind of rental information, hence the rental order doesn't have a rental period set. The lack of rental dates is what causes the error when trying to partition the lines based on rental period. Solution -------- When creating a sale order via a purchase order, pass the `in_rental_app=False` context value to ensure it won't be created as a rental order. opw-4583210
The Helpdesk return button now only appears when there is an actual related delivery to return. This prevents users from hitting an error when a ticket is linked only to a sales order, improving reliability for support teams.
Original PR description
### Issue : The return button was visible even when the customer had only a sale order. Clicking it caused a traceback. ### Steps to Reproduce: 1. Install `helpdesk_stock`. 2. Create a Sale Order…
### Issue :
The return button was visible even when the customer had only a sale order. Clicking it caused a traceback.
### Steps to Reproduce:
1. Install `helpdesk_stock`.
2. Create a Sale Order (SOL) with a storable product.
3. Create a helpdesk ticket.
4. Save the ticket.
5. Click on the return button.
### Fix:
The return button now appears only when a related delivery (picking) exists.
### Technical Details:
We used `commercial_partner_id` to search for pickings, ensuring that pickings from child partners are also considered, so checking `partners_in_sale` is unnecessary.
The `partners_in_sale` condition is removed because it incorrectly returned when no picking existed.
### Test Scenarios:
1. Create a product.
2. Create a sale order:
- Customer: `Azure Interior`
- Delivery address: `Azure Interior, Brandon Freeman`
3. Confirm the sale order.
4. Create a helpdesk ticket with customer `Azure Interior`
and check the return button.
5. Validate the picking.
6. Create a ticket for `Azure Interior` and check the return button.
7. Create a ticket for `Azure Interior, Brandon Freeman` and check the return button.
In this commit: [commit](https://github.com/odoo/odoo/commit/57b8b2487def43a1b9c461c0fa4eb02200b5c1ef),
the condition `if wizard.picking_id` was removed, which led to the traceback.
task: 4522134