Daily updates from Odoo
Monday, August 4, 2025
52 changes
15 changes
Resolved issues and error corrections
Future leave balances now stay correct when unused days carry over for a limited period. This helps HR teams and employees see reliable vacation entitlements after carryover expires, avoiding misleading zero or partial balances.
Original PR description
### Steps to reproduce: - Create an accrual plan with the following rule: — The employee has 20 days off in the first year. Total 20. — The employee has 21 days off in the second year and an…
### Steps to reproduce: - Create an accrual plan with the following rule: — The employee has 20 days off in the first year. Total 20. — The employee has 21 days off in the second year and an additional 5 days off if available from the previous year, which can be taken until 6 months. Total 21 + 5 = 26 — The employee has 22 days off in the third year and an additional 5 days off if available from the previous year, which can be taken until 6 months. Total 22 + 5 = 27 — The employee has 23 days off in the fourth year and an additional 5 days off if available from the previous year, which can be taken until 6 months. Total 23 + 5 = 28 - Create an accrual allocation with the created plan - Check future allocation data using 'Balance at the' - Notice the following behaviour: — until 31/12/2025 it CORRECTLY shows 20 days available. — from 01/01/2026 to 30/06/2026 it CORRECTLY shows 26 days (21 days for renewal and 5 days not used in 2025) — from 01/07/2026 it INCORRECTLY shows no days available. — from 01/01/2027 to 30/06/2027 it CORRECTLY shows 27 days (22 days for renewal and 5 days not used in 2026) — from 01/07/2027 it INCORRECTLY shows 5 days. — from 01/01/2028 to 30/06/2028 it CORRECTLY shows 28 days (23 days for renewal and 5 days not used in 2027) — from 01/07/2028 it INCORRECTLY shows no days available. — from 01/01/2029 it CORRECTLY shows 28 days again. — In the following years, after 6 months, one year shows 5 days and the next shows nothing. ### Cause: The first cause here is that when we have validity for the carryover then we will have two calls in each year one at the start of the year and another at the expiration date of the carryover. So, when we add the days to the allocation we don't consider the second call in the condition and we only check if the allocation.actual_lastcall is equal to one of the start dates for each year https://github.com/odoo/odoo/blob/3fb37cbc59adc2caace8efcdae418d2466a9b750/addons/hr_holidays/models/hr_leave_allocation.py#L588 The second cause where each two years one of them shows the number of carryover days from the previous year, this is happening because when we remove the expiring days for the first year we set the number of days to 0 https://github.com/odoo/odoo/blob/3fb37cbc59adc2caace8efcdae418d2466a9b750/addons/hr_holidays/models/hr_leave_allocation.py#L516-L517 And it will be 0 until we loop again and add the days to allocation https://github.com/odoo/odoo/blob/3fb37cbc59adc2caace8efcdae418d2466a9b750/addons/hr_holidays/models/hr_leave_allocation.py#L521-L522 and since this is happening after we already set the expiring days which in this year will be 0 we won't remove those expiring days from the year's allocation data ### Fix: We add a condition to check if the actual_lastcall is either a date in the start of the allocation or one of the expiration dates for the carryover. Also, before we set the value of the expiring_carryover_days we call _add_days_to_allocation to calculate on the correct number of days for the plan level we are checking. opw-4606886 Forward-Port-Of: odoo/odoo#221433 Forward-Port-Of: odoo/odoo#209669
This update brings the spreadsheet engine to its latest 18.4 version and fixes several visible issues. Users should see more reliable chart behavior, better handling of transparent colors, and fewer interface layering problems in the spreadsheet top bar.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/358931f33 [REL] 18.4.5 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/358931f33 [REL] 18.4.5 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/8ab8485e4 [FIX] Color: Support colors with alpha in colorScale helpers [Task: 4951926](https://www.odoo.com/odoo/2328/tasks/4951926) https://github.com/odoo/o-spreadsheet/commit/808a34539 [IMP] demo: Add error handler [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/d2e91ea45 [FIX] chart: chartJS extensions loaded too late [Task: 4954034](https://www.odoo.com/odoo/2328/tasks/4954034) https://github.com/odoo/o-spreadsheet/commit/b6d9f269a [FIX] Topbar: Fix Z-index [Task: 4981390](https://www.odoo.com/odoo/2328/tasks/4981390) Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Mehdi Rachico (mera) <mera@odoo.com> Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Payment providers are now filtered consistently by the current website across checkout, saved payment methods, and payment link flows. This prevents customers from seeing or using payment options that are not meant for the site they are visiting, reducing confusion and transaction issues.
Original PR description
In a multi-website environment, payment providers are often configured specifically for each website using the `website_id` field. While the checkout page (`/shop/payment`) correctly filters providers by the current website, other routes such as `/my/payment_method` or `/payment/pay` flows do not apply this filtering consistently. This patch ensures that the `website_id` constraint on payment providers is respected across all relevant flows, improving consistency and preventing users from seeing or using providers that are not available for their current website. Without this patch, users may see or select payment providers that are not intended for their site, leading to potential confusion, incorrect transactions, or access to providers that are not supported on the current website. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#218985 Forward-Port-Of: odoo/odoo#218089
Fixes an error that could block users from completing subcontracted purchase receipts when they choose not to create a backorder for a small remaining quantity. The system now correctly cancels the remaining manufacturing order instead of trying to set it to zero, improving reliability for subcontracting workflows.
Original PR description
Steps to reproduce the bug: - unarchive the subcontracting route - Create a storable product C1 with the following route: - Buy + Resupply Subcontractor on Order - Create a storable product P1 with:…
Steps to reproduce the bug:
- unarchive the subcontracting route
- Create a storable product C1 with the following route:
- Buy + Resupply Subcontractor on Order
- Create a storable product P1 with:
- BoM type: Subcontracting - Type: subcontracting - Subcontractor: Azure Interior - Component: C1
- Create a purchase order for 20 units of P1
- Confirm the purchase order
- Validate the resupply transfer
- Go to the receipt of P1
- Record 19.8 units of the component (ignore the remaining 0.2)
- Validate the receipt with no backorder
Problem:
A user error is raised:
```
The operation cannot be completed: The quantity to produce must
be positive!
```
When clicking No Backorder, the `process_cancel_backorder` method is
called:
https://github.com/odoo/odoo/blob/18.0/addons/stock/wizard/stock_backorder_confirmation.py#L75-L77
This triggers the validation of the picking, so updates the subcontract
order quantity:
https://github.com/odoo/odoo/blob/16a1d9b19b8b07435a9c4b4db2cad3c1e37e4e17/addons/mrp_subcontracting/models/stock_picking.py#L53
At this stage, we check whether it should reduce the MO quantity or
cancel the order entirely. However, the logic compares the quantity to
remove against the initial order quantity without using `float_compare`,
which leads to minor rounding differences. This results to update the
MO quantity to zero instead of canceling it, which then triggers an SQL
constraint error because the MO quantity cannot be zero:
https://github.com/odoo/odoo/blob/e7e2a088495eed3c2886a69054af689c01628f32/addons/mrp_subcontracting/models/stock_move.py#L304-L311
https://github.com/odoo/odoo/blob/29d1f637d3ec6f3ebb218d103001a6182af1b8a4/addons/mrp/models/mrp_bom.py#L93-L95
opw-4905031
Forward-Port-Of: odoo/odoo#221451
Forward-Port-Of: odoo/odoo#219650The activity counter in the systray now updates correctly when activities are changed, archived, rescheduled, created, or deleted in batches. This helps users see an accurate count of pending activities without needing to refresh or wait for unrelated changes.
Original PR description
Currently the systray counter is only updated at: - create - unlink - write, but only if the user changes We want to detect changes such as activities being archived or due dates being updated to properly reflect the changes as the user applies them. We now do a separate check for activity count per user before and after a write call that modifies these fields. Additionally since we now have a count we provide that as part of the bus notification so that it can be updated accurately when modifying/creation/deleting activities in batch. Common activity test utils are updated to avoid false negatives. task-4862215 Forward-Port-Of: odoo/odoo#220642 Forward-Port-Of: odoo/odoo#215880
Users can now merge stock picking batches even when some batches do not have a scheduled date, avoiding an unexpected error. The system also clearly warns users when they try to merge only one batch, since that action has no practical effect.
Original PR description
Issue Before This Commit: ============================ - Merging a batch that lacks a `scheduled_date` causes a traceback: `TypeError: '<' not supported between instances of 'datetime.datetime' and…
Issue Before This Commit: ============================ - Merging a batch that lacks a `scheduled_date` causes a traceback: `TypeError: '<' not supported between instances of 'datetime.datetime' and 'bool'.` - Merging a single batch does nothing but still proceeds silently, even though merging a single record has no practical effect. Steps to Reproduce: ============================ - Install the `stock_picking_batch` module. - Create two batches, one with a scheduled_date, one without. - Try merging only one batch → it proceeds silently, which makes no sense. - Try merging both; a traceback error occurs due to a missing scheduled date. With This Commit: ============================ - Raise a proper UserError when the user tries to merge fewer than two batches. - Prevent traceback by filtering out batches without a scheduled date before finding the earliest one. This commit ensures that users can proceed with the batch merging process without encountering a traceback when one or more batches have no scheduled date. It also introduces a UserError when attempting to merge only a single batch, similar to the behaviour in purchase order merging. Since merging a single record has no practical effect.
Past-date inventory reports now avoid counting internal warehouse transfers as customer outgoing stock. This prevents inflated on-hand quantities for products using multi-step delivery routes, giving businesses more reliable historical stock reporting.
Original PR description
Before this commit, the available quantity was incorrect when using the "Inventory At" feature with a past date in the inventory report For products using multi-step delivery routes, the…
Before this commit, the available quantity was incorrect when using the "Inventory At" feature with a past date in the inventory report For products using multi-step delivery routes, the `_compute_quantities_dict()` method incorrectly treated internal moves as outgoing moves As a result, the same outgoing quantity was added multiple times, leading to an overestimation of the available stock This commit adds a filter to the `domain_move_out_done` domain used for past dates, excluding internal moves based on `location_dest_usage`` ## Steps to reproduce: - Create a new product - Active the multi-step routes in Settings - Set the Warehouse's Outgoing Shipments to Pick, Pack, then Deliver - Create a RFQ for 100 products and Receive Products - Create a Quotation for 20 products - Validate each delivery steps - Go to Inventory -> Report -> Stock - Click on Inventory At - Set the date to 2025-01-01 - Search for your product - The `In Hand` quantity should be 0 but is 40 before the fix opw-4848473 Forward-Port-Of: odoo/odoo#217732
The website event pages now show the “Registered” banner consistently based on the visitor’s actual registration state. This prevents customers from seeing misleading event registration status when browsing event lists or pages in different sessions.
Original PR description
We had an inconsistent display of the Registered banner for events on the website. The banner would appear or disappear randomly, regardless of whether the user was logged in or not. Steps to reproduce: ------------------- - start the server - log in as a user that does not have access to website editor - get a ticket for an event - go to the event list -> event is marked register - go to the event page in a new browser session (incognito) -> event is still marked register > Observation: On refresh, Registered green banner on events appear and disappear randomly Why the fix: ------------ Keys that are not stored on the table of event should be added to the cache key to force a re-render when they change, or t-nocache should be used opw-4819021 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#221637 Forward-Port-Of: odoo/odoo#220053
Malaysian e-invoices now use the classification code chosen on each invoice line before falling back to the product default. This helps ensure submitted e-invoices reflect line-specific choices and reduces reporting errors when a product needs a different classification on a particular invoice.
Original PR description
Description of the issue/feature this PR addresses: Prioritizes the Malaysian classification code from the invoice line over the one from the product. This ensures that line-specific override or manual selection of the code is correctly used when submitting e-invoices. Adds one unit test to verify this priority logic. Current behavior before PR: Submission of e-invoice uses products' classification code and ignores invoice lines' code. Desired behavior after PR is merged: Submission of e-invoice uses invoice lines' classificatio`n code. If the code is not available, the submission uses products' classification code. Task-4945679 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The French POS inalterability check report now processes large volumes of orders much faster by loading only the data needed for verification. This reduces delays and memory pressure for businesses running compliance checks on high transaction volumes.
Original PR description
### Problem: Pos inalterability Check report is specific to French localization. It verifies whether POS orders have been modified by computing a hash of the order data and comparing it to the previously stored hash. _compute_string_to_hash method is computationally expensive and leads to significant performance and memory issues when processing more than 50,000 orders. ### Benchmark Before: | Orders | Time | Memory | |--------|---------|--------| | 1k | 15s | 10MB | | 10k | 77s | 81MB | | 20k | 102s | 110MB | | 40K | timeout | 256MB | After: | Orders | Time | Memory | |--------|------|--------| | 1k | 5s | 7MB | | 10k | 9s | 42MB | | 40K | 20s | 174MB | | 100k | 42s | 550MB | | 330k | 126s | 1.2GB | ### Solution: Fetching only required fields to compute _compute_string_to_hash opw-4901994 Forward-Port-Of: odoo/odoo#221218 Forward-Port-Of: odoo/odoo#217348
This fix prevents WinBooks file imports from being blocked by validation issues related to payable tax accounts, missing journals, or accounts marked for deprecation. Businesses can import legacy accounting data more reliably without manual cleanup for these cases.
Original PR description
When importing a winbooks file the following issues and or inconsistencies may be found **Issue 1** We may import an account with CENTRALID 'V03' and code 45100000 Having this centralID means that it…
When importing a winbooks file the following issues and or inconsistencies may be found **Issue 1** We may import an account with CENTRALID 'V03' and code 45100000 Having this centralID means that it will be set as tax payable account id according to https://github.com/odoo/enterprise/blame/d8d4812414dba8825a1c785c29d00f7d0fd98360/account_winbooks_import/wizard/import_wizard.py#L174 However, this means it needs to be a `liability_payable` account with reconcile enable, in order to comply with the following check https://github.com/odoo/odoo/blame/ad6c9001b447f5ffebafe1581512f48708c7d746/addons/account/models/account_tax.py#L80 *Note* Even if we set it as liability_payable, the import may fail later on in case the same account is used in a sales move where those types of account are not allowed https://github.com/odoo/odoo/blame/1b657cf1e1ce43874a3ede307b2f8ad68216aa56/addons/account/models/account_move_line.py#L1247 A solution is to skip the `_check_payable_receivable` check for winbooks lines **Issue 2** Move line data may reference an unkown journal, causing a validation error because no journal is retrieved from the database and a move always need a journal **Issue 3** Account created during import may be marked for deprecation, which occurs at the end of the import process. However, if the account has been used in a tax repartition line, trying to set it as deprecated will raise an error. https://github.com/odoo/odoo/blame/2cdc41c012f637849ba030989ce928b6b1152e7e/addons/account/models/account_account.py#L1028 opw-4850314 Forward-Port-Of: odoo/enterprise#89426
Payment links for already invoiced recurring sales orders now use the next invoice amount instead of including past transactions. This prevents customers from seeing incorrect payment amounts when renewing or paying for subscription periods.
Original PR description
Before this commit,when a payment link was generated for a recurring SO already invoiced, the default values of amount and amiunt_max would take into account all previous transactions. As a result, the amount would be badly computed as recurring order have many transactions (at least once or each period). This commit ensure to use the next invoice amount. taskid: 4352396 Forward-Port-Of: odoo/enterprise#83934
Barcode scanning on iOS is made more reliable by preventing unsupported or blocked scan sounds from causing an error. Users can continue scanning even if their browser cannot play the selected sound or does not allow audio playback.
Original PR description
Issue ----- On iOS 18.5, users can get a `NotSupportedError` when trying to scan a barcode from the (barcode) main menu. Steps to reproduce ----- - Open barcode - Click the center scan button - Scan…
Issue ----- On iOS 18.5, users can get a `NotSupportedError` when trying to scan a barcode from the (barcode) main menu. Steps to reproduce ----- - Open barcode - Click the center scan button - Scan a barcode --> Traceback Discussion ----- There are 2 issues occuring here. 1. We play either an ogg or mp3 file. However, the method to know if the format is supported by the browser returns one of 'probably', 'maybe', ''. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType#return_value This means that when we do https://github.com/odoo/enterprise/blob/70e5013ea022ed04ff27db71ea3ecccb55ae1f70/stock_barcode/static/src/main_menu/main_menu.js#L37 We might end up using ogg even if the browser doesn't actually support it, as 'maybe' is truthy. To reduce the risk of this happening, we can specify the codec as "vorbis" (all ogg files of Odoo are vorbis). This is already done in mail: https://github.com/odoo/odoo/blob/cd4c1d599ea9403ce3791e239ad765d946446a47/addons/mail/static/src/core/common/sound_effects_service.js#L46 2. The browser might not have the permission to play the sound. In such cases, the best we can do is try to play the sound and log potential errors. ----- Ticket: opw-4820022 Forward-Port-Of: odoo/enterprise#91158
Manufacturing users who are not HR users can now open the Shop Floor app without encountering an access rights error. The app now looks up the relevant employee barcode only when needed, avoiding restricted employee data access while keeping barcode identification working.
Original PR description
**PROBLEM** If a user is in the mrp.group_mrp_user group, but does not belong to hr.group_hr_user, he can't access the shop floor app. **STEP TO REPRODUCE** 1. connect with a user which is a user of manufactring, but not a user of hr. 2. try to go on the shop floor app and notice there is an access right error. **CAUSE** When connecting to the shop floor app, we are trying to get the barcode field on all employee (because we need them if we want to identify an employee on the shop floor app using their barcode). This was added in this commit: https://github.com/odoo/enterprise/commit/b3fb0073a15adcc799a5681284f0cfd2308764b8 The barcode field is only accessible to member of hr.group_hr_user. **FIX** Instead of getting the barcode of all employee using `get_all_employee()`, we do a rpc call to query the employee the barcode belong to. opw-4905206 Forward-Port-Of: odoo/enterprise#89436
Rejecting an UrbanPiper order in Point of Sale now completes without causing an error. This keeps staff workflows stable when declining test or real delivery orders and ensures the POS screen resets correctly afterward.
Original PR description
Steps to reproduce: --- - Configure UrbanPiper in any POS configuration. - Open this POS and place a test order. - Attempt to reject the order. Issue: --- - A traceback occurs when rejecting the order. Cause: --- - The `removeOrder` function was being called unnecessarily, even though it is already handled by `deleteOrders`. Fix: --- - Removed the redundant call to `removeOrder`. - Additionally, called `afterOrderValidation` and `setSelectedOrder` to properly reset the state after rejection. task-4965076 Forward-Port-Of: odoo/enterprise#91116
16 changes
Resolved issues and error corrections
In multi-website setups, customers will now only see and use payment providers configured for the website they are visiting. This prevents confusion and reduces the risk of payments being started with providers that are not meant for that site.
Original PR description
In a multi-website environment, payment providers are often configured specifically for each website using the `website_id` field. While the checkout page (`/shop/payment`) correctly filters providers by the current website, other routes such as `/my/payment_method` or `/payment/pay` flows do not apply this filtering consistently. This patch ensures that the `website_id` constraint on payment providers is respected across all relevant flows, improving consistency and preventing users from seeing or using providers that are not available for their current website. Without this patch, users may see or select payment providers that are not intended for their site, leading to potential confusion, incorrect transactions, or access to providers that are not supported on the current website. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#218985 Forward-Port-Of: odoo/odoo#218089
This update brings the spreadsheet component up to its latest maintenance version and fixes an issue where chart-related extensions could load too late. Users should see more reliable spreadsheet chart behavior, with a small supporting improvement to demo error handling.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/9499d989e [REL] 18.3.15 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/8c41a1bc3 [FIX] chart: chartJS extensions loaded too late [Task: 4954034](https://www.odoo.com/odoo/2328/tasks/4954034) https://github.com/odoo/o-spreadsheet/commit/f921fe1d7 [IMP] demo: Add error handler [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) Co-authored-by: Anthony Hendrickx (anhe) <anhe@odoo.com> Co-authored-by: Alexis Lacroix (laa) <laa@odoo.com> Co-authored-by: Lucas Lefèvre (lul) <lul@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@odoo.com> Co-authored-by: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Mehdi Rachico (mera) <mera@odoo.com> Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> Co-authored-by: Rémi Rahir (rar) <rar@odoo.com> Co-authored-by: Pierre Rousseau (pro) <pro@odoo.com> Co-authored-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Updating an Odoo chart in a spreadsheet now keeps the spreadsheet's global filters applied. This prevents chart data from unexpectedly ignoring shared filters, helping users see consistent and accurate reporting after edits.
Original PR description
The global filters were not re-applied when updating an oodo chart domain. Task: [4965683](https://www.odoo.com/odoo/2328/tasks/4965683) 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#221534 Forward-Port-Of: odoo/odoo#220764
Past-date inventory reports now avoid counting internal warehouse transfers as customer deliveries. This prevents available stock from being overstated for products using multi-step delivery routes, making historical stock reports more reliable for operations and planning.
Original PR description
Before this commit, the available quantity was incorrect when using the "Inventory At" feature with a past date in the inventory report For products using multi-step delivery routes, the…
Before this commit, the available quantity was incorrect when using the "Inventory At" feature with a past date in the inventory report For products using multi-step delivery routes, the `_compute_quantities_dict()` method incorrectly treated internal moves as outgoing moves As a result, the same outgoing quantity was added multiple times, leading to an overestimation of the available stock This commit adds a filter to the `domain_move_out_done` domain used for past dates, excluding internal moves based on `location_dest_usage`` ## Steps to reproduce: - Create a new product - Active the multi-step routes in Settings - Set the Warehouse's Outgoing Shipments to Pick, Pack, then Deliver - Create a RFQ for 100 products and Receive Products - Create a Quotation for 20 products - Validate each delivery steps - Go to Inventory -> Report -> Stock - Click on Inventory At - Set the date to 2025-01-01 - Search for your product - The `In Hand` quantity should be 0 but is 40 before the fix opw-4848473 Forward-Port-Of: odoo/odoo#217732
Branch-only users can now open the Chart of Accounts without being blocked by an access error. This ensures accounting configuration remains available to users who are correctly limited to a branch, avoiding disruption in multi-company setups.
Original PR description
#### Steps to reproduce
- Create a branch in a company that has a CoA installed.
- Create a user that only has access to the branch
- Login as the user
- Try to open Accounting > Configuration > Chart of Accounts
- You get an AccessError in your face.
#### Analysis
- When calling `web_search_read` on `account.account`, the `company_ids` field is loaded into cache by `search_fetch`.
- Since the user does not have access to the parent company, the parent company will not be in the account's `company_ids` in cache.
- When calling `_check_access` in `fetch`, the `filtered_domain` (even though it is called behind `sudo`) will use the `company_ids` in cache to determine whether the accounts can be accessed, triggering the `AccessError`.
#### Solution
- Set `depends_context=('uid',)` on the `company_ids` field to keep separate sudo / non-sudo caches for the field.
opw-4730107
Forward-Port-Of: odoo/odoo#220294
Forward-Port-Of: odoo/odoo#217752Fixed an issue where the website event “Registered” banner could appear or disappear inconsistently because cached event pages reused the wrong display state. Visitors now see more reliable event registration status across sessions and refreshes.
Original PR description
We had an inconsistent display of the Registered banner for events on the website. The banner would appear or disappear randomly, regardless of whether the user was logged in or not. Steps to reproduce: ------------------- - start the server - log in as a user that does not have access to website editor - get a ticket for an event - go to the event list -> event is marked register - go to the event page in a new browser session (incognito) -> event is still marked register > Observation: On refresh, Registered green banner on events appear and disappear randomly Why the fix: ------------ Keys that are not stored on the table of event should be added to the cache key to force a re-render when they change, or t-nocache should be used opw-4819021 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#220053
This fix prevents an error when users receive almost all subcontracted goods and choose not to create a backorder for the small remaining quantity. The system now correctly cancels the leftover manufacturing order instead of trying to set it to zero, allowing the receipt process to finish smoothly.
Original PR description
Steps to reproduce the bug: - unarchive the subcontracting route - Create a storable product C1 with the following route: - Buy + Resupply Subcontractor on Order - Create a storable product P1 with:…
Steps to reproduce the bug:
- unarchive the subcontracting route
- Create a storable product C1 with the following route:
- Buy + Resupply Subcontractor on Order
- Create a storable product P1 with:
- BoM type: Subcontracting - Type: subcontracting - Subcontractor: Azure Interior - Component: C1
- Create a purchase order for 20 units of P1
- Confirm the purchase order
- Validate the resupply transfer
- Go to the receipt of P1
- Record 19.8 units of the component (ignore the remaining 0.2)
- Validate the receipt with no backorder
Problem:
A user error is raised:
```
The operation cannot be completed: The quantity to produce must
be positive!
```
When clicking No Backorder, the `process_cancel_backorder` method is
called:
https://github.com/odoo/odoo/blob/18.0/addons/stock/wizard/stock_backorder_confirmation.py#L75-L77
This triggers the validation of the picking, so updates the subcontract
order quantity:
https://github.com/odoo/odoo/blob/16a1d9b19b8b07435a9c4b4db2cad3c1e37e4e17/addons/mrp_subcontracting/models/stock_picking.py#L53
At this stage, we check whether it should reduce the MO quantity or
cancel the order entirely. However, the logic compares the quantity to
remove against the initial order quantity without using `float_compare`,
which leads to minor rounding differences. This results to update the
MO quantity to zero instead of canceling it, which then triggers an SQL
constraint error because the MO quantity cannot be zero:
https://github.com/odoo/odoo/blob/e7e2a088495eed3c2886a69054af689c01628f32/addons/mrp_subcontracting/models/stock_move.py#L304-L311
https://github.com/odoo/odoo/blob/29d1f637d3ec6f3ebb218d103001a6182af1b8a4/addons/mrp/models/mrp_bom.py#L93-L95
opw-4905031
Forward-Port-Of: odoo/odoo#221451
Forward-Port-Of: odoo/odoo#219650Applying a partnership grade to a company or contact now affects only that specific partner, not its related child contacts. This restores the intended behavior and prevents unintended partnership status changes on linked contacts.
Original PR description
This reverts commit 9d1857e so that applying a grade no longer adds it to the children of the partner as well. TASK-4985900
The activity menu now shows only ongoing activities, so completed items no longer remain visible as late or pending work. This reduces confusion for users and keeps activity counts aligned with what still needs attention.
Original PR description
**Current Behavior:** When users click on the activities icon, both active and archived activities are displayed. This can lead to confusion, as users expect to see only ongoing (i.e., pending or…
**Current Behavior:** When users click on the activities icon, both active and archived activities are displayed. This can lead to confusion, as users expect to see only ongoing (i.e., pending or overdue) activities. **To reproduce this issue:** 1) Install the Contacts module and create two partner records. 2) Create a late activity for each of the two records. 3) Mark one activity as Done by clicking the DONE button. 4) Open the Late Activities for Contacts from the top-right corner. **Issue:** Even after marking one activity as done, both activities are shown. This results in two late activities appearing, instead of just one active one. **Cause:** When an activity is marked as Done, the `action_feedback` method is called via `markAsDone`. https://github.com/odoo/odoo/blob/7fa14f9b8e2e886243d68d8e04b0798cd801615b/addons/mail/static/src/core/web/activity_model_patch.js#L44-L48 This method archives the corresponding `mail.activity` record. https://github.com/odoo/odoo/blob/7fa14f9b8e2e886243d68d8e04b0798cd801615b/addons/mail/models/mail_activity.py#L556-L557 But because of the recent changes from the below-mentioned commit, we are now showing the archived records. https://github.com/odoo/odoo/commit/f05c2f9c7942943140c98174f8c86917fc72fc9b#diff-cacfccf65b597df222b166a1c6d80d125bb75a1f2aeabf2eed2e88e189c144f0R59 However, this change was intended to display archived model records that still have active activities, not to show archived or completed activities themselves. **Solution:** Apply a domain filter to ensure that only active (non-archived) activity records are displayed. opw-4946120
The French POS inalterability check report now loads only the data it needs when verifying order integrity. This greatly improves performance and reduces memory pressure for businesses with large volumes of POS orders, helping audits complete reliably instead of timing out.
Original PR description
### Problem: Pos inalterability Check report is specific to French localization. It verifies whether POS orders have been modified by computing a hash of the order data and comparing it to the previously stored hash. _compute_string_to_hash method is computationally expensive and leads to significant performance and memory issues when processing more than 50,000 orders. ### Benchmark Before: | Orders | Time | Memory | |--------|---------|--------| | 1k | 15s | 10MB | | 10k | 77s | 81MB | | 20k | 102s | 110MB | | 40K | timeout | 256MB | After: | Orders | Time | Memory | |--------|------|--------| | 1k | 5s | 7MB | | 10k | 9s | 42MB | | 40K | 20s | 174MB | | 100k | 42s | 550MB | | 330k | 126s | 1.2GB | ### Solution: Fetching only required fields to compute _compute_string_to_hash opw-4901994 Forward-Port-Of: odoo/odoo#221218 Forward-Port-Of: odoo/odoo#217348
Payment links for recurring sales orders now use the next invoice amount instead of adding past payments or transactions. This prevents customers from seeing incorrect payment amounts after previous subscription billing cycles.
Original PR description
Before this commit,when a payment link was generated for a recurring SO already invoiced, the default values of amount and amiunt_max would take into account all previous transactions. As a result, the amount would be badly computed as recurring order have many transactions (at least once or each period). This commit ensure to use the next invoice amount. taskid: 4352396 Forward-Port-Of: odoo/enterprise#83934
Bank reconciliation now preserves the original foreign currency amount when recalculated values are close enough, avoiding artificial one-cent differences caused by exchange-rate rounding. This helps invoices reconcile correctly and reduces unnecessary accounting discrepancies for multi-currency transactions.
Original PR description
The aim of this commit is to keep the original foreign amount currency if the computation ends up close enough to it. Before this commit: The reconciliation process was losing so much precision that…
The aim of this commit is to keep the original foreign amount currency if the computation ends up close enough to it. Before this commit: The reconciliation process was losing so much precision that it could mess up the reconciliation of one single invoice. After this commit: We keep the original amount as it is most probably the correct one. Context: With a rate of 1 US$ = 5.421327349 R$ and an invoice of 143.62 R$, we convert the amount in US$ which is 26.491668921649627 US$. As we have to round it for the accounting, we end up with 26.49 US$ as company currency amount, losing the rest of the decimals. During the reconciliation process, we convert back the US$ to R$ ending up with 143.61096147501 R$ that have to be rounded to 143.61 R$. This creates a difference of 0.01 R$ which surfaces later on. Chosen solution: As we still have the original currency amount and the rate, we are able to recompute the raw numbers and we are able to make "fairer" comparison between the amounts. If we can confidently tell that the amounts are close enough, we can just keep the original amount and prevent all those rounding errors to be taken into account. opw-4937508
Fixes several cases where importing WinBooks accounting files could fail because of account, tax, journal, or deprecation validation rules. This helps businesses complete accounting data imports more reliably, even when source files contain inconsistent references.
Original PR description
When importing a winbooks file the following issues and or inconsistencies may be found **Issue 1** We may import an account with CENTRALID 'V03' and code 45100000 Having this centralID means that it…
When importing a winbooks file the following issues and or inconsistencies may be found **Issue 1** We may import an account with CENTRALID 'V03' and code 45100000 Having this centralID means that it will be set as tax payable account id according to https://github.com/odoo/enterprise/blame/d8d4812414dba8825a1c785c29d00f7d0fd98360/account_winbooks_import/wizard/import_wizard.py#L174 However, this means it needs to be a `liability_payable` account with reconcile enable, in order to comply with the following check https://github.com/odoo/odoo/blame/ad6c9001b447f5ffebafe1581512f48708c7d746/addons/account/models/account_tax.py#L80 *Note* Even if we set it as liability_payable, the import may fail later on in case the same account is used in a sales move where those types of account are not allowed https://github.com/odoo/odoo/blame/1b657cf1e1ce43874a3ede307b2f8ad68216aa56/addons/account/models/account_move_line.py#L1247 A solution is to skip the `_check_payable_receivable` check for winbooks lines **Issue 2** Move line data may reference an unkown journal, causing a validation error because no journal is retrieved from the database and a move always need a journal **Issue 3** Account created during import may be marked for deprecation, which occurs at the end of the import process. However, if the account has been used in a tax repartition line, trying to set it as deprecated will raise an error. https://github.com/odoo/odoo/blame/2cdc41c012f637849ba030989ce928b6b1152e7e/addons/account/models/account_account.py#L1028 opw-4850314 Forward-Port-Of: odoo/enterprise#89426
This fixes partner commission and subscription partnership behavior so applying a grade to a company or contact no longer automatically applies it to related child contacts. It also restores the needed module dependency so partnership removal works correctly when installing partner commission.
Original PR description
This reverts commit 14001a8a0216750be0c897d0e1bf31fccfc51c6a so that applying a grade no longer adds it to the children of the partner as well. This commit also fix the issue of not having sale_subscription_partnership in the manifest of partner_commission, which results in the _remove_partnership method not working when installing partner_commission. TASK-4985900
This fix prevents barcode scanning from failing on iOS when the confirmation sound is unsupported or blocked by browser permissions. Users can continue scanning normally, while any sound playback issue is safely logged instead of interrupting the workflow.
Original PR description
Issue ----- On iOS 18.5, users can get a `NotSupportedError` when trying to scan a barcode from the (barcode) main menu. Steps to reproduce ----- - Open barcode - Click the center scan button - Scan…
Issue ----- On iOS 18.5, users can get a `NotSupportedError` when trying to scan a barcode from the (barcode) main menu. Steps to reproduce ----- - Open barcode - Click the center scan button - Scan a barcode --> Traceback Discussion ----- There are 2 issues occuring here. 1. We play either an ogg or mp3 file. However, the method to know if the format is supported by the browser returns one of 'probably', 'maybe', ''. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType#return_value This means that when we do https://github.com/odoo/enterprise/blob/70e5013ea022ed04ff27db71ea3ecccb55ae1f70/stock_barcode/static/src/main_menu/main_menu.js#L37 We might end up using ogg even if the browser doesn't actually support it, as 'maybe' is truthy. To reduce the risk of this happening, we can specify the codec as "vorbis" (all ogg files of Odoo are vorbis). This is already done in mail: https://github.com/odoo/odoo/blob/cd4c1d599ea9403ce3791e239ad765d946446a47/addons/mail/static/src/core/common/sound_effects_service.js#L46 2. The browser might not have the permission to play the sound. In such cases, the best we can do is try to play the sound and log potential errors. ----- Ticket: opw-4820022 Forward-Port-Of: odoo/enterprise#91158
Restaurant bookings made through the website now show the correct number of guests when opened in the PoS booking view. This prevents staff from seeing a misleading zero guest count and helps them prepare tables accurately.
Original PR description
Steps to reproduce: --- - Install `pos_restaurant`, `pos_appointment`, and `website` modules. - Book a table appointment via the website for X people. - Open the Restaurant PoS and go to the "Booking" tab. - Open the appointment created above. Issue: --- - The people count shows as 0, even though the appointment was booked for X people. Cause: --- - In version 18.3, a new field was introduced to track the number of people. - This field was not being populated when the appointment was created outside the PoS UI. Fix: --- - Ensure the new people count field is set correctly when the booking is not created from the PoS interface. task-4848208
10 changes
Resolved issues and error corrections
The Preparation Display menu now appears when the restaurant preparation display feature is installed. This prevents users from hitting an error while setting up or exploring demo data and makes the feature easier to access.
Original PR description
Steps to reproduce: --- - Install `point_of_sale` module(without demo) - Point of Sale > Orders > `Preparation Display` - Create new and Load Demo Data(Explore Demo Data) Traceback: --- `AttributeError: The method 'pos.config.load_onboarding_restaurant_scenario' does not exist` In this commit: --- The `Preparation Display` will be visible in the main menu if the `pos_restaurant_preparation_display` module is installed.
This fixes an error that could stop HR from completing an offer after a new hire signed it. The process now avoids closing an incomplete draft contract for new employees while still closing previous contracts correctly for existing employees.
Original PR description
Steps: - Go to Recruitment > create/select an applicant > Create Offer - Sign the offer as the applicant > Sign as HR responsible. Issue: - Validation Error: 'Start date must be earlier than contract end date.' Reason: - When a new employee signs, a contract version is created without start/end dates. - On HR sign, the old version is ended (with end_date) as per earlier fix [#88915], but if the old version has no start_date then it breaks the constraint. Fix: - Only set end_date on old version if start_date exists (for existing employee). - For existing employees, the old contract closes cleanly with end date. - For new hires, we skip setting end_date to avoid constraint issues. task-4948131
Inventory users can now open the map view for receipts and delivery orders even when batch transfer features are not enabled. The change removes a dependency on an optional batch transfer field, preventing an error that blocked access to the map view.
Original PR description
When a user without enabling 'Batch, Wave & Cluster Transfers' from settings, tries to open the map view for any stock transfer operations (e.g., Receipts, Delivery Orders), a error is raised.…
When a user without enabling 'Batch, Wave & Cluster Transfers' from settings, tries to open the map view for any stock transfer operations (e.g., Receipts, Delivery Orders), a error is raised. **Steps to Reproduce:** - Install Inventory App. - Navigate to 'Receipts' or 'Delivery Orders'. - Switch to map view. **Error:** `ValueError: Invalid field 'batch_sequence' on model 'stock.picking'` **Root Cause:** Since [this commit](https://github.com/odoo/enterprise/pull/78373/commits/fddb39104d675af2784559fe2f7cb28f8dc6120b), the `stock.picking.view.map` view has a hardcoded `default_order` attribute that sorts by `batch_sequence` as shown at [1]. This field is only added to the `stock.picking` model when the `stock_picking_batch` module is installed. This creates an invalid view definition, where this optional module is not present, causing an error. **Solution:** This commit resolves the issue by removing the `default_order='batch_sequence'` from the stock picking map view at [1]. This ensures the map view no longer depends on the `stock_picking_batch module`. [1]- https://github.com/odoo/enterprise/blob/5e0380513899f199340620d8ce17eff5b5b6aec3/stock_enterprise/views/stock_picking_map_views.xml#L8 sentry-6732756118 Forward-Port-Of: odoo/enterprise#90399
Manufacturing users who are not HR users can now open the Shop Floor app without an access rights error. The app now looks up an employee only when a barcode is scanned, avoiding restricted employee data access while preserving barcode identification on the shop floor.
Original PR description
**PROBLEM** If a user is in the mrp.group_mrp_user group, but does not belong to hr.group_hr_user, he can't access the shop floor app. **STEP TO REPRODUCE** 1. connect with a user which is a user of manufactring, but not a user of hr. 2. try to go on the shop floor app and notice there is an access right error. **CAUSE** When connecting to the shop floor app, we are trying to get the barcode field on all employee (because we need them if we want to identify an employee on the shop floor app using their barcode). This was added in this commit: https://github.com/odoo/enterprise/commit/b3fb0073a15adcc799a5681284f0cfd2308764b8 The barcode field is only accessible to member of hr.group_hr_user. **FIX** Instead of getting the barcode of all employee using `get_all_employee()`, we do a rpc call to query the employee the barcode belong to. opw-4905206 Forward-Port-Of: odoo/enterprise#89436
Rejecting an UrbanPiper order in Point of Sale now works without causing an error screen. This keeps staff workflows smooth when declining test or real incoming orders and ensures the POS returns to a usable state afterward.
Original PR description
Steps to reproduce: --- - Configure UrbanPiper in any POS configuration. - Open this POS and place a test order. - Attempt to reject the order. Issue: --- - A traceback occurs when rejecting the order. Cause: --- - The `removeOrder` function was being called unnecessarily, even though it is already handled by `deleteOrders`. Fix: --- - Removed the redundant call to `removeOrder`. - Additionally, called `afterOrderValidation` and `setSelectedOrder` to properly reset the state after rejection. task-4965076 Forward-Port-Of: odoo/enterprise#91525 Forward-Port-Of: odoo/enterprise#91116
French VAT XML filings now place grid 26 refund requests in the correct field. This prevents reimbursement amounts from being omitted or sent in the wrong place when businesses submit VAT returns.
Original PR description
The French VAT report line for grid 26 ("Repayment of credit requested on form n°3519") uses code `box_26_external`, but the XML generator only mapped `box_26` to the `JB` tag.
As a result, the reimbursement amount was missing or incorrectly placed in the XML file.
This commit maps `box_26_external` to `JB` to ensure the correct tag is used when the user fills in grid 26.
opw-4931275
Forward-Port-Of: odoo/enterprise#90940This update improves the accounting audit workflow by making new working files easier to create and audit checks easier to follow. It also fixes status changes so validated checks remain usable when an audit is moved between ongoing and done.
Original PR description
Task https://www.odoo.com/odoo/project/967/tasks/4840028 was requested to merged very quickly and not everything could be done on time. This PR fixes/adds several things.
POS orders invoiced after session closing are now included correctly in GSTR1 HSN reporting. This helps ensure Indian tax return data remains complete after certain database migrations or session closing scenarios.
Original PR description
The issue occurs when a POS session closing entry is generated without grouping by HSN + UOM, which can happen after a database migration from an older version. Before this PR: POS orders were included only if they were **not invoiced** and had no **reversed_move_ids** (which is set when the invoice is created after closing the session). After this PR: POS orders are included if they are **not invoiced** **or** if they have **reversed_move_ids** (invoiced after session close). This ensures that reversed POS orders are properly processed in the GSTR1 HSN computation. OPW: 4931360
Payment links for recurring sales orders now use the next invoice amount instead of factoring in past payments. This prevents customers from seeing incorrect payment amounts on already-invoiced subscriptions.
Original PR description
Before this commit,when a payment link was generated for a recurring SO already invoiced, the default values of amount and amiunt_max would take into account all previous transactions. As a result, the amount would be badly computed as recurring order have many transactions (at least once or each period). This commit ensure to use the next invoice amount. taskid: 4352396 Forward-Port-Of: odoo/enterprise#83934
Audit report PDFs now prepare currency data before calculating figures like revenue and net accounting result. This prevents an internal error when users print audit reports and helps ensure the report values are generated correctly.
Original PR description
The method for generating the PDF of an audit report currently crashes when computing the template variables "revenue" and "net accounting result". This issue arises because the underlying method…
The method for generating the PDF of an audit report currently crashes when computing the template variables "revenue" and "net accounting result".
This issue arises because the underlying method used to compute these values runs raw SQL queries that perform a JOIN operation on the `account_currency_table`. However, this table is not created automatically by the system: It must be explicitly initialized by calling the method `_init_currency_table`.
This commit updates the code to ensure that `_init_currency_table` is called before invoking the methods that compute the total revenue, the net accounting result, etc. This should prevent the crash and allow the template variables to be computed correctly.
Steps to reproduce the issue on the runbot:
1. Open the Accounting App
2. In the navbar, click on "Accounting" > "Audit Reports"
3. Create a new audit report
4. Fill the form and save
5. Click on the "Print" button of the kanban card.
=> A new page should open displaying an internal error.
In the log of the runbot, we have the following log:
```
File "/data/build/enterprise/account_reports/models/account_report.py",
line 3899, in _compute_formula_batch_with_engine_domain
self.env.cr.execute(query)
File "/data/build/odoo/odoo/sql_db.py", line 426, in execute
self._obj.execute(query, params)
psycopg2.errors.UndefinedTable: relation "account_currency_table" does not exist
LINE 10: LEFT JOIN account_currency_table
```
Task-484094011 changes
Resolved issues and error corrections
This change restores the ability to edit or remove images and other media inside areas where surrounding text editing is disabled. It helps users manage image layouts such as figures with captions more reliably in the HTML editor.
Original PR description
Backport relevant commits from PR [1], as well as commit [2]. This allows us to use the editable media feature in 18.0. [1]: https://github.com/odoo/odoo/pull/209228 [2]: https://github.com/odoo/odoo/pull/186917/commits/1c7e05ca26a7fe5db4f7b5aa69c56c5811d20256 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Customers can now choose shipping options at checkout when their cart includes combo products, as long as the individual combo items have weights. The fix also prevents shipping calculation errors on orders with zero-quantity lines such as down payments.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Have a combo product Foo; 2. ensure the combo items have a weight set; 3. enable & publish a shipping connector; 4. add combo product to cart; 5. go to…
Versions -------- - 18.0+ Steps ----- 1. Have a combo product Foo; 2. ensure the combo items have a weight set; 3. enable & publish a shipping connector; 4. add combo product to cart; 5. go to checkout; 6. attempt to select shipping connector as delivery method. A similar message appears when trying to add a delivery method to a backend order if the order has downpayment lines. Issue ----- > The estimated shipping price cannot be computed because the weight is missing for the following product(s): Foo Cause ----- The combo product doesn't have a weight, as it's not a discrete item, but a collection of multiple items. The shipping connectors haven't been updated yet to account for this, and still expect every non-service product to have a weight. Solution -------- When looking for lines without weight, filter out products of type `combo` (similar to how `service` products are handled) using a new `_get_invalid_delivery_weight_liens` helper method, added to `sale.order.line`. Also ignore lines where `product_qty` is zero, e.g. `display_type` lines & down payment lines. Enterprise PR: https://github.com/odoo/enterprise/pull/91243 opw-4940973
Fixes an issue where creating a sales order item from a project task could leave the company blank, preventing product taxes from appearing. This helps ensure billable project work uses the correct company and tax information during sales item creation.
Original PR description
## Short functional explanation of the error When clicking on "create and edit" on a Sales Order Item field in a task, the company field is left blank. As a result, the taxes linked to the product…
## Short functional explanation of the error When clicking on "create and edit" on a Sales Order Item field in a task, the company field is left blank. As a result, the taxes linked to the product don't appear. ## Reproduction Steps 1. Install the modules sales, timesheet and project. 2. Make sure that you have at least 2 different companies in the settings. 2. Click on the project app and create a new project. Check the Billable and Timesheets boxes. 3. Create a task and click on it. Set a customer: the field "Sales Order Item" should appear. 4. Click on the "Sales Order Item" field. Type random letters and click on "create and edit". 5. Select a product that has at least one tax. ### Expected behavior The company field should be filled as soon as we click on the create and edit button, and the taxes field should be filled with the taxes of the product as soon as we select said product. ### Unexpected behavior The company and taxes field remain empty. ## Origin of the issue Some fields were set at "default_." __ opw-4904861 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#221342
Fixes an accounting error when dropshipped products are returned to an internal subcontracting location. Stock value is now increased correctly, helping keep inventory valuation and financial reports accurate.
Original PR description
…ml internal dropship return **Problem:** when the subcontracting setting is active, the return of a dropshipped product (not necessarily subcontracted) to the internal subcontracting location will…
…ml internal dropship return **Problem:** when the subcontracting setting is active, the return of a dropshipped product (not necessarily subcontracted) to the internal subcontracting location will create an account move that credits "stock valuation" instead of debitting it **Steps to reproduce:** - enable the "Anglo-Saxon Accounting","Multi-steps routes" and "Subcontracting" settings - create a storable product with dropshipping route and a vendor - in 'general information' write a non null cost - make sure the product category's inventory valuation' is 'automated' - create a new quotation for this product, confirm it and confirm the linked purchase order - click on the dropship smart button and validate the picking - click on return and select 'Physical Locations/Subcontracting Location' as the return location - validate and click on the valuation smart button - on the only stock valuation layer for this move, click on the book shaped widget **Current behavior:** the account move credits Stock Valuation and debits stock interim (received) **Expected behavior:** As we are returning the product to stock it should increase the value of the stock valuation account. Therefore, it should debit stock valuation and credit stock interim (received) **Cause of the issue:** If the mrp_subcontracting_dropshipping module is active, and if we call _is_dropshipped_return on a stock move which is the return (to the subcontracting location) of a dropshipped move : the method will return true. https://github.com/odoo/odoo/blob/b34cebcf0c142d92affdb642525f066d431b7ca3/addons/mrp_subcontracting_dropshipping/models/stock_move.py#L29-L35 Therefore, inside _account_entry_move, _is_in will be false (contrary to if mrp_subcontracting_dropshipping is not installed or if the destination is another internal location) https://github.com/odoo/odoo/blob/b34cebcf0c142d92affdb642525f066d431b7ca3/addons/stock_account/models/stock_move.py#L580 The aml vals will be computed inside _prepare_anglosaxon_account_move_vals https://github.com/odoo/odoo/blob/b34cebcf0c142d92affdb642525f066d431b7ca3/addons/stock_account/models/stock_move.py#L596 Here the fact the destination location is internal does not change the fact that it should debit the stock valuation account (meaning it should used acc_valuation as the second parameter of _prepare_account_move_vals) if the cost is positive. https://github.com/odoo/odoo/blob/b34cebcf0c142d92affdb642525f066d431b7ca3/addons/stock_account/models/stock_move.py#L610-L614 opw-4894755 Forward-Port-Of: odoo/odoo#221009
This fixes a save error when chart of accounts default taxes belonged to companies no longer selected on the account. Users now get a clear validation message instead of a system error, helping prevent incorrect multi-company accounting setup.
Original PR description
Currently, an error is produced on creating/saving the record of the chart of account if the company of any tax belongs to a company which company is not in the allowed Companies. **Steps to…
Currently, an error is produced on creating/saving the record of the chart of account if the company of any tax belongs to a company which company is not in the allowed Companies. **Steps to reproduce:** - Install the `accountant` and `l10n_be` modules. - Activate the **IN Company** and keep **YourCompany** as the default. - Navigate to `Accounting > Configuration > Accounting > Chart of Accounts`. - Open the new form view of the model by clicking the **view** button. - In **Companies** field, select the **IN Company**. - Select the **5% GST** tax in **Default Taxes** field. - Now, remove the **IN Company** from the **Companies** field. - Attempt to save the record. **Error:** `AttributeError: 'account.account' object has no attribute 'company_id'` Here, the `_check_company` method at [1] verifies that all relational fields (such as tax groups) belong to the selected companies. While building the user error message, it assumes that all involved records (e.g., `account.account`) have a `company_id` field. However, `account.account` does not define `company_id`, which results in an attribute error. [1] - https://github.com/odoo/odoo/blob/887f3fa98f6172dc5d35f9981d43d6ccb4cf86dc/odoo/models.py#L4396 This commit added constraint that raises a **UserError** if any tax in the **Default Taxes** field belongs to a company not included in the selected **Companies**. This prevents errors during the company check. Sentry - 6636043482
Fixes an error that could appear when a survey question was removed and replaced during a live session, then a participant refreshed the completed survey page. This keeps live survey sessions stable for users even when survey content is edited mid-session.
Original PR description
This error occurs when we create a live session, modify a question at the end of the survey, and then refresh the page. Steps to reproduce: --- - Install ``survey`` module - Create new Survey > Add a…
This error occurs when we create a live session, modify a question at the end of the survey, and then refresh the page. Steps to reproduce: --- - Install ``survey`` module - Create new Survey > Add a question > Click on ``Create Live Session`` - Complete the survey(wait on Thank You page) - Now go to the previous tab remove the question and add another question - Now refresh another tab (Thank You page) Traceback: --- ``ValueError: False is not in list`` We encounter the error at [1] because ``page_or_question`` is empty. Its value comes from the ``_is_last_page_or_question`` method, where ``survey.session_question_id`` is also empty. This happens because when a question is removed, ``survey.session_question_id`` becomes empty, and when a new question is added, the ID for that question is not retrieved. [1]- https://github.com/odoo/odoo/blob/e35d2a0c08f69ad1d122e07726786450e4c30b5a/addons/survey/models/survey_survey.py#L810 sentry-6043084559 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Businesses using branch companies can now use warehouses and stock locations from those branches without triggering company mismatch errors. This fixes issues when setting up store pickup, dropshipping, and related stock flows across parent and branch companies.
Original PR description
*: stock_dropshipping, website_sale_collect Versions -------- - 18.0+ Steps ----- 1. Create a branch company; 2. switch to branch company; 3. create a new warehouse; 4. create a new delivery method; 5. select "Pick up in store" as provider; 6. add warehouse as pick-up location; 7. replenish stock of a published product in the warehouse; 8. go to product's eCommerce page; 9. select store as a pick-up location. Issue ----- > Invalid Operation: Incompatible companies on records Cause ----- The `warehouse_id` field of `sale.order` has `check_company` set to `True`. When `_check_company` gets called, it will throw an error if the `warehouse_id` belongs to a different company than the order. Solution -------- Add `check_company_domain_child_of` to `models`, and use it for `stock.warehouse` and `stock.location` to allow for companies to use warehouses & locations of their branch companies. opw-4777937
Creating a new website page no longer fails if an existing custom template page has missing or incomplete page structure. This helps website editors continue managing pages even when earlier custom code contains mistakes.
Original PR description
This error occurs when trying to create a new page after previously creating a custom page that contains missing or incomplete code, leading to unexpected behavior. Steps to reproduce: --- - Install the `Website` module. - Navigate to Website > Site > Pages and create a new Blank Page (Test). - Site > Properties > Enable `Is a Template` > Save & Close - Open Page (Test) Settings, remove `id="wrap"` or `Add custom code` in Architecture, and save. - Return to `Pages` and click `New`. Traceback: --- IndexError: list index out of range At [1], this error occurs because the html_tree fails to find `id="wrap"` in the `<div>` element of the custom code added by the user in the architecture while creating a new page. https://github.com/odoo/odoo/blob/aed6c283951929a8ba504fe3166838db566ed735/addons/website/controllers/main.py#L696 sentry-6390821119 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where refusing a job application while selecting a duplicate application could cause an error instead of completing the refusal. This helps recruiters process duplicate applications smoothly without interruptions.
Original PR description
When the user refuses the application with its duplicate application, a traceback will appear. Steps to reproduce the error: - Go to Recruitment > All Applications > Create 2 applications with the…
When the user refuses the application with its duplicate application,
a traceback will appear.
Steps to reproduce the error:
- Go to Recruitment > All Applications >
Create 2 applications with the same candidate
- Open that application > Refuse > Select refuse reason >
Select other Duplicate application > Refuse
Traceback:
```
AttributeError: 'hr.applicant' object has no attribute '_get_similar_applicants_domain'
File "odoo/http.py", line 2364, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 330, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 728, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 40, in call_button
action = call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "addons/hr_recruitment/wizard/applicant_refuse_reason.py", line 75, in action_refuse_reason_apply
duplicate_domain = self.applicant_ids._get_similar_applicants_domain()
```
https://github.com/odoo/odoo/blob/e4a4806e5c58c599815204a73c78a228ee230613/addons/hr_recruitment/wizard/applicant_refuse_reason.py#L75
``_get_similar_applicants_domain`` method is removed in this commit 9359d08d331beac389fde0e6c82c895341f7dbc5 but still used here.
So, it will lead to the above traceback.
sentry-5986653915
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prShipping carriers can now calculate delivery options for orders containing combo products when the individual items have weights. This prevents checkout or sales order errors that incorrectly treated the combo bundle itself as missing weight, and also avoids false errors on zero-quantity lines such as down payments.
Original PR description
\* = bpost, dhl{,_rest}, easypost, sendcloud, ups, usps{,_rest} Versions -------- - 18.0+ Steps ----- 1. Have a combo product Foo; 2. ensure the combo items have a weight set; 3. enable & publish a…
\* = bpost, dhl{,_rest}, easypost, sendcloud, ups, usps{,_rest}
Versions
--------
- 18.0+
Steps
-----
1. Have a combo product Foo;
2. ensure the combo items have a weight set;
3. enable & publish a shipping connector;
4. add combo product to cart;
5. go to checkout;
6. attempt to select shipping connector as delivery method.
A similar message appears when trying to add a delivery method to a backend order if the order has downpayment lines.
Issue
-----
> The estimated shipping price cannot be computed because the weight is missing for the following product(s): Foo
Cause
-----
The combo product doesn't have a weight, as it's not a discrete item, but a collection of multiple items.
The shipping connectors haven't been updated yet to account for this, and still expect every non-service product to have a weight.
Solution
--------
When looking for lines without weight, filter out products of type `combo` (similar to how `service` products are handled) using a new `_get_invalid_delivery_weight_liens` helper method, added to `sale.order.line`.
Also ignore lines where `product_qty` is zero, e.g. `display_type` lines & down payment lines.
Community PR: https://github.com/odoo/odoo/pull/221696
opw-4940973Spanish Model 349 tax reports now calculate rectification amounts using linked credit notes only, so payments no longer incorrectly reduce the reported value. This improves compliance accuracy for businesses filing Spanish tax declarations and ensures BOE exports match the required rectification rules.
Original PR description
# How to reproduce the issue With l10n_es fiscal position: - Create a bill in a previous period (e.g., amount 1000). Partially credit note this bill for 500. - Register a partial payment of 250 on…
# How to reproduce the issue With l10n_es fiscal position: - Create a bill in a previous period (e.g., amount 1000). Partially credit note this bill for 500. - Register a partial payment of 250 on this bill. - In the tax report, go to model 349. Under the Rectificationes section, the new rectified value will be 250. This is incorrect, as the rectifications in this report should only reflect the value of the original move from a past period after applying the credit note. Payments or other transactions should not impact this report. This commit adjusts the computation of the report (and the BOE export) to ensure that, instead of using `amount_residual` (which includes payments and other transactions), the report uses the sum of the credit notes linked to the move included in the rectification report. Also changed the test test_mod349_credit_note. The rectification section is supposed to show the adjusted amount after rectification. In the test a bill of 400 is fully refunded. Instead of 400, the report should show 0. (https://www.boe.es/buscar/doc.php?id=BOE-A-2010-5098 in TIPO DE REGISTRO 2: REGISTRO DE RECTIFICACIONES. in 153-165 Numérico Base Imponible Rectificada section) opw-4895636 Forward-Port-Of: odoo/enterprise#90174 Forward-Port-Of: odoo/enterprise#89431