Wednesday, April 23, 2025
14 changes · 18.0
Resolved issues and error corrections
The POS product configurator now shows the correct on-hand quantity when staff switch between product variants, including products with attributes that do not create separate variants. This helps cashiers see accurate availability and avoid selling based on the wrong stock level.
Original PR description
Prior to this fix, the product configurator did not display the on-hand quantities of product variants as shown on the product page, when an attribute’s variant creation was set to 'never'. Steps to reproduce: 1. Create a product with variants. 2. Add multiple attributes and values. 3. Set the variant creation to 'never' for one attribute. 4. Add stock for the product and make it available in POS. 5. Open POS, select the product, and switch between variants. The quantity displayed was only for one variant. This commit ensures that the correct on-hand quantity is shown for each selected variant in POS. opw-4685882 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Customer records now correctly show lot and serial numbers for products delivered through dropshipping. This gives sales and support teams a more complete view of what tracked products each customer received, regardless of delivery route.
Original PR description
**Current behavior:** In the *Contacts* application, with a partner record open, you can view the lots associated with that customer (used in orders for that partner(?)). Lots that were delivered to that partner via dropship transfers do not appear here. **Expected behavior:** Dropship lots are there. **Steps to reproduce:** 1. Create a dropship product (route, vendor, ..) tracked by lot 2. Sell 1 of that product to some partner, confirm the ensuing purchase & dropship transfer 3. Go to *Contact* -> open the customer -> `Lot/Serial Numbers` smart button -> lot is not there **Cause of the issue:** `StockLotReport` only looks for `outgoing` (delivery) picking type pickings. **Fix:** Override the join on `PickingType` and `ResPartner` such that dropship pickings can also be collected here. opw-4559129
This fixes an issue where a point of sale session could trap users if no admin employees were configured. Users can now continue managing or closing the session instead of being blocked, reducing operational disruption at checkout.
Original PR description
Before this commit, when opening a pos without admin employees set, the user was blocked into its open session without being able to close it. task-id: 4730841 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a Point of Sale issue where non-manager cashiers were blocked from changing product prices even when the business had not enabled price restrictions. It also makes cashier role handling consistent whether the employee POS module is installed or not, reducing unexpected checkout behavior.
Original PR description
Before this commit, non-manager cashiers were unable to modify product prices even when price control was not enabled, which was not the intended behavior. Additionally, when `pos_hr` was not installed, the `get_cashier` method returned the user object with a `role` attribute. However, when `pos_hr` was installed, the returned cashier used `_role`, leading to inconsistencies and broken functionality depending on the module's presence. opw-4726098 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixed an issue where using the Backend button on a second device after a shared POS session was already closed could show a missing record error. This makes multi-device POS session closing smoother and avoids confusing errors for store staff.
Original PR description
Before this commit, if a POS session was open on two devices and closed on one, a new session would be automatically created and both devices would switch to it. However, if the "Backend" button was clicked on one device—removing the session—then clicking "Backend" on the second device would trigger a missing record error, since the session was already deleted. opw-4709064 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an error that prevented users from creating a product from a sales quotation when the Units of Measure setting was not enabled. The system now falls back to the normal unit setup instead of using an empty hidden value, so product creation works as expected.
Original PR description
Bug introduced by: https://github.com/odoo/odoo/commit/25d0c760bbfabb3cc7d471b08b5b06fe1cfc2ec4 **Steps to reproduce the bug:** - Install the “Sales” module. - Do not enable the "Units of Measure"…
Bug introduced by: https://github.com/odoo/odoo/commit/25d0c760bbfabb3cc7d471b08b5b06fe1cfc2ec4 **Steps to reproduce the bug:** - Install the “Sales” module. - Do not enable the "Units of Measure" option in the settings. - Create a new quotation. - In the sale order line, enable the Product Variant field. - Try to create a new “product.product” **Problem:** A validation Error is triggered: ``` The operation cannot be completed - Create/update: a mandatory field is not set. - Delete: another model requires the record being deleted. If possible, archive it instead. Model: Product (product.template) Field: Unit of Measure (uom_id) ``` **Explanation:** This happens because a default value for the UoM is passed through the context. As a result, we skip the computation of “uom_id”: https://github.com/odoo/odoo/blob/2b38c1f446441e04f8d85125a9ec6562d13b7ce8/addons/product/models/product_template.py#L27 However, this default is derived from the field “product_uom” that is present in the view but restricted to users in the "uom.group_uom" group. If the current user doesn't belong to this group (if you don't enable the param in the settings), the field is hidden and its value is empty, causing the default to be set to False. https://github.com/odoo/odoo/blob/25d0c760bbfabb3cc7d471b08b5b06fe1cfc2ec4/addons/sale/views/sale_order_views.xml#L537 **Solution:** Force the computation of “uom_id” by removing “default_uom_id” from the context when its value is “False”. opw-4717913
Fixed an issue where validating a Point of Sale order could fail when the order came from a different PoS setup and the selected payment method was unavailable there. This helps cashiers complete affected orders without being blocked by a configuration mismatch.
Original PR description
Before this commit, validating an order that belonged to a different PoS configuration could result in an error if the selected payment method was not available in the current configuration. This prevented the order from being successfully validated. opw-4687658 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The self-ordering point of sale flow now handles combo products that include items with multiple selectable options. This prevents customers from hitting an error while completing an order, reducing checkout disruption.
Original PR description
Before this commit, if a combo product contains a product with multi options attribute, you will have an error when proceeding the order. opw-4637372 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Odoo now treats employees with flexible working hours consistently by applying the standard calendar before scheduling calculations. This prevents meeting creation from failing when attendees include both flexible-schedule employees and employees using the standard 40-hour calendar.
Original PR description
## Issue When an employee has a flexible (unset) working calendar, and another employee has the default calendar (`Standard 40 hours/week`), scheduling a meeting involving both results in a…
## Issue
When an employee has a flexible (unset) working calendar, and another employee has the default calendar (`Standard 40 hours/week`), scheduling a meeting involving both results in a `KeyError`:
```python
File "/home/odoo/src/odoo/18.0/addons/hr_calendar/models/res_partner.py", line 78, in _get_schedule
calendar_interval = interval_by_calendar[calendar][employee.resource_id.id]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: <number>
```
## Root Cause
Odoo uses the Standard 40 hours/week calendar (resource.resource_calendar_std) as a fallback for flexible (unset) calendars. However, when grouping resources by their calendars, resources without a calendar are included in a separate group.
Later, when Odoo computes work intervals per calendar, it assigns the default calendar to resource.resource(). If another user already uses the same calendar, the group duplication results in one being overwritten during iteration—causing the KeyError.
## Fix
Before grouping resources by calendar, explicitly assign the default calendar (resource.resource_calendar_std) to any resource that lacks a calendar. This ensures all resources are grouped correctly, avoiding duplication and key errors.
## Impacted versions:
18.0 and later
## Steps to Reproduce
### Pre-requisites:
- Install `hr_contract`, `calendar` apps.
### Steps:
1. Create **Employee 1**:
- Set **Working hours** to **Flexible** (unset)
- Create a **Contract**:
- Set **Working hours** to **Flexible** (unset)
2. Create **Employee 2**:
- Set **Working hours** to **Standard 40 hours/week**
- Create a **Contract**:
- Set **Working hours** to **Standard 40 hours/week**
- Ensure the XML ID is `resource.resource_calendar_std`
3. Open the **Calendar** app.
4. Create a **new Event**.
5. Add both employees as **attendees**.
## Current Behavior
The system raises a `KeyError` and does not allow the event to be saved.
## Expected Behavior
The event is saved successfully with both attendees.
### Task
OPW-[4699028](https://www.odoo.com/odoo/my-tasks/4699028)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update speeds up a point of sale upgrade step that could take a long time for businesses with large sales histories. It reduces upgrade delays by replacing many repeated database operations with a more efficient batched approach.
Original PR description
The original script is slow on large tables (more than 100000 records) because of multiple sql queries. We reworked it so it's now one query exploded on chunks which speeds it up a lot. | | **Chunk…
The original script is slow on large tables (more than 100000 records) because of multiple sql queries. We reworked it so it's now one query exploded on chunks which speeds it up a lot. | | **Chunk size** | **Table** | **Records** | **Total time (hh:mm:ss.)** | **Time/1000 records** | |------------------|----------------|----------------|-------------|----------------------------|-----------------------| | Multiple Queries | 100000 | pos_order | 354881 | 0:41:47.438305 | 0:00:06.269000 | | Multiple Queries | 2000 | pos_order | 354881 | 0:02:11.708014 | 0:00:00.371000 | | Single Query | 100000 | pos_order | 354881 | 0:00:14.724486 | 0:00:00.041000 | | Exploded Query | 100000 | pos_order | 354881 | 0:00:07.937863 | 0:00:00.022367 | | Multiple Queries | 2000 | pos_order_line | 819189 | 0:07:39.805373 | 0:00:00.561000 | | Single Query | 100000 | pos_order_line | 819189 | 0:00:29.666529 | 0:00:00.036000 | | Exploded Query | 100000 | pos_order_line | 819189 | 0:00:12.124260 | 0:00:00.014800 | | Multiple Queries | 2000 | pos_payment | 365725 | 0:01:52.806145 | 0:00:00.308000 | | Single Query | 100000 | pos_payment | 365725 | 0:00:10.894065 | 0:00:00.030000 | | Exploded Query | 100000 | pos_payment | 365725 | 0:00:04.670350 | 0:00:00.012770 | 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
Messages sent from eLearning courses or slides will no longer automatically include all attendees as recipients. This prevents large unintended email blasts and gives the sender full control over who is notified.
Original PR description
This commit fixes an issue with the slide.slide and slide.channel models from website_slides. When a user tries to send a message via the chatter the default_recipients and suggested_recipients added the attendees for slides and courses. This means that everytime someone sends a message on slide.channel or slide.slide potentially hundreds of people would be spammed. To fix this, we override in both models _mail_get_partner_fields. This method is supposed to return the name of the fields linked to customers. In the case of the above models, we don't want to send a message to all the attendees (they were stored in partner_ids which is the default field read). Thus by returning an empty list we block the computation of suggested_recipients and default_recipients. Letting full control to the user sending the email which people to notify. task-4736015 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The unrealized currency gains and losses report now creates adjustment entries with the correct debit and credit amounts when the selected expense account has a default tax. This prevents zero-value accounting entries and helps keep foreign currency revaluations accurate.
Original PR description
**Steps to reproduce:** - Install Accounting - Activate a foreign currency (e.g. EUR) - Make sure there are several rates with today rate different than others - Go to "Accounting / Configuration /…
**Steps to reproduce:** - Install Accounting - Activate a foreign currency (e.g. EUR) - Make sure there are several rates with today rate different than others - Go to "Accounting / Configuration / Accounting / Chart of Accounts" - Add a default tax to "Expenses" account - Create an invoice: * Customer: [any] * Currency: [EUR] (i.e. the foreign currency) * Invoice Date: [a date in the past where the currency rate is different than today] * Invoice Lines: [any] - Confirm the invoice - Go to "Accounting / Reporting / Management / Unrealized Currency Gains/Losses" - Set date filter to "Today" - If there is no adjustement to do, check if the following message is displayed: "You are using custom exchange rates. => Reset to Odoo’s Rate" If it's the case, reset to Odoo's rate (i.e. Today's rate) - Click on "Adjustement Entry" button: * Journal: Miscellaneous Operations * Expense Account: Expenses * Income Account: [any] - Create Entry **Issue:** The values (debit/credit) of the created entry are 0, which is not the case when there is no default tax on the expense account. **Cause:** "_sync_dynamic_lines" is executed on the created entry. If a default tax is set on the expense account, "_sync_tax_lines" is also executed. As only debit and credit values are set on the invoice lines of the entry (neither balance nor amount_currency), the sync method messes up with the value of debit and credit, resetting them to 0 (via multiple recompute). **Solution:** Skip invoice sync. The values computed in "Multicurrency Revaluation Wizard" should be the ones that are used. opw-4664255
The sales journal dashboard now shows the remaining amount due for partially paid invoices when 3-way matching is installed, instead of showing the original full invoice total. This helps users rely on the Unpaid and Late dashboard figures for accurate cash collection follow-up.
Original PR description
Currently, the “Unpaid” and “Late” buttons in the sale journal dashboard used the total invoice amount instead of the remaining due amount when account_3way_match was installed. Steps to reproduce: - Install account_3way_match - Create and partially pay an invoice - Go to the dashboard - The displayed amount should reflect the residual, but it shows the full amount This fix restores the expected behavior by using the same logic as the original `_get_open_sale_purchase_query` to compute `amount_total` and `amount_total_company`. opw-4731478
The Belgian payroll DMFA export now correctly accepts ONSS numbers that include formatting such as dots or dashes. This prevents report generation errors and allows companies to produce the required XML payroll report without manually removing special characters.
Original PR description
steps to reproduce: - set up ONSS data about the company in Payroll settings / BE L10N (where ONSS number is consisting of special characters - dots or dashes) - go to Payroll / Reporting / DMFA - create a new DMFA and generate an XML report - it should throw error saying expected `int` (since ONSS is a Char field) fix: - while performing the export, filtered the digits only from these fields task-4502689