Friday, April 18, 2025
10 changes · 18.0
New functionality added to Odoo
This adds a custom product feature that makes external IDs visible in product lists and product forms, and allows users to search products by those IDs. It helps teams import bills of materials and inventory updates more efficiently without first exporting products to find system-generated identifiers.
Original PR description
# Description of the issue/feature this PR addresses: Our organization would like to manage the external ID of products (i.e. during product CSV upload) because this lets us later upload BoMs and inventory adjustments that reference this external ID. This avoid an extra step of first finding products in Odoo, downloading them to get their auto-generated external ID, and then re-uploading. # Current behavior before PR: External ID is hidden from the user # Desired behavior after PR is merged: 1. External ID is present on the product list page 2. External ID can be used for searching products 3. External ID is present on the General Information tab of the product form page --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fix reduces database strain when many accounting records receive sequence numbers in the same operation, such as batch journal posting, asset creation, or payment validation. It helps prevent transaction issues and improves reliability during large accounting workflows while preserving gapless numbering.
Original PR description
Creating many savepoints can lead to issues, not only in the current transaction, but also on other transactions from other connections on other databases[^1]. The `sequence.mixin` relies heavily on…
Creating many savepoints can lead to issues, not only in the current transaction, but also on other transactions from other connections on other databases[^1]. The `sequence.mixin` relies heavily on a unique constraint for giving a sequence without gaps[^2], which forces the use of savepoints because we expect the transaction to fail when assigning numbers with concurrent transactions. A previous commit removes savepoints created in a loop, which could happen when concurrency happens[^3], but there is still an issue when many records are getting a sequence number in the same transaction. This happens for instance when posting journal entries in batch (i.e. after an import), creating a `account.asset` in the past, or validating a batch payment with exchange differences. This commit is now caching the value as soon as the lock is held for a series in the sequence, and is now doing only one savepoint per series in the same transaction. [^1]: https://github.com/odoo/odoo/pull/71395#issuecomment-851440042 [^2]: c45998c8368c6feb3d574d6d3d0ad064faf21679 [^3]: 10565c6968a5d0f285f93c4bdc610350999a88e3
Employees on flexible working schedules now get accurate timesheet entries when they take time off. This prevents overstated absence hours, helping payroll, project tracking, and reporting reflect the expected daily hours.
Original PR description
**Issue:** When an employee's working hours are set to flexible Hours, and the employee takes time off, the Timesheet module displays incorrect hours instead of the expected hours per day, e.g. 11h instead of 8h **Steps to reproduce:** - In Employee, ensure Flexible Hours is set on the chosen employee’s working calendar - Time off > configuration > time off types > sick time off - Click the time‑off icon on top, create a new time‑off allocation for the same employee, and approve it. - Tmesheets > all timesheet Timesheet entries show incorrect hours for time off days opw-4715551
This fixes an issue where changing both the quantity and lot on a tracked inventory adjustment could create an extra negative valuation entry. Inventory valuation reports will now better reflect the real stock adjustment, improving accuracy for products tracked by lot with average cost valuation.
Original PR description
### Steps to reproduce: - Create a storable product tracked by lot and avco valuated. - Put 10 units of that product in stock withtout set lot. - On the stock quant, click on history - Modify the…
### Steps to reproduce: - Create a storable product tracked by lot and avco valuated. - Put 10 units of that product in stock withtout set lot. - On the stock quant, click on history - Modify the inventory adjustment move to set a quantity of 3 and a lot. - Inventory > Reporting > Valuation #### > Stock valuation layer inconsistency: +10, -10, -7, +3 > the -7 should not be there ### Cause of the issue: If you change the quantity of a move line you will automatically reconcile the quantity difference because of these lines: https://github.com/odoo/odoo/blob/6f3f89f55ab67d39b2487fdf8220747f568b7eb0/addons/stock_account/models/stock_move_line.py#L34-L36 However, if you change the lot of your move line you already plan to conter balance the entire quantity of the previous lot because of these lines: https://github.com/odoo/odoo/blob/6f3f89f55ab67d39b2487fdf8220747f568b7eb0/addons/stock_account/models/stock_move_line.py#L37-L46 In partciular, the first reconciliation should not be performed in case we change both the quantity and the lot of the move line. opw-4685988 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents draft point-of-sale orders from being sent to the server in standard retail setups. It avoids unintended order data being synced outside restaurant workflows, improving reliability for non-restaurant POS users.
Original PR description
Before this commit, draft orders were incorrectly synced to the server in non-restaurant PoS, causing several issues. This commit ensures that draft orders are only synced when the POS is in restaurant mode, preventing unintended behavior. opw-4624604 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Point of Sale now blocks a cash rounding option that can cause errors when closing a session. This temporary safeguard helps businesses avoid failed session closures until full support for that rounding method is ready.
Original PR description
Currently, when using a cash rounding method with the strategy `Modify tax amount` on a Pos config, an error message appears upon trying to close the session. Steps to reproduce: -------------------…
Currently, when using a cash rounding method with the strategy `Modify tax amount` on a Pos config, an error message appears upon trying to close the session. Steps to reproduce: ------------------- * Create a cash rounding method with strategy `Modify tax amount` * Open pos setting and apply the cash rounding method * Open pos session * Make an order that will trigger the cash rounding * Validate the order * Try closing the session > Observation: The operation cannot be completed: Missing required account on accountable line Why the fix: ------------ Prior to 18.0, the point of sale would only allow rounding methods using the strategy `add_invoice_line`. https://github.com/odoo/odoo/blob/786abeb0783461d555c4077b8258490a7aed8c21/addons/point_of_sale/models/pos_config.py#L302-L314 This constraint was removed in this commit to also allow using `biggest_tax` strategy: [8fb7e5f#diff-4c6e412c7d8f4df2a05831547e7df93d0b91f510d03b7b3ed0d689a18f5dae44](https://github.com/odoo/odoo/commit/8fb7e5fd304697aebcce085602a5f3a1ecaf757a#diff-4c6e412c7d8f4df2a05831547e7df93d0b91f510d03b7b3ed0d689a18f5dae44) This is a temporary fix bringing back the constraint has the pos wasns't fully ready to use it. It will be remove later when the integration is complete. opw-[4673618]
This fix prevents an error when Odoo calculates placeholder names for multiple accounting entries without a date. It improves reliability in accounting workflows by avoiding a crash that could interrupt users working with invoices or journal entries.
Original PR description
… 18/04/2025
Description of the issue/feature this PR addresses:
ERRER: File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 915, in _compute_name_placeholder
if (not move.name or move.name == '/') and self.date and not move._get_last_sequence():
^^^^^^^^^
File "/home/odoo/src/odoo/odoo/fields.py", line 1232, in get
record.ensure_one()
File "/home/odoo/src/odoo/odoo/models.py", line 6255, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: account.move(2620, 2606, 2592, 2584, 2582, 2580, 2578, 2576, 2574, 2572, 2564, 2550, 2536)
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-prThis fix improves how Odoo detects missed real-time notifications after a user was disconnected. It helps ensure users are prompted to refresh when updates may have been lost, reducing the risk of working with stale information.
Original PR description
In [1], a mechanism was introduced to detect when notifications were lost due to the bus table being cleared during a disconnection. However, this approach used the autovacuum cron dates to detect this scenario. Other actions can clear the bus table, which is typically the case on odoo.com where another cron runs more frequently. This PR fixes the issue by comparing the disconnection time with the oldest bus notification's create date. [1]: https://github.com/odoo/odoo/pull/188003 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
Point of Sale now prevents staff from settling customer dues or taking deposits when the required pay-later payment method is unavailable. This avoids failed partial payments, stuck screens, and follow-up errors caused by an incomplete POS payment setup.
Original PR description
Partial payments in POS are buggy if there is no pay later POS payment method Steps to reproduce: 1. Navigate to Point of Sale > Configuration > Payment Methods 2. Archive the "Customer Account" payment method (which is of `type == 'pay_later'`) 3. Try to settle a partially paid invoice in POS 4. Selecting the the "Validate" button will close the order without settling and will leave the UI in a buggy state where any further interactions produce a traceback Solution: Block the user from settling dues or making deposits when no pay_later payment method is loaded. OPW-4712869 The following error dialog is shown: <img width="163" alt="Screenshot 2025-04-18 at 00 28 41" src="https://github.com/user-attachments/assets/7651c863-bc75-4486-8483-8a8ee2fed5db" />
Fixed an issue where postpaid subscriptions with note or non-recurring lines could be treated like prepaid subscriptions. This prevented contracts from being checked every day unnecessarily and helps keep the next invoice date aligned with the subscription billing cycle.
Original PR description
Before thos commit, the next invoice date was updated at post invoice based on the order line properties. pre paid lines are will use the last deferred end date of the linked account move lines and post paid line simply increment the next invoice date. Before this commit, the post paid detection was faulty: we checked that all line were postpaid but if line notes or non recurring lines existed, they would not have the postpaid property. As a result, the next invoice date would be incremented with the prepaid condition. As a result, the next invoice date would only be incremented by one day and the cron would run on these contracts every day. opw-4618947 opw-4668741 opw-4686930