Daily updates from Odoo
Wednesday, June 24, 2026
203 changes
23 changes
Resolved issues and error corrections
This update fixes an error that prevented users from correctly processing credit notes in Croatia using the P10 process type. The fix ensures compliance with Croatian tax authority regulations, allowing for accurate reporting of credit note corrections. This resolves a previous restriction that blocked the use of P10 for credit notes.
Original PR description
**Steps to reproduce:** * Install the Croatian e-invoicing module (**l10n_hr_edi**). * Set up a Croatian company and a Croatian customer partner (with OIB and VAT configured). * Create a customer…
**Steps to reproduce:** * Install the Croatian e-invoicing module (**l10n_hr_edi**). * Set up a Croatian company and a Croatian customer partner (with OIB and VAT configured). * Create a customer invoice and post it. * Create a credit note from that invoice via **Credit Note** button. * On the credit note, change **Business Process Type** from `P9` to `P10: Issuing a corrective invoice`. * Save the credit note. **Observed behavior:** * Saving fails with: "Business Process Type P9 can only be used with credit notes and vice versa." * The error occurs even though P10 is a valid process type for credit notes according to the Croatian tax authority specification. **Cause:** * The `_check_l10n_hr_process_type` constraint used an XOR-style boolean check: `(process_type == 'P9') == (move_type != 'out_refund')`. * This enforced an exclusive P9 ↔ out_refund mapping, making P9 the **only** allowed process type for credit notes and blocking P10 entirely. * Per the Croatian tax authority specification, P10 (corrective invoice) is explicitly valid for credit notes: full cancellations report negative quantities/amounts, and partial corrections may report either positive or negative values. **Fix:** * Replace the XOR constraint with two independent, clearly-scoped rules: - P9 may only be used on credit notes (`out_refund`). - Credit notes must use either P9 or P10. * Add P10 UBL type code mapping in `_ubl_add_credit_note_type_code_node()`: P10 credit notes now emit `CreditNoteTypeCode 384` (Corrected Invoice, UNTDID 1001) instead of falling through to the default 381. opw-6128955 - Official Croatian Information Intermediary: https://portal.moj-eracun.hr/blog/kako-stornirati-eracun/ - Croatian Tax Authority (FAQ on fiscalization and e-invoicing): https://porezna-uprava.gov.hr/UserDocsImages/Fiskalizacija/Fiskalizacija_eRacun/Pitanja%20i%20odgovori%20vezani%20uz%20Zakon%20o%20fiskalizaciji.pdf Forward-Port-Of: odoo/odoo#266288
This update fixes an issue where clicking the 'Documents' button on an employee form opened a new browser tab. The change adds a setting to open the document link directly within the existing employee form, improving user workflow and efficiency. This ensures a smoother experience for accessing employee documents.
Original PR description
Issue: ---------------------------------------- When on an employee form, clicking the "Documents" button opens a new page instead of staying on the same. Steps to reproduce: ---------------------------------------- - Install `documents_hr` - Go on an employee form - Click the "Documents" button - It opens a new page Cause: ---------------------------------------- The `'ir.actions.act_url'` opens a new page by default. Solution: ---------------------------------------- Add `'target': 'self',` to make it open the URL in the same page. opw-6284677 Forward-Port-Of: odoo/enterprise#120285
This update fixes an issue where employees created in one company within a country were incorrectly assigned rulesets from another company. The change ensures that employees are assigned the ruleset specific to their company, improving data accuracy and consistency across the system. This resolves a potential problem with overtime calculations and reporting.
Original PR description
Problem ------------------- When there are multiple companies in the same country, and a employee is created, the default ruleset that is assigned can be from the wrong company. Steps to repoduce: 1.…
Problem ------------------- When there are multiple companies in the same country, and a employee is created, the default ruleset that is assigned can be from the wrong company. Steps to repoduce: 1. Create Company A with Ruleset A 2. Create Company B with Ruleset B in the same country as Company A 3. Create an employee in Company B. The default ruleset is Ruleset A. Cause --------------------- When assigning the ruleset to the employee, rulesets for the country were searched and the first one that had a matching country was assigned to the employee, and since the companies were in the same country, the ruleset from Company A was assigned. Solution -------------------- Change the ruleset filters to search only for rulesets for the company, and use the default ruleset if none are found. task-6147409 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves a crash issue when generating tax returns for Spanish companies using the Mod 349 reporting format. The fix adjusts how report data is processed to handle a specific report structure, ensuring tax return reports open correctly. This prevents disruptions for Spanish businesses.
Original PR description
Steps to reproduce: - Install `Accounting` and `l10n_es` module - Switch to `Spain` company - Open `Tax Returns` Traceback: ```py File…
Steps to reproduce:
- Install `Accounting` and `l10n_es` module
- Switch to `Spain` company
- Open `Tax Returns`
Traceback:
```py
File "/data/build/enterprise/account_reports/models/account_return.py", line 2699, in _check_suite_common_ec_sales_list
engine_results = custom_handler._report_engine_ec_sales_report(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/build/enterprise/account_reports/models/account_sales_report.py", line 396, in _report_engine_ec_sales_report
return {next(iter(formulas_dict.values())): results}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration
```
Cause:
In the method `_check_suite_common_ec_sales_list`, `formulas_dict` is built by taking `line_ids[0].expression_ids.grouped('formula')`. This assumes the first report line always has expressions defined, which holds true for standard EC Sales List reports.
However, Mod 349 has a different report structure where the first line is a "Summary" line with no expressions, resulting in `formulas_dict` being an empty dict. When `_report_engine_ec_sales_report` then calls
`next(iter(formulas_dict.values()))` to retrieve the formula key, it raises a `StopIteration` error, causing a crash whenever a Spanish company opens the tax return report.
Solution:
Override `_check_suite_common_ec_sales_list` for Mod 349 to only run the basic checks, bypassing the engine call that caused the crash. All other return types still go through the generic suite via `super()`.
opw-6222938
sentry-7513259974This update corrects a technical issue where new version creations were inadvertently duplicating notes associated with those versions. This change ensures that each version has its own unique note, improving data accuracy and organization within the HR system. It's a small but important fix for maintaining consistent version tracking.
Original PR description
When we create a new version, we don't want to copy the note which should be version specific task-6304034 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#271379 Forward-Port-Of: odoo/odoo#270110
This update corrects a technical issue where the system incorrectly rejected zero measurement values received from caliper devices via IoT. This ensures accurate data reporting, particularly for items with no measurement, and improves the reliability of IoT-driven quality checks. It also includes a minor typo correction.
Original PR description
Fix a check on the IoT response that incorrectly rejected valid measurements of 0 from caliper devices Also fix a typo opw-6184669 Forward-Port-Of: odoo/enterprise#121226 Forward-Port-Of: odoo/enterprise#121116
This update resolves an error that prevented users from accessing task suggestions within the timesheet timer. The fix filters task suggestions to only include tasks the user currently has access to, ensuring a smoother and more reliable timesheet experience. This prevents access errors and improves usability.
Original PR description
Steps to reproduce: - 1. Log in as a user who can see their own timesheets and has already logged time on tasks that are now in projects they can no longer read (e.g. Marc Demo in the demo data). 2. Open the Timesheets timer in the systray and check in. 3. Click the task field to open the suggestions dropdown. Issue: - An access error is raised when the task dropdown is opened. Cause: - The timer's `project.task` `name_search` override suggests recently used tasks via `account.analytic.line.sudo()._get_recently_used_records()`. The sudo surfaces task ids the user can no longer read. `name_search` returns them, raising the access error. Fix: - Filter the aggregation result so only tasks the user can read are returned. task-6319815 Forward-Port-Of: odoo/enterprise#121345
This update simplifies the process of updating the Account EDI UBL Cii reporting module. Previously, the module's reliance on specific inherited view structures caused potential conflicts. This change removes that fragile inheritance, leading to a more stable and easier-to-maintain system.
Original PR description
**Description of the issue/feature this PR addresses:** As the new `xpath` is expecting a very specific type of `t-if` which is possibly changed in other templates of third parties or even Odoo itself which do not depend on this module, we take a more robust approach to identify the block **Current behavior before PR:** Issues with inherited views outside the dependency tree (because of primary=True) **Desired behavior after PR is merged:** Less friction and smoother identifier of the needed diff Info: @wt-io-it --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270605
This update resolves a stability issue in the point-of-sale tour. Previously, the tour could fail due to asynchronous order processing, leading to duplicate requests. The fix ensures the tour waits for order processing to complete, preventing these race conditions and improving the overall reliability of the test.
Original PR description
The tour could fail because `sendOrderInPreparationUpdateLastChange` is asynchronous when sending the order to the kitchen. The test was continuing to the next steps before the request was fully resolved, which could lead to sending the order again while the previous call was still in progress. This commit updates the tour to explicitly wait for the async call to complete before continuing, by adding a delay step after clicking the order button. This prevents race conditions during the test. --- Runbot Error: https://runbot.odoo.com/odoo/runbot.build.error/181846 Forward-Port-Of: odoo/enterprise#121237 Forward-Port-Of: odoo/enterprise#110909
This update resolves an issue where users without survey rights would encounter a technical error when creating interview records. The fix ensures that the system gracefully handles users without survey permissions by returning an empty list, preventing the TypeError. This ensures all users can access the interview configuration feature.
Original PR description
Steps-to-Reproduce - Install hr_recruitment_survey - Make a user with no Survey rights but Recruitment Admin. - From that user go to Recruitment > Configurations > Interview. - Trying to create…
Steps-to-Reproduce
- Install hr_recruitment_survey
- Make a user with no Survey rights but Recruitment Admin.
- From that user go to Recruitment > Configurations > Interview.
- Trying to create record will reproduce this error
```
File "/home/odoo/src/odoo/saas-19.3/addons/hr_recruitment_survey/models/
survey_survey.py", line 19, in _compute_allowed_survey_types
survey.allowed_survey_types = [*survey.allowed_survey_types, 'recruitment']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Value after * must be an iterable, not bool
```
Reason
- Because user may not have survey rights return `[]` [here](https://github.com/odoo/odoo/blob/a7f9b44aad071efe401d3caa70d069aaf7e19cc9/addons/survey/models/survey_survey.py#L400) which gets converted to false by orm [here](https://github.com/odoo/odoo/blob/3a4b2a320c1496e97eeb1834862230439da6ea2f/odoo/orm/fields_misc.py#L55-L74).
- upg : [4282172](https://upgrade.odoo.com/odoo/upgrade.request/4282172)
- opw : [6231531](https://www.odoo.com/odoo/project/70/tasks/6231531)
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-prThis update fixes an issue where AI-generated views lacked proper 'no content' messages. The change ensures that help messages are correctly formatted when views are opened by the AI agent, providing a better user experience. This improves the clarity and usability of AI-driven views.
Original PR description
Purpose: -------- Currently, when a view is opened by an AI Agent and if there are no records to show (even after filtering them manually), the no content helper is not formatted as it would be if the user opened the view manually. This happens because the tools to open the views by AI return the action dictionaries instead of letting the action service fetch them based on an action Id. However `_loadAction` in the action service only markups the "help" key when it fetches the action, not if it was passed. With this commit, the "help" key will be markuped before being processed by the action service when an action dict is returned from an AI tool. Task-6251090
This update addresses a test failure related to database constraints within the Odoo email alias functionality. A recent database update triggered a different error (RESTRICT_VIOLATION) instead of the previously reported FOREIGN_KEY_VIOLATION. The test has been updated to handle this new error type for consistent results.
Original PR description
This commit is kind of a follow up of
odoo/odoo@39cd4ea856fe00f5674f8c44b2b66cbf2705426d (in 18.0).
In a nutshell, following a standard-compliance fix (postgres/postgres@086c84b) has led to `RESTRICT_VIOLATION` being emitted in cases which formerly emitted `FOREIGN_KEY_VIOLATION`. One such case is specifically being tested for by `test_alias_domain_setup`, leading to this test failing systematically when running pg18:
psycopg2.errors.RestrictViolation: update or delete on table "mail_alias_domain" violates RESTRICT setting of foreign key constraint "mail_alias_alias_domain_id_fkey" on table "mail_alias"
DETAIL: Key (id)=(191) is referenced from table "mail_alias".
This commit updates the test to use the more generic `IntegrityError` as it's probably more than sufficient for our purposes.
Forward-Port-Of: odoo/odoo#271403
Forward-Port-Of: odoo/odoo#271302This update adds a new setting to our spreadsheet tests that allows them to bypass waiting for data to fully load. Previously, tests were slow because they had to wait for all data to be ready. Now, tests can run faster and more reliably by skipping this wait, ensuring consistent results.
Original PR description
Added the parameter `skipWaitForDataLoaded` to `createSpreadsheetWithList` to test what happens when the list is not ready yet. Task: [6289944](https://www.odoo.com/odoo/2328/tasks/6289944) 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#271144 Forward-Port-Of: odoo/odoo#269096
This update resolves an issue where tooltips in the list autofill feature were displaying error messages instead of correct information when the list data wasn't immediately available. The fix ensures that tooltips display the correct data, improving the user experience and preventing misleading information. This was part of a larger effort to improve data reliability.
Original PR description
The getter `getTooltipListFormula` would return the result of `getListHeaderValue` as the content of the tooltip, but this returned a loading error instead of a string if the list was not ready yet. Task: [6289944](https://www.odoo.com/web#id=6289944&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#121228 Forward-Port-Of: odoo/enterprise#119876
This update optimizes how Odoo processes QWeb templates, specifically addressing a performance issue related to template compilation. The change reverts a recent Markupsafe update that introduced a slower method for handling template tags, resulting in faster compilation times. This ensures Odoo applications run more efficiently.
Original PR description
Starting version 2.1.4 of markupsafe, they decided to adapt the `striptags` function to use in-python-loops instead of the original implemenation that relied on pre-compiled regex. A problem has been…
Starting version 2.1.4 of markupsafe, they decided to adapt the `striptags` function to use in-python-loops instead of the original implemenation that relied on pre-compiled regex. A problem has been spotted with qweb templates that used `striptags` with large inputs, which led to the investigation of this function and it was found that the old implementation is actually faster. In fact, the PR introducing this change in Markupsafe, made these claims with no benchmarks whatsoever: https://github.com/pallets/markupsafe/pull/413/changes The new implementation of markupsafe is O(N x M), where n is the number of tags and M being the length of the input string. The old regex approach does a single c-level scan to check the existence of the regex which is performing much better for varying input size. The benchmark cases below are in the form `<case_description>_<number_of_tags>`. We can see that in the cases where the current implementation is slightly faster is when there are no tags in the input which can be explained by the fact that the while loops will simply exit early. The time lost in the regex implementation is likely due to the deeper call stack to scan for the regex. Apart from that, in the case of an unclosed tag, the regex implementation is also slower because it still needs to scan the entire line. However, in that case the time taken is a handful of milliseconds, so it's not really a performance regression there either. Apart from that, the old implementation is consistently much more performant, for both small and large inputs. Benchmarks: | Case | Regex ms | Current ms | Speedup | |----------------------------------------------|----------|------------|---------| | plain_text_50k_words | 3.020 | 2.627 | 0.9x ← current_implementation | | unclosed_tag_then_50kb_text | 0.367 | 0.032 | 0.1x ← current_implementation | | unclosed_tag_then_500kb_text | 3.787 | 0.273 | 0.1x ← current_implementation | | multiple_unclosed_open_tags_then_50kb_text | 18.912 | 0.371 | 0.0x ← current_implementation | | multiple_unclosed_open_tags_then_500kb_text | 189.007 | 8.209 | 0.0x ← current_implementation | | unclosed_comment_then_500kb_text | 7.276 | 0.412 | 0.1x ← current_implementation | | 5k_small_tags | 0.986 | 22.096 | 22.4x ← regex_old_implementation | | 20k_small_tags | 4.125 | 492.186 | 119.3x ← regex_old_implementation | | 50k_small_tags | 12.658 | 5499.602 | 434.5x ← regex_old_implementation | | 1k_nested_divs | 0.155 | 0.923 | 5.9x ← regex_old_implementation | | 10k_nested_divs | 1.648 | 48.410 | 29.4x ← regex_old_implementation | | 2k_tags_with_attrs | 1.058 | 12.013 | 11.4x ← regex_old_implementation | | 20k_tags_with_attrs | 13.185 | 6068.755 | 460.3x ← regex_old_implementation | | 2k_multiline_tags | 0.815 | 10.819 | 13.3x ← regex_old_implementation | | 20k_multiline_tags | 8.939 | 4231.768 | 473.4x ← regex_old_implementation | | 1k_comments | 0.222 | 1.292 | 5.8x ← regex_old_implementation | | 1k_comments_hiding_tags | 0.163 | 1.121 | 6.9x ← regex_old_implementation | | 2k_mixed | 0.278 | 2.392 | 8.6x ← regex_old_implementation | | 10k_mixed | 1.400 | 50.959 | 36.4x ← regex_old_implementation | | qweb_shop_200_products | 0.907 | 7.880 | 8.7x ← regex_old_implementation | | qweb_shop_1000_products | 4.296 | 194.647 | 45.3x ← regex_old_implementation | This PR is needed because requirements.txt in Odoo specifies the following dependency: `MarkupSafe==2.1.5 ; python_version >= '3.12' \# (Noble)` This means that all versions running Ubuntu Noble, will be having the same issue introduced in version 2.1.4 of markupsafe. opw-5999688 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268580 Forward-Port-Of: odoo/odoo#257889
This update resolves a previous issue where clicking gift cards, e-wallets, or discount order lines in the ticket screen unexpectedly increased refund quantities. Now, these product types are properly restricted from quantity increments during refunds, ensuring accurate transaction handling.
Original PR description
pos*: point_of_sale, pos_loyalty, pos_discount Before this commit: =================== - Clicking an e-wallet, gift card, discount order line in the ticket screen increased the refund quantity. After this commit: ================== - Gift card, e-wallet and discount products are now restricted from refund quantity increments in the ticket screen. Task-6200888 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#271309
This update resolves an issue where bank statement lines couldn't correctly select child contacts when using the 'Set Partner' button. The fix aligns the system's selection process, allowing users to accurately associate bank statements with related contacts, including those nested within company contacts. This improves data accuracy and streamlines bank reconciliation workflows.
Original PR description
When creating a bank statement line, we can not set an individual contact that is a children of a company contact. However, when clicking on the 'Set Partner' button, all contacts are shown in the modal list view. This commit aligns the domain coming from the 'Set Partner' button with the domain from the 'partner_id' field of the auto reconcile wizard Steps: - Have a contact X, with a child contact Y - Create and confirm an invoice for contact Y, amount 1000 - Create a bank statement line for 1000 -> You can not select Y, only X - Click 'Add & Close' - Click on 'Set Partner' button -> Y is displayed opw-6205154 Forward-Port-Of: odoo/enterprise#121223 Forward-Port-Of: odoo/enterprise#118036
This update resolves a problem where Odoo couldn't correctly retrieve lot numbers from GS1 barcodes containing leading zeros (specifically '10'). The fix ensures accurate lot number identification when scanning these barcodes, preventing errors and improving inventory management. This impacts users relying on GS1 barcode scanning for stock tracking.
Original PR description
When we scan a gs1 barcode that has in his lot a special character and start with 10, odoo will not be able to retrieve it from the db. **Steps to reproduce** * In settings activate: - Lots & Serial…
When we scan a gs1 barcode that has in his lot a special character and start with 10, odoo will not be able to retrieve it from the db. **Steps to reproduce** * In settings activate: - Lots & Serial Numbers - Units of Measure & Packagings - Storage Locations - Barcode Scanner : GS1 nomenclature * Create a Product tracked by lot with - barcode: 00001234567895 * Add on hand quantity: - 100 kg in lot : 10002002303-4 - 100 kg in lot : 11002002303-4 * Go to barcode>Operation>Internal Transfer>New * Scan 02000012345678951010002002303-4#3100000100 meaning: - 02 following 14 characters are the product barcode - 10 following characters are the lot number - "#" separator - 3100: means the units are kilograms, - 00100 means 100 units. -> if you check with the edit button the lot was not found (if you click on validate it will trigger an UserError for missing lot) **Observation** When scanning the GS1 barcode it will call onBarcodeSubmitted->onBarcodeScanned where we will execute processBarcode: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/static/src/components/main.js#L387 Where we will deconstruct the barcode into his component en retrieve from the db the relevant data: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/static/src/models/barcode_model.js#L709-L717 - First the barcode is parsed, identifiers are erased and each section is separated, the variable with our lot number only has the lot number in it, the identifier (10) is not included, BarcodeObject.forBarcode(bc) -> new BarcodeObject -> parser.parse_barcode: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/static/src/barcode_object.js#L14 - Check if the data is in the cache, if not, set it to retrieve after - Retrieve missing data getMissingRecords : https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/static/src/lazy_barcode_cache.js#L349 From here we will get a call to get_specific_barcode_data for each element: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/controllers/stock_barcode.py#L176 In the case of the stock.lot since it has a symbol and it's not only digit it will skip the gs1 nomenclature domain converter (it will not become 'ilike' and stay with 'in'): https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/controllers/stock_barcode.py#L182-L197 We will do the search: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/controllers/stock_barcode.py#L205 during which we will retrieve specific query from the stock.lot module : https://github.com/odoo/odoo/blob/8d14665af5acf1bd391d05a5048dc701986e8b15/odoo/orm/models.py#L1408 Where, since it's a GS1 nomenclature, we will preprocess the agrs: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/models/stock_lot.py#L14 -> Since our barcode start with a 10, it will erase it, which lead to a miss in the search. It will also avoid further searches since we avoid multiple search on the same elements (added in missingBarcodeKeyCache in getMissingRecords). https://github.com/odoo/enterprise/blob/c6d18a7a92092ffdf96f4569a70e95bdc276441c/stock_barcode/static/src/lazy_barcode_cache.js#L294-L298 opw-6207120 Forward-Port-Of: odoo/enterprise#118828
This update resolves a problem where Point of Sale order numbers weren't correctly generated when using dynamic prefixes like the year. The fix ensures that order numbers are consistently formatted as integers, preventing errors during payment processing and improving order accuracy. This update addresses a technical issue related to sequence number generation.
Original PR description
**Steps to reproduce:** - Create a database in version 19.0 and install Point of Sale. - Create a sequence with a prefix or suffix using placeholders like %(year)s. - Assign this sequence to a POS…
**Steps to reproduce:** - Create a database in version 19.0 and install Point of Sale. - Create a sequence with a prefix or suffix using placeholders like %(year)s. - Assign this sequence to a POS configuration. - Create a new POS order and confirm payment. **Issue:** - POS order `sequence_number` must be an integer, but when using dynamic prefixes/suffixes (e.g., %(year)s), `_next()` returns values like `POS/2026/` while the configured prefix remains `%(year)s`. - Due to this mismatch, [`_update_sequence_number`](https://github.com/odoo/odoo/blob/ab6cfabf0086afced2d035eb2207a0acab655540/addons/point_of_sale/models/pos_order.py#L561) fails to correctly remove the prefix/suffix. - The root cause is that placeholders such as `%(year)s` are not interpolated before applying prefix/suffix removal logic, causing string mismatch and failure in extracting the numeric part.<img width="1920" height="959" alt="image" src="https://github.com/user-attachments/assets/d331fb7a-3c0f-4e34-a33e-6ec906be77bb" /> **Solution:** - Interpolate prefix and suffix before removing them from the generated sequence. - Convert placeholders like %(year)s into actual values (e.g., 2026). - Then apply prefix/suffix removal logic. opw-6150204 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262427
This update fixes an issue where the quantity on hand for products across multiple companies was incorrectly calculated. The change ensures accurate FIFO valuation by including all company movements in the calculation, resolving discrepancies in reported stock levels and standard prices, particularly for lot-valuated products.
Original PR description
The quantity on hand for a main company with branches is calculated to be the the sum of all its child companies + its own quantities. `_run_fifo_get_stack()` doesn't include the child companies in…
The quantity on hand for a main company with branches is calculated to be the the sum of all its child companies + its own quantities. `_run_fifo_get_stack()` doesn't include the child companies in the `moves_domain`, so it is unable to create a FIFO stack for moves from a child. This leaves extra quantity unaccounted for, which defaults to the standard_price. **Video of the bug:** https://drive.google.com/file/d/11PIfNAIb_Yyo4A-3R0CRF0NV6_HE6EwF/view **Issue:** When multiple companies are selected, the displayed quantity on hand for a product is calculated as the sum of all selected companies. However, the moves domain only looks at the main selected company instead of all selected companies, leading to an incorrectly calculated standard price when using FIFO. This is more apparent on lot-valuated products because the lot standard price is recalculated every time the field is accessed. **Reproduction steps:** - Have a main company - Create a branch company - Create a product, configure it as FIFO on both the main company and branch company - Let the product be tracked by lots and set to `Valuation by Lot` (for demonstrative purposes) - On the main company, set the product cost to $15 (for demonstrative purposes) - Go to only the branch company, make a purchase for one unit of the FIFO product at $100 (make a warehouse for delivery) , validate the receipt - Go to the lot -> When logged in to only the branch company, quantity is 1 and cost is $100 (correct). When logged in to both the main and branch company and viewing from the main company, quantity is 1 and cost is $15 (incorrect) **Fix:** Allow `_run_fifo_get_stack()` to see the moves from all companies in the environment instead of just the main company Related ticket: opw-6064126 Forward-Port-Of: odoo/odoo#270201 Forward-Port-Of: odoo/odoo#258199
This update resolves an issue where the 'select all' (Ctrl+A) function in the website builder incorrectly included non-editable text. The fix ensures that the selection is limited to editable content, specifically elements with the `contenteditable` attribute, improving the user experience and preventing unwanted text inclusion.
Original PR description
*: website Commit d09c8fd428315b8c3bf08c43d55da50fcd77f2ae added a handler for `ctrl+a` to restrict the selection inside the closest `div`. But if the `div` element is outside `contenteditable=true`, it would select non-editable nodes. This commit sets the selection on the closest `[contenteditable=true]` instead of the closest `div` if the latter is not editable. Steps to reproduce: - Open website builder on a product page - Place the cursor in the price of the product - Press `ctrl+a` - Bug: the selection contains the `$` which is not editable task-6324409
This update fixes a minor accessibility issue by adding an aria-label to the quantity input field on the cart page. This ensures that users with screen readers can correctly identify and interact with the field, improving the overall user experience and compliance with accessibility standards. It's a simple change that enhances usability for all users.
Original PR description
In [1], the `aria-label` was not added to the quantity input field. This commit adds an `aria-label` to the quantity input field on the cart page to improve accessibility. [1]:https://github.com/odoo/odoo/commit/8f6c27b9b2d553a0b539ecd382bed80973621b6d | wih aria-label | without aria-label | | ------------- | ------------- | | <img width="674" height="432" alt="image" src="https://github.com/user-attachments/assets/962057fd-7272-4242-8a5d-dd1d66bc1096" /> | <img width="1293" height="229" alt="image" src="https://github.com/user-attachments/assets/836e272e-f505-4284-9a5c-02ab662f6061" /> | | <img width="1181" height="86" alt="image" src="https://github.com/user-attachments/assets/0e64d231-0c88-4cca-b333-7e602aedff18" /> |<img width="976" height="114" alt="image" src="https://github.com/user-attachments/assets/ae403367-cd3b-4c81-afe9-9eb452f66073" />| --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where product searches weren't working correctly when using the autocomplete feature. The fix bypasses a search optimization that prevented finding products based on barcode when the name search failed. This ensures users can consistently find products using either name or barcode.
Original PR description
Steps: - Create a product with a barcode "12345" - Create a sale order - Add a product - search product with name "12345" without copy/pasting - no result - try with copy/pasting - 1 result The problem is due to the fact that there is an optimization in Many2XAutocomplete.search which means that if no results are found for “1234,” it will not search for “12345.” However, product override name_search to returns a product only when the name is exactly equal to its barcode (`=` and not `ilike`), which does not work at all with search optimization. Since: https://github.com/odoo/odoo/pull/228035 opw-5908011 Forward-Port-Of: odoo/odoo#248583 Forward-Port-Of: odoo/odoo#247978
20 changes
Resolved issues and error corrections
This update resolves an issue where bank statement lines couldn't correctly select child contacts when using the 'Set Partner' button. The change aligns the system's selection process, allowing users to properly associate bank statements with related company contacts, including those with dependent contacts. This improves data accuracy and simplifies reconciliation workflows.
Original PR description
When creating a bank statement line, we can not set an individual contact that is a children of a company contact. However, when clicking on the 'Set Partner' button, all contacts are shown in the modal list view. This commit aligns the domain coming from the 'Set Partner' button with the domain from the 'partner_id' field of the auto reconcile wizard Steps: - Have a contact X, with a child contact Y - Create and confirm an invoice for contact Y, amount 1000 - Create a bank statement line for 1000 -> You can not select Y, only X - Click 'Add & Close' - Click on 'Set Partner' button -> Y is displayed opw-6205154 Forward-Port-Of: odoo/enterprise#121223 Forward-Port-Of: odoo/enterprise#118036
This update enhances the automated helpdesk system by adding tests for reminder emails and correcting a calculation error related to the reminder timer. This ensures timely and accurate automated reminders are sent to users, improving the overall efficiency of ticket resolution.
Original PR description
- add tests for the auto reminder email before auto-closing tickets - fix issue with the reminder timer calculation --- task-5438678 Forward-Port-Of: odoo/enterprise#120540
This update resolves an issue preventing users from correctly processing credit notes in Croatia using the P10 process type. The fix adjusts internal rules to align with Croatian tax authority specifications, now permitting P10 for credit notes while maintaining the previous restriction. This ensures accurate e-invoicing compliance.
Original PR description
**Steps to reproduce:** * Install the Croatian e-invoicing module (**l10n_hr_edi**). * Set up a Croatian company and a Croatian customer partner (with OIB and VAT configured). * Create a customer…
**Steps to reproduce:** * Install the Croatian e-invoicing module (**l10n_hr_edi**). * Set up a Croatian company and a Croatian customer partner (with OIB and VAT configured). * Create a customer invoice and post it. * Create a credit note from that invoice via **Credit Note** button. * On the credit note, change **Business Process Type** from `P9` to `P10: Issuing a corrective invoice`. * Save the credit note. **Observed behavior:** * Saving fails with: "Business Process Type P9 can only be used with credit notes and vice versa." * The error occurs even though P10 is a valid process type for credit notes according to the Croatian tax authority specification. **Cause:** * The `_check_l10n_hr_process_type` constraint used an XOR-style boolean check: `(process_type == 'P9') == (move_type != 'out_refund')`. * This enforced an exclusive P9 ↔ out_refund mapping, making P9 the **only** allowed process type for credit notes and blocking P10 entirely. * Per the Croatian tax authority specification, P10 (corrective invoice) is explicitly valid for credit notes: full cancellations report negative quantities/amounts, and partial corrections may report either positive or negative values. **Fix:** * Replace the XOR constraint with two independent, clearly-scoped rules: - P9 may only be used on credit notes (`out_refund`). - Credit notes must use either P9 or P10. * Add P10 UBL type code mapping in `_ubl_add_credit_note_type_code_node()`: P10 credit notes now emit `CreditNoteTypeCode 384` (Corrected Invoice, UNTDID 1001) instead of falling through to the default 381. opw-6128955 - Official Croatian Information Intermediary: https://portal.moj-eracun.hr/blog/kako-stornirati-eracun/ - Croatian Tax Authority (FAQ on fiscalization and e-invoicing): https://porezna-uprava.gov.hr/UserDocsImages/Fiskalizacija/Fiskalizacija_eRacun/Pitanja%20i%20odgovori%20vezani%20uz%20Zakon%20o%20fiskalizaciji.pdf Forward-Port-Of: odoo/odoo#266288
This pull request updates the core spreadsheet component (o_spreadsheet) with several bug fixes and improvements. These changes address issues related to viewport behavior, formula calculations, and table rendering, ensuring a smoother and more reliable spreadsheet experience for users. The update also includes enhancements to the underlying Node.js environment.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/f29ad892a2 [REL] 19.2.17 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0)…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/f29ad892a2 [REL] 19.2.17 [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/5f301282cd [FIX] viewport: fix viewport jump with frozen pane [Task: 6292764](https://www.odoo.com/odoo/2328/tasks/6292764) https://github.com/odoo/o-spreadsheet/commit/55308a5492 [FIX] composer_tokenizer: fix argument separator in formulas [Task: 6303210](https://www.odoo.com/odoo/2328/tasks/6303210) https://github.com/odoo/o-spreadsheet/commit/683ed8df8b [FIX] Find and replace : selection after an UPDATE_CELL [Task: 4818132](https://www.odoo.com/odoo/2328/tasks/4818132) https://github.com/odoo/o-spreadsheet/commit/5c1c720879 [FIX] rolldown: Fix cjs file extension [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/ec12e30dfd [IMP] node: add script to run the model in node [Task: 6088515](https://www.odoo.com/odoo/2328/tasks/6088515) https://github.com/odoo/o-spreadsheet/commit/95c32d163e [FIX] package.json: Update Node.js and npm engine requirements [Task: 0](https://www.odoo.com/odoo/2328/tasks/0) https://github.com/odoo/o-spreadsheet/commit/85381e6ae8 [FIX] carousel: custom color don't use carousels [Task: 6263128](https://www.odoo.com/odoo/2328/tasks/6263128) https://github.com/odoo/o-spreadsheet/commit/20bfea982c [FIX] table: correctly insert table on static pivots [Task: 6204984](https://www.odoo.com/odoo/2328/tasks/6204984) Co-authored-by: Florian Damhaut (flda) <flda@odoo.com> 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: Adrien Minne (adrm) <adrm@odoo.com> Co-authored-by: Ronak Mukeshbhai Bharadiya (rmbh) <rmbh@odoo.com> Co-authored-by: Dhrutik Patel (dhrp) <dhrp@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> Co-authored-by: Marceline Thomas (matho) <matho@odoo.com>
This update fixes an issue where clicking the 'Documents' button on an employee form opened a new browser tab. The change adds a setting to open the document link directly within the employee form, improving user experience and efficiency. This ensures users can quickly access employee documents without navigating away from the main form.
Original PR description
Issue: ---------------------------------------- When on an employee form, clicking the "Documents" button opens a new page instead of staying on the same. Steps to reproduce: ---------------------------------------- - Install `documents_hr` - Go on an employee form - Click the "Documents" button - It opens a new page Cause: ---------------------------------------- The `'ir.actions.act_url'` opens a new page by default. Solution: ---------------------------------------- Add `'target': 'self',` to make it open the URL in the same page. opw-6284677 Forward-Port-Of: odoo/enterprise#120285
This update fixes a previous issue where commission calculations were incorrectly applying to employees on long-term sick leave. The change ensures that employees on partial incapacity or long-term sickness are not subject to commission deductions, aligning with proper accounting and payroll regulations. This ensures accurate commission payments for employees in extended periods of absence.
Original PR description
Partial incapacity and long term sickness are not elligible to loss on commissions.
This update ensures that partner data created in the POS system is automatically synchronized with the latest information from the DIAN government service after a refresh. Previously, changes weren't reflected immediately, requiring manual updates. This fix guarantees accurate and up-to-date partner details for improved business operations.
Original PR description
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh…
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh icon` is visible: click on it. Observation: - the dialog is closed and partner is selected with "temp" name Expected: - with valid government credentials and a valid identification number, the refresh action should also update the partner data on the POS side Cause: - the refresh button triggers the `button_l10n_co_dian_refresh_data` action, which fetches the legal name and email from the government service - although the backend record is correctly updated, the new values are not immediately synchronized with the POS - when the refresh button is clicked, editPartner() first triggers `web_save` using the temporary "temp" name and immediately reads the partner data afterward - the refresh action executes later and updates the contact with the fetched legal information, but the POS is not aware of these subsequent changes Fix: - read the data again if there is any update caused by this action. - this is done by overriding `afterExecuteActionButton` of FormController class opw-6198035 Forward-Port-Of: odoo/enterprise#117527
This update simplifies the process of updating the Account EDI UBL Cii reporting module. Previously, the module's configuration could easily clash with other parts of Odoo, causing issues. This change removes a fragile setup, making updates smoother and more reliable.
Original PR description
**Description of the issue/feature this PR addresses:** As the new `xpath` is expecting a very specific type of `t-if` which is possibly changed in other templates of third parties or even Odoo itself which do not depend on this module, we take a more robust approach to identify the block **Current behavior before PR:** Issues with inherited views outside the dependency tree (because of primary=True) **Desired behavior after PR is merged:** Less friction and smoother identifier of the needed diff Info: @wt-io-it --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270605
This update resolves a stability issue in the point-of-sale tour. Previously, the tour could fail due to asynchronous order processing, leading to duplicate requests. The fix ensures the tour waits for order updates to complete, preventing these race conditions and improving the overall test reliability.
Original PR description
The tour could fail because `sendOrderInPreparationUpdateLastChange` is asynchronous when sending the order to the kitchen. The test was continuing to the next steps before the request was fully resolved, which could lead to sending the order again while the previous call was still in progress. This commit updates the tour to explicitly wait for the async call to complete before continuing, by adding a delay step after clicking the order button. This prevents race conditions during the test. --- Runbot Error: https://runbot.odoo.com/odoo/runbot.build.error/181846 Forward-Port-Of: odoo/enterprise#121237 Forward-Port-Of: odoo/enterprise#110909
This update addresses a test failure related to database constraints within the Odoo email alias functionality. A recent database update triggered a different error type (RESTRICT_VIOLATION) instead of the previously reported FOREIGN_KEY_VIOLATION. The test has been updated to handle this new error, ensuring consistent test results with PostgreSQL 18.
Original PR description
This commit is kind of a follow up of
odoo/odoo@39cd4ea856fe00f5674f8c44b2b66cbf2705426d (in 18.0).
In a nutshell, following a standard-compliance fix (postgres/postgres@086c84b) has led to `RESTRICT_VIOLATION` being emitted in cases which formerly emitted `FOREIGN_KEY_VIOLATION`. One such case is specifically being tested for by `test_alias_domain_setup`, leading to this test failing systematically when running pg18:
psycopg2.errors.RestrictViolation: update or delete on table "mail_alias_domain" violates RESTRICT setting of foreign key constraint "mail_alias_alias_domain_id_fkey" on table "mail_alias"
DETAIL: Key (id)=(191) is referenced from table "mail_alias".
This commit updates the test to use the more generic `IntegrityError` as it's probably more than sufficient for our purposes.
Forward-Port-Of: odoo/odoo#271403
Forward-Port-Of: odoo/odoo#271302This update resolves an issue where E-Way Bill amounts were incorrectly calculated when sales prices included tax. The fix ensures that tax is handled accurately, displaying the correct taxable and total amounts in the generated E-Way Bills. This ensures compliance with Indian tax regulations.
Original PR description
`*` = `ewaybill_Stock, sale_stock, purchase_stock` **Steps to reproduce:** * Install `l10n_in_ewabill_stock` and `l10n_in_sale_Stock`. * Set the Default Tax Price Setting to "Tax Included". * Create…
`*` = `ewaybill_Stock, sale_stock, purchase_stock` **Steps to reproduce:** * Install `l10n_in_ewabill_stock` and `l10n_in_sale_Stock`. * Set the Default Tax Price Setting to "Tax Included". * Create a Sales Order (e.g. unit price 300, qty 600, 18% GST) and confirm the Delivery Challan/Delivery Order. * Generate an E-Way Bill from the Delivery Challan. **Observed behavior:** * The Taxable Amount and Total Invoice Amount are displayed incorrectly in the generated E-Way Bill, including both the printed document and the JSON. * The `ewaybill_price_unit` shows the tax-excluded price (e.g. 254.24) instead of the original tax-included price (300), leading to a double tax exclusion when `compute_all` processes it. **Cause:** * `_l10n_in_get_product_price_unit` in both `l10n_in_sale_stock` and `l10n_in_purchase_stock` unconditionally used `price_subtotal / qty` to compute the E-Way Bill price unit. `price_subtotal` is always tax-excluded, so for tax-included prices, the tax was already stripped. * `_l10n_in_tax_details_by_stock_move` then passed this already tax-excluded price to `compute_all` with taxes that have `price_include=True`, causing `compute_all` to strip the tax a second time (e.g. 254.24 / 1.18 = 215.46 instead of the correct 254.24). **Fix:** * Check whether any of the line's taxes have `price_include` set. If so, use `price_total / qty` (which preserves the tax-included price) so that `compute_all` can correctly extract the tax. Otherwise, continue using `price_subtotal / qty` as before. opw-6273101 Forward-Port-Of: odoo/odoo#271492 Forward-Port-Of: odoo/odoo#268504
This update optimizes how Odoo processes QWeb templates, specifically when handling large amounts of text. The change reverts a recent Markupsafe update that introduced a slower processing method. The result is a faster and more efficient compilation of templates, improving overall Odoo performance.
Original PR description
Starting version 2.1.4 of markupsafe, they decided to adapt the `striptags` function to use in-python-loops instead of the original implemenation that relied on pre-compiled regex. A problem has been…
Starting version 2.1.4 of markupsafe, they decided to adapt the `striptags` function to use in-python-loops instead of the original implemenation that relied on pre-compiled regex. A problem has been spotted with qweb templates that used `striptags` with large inputs, which led to the investigation of this function and it was found that the old implementation is actually faster. In fact, the PR introducing this change in Markupsafe, made these claims with no benchmarks whatsoever: https://github.com/pallets/markupsafe/pull/413/changes The new implementation of markupsafe is O(N x M), where n is the number of tags and M being the length of the input string. The old regex approach does a single c-level scan to check the existence of the regex which is performing much better for varying input size. The benchmark cases below are in the form `<case_description>_<number_of_tags>`. We can see that in the cases where the current implementation is slightly faster is when there are no tags in the input which can be explained by the fact that the while loops will simply exit early. The time lost in the regex implementation is likely due to the deeper call stack to scan for the regex. Apart from that, in the case of an unclosed tag, the regex implementation is also slower because it still needs to scan the entire line. However, in that case the time taken is a handful of milliseconds, so it's not really a performance regression there either. Apart from that, the old implementation is consistently much more performant, for both small and large inputs. Benchmarks: | Case | Regex ms | Current ms | Speedup | |----------------------------------------------|----------|------------|---------| | plain_text_50k_words | 3.020 | 2.627 | 0.9x ← current_implementation | | unclosed_tag_then_50kb_text | 0.367 | 0.032 | 0.1x ← current_implementation | | unclosed_tag_then_500kb_text | 3.787 | 0.273 | 0.1x ← current_implementation | | multiple_unclosed_open_tags_then_50kb_text | 18.912 | 0.371 | 0.0x ← current_implementation | | multiple_unclosed_open_tags_then_500kb_text | 189.007 | 8.209 | 0.0x ← current_implementation | | unclosed_comment_then_500kb_text | 7.276 | 0.412 | 0.1x ← current_implementation | | 5k_small_tags | 0.986 | 22.096 | 22.4x ← regex_old_implementation | | 20k_small_tags | 4.125 | 492.186 | 119.3x ← regex_old_implementation | | 50k_small_tags | 12.658 | 5499.602 | 434.5x ← regex_old_implementation | | 1k_nested_divs | 0.155 | 0.923 | 5.9x ← regex_old_implementation | | 10k_nested_divs | 1.648 | 48.410 | 29.4x ← regex_old_implementation | | 2k_tags_with_attrs | 1.058 | 12.013 | 11.4x ← regex_old_implementation | | 20k_tags_with_attrs | 13.185 | 6068.755 | 460.3x ← regex_old_implementation | | 2k_multiline_tags | 0.815 | 10.819 | 13.3x ← regex_old_implementation | | 20k_multiline_tags | 8.939 | 4231.768 | 473.4x ← regex_old_implementation | | 1k_comments | 0.222 | 1.292 | 5.8x ← regex_old_implementation | | 1k_comments_hiding_tags | 0.163 | 1.121 | 6.9x ← regex_old_implementation | | 2k_mixed | 0.278 | 2.392 | 8.6x ← regex_old_implementation | | 10k_mixed | 1.400 | 50.959 | 36.4x ← regex_old_implementation | | qweb_shop_200_products | 0.907 | 7.880 | 8.7x ← regex_old_implementation | | qweb_shop_1000_products | 4.296 | 194.647 | 45.3x ← regex_old_implementation | This PR is needed because requirements.txt in Odoo specifies the following dependency: `MarkupSafe==2.1.5 ; python_version >= '3.12' \# (Noble)` This means that all versions running Ubuntu Noble, will be having the same issue introduced in version 2.1.4 of markupsafe. opw-5999688 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268580 Forward-Port-Of: odoo/odoo#257889
This update resolves an issue where Odoo couldn't correctly retrieve lot numbers from GS1 barcodes containing leading zeros (like '10'). The fix ensures accurate lot number identification when scanning these barcodes, preventing errors and improving inventory management. It corrects a parsing problem within the barcode scanning process.
Original PR description
When we scan a gs1 barcode that has in his lot a special character and start with 10, odoo will not be able to retrieve it from the db. **Steps to reproduce** * In settings activate: - Lots & Serial…
When we scan a gs1 barcode that has in his lot a special character and start with 10, odoo will not be able to retrieve it from the db. **Steps to reproduce** * In settings activate: - Lots & Serial Numbers - Units of Measure & Packagings - Storage Locations - Barcode Scanner : GS1 nomenclature * Create a Product tracked by lot with - barcode: 00001234567895 * Add on hand quantity: - 100 kg in lot : 10002002303-4 - 100 kg in lot : 11002002303-4 * Go to barcode>Operation>Internal Transfer>New * Scan 02000012345678951010002002303-4#3100000100 meaning: - 02 following 14 characters are the product barcode - 10 following characters are the lot number - "#" separator - 3100: means the units are kilograms, - 00100 means 100 units. -> if you check with the edit button the lot was not found (if you click on validate it will trigger an UserError for missing lot) **Observation** When scanning the GS1 barcode it will call onBarcodeSubmitted->onBarcodeScanned where we will execute processBarcode: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/static/src/components/main.js#L387 Where we will deconstruct the barcode into his component en retrieve from the db the relevant data: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/static/src/models/barcode_model.js#L709-L717 - First the barcode is parsed, identifiers are erased and each section is separated, the variable with our lot number only has the lot number in it, the identifier (10) is not included, BarcodeObject.forBarcode(bc) -> new BarcodeObject -> parser.parse_barcode: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/static/src/barcode_object.js#L14 - Check if the data is in the cache, if not, set it to retrieve after - Retrieve missing data getMissingRecords : https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/static/src/lazy_barcode_cache.js#L349 From here we will get a call to get_specific_barcode_data for each element: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/controllers/stock_barcode.py#L176 In the case of the stock.lot since it has a symbol and it's not only digit it will skip the gs1 nomenclature domain converter (it will not become 'ilike' and stay with 'in'): https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/controllers/stock_barcode.py#L182-L197 We will do the search: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/controllers/stock_barcode.py#L205 during which we will retrieve specific query from the stock.lot module : https://github.com/odoo/odoo/blob/8d14665af5acf1bd391d05a5048dc701986e8b15/odoo/orm/models.py#L1408 Where, since it's a GS1 nomenclature, we will preprocess the agrs: https://github.com/odoo/enterprise/blob/8030b105d3fce1eef9b8965a2bfc37195f71723c/stock_barcode/models/stock_lot.py#L14 -> Since our barcode start with a 10, it will erase it, which lead to a miss in the search. It will also avoid further searches since we avoid multiple search on the same elements (added in missingBarcodeKeyCache in getMissingRecords). https://github.com/odoo/enterprise/blob/c6d18a7a92092ffdf96f4569a70e95bdc276441c/stock_barcode/static/src/lazy_barcode_cache.js#L294-L298 opw-6207120 Forward-Port-Of: odoo/enterprise#118828
This update resolves a problem where Point of Sale order sequences generated with dynamic prefixes (like years) weren't correctly formatted. The fix ensures that sequence numbers are properly generated and updated, preventing errors in order creation and payment processing. This improves the reliability of the POS system.
Original PR description
**Steps to reproduce:** - Create a database in version 19.0 and install Point of Sale. - Create a sequence with a prefix or suffix using placeholders like %(year)s. - Assign this sequence to a POS…
**Steps to reproduce:** - Create a database in version 19.0 and install Point of Sale. - Create a sequence with a prefix or suffix using placeholders like %(year)s. - Assign this sequence to a POS configuration. - Create a new POS order and confirm payment. **Issue:** - POS order `sequence_number` must be an integer, but when using dynamic prefixes/suffixes (e.g., %(year)s), `_next()` returns values like `POS/2026/` while the configured prefix remains `%(year)s`. - Due to this mismatch, [`_update_sequence_number`](https://github.com/odoo/odoo/blob/ab6cfabf0086afced2d035eb2207a0acab655540/addons/point_of_sale/models/pos_order.py#L561) fails to correctly remove the prefix/suffix. - The root cause is that placeholders such as `%(year)s` are not interpolated before applying prefix/suffix removal logic, causing string mismatch and failure in extracting the numeric part.<img width="1920" height="959" alt="image" src="https://github.com/user-attachments/assets/d331fb7a-3c0f-4e34-a33e-6ec906be77bb" /> **Solution:** - Interpolate prefix and suffix before removing them from the generated sequence. - Convert placeholders like %(year)s into actual values (e.g., 2026). - Then apply prefix/suffix removal logic. opw-6150204 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262427
This update clarifies Redsys payment errors by mapping their technical codes to understandable messages. Previously, errors were difficult to diagnose, making it hard to resolve payment issues and provide accurate information to customers. This change improves the reliability and transparency of Redsys payments within Odoo.
Original PR description
Raw Redsys response codes were not human-readable, making it hard to diagnose failed transactions or provide meaningful feedback. See: https://pagosonline.redsys.es/desarrolladores-inicio/integrate-con-nosotros/parametros-de-entrada-y-salida/#tablepress-11_wrapper --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269968
This update resolves an issue where delivery dates on sales orders weren't correctly applied to manufacturing orders, leading to scheduling conflicts. The fix ensures that delivery dates are consistently propagated to finished moves, preventing mismatched deadlines and enabling accurate production planning. This improves the reliability of the manufacturing process.
Original PR description
Steps to reproduce: - Create a storable product with a BoM, routes MTO + Manufacturing, costing method FIFO + Perpetual (at invoicing) - Confirm a sale order for 1 unit → a manufacturing order is…
Steps to reproduce: - Create a storable product with a BoM, routes MTO + Manufacturing, costing method FIFO + Perpetual (at invoicing) - Confirm a sale order for 1 unit → a manufacturing order is created - Set a Delivery Date on the SO (Other Info tab) - Increase the SO line qty to 2 - Validate the MO → traceback on finished_move.ensure_one() Problem: When a delivery date is set on the SO, it propagates to the MO's finished move via date_deadline. However, `production.date_deadline\ was not updated (guarded by `if not production.date_deadline`) because the MO already had a deadline set at planning time: https://github.com/odoo/odoo/blob/19.0/addons/mrp/models/mrp_production.py#L476 When the SO qty then increases, change_production_qty copies the finished move to create a delta move. That delta move receives production.date_deadline (the stale planning date) instead of the delivery date, so the two finished moves end up with different deadlines and cannot be merged: https://github.com/odoo/odoo/blob/19.0/addons/mrp/wizard/change_production_qty.py#L43 Solution - always update production.date_deadline from its finished moves - link the new delivery move to the finished move after the qty wizard runs so it gets reserved after MO validation opw-6273076 Forward-Port-Of: odoo/odoo#269405
This update resolves an issue where product searches weren't working correctly when using the autocomplete feature. The fix bypasses a search optimization that prevented finding products based on barcode when the name didn't exactly match. This ensures accurate product results are displayed when searching by barcode or name.
Original PR description
Steps: - Create a product with a barcode "12345" - Create a sale order - Add a product - search product with name "12345" without copy/pasting - no result - try with copy/pasting - 1 result The problem is due to the fact that there is an optimization in Many2XAutocomplete.search which means that if no results are found for “1234,” it will not search for “12345.” However, product override name_search to returns a product only when the name is exactly equal to its barcode (`=` and not `ilike`), which does not work at all with search optimization. Since: https://github.com/odoo/odoo/pull/228035 opw-5908011 Forward-Port-Of: odoo/odoo#248583 Forward-Port-Of: odoo/odoo#247978
This update resolves a bug that prevented users from sorting tasks by their planned dates. The fix adds a necessary configuration to correctly retrieve sort order information, ensuring accurate task sorting within the project portal. This improves the user experience for managing tasks.
Original PR description
Currently, an error occurs when a user sorts tasks by Planned Date. **Steps to reproduce:** - Install the `project_enterprise` module with demo data. - Go to Projects in the portal (`/my/projects`),…
Currently, an error occurs when a user sorts tasks by Planned Date. **Steps to reproduce:** - Install the `project_enterprise` module with demo data. - Go to Projects in the portal (`/my/projects`), open any `project`, and sort the tasks by `Planned Date`. KeyError: 'order' After a [recent change], the sort order is retrieved from searchbar sortings. When sorting by Planned Date, it attempts to access the order key from the corresponding sorting configuration [1]. However, the planned_date_begin entry does not define an order key [2], which raises error when it tries to access order. This commit ensures that the order key is added with its value for planned_date_begin in searchbar sorting. [recent change]: https://github.com/odoo/odoo/commit/8be5dacf9fbfe8c23b04c876994bea2ce7cbb89a [1]: https://github.com/odoo/odoo/blob/2ae9b57b86cd0bc4816ff8ec207564631baa8ad6/addons/project/controllers/portal.py#L424 [2]- https://github.com/odoo/enterprise/blob/9dd3a9b2c09a6d23a3f71d3e531edd6d78b30277/project_enterprise/controllers/portal.py#L8-L11 sentry-7556050938 Forward-Port-Of: odoo/enterprise#121141
This update resolves a problem where emojis, such as firefighter emojis, were being displayed incorrectly due to how they were encoded. The fix backports a more robust regex pattern from a previous version of Odoo to correctly handle these variations in emoji formatting, ensuring consistent display.
Original PR description
Bug === Some emoji like `👨🚒` are separated, because they are built using `👨 + Emoji_Modifier + 🚒` (`\uFE0F` can also be used to get the variant of the emoji). Adapt the regex to take into account those Unicode variations. Task-5491124 Forward-Port-Of: odoo/odoo#271373 Forward-Port-Of: odoo/odoo#269719
This change resolves an issue where the 'Add Property' button disappeared after navigating between worksheet templates. The fix ensures the button remains visible and functional after using the navigation controls, improving usability for users working with complex data structures. The underlying problem was a misconfiguration of edit mode state during record navigation.
Original PR description
Steps to reproduce: ------------------------------------------------- 1. Install `planning_field_service_worksheet` module with demo data 2. Go to Worksheet Templates 3. Open First Worksheet >…
Steps to reproduce:
-------------------------------------------------
1. Install `planning_field_service_worksheet` module with demo data
2. Go to Worksheet Templates
3. Open First Worksheet > Observe `+ Add Property` button at bottom
4. From the Navigation button, move to the next Worksheet Template
5. Come back to First Template using the same navigation button
Observation:
-------------------------------------------------
The '+ Add Property' button and property edit buttons disappear after navigating away from and back to the first worksheet template.
Issue:
-------------------------------------------------
`PropertiesDefinitionField.setup()` sets
`this.state.isInEditMode = this.definitionRecordId` only once during component initialization.
https://github.com/odoo/odoo/blob/8cf75467969eb423b8e50e8be45ebf5f60f1cc43/addons/web/static/src/views/fields/properties/properties_definition_field.js#L9-L12
When the user navigates via the pager, `FormController.onWillLoadRoot` resets `propertiesState.editable` to `false` and fires a `PROPERTY_FIELD:EDIT` bus event with `{ editable: false }`, which calls `setEditMode(false)` https://github.com/odoo/odoo/blob/8cf75467969eb423b8e50e8be45ebf5f60f1cc43/addons/web/static/src/views/form/form_controller.js#L407
After the new record loads, the parent's `useEffect` (which watches the definition record field) should restore edit mode, but it short-circuits when both `isInEditMode` and `editMode` are `false`
https://github.com/odoo/odoo/blob/8cf75467969eb423b8e50e8be45ebf5f60f1cc43/addons/web/static/src/views/fields/properties/properties_field.js#L115-L117
Since `setup()` doesn't re-run on record navigation and nothing else restores `isInEditMode`, it stays `false` permanently. This hides the parent template's 'Add Property' button
https://github.com/odoo/odoo/blob/8cf75467969eb423b8e50e8be45ebf5f60f1cc43/addons/web/static/src/views/fields/properties/properties_field.xml#L86-L90
Solution:
-------------------------------------------------
* Replace the one-time assignment in `setup()` with a `useRecordObserver` that sets `this.state.isInEditMode` whenever the record changes. This hook fires both on initial setup (via `onWillStart`) and on every record change (via `onWillUpdateProps`) ensuring `isInEditMode` is correctly restored after pager navigation
* Using `record.data.id` rather than `true` preserves the existing behavior of disabling edit mode for unsaved records (where `id` is `false/falsy`)
opw-626436122 changes
Resolved issues and error corrections
This update fixes an error that prevented users from correctly processing credit notes with the 'P10' business process type in the Croatian e-invoicing module. The fix ensures compliance with Croatian tax authority regulations, allowing for accurate reporting of credit note corrections. This update resolves a restriction that was preventing the correct generation of e-invoices.
Original PR description
**Steps to reproduce:** * Install the Croatian e-invoicing module (**l10n_hr_edi**). * Set up a Croatian company and a Croatian customer partner (with OIB and VAT configured). * Create a customer…
**Steps to reproduce:** * Install the Croatian e-invoicing module (**l10n_hr_edi**). * Set up a Croatian company and a Croatian customer partner (with OIB and VAT configured). * Create a customer invoice and post it. * Create a credit note from that invoice via **Credit Note** button. * On the credit note, change **Business Process Type** from `P9` to `P10: Issuing a corrective invoice`. * Save the credit note. **Observed behavior:** * Saving fails with: "Business Process Type P9 can only be used with credit notes and vice versa." * The error occurs even though P10 is a valid process type for credit notes according to the Croatian tax authority specification. **Cause:** * The `_check_l10n_hr_process_type` constraint used an XOR-style boolean check: `(process_type == 'P9') == (move_type != 'out_refund')`. * This enforced an exclusive P9 ↔ out_refund mapping, making P9 the **only** allowed process type for credit notes and blocking P10 entirely. * Per the Croatian tax authority specification, P10 (corrective invoice) is explicitly valid for credit notes: full cancellations report negative quantities/amounts, and partial corrections may report either positive or negative values. **Fix:** * Replace the XOR constraint with two independent, clearly-scoped rules: - P9 may only be used on credit notes (`out_refund`). - Credit notes must use either P9 or P10. * Add P10 UBL type code mapping in `_ubl_add_credit_note_type_code_node()`: P10 credit notes now emit `CreditNoteTypeCode 384` (Corrected Invoice, UNTDID 1001) instead of falling through to the default 381. opw-6128955 - Official Croatian Information Intermediary: https://portal.moj-eracun.hr/blog/kako-stornirati-eracun/ - Croatian Tax Authority (FAQ on fiscalization and e-invoicing): https://porezna-uprava.gov.hr/UserDocsImages/Fiskalizacija/Fiskalizacija_eRacun/Pitanja%20i%20odgovori%20vezani%20uz%20Zakon%20o%20fiskalizaciji.pdf Forward-Port-Of: odoo/odoo#266288
This update significantly speeds up the calculation of future timesheets based on public holidays. The previous process was slow and inefficient, especially with many holidays set for the future. This change optimizes the calculation process, resulting in faster timesheet generation and improved system performance.
Original PR description
**Problem:** When creating a new employee, the future timesheets due to public holidays are computed. If the number of public holidays is large (i.e. if the user creates them for each year, several…
**Problem:** When creating a new employee, the future timesheets due to public holidays are computed. If the number of public holidays is large (i.e. if the user creates them for each year, several years in the future), then it takes excessively long and the action may not complete. **Cause:** The pytz method `localize` and comparing times with non-static timezones is done repeatedly and unnecessarily which becomes costly with more records. **Solution:** Only localize the time when absolutely necessary (determining the date of the leave in the calendar timezone). **Performance Stats:** |Record count|Time before|Queries before|Time after|Queries after| |------------|-----------|--------------|----------|-------------| |100 |3.1s |393 |0.8s |117 | |1,000 |22.3s |2,090 |1.5s |183 | |10,000 |Timeout |N/A |6.7s |541 | opw-6087422 Forward-Port-Of: odoo/odoo#269876 Forward-Port-Of: odoo/odoo#263953
This update fixes an issue where scanning an unknown barcode in the POS system didn't automatically open the product creation form. The fix removes a redundant check for API keys, ensuring the form opens correctly regardless of whether a barcode lookup key is configured. This improves the user experience by streamlining product creation through barcode scanning.
Original PR description
When scanning an unknown barcode in POS, the product creation form was never opened because `barcode_lookup()` was called with no barcode as an implicit API key check. Commit 0c8019a4aa7 ([FIX] product_barcodelookup: avoid crash on invalid image URLs) standardized `barcode_lookup_request()` to always
return a `requests.Response` object, removing the `{'authenticated': True}` dict it previously returned for HTTP 404 responses. As a result the JS check `response?.authenticated` was always falsy and the form never opened.
Fix: remove the API key check entirely. `allowProductCreation()` already gates on the user having product create rights, which is the only condition that matters. If a Barcode Lookup API key is configured the `_onchange_barcode` on the form will auto-fill product data; if not, the user can fill it in manually. Either way the form is always usable.
opw-6295221
Forward-Port-Of: odoo/enterprise#120256This update corrects an error in the generation of E-Way Bills when prices include tax. Previously, the system incorrectly calculated tax amounts, leading to inaccurate E-Way Bill documents. The fix ensures that tax is properly accounted for, producing correct amounts for tax-included sales.
Original PR description
`*` = `ewaybill_Stock, sale_stock, purchase_stock` **Steps to reproduce:** * Install `l10n_in_ewabill_stock` and `l10n_in_sale_Stock`. * Set the Default Tax Price Setting to "Tax Included". * Create…
`*` = `ewaybill_Stock, sale_stock, purchase_stock` **Steps to reproduce:** * Install `l10n_in_ewabill_stock` and `l10n_in_sale_Stock`. * Set the Default Tax Price Setting to "Tax Included". * Create a Sales Order (e.g. unit price 300, qty 600, 18% GST) and confirm the Delivery Challan/Delivery Order. * Generate an E-Way Bill from the Delivery Challan. **Observed behavior:** * The Taxable Amount and Total Invoice Amount are displayed incorrectly in the generated E-Way Bill, including both the printed document and the JSON. * The `ewaybill_price_unit` shows the tax-excluded price (e.g. 254.24) instead of the original tax-included price (300), leading to a double tax exclusion when `compute_all` processes it. **Cause:** * `_l10n_in_get_product_price_unit` in both `l10n_in_sale_stock` and `l10n_in_purchase_stock` unconditionally used `price_subtotal / qty` to compute the E-Way Bill price unit. `price_subtotal` is always tax-excluded, so for tax-included prices, the tax was already stripped. * `_l10n_in_tax_details_by_stock_move` then passed this already tax-excluded price to `compute_all` with taxes that have `price_include=True`, causing `compute_all` to strip the tax a second time (e.g. 254.24 / 1.18 = 215.46 instead of the correct 254.24). **Fix:** * Check whether any of the line's taxes have `price_include` set. If so, use `price_total / qty` (which preserves the tax-included price) so that `compute_all` can correctly extract the tax. Otherwise, continue using `price_subtotal / qty` as before. opw-6273101 Forward-Port-Of: odoo/odoo#271492 Forward-Port-Of: odoo/odoo#268504
This update resolves a problem where Point of Sale order sequences with dynamic prefixes (like years) weren't generating correctly. The fix ensures that sequence numbers are properly formatted as integers, preventing errors during order processing. This improves the reliability of POS order creation.
Original PR description
**Steps to reproduce:** - Create a database in version 19.0 and install Point of Sale. - Create a sequence with a prefix or suffix using placeholders like %(year)s. - Assign this sequence to a POS…
**Steps to reproduce:** - Create a database in version 19.0 and install Point of Sale. - Create a sequence with a prefix or suffix using placeholders like %(year)s. - Assign this sequence to a POS configuration. - Create a new POS order and confirm payment. **Issue:** - POS order `sequence_number` must be an integer, but when using dynamic prefixes/suffixes (e.g., %(year)s), `_next()` returns values like `POS/2026/` while the configured prefix remains `%(year)s`. - Due to this mismatch, [`_update_sequence_number`](https://github.com/odoo/odoo/blob/ab6cfabf0086afced2d035eb2207a0acab655540/addons/point_of_sale/models/pos_order.py#L561) fails to correctly remove the prefix/suffix. - The root cause is that placeholders such as `%(year)s` are not interpolated before applying prefix/suffix removal logic, causing string mismatch and failure in extracting the numeric part.<img width="1920" height="959" alt="image" src="https://github.com/user-attachments/assets/d331fb7a-3c0f-4e34-a33e-6ec906be77bb" /> **Solution:** - Interpolate prefix and suffix before removing them from the generated sequence. - Convert placeholders like %(year)s into actual values (e.g., 2026). - Then apply prefix/suffix removal logic. opw-6150204 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262427
This update corrects a rounding error in how overtime durations are calculated, which previously caused overlapping time entries. The fix ensures accurate back-projection of work entries, preventing overlaps and guaranteeing correct overtime tracking. This improves the reliability of time and attendance data.
Original PR description
__Issue:__ `duration` is rounded to 3 decimals (~1.8s drift) while `time_stop` is exact, so the back-projected start could land before midnight on overnight overtime or middle of the day causing overlaps with the previous line Example: - time_start = 03/05 00:00:00 - time_stop = 03/05 07:07:14 actual duration 7h07m14s gets stored as `duration = 7.121` (= 7h07m15.6s) after `round(_, 3)`. Back-projection yields `datetime_start = 07:07:14 - 7.121h = 02/05 23:59:58`, overlapping by ~2s with the prior line ending at `02/05 23:59:59.999`. __Fix:__ Sort lines by `time_stop` within each date and clamp `datetime_start` to the previously emitted interval's stop when the two intervals genuinely intersect. opw-6170828 Forward-Port-Of: odoo/enterprise#116565
This update fixes an issue where clicking the 'Documents' button on an employee form would open a new browser tab. The change adds a setting to the button's action, ensuring it opens directly within the existing employee form, improving user experience and workflow efficiency.
Original PR description
Issue: ---------------------------------------- When on an employee form, clicking the "Documents" button opens a new page instead of staying on the same. Steps to reproduce: ---------------------------------------- - Install `documents_hr` - Go on an employee form - Click the "Documents" button - It opens a new page Cause: ---------------------------------------- The `'ir.actions.act_url'` opens a new page by default. Solution: ---------------------------------------- Add `'target': 'self',` to make it open the URL in the same page. opw-6284677 Forward-Port-Of: odoo/enterprise#120285
This update ensures that partner data created in the POS system is automatically synchronized with the latest information from the DIAN government service after a refresh. Previously, changes weren't reflected immediately, but this fix corrects this issue by updating the POS data during the refresh process. This improves data accuracy and compliance.
Original PR description
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh…
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh icon` is visible: click on it. Observation: - the dialog is closed and partner is selected with "temp" name Expected: - with valid government credentials and a valid identification number, the refresh action should also update the partner data on the POS side Cause: - the refresh button triggers the `button_l10n_co_dian_refresh_data` action, which fetches the legal name and email from the government service - although the backend record is correctly updated, the new values are not immediately synchronized with the POS - when the refresh button is clicked, editPartner() first triggers `web_save` using the temporary "temp" name and immediately reads the partner data afterward - the refresh action executes later and updates the contact with the fetched legal information, but the POS is not aware of these subsequent changes Fix: - read the data again if there is any update caused by this action. - this is done by overriding `afterExecuteActionButton` of FormController class opw-6198035 Forward-Port-Of: odoo/enterprise#117527
This update resolves a problem in the SendCloud test suite caused by recent changes to the SendCloud integration. The tests were failing because they continued to use an outdated method for accessing the SendCloud API. This change ensures the tests accurately reflect the current SendCloud implementation.
Original PR description
Issue Before This Commit: ---------------------------- The delivery_sendcloud test suite relied on `delivery.carrier._get_sendcloud()` to access the SendCloud API helper. After recent changes in the SendCloud integration, this method is no longer available, causing multiple tests to fail when invoking SendCloud services during setup and execution. Cause of the issue: ------------------- After PR odoo/enterprise#96749, the SendCloud integration was refactored to require usage through a context manager. As part of this change, _get_sendcloud() was removed, but the existing test cases were still relying on it, causing failures. After this commit: ------------------ All SendCloud-related test cases are updated to explicitly instantiate the SendCloud client and use it within a context manager, mirroring the new lifecycle requirements introduced by the refactor. This aligns the test suite with the current SendCloud implementation and fixes the failing tests.
This update removes an outdated method for retrieving system parameters in the l10n_fr_pdp module. The change utilizes a more reliable approach (get_str) for parameter retrieval, enhancing the module's stability and performance. This is a routine maintenance fix.
Original PR description
This commit will remove the use of the get_param for system parameter and instead use get_str no task id --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where self-invoicing URLs on receipts were incorrectly formatted. Now, the correct URLs are generated and displayed, ensuring accurate invoicing data is sent to the appropriate systems. This improves the reliability of self-ordering transactions.
Original PR description
Before this commit: ------------------------- - The self-invoicing URL on the receipt was displayed as `undefined/pos/ticket`. After this commit: ------------------------- - The self-invoicing URL is now generated correctly and displayed properly on the receipt. Task-6271261 Forward-Port-Of: odoo/odoo#270052
This update fixes a display issue where rental prices weren't correctly formatted with a slash separating the price and duration. The fix ensures rental prices are shown clearly on the website, improving the user experience for customers renting products. This change was triggered by a bug in how the rental duration label was generated.
Original PR description
Steps to produce: --- - Install the `Rental and eCommerce `modules. - Create a rental product and configure a rental price for it. - Add an optional product from the Sales tab. - Publish the product…
Steps to produce: --- - Install the `Rental and eCommerce `modules. - Create a rental product and configure a rental price for it. - Add an optional product from the Sales tab. - Publish the product on the website. - Open the product page on the website and click` Add to Cart`. Issue: --- - In the product configurator, the rental price is displayed without the `/` separator between the price and the rental duration period. Cause: --- - The string used to generate the rental duration label does not include the `/` separator. Fix: --- - Add the missing `/` separator to the rental duration label so that rental prices are displayed correctly. Before: --- <img width="974" height="185" alt="image" src="https://github.com/user-attachments/assets/64a88a60-bcc0-4657-97fd-584da57d0aff" /> After: --- <img width="967" height="188" alt="image" src="https://github.com/user-attachments/assets/b4d50019-1db4-4817-a8ce-446cc3c55df4" /> opw-6293015 Forward-Port-Of: odoo/enterprise#120223
This update simplifies the process of updating the Account EDI UBL Cii reporting module. Previously, a fragile inheritance method caused potential conflicts with other Odoo templates. This change creates a more robust system for identifying the necessary updates, reducing the risk of issues and making future improvements smoother.
Original PR description
**Description of the issue/feature this PR addresses:** As the new `xpath` is expecting a very specific type of `t-if` which is possibly changed in other templates of third parties or even Odoo itself which do not depend on this module, we take a more robust approach to identify the block **Current behavior before PR:** Issues with inherited views outside the dependency tree (because of primary=True) **Desired behavior after PR is merged:** Less friction and smoother identifier of the needed diff Info: @wt-io-it --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270605
This update resolves a stability issue in the point-of-sale tour. Previously, the tour could fail due to asynchronous order processing, leading to duplicate requests. By adding a delay to ensure requests are fully completed, this fix prevents race conditions and improves the reliability of the tour.
Original PR description
The tour could fail because `sendOrderInPreparationUpdateLastChange` is asynchronous when sending the order to the kitchen. The test was continuing to the next steps before the request was fully resolved, which could lead to sending the order again while the previous call was still in progress. This commit updates the tour to explicitly wait for the async call to complete before continuing, by adding a delay step after clicking the order button. This prevents race conditions during the test. --- Runbot Error: https://runbot.odoo.com/odoo/runbot.build.error/181846 Forward-Port-Of: odoo/enterprise#121237 Forward-Port-Of: odoo/enterprise#110909
This update addresses a test failure related to database constraints in the email functionality. A recent database upgrade triggered a different error (RESTRICT_VIOLATION) instead of the previous FOREIGN_KEY_VIOLATION. The test has been updated to handle this new error type, ensuring continued stability.
Original PR description
This commit is kind of a follow up of
odoo/odoo@39cd4ea856fe00f5674f8c44b2b66cbf2705426d (in 18.0).
In a nutshell, following a standard-compliance fix (postgres/postgres@086c84b) has led to `RESTRICT_VIOLATION` being emitted in cases which formerly emitted `FOREIGN_KEY_VIOLATION`. One such case is specifically being tested for by `test_alias_domain_setup`, leading to this test failing systematically when running pg18:
psycopg2.errors.RestrictViolation: update or delete on table "mail_alias_domain" violates RESTRICT setting of foreign key constraint "mail_alias_alias_domain_id_fkey" on table "mail_alias"
DETAIL: Key (id)=(191) is referenced from table "mail_alias".
This commit updates the test to use the more generic `IntegrityError` as it's probably more than sufficient for our purposes.
Forward-Port-Of: odoo/odoo#271403
Forward-Port-Of: odoo/odoo#271302This update resolves an issue where Italian POS systems using specific characters in product or payment names would cause printing errors. The fix replaces unsupported characters with spaces, aligning with EPSON fiscal printer documentation to ensure proper printing functionality. This prevents incomplete order prints and improves the Italian POS experience.
Original PR description
Steps to reproduce: - Setup an Italian fiscal printer - Modify the name of a product to use the non-blocking space character "\ "; - In the POS, create an order with the product. Error: the fiscal device will stop midway in the printing process and return an incomplete response to the frontend. The issue can also be reproduce if the character is included in the payment method name or the POS config name. Solution: When formating the xml command, replace all non-supported character by a space character. The non-supported character list is provided by the official [EPSON fiscal printer documentation](https://support.epson.net/setupnavi/?PINF=bsmanual&OSC=WS&LG2=EN&MKN=FP-90III%20RT) in the document "ePOS Fiscal Print Solution Development Guide". Other: Rename the file "dispaly_text.xml" to "display_text.xml". [opw-6244089](https://www.odoo.com/odoo/project/49/tasks/6244089) Forward-Port-Of: odoo/enterprise#121248 Forward-Port-Of: odoo/enterprise#120169
This update clarifies Redsys payment errors by mapping their technical codes to understandable messages. Previously, errors were difficult to diagnose, making it hard to resolve payment issues and provide accurate information to customers. This change improves the reliability and transparency of Redsys payments within Odoo.
Original PR description
Raw Redsys response codes were not human-readable, making it hard to diagnose failed transactions or provide meaningful feedback. See: https://pagosonline.redsys.es/desarrolladores-inicio/integrate-con-nosotros/parametros-de-entrada-y-salida/#tablepress-11_wrapper --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269968
This update resolves an issue where delivery dates set on sales orders weren't consistently reflected in manufacturing orders, leading to incorrect deadlines. The fix ensures that delivery dates are properly propagated to finished moves during quantity changes, allowing for accurate scheduling and merging of production steps. This improves order fulfillment accuracy.
Original PR description
Steps to reproduce: - Create a storable product with a BoM, routes MTO + Manufacturing, costing method FIFO + Perpetual (at invoicing) - Confirm a sale order for 1 unit → a manufacturing order is…
Steps to reproduce: - Create a storable product with a BoM, routes MTO + Manufacturing, costing method FIFO + Perpetual (at invoicing) - Confirm a sale order for 1 unit → a manufacturing order is created - Set a Delivery Date on the SO (Other Info tab) - Increase the SO line qty to 2 - Validate the MO → traceback on finished_move.ensure_one() Problem: When a delivery date is set on the SO, it propagates to the MO's finished move via date_deadline. However, `production.date_deadline\ was not updated (guarded by `if not production.date_deadline`) because the MO already had a deadline set at planning time: https://github.com/odoo/odoo/blob/19.0/addons/mrp/models/mrp_production.py#L476 When the SO qty then increases, change_production_qty copies the finished move to create a delta move. That delta move receives production.date_deadline (the stale planning date) instead of the delivery date, so the two finished moves end up with different deadlines and cannot be merged: https://github.com/odoo/odoo/blob/19.0/addons/mrp/wizard/change_production_qty.py#L43 Solution - always update production.date_deadline from its finished moves - link the new delivery move to the finished move after the qty wizard runs so it gets reserved after MO validation opw-6273076 Forward-Port-Of: odoo/odoo#269405
This update fixes an issue where emojis, particularly complex ones like family emojis, were being displayed incorrectly due to how they were encoded. The fix backports a previous solution from version 19.4 to ensure all emojis are correctly rendered, improving the overall email experience for users. This resolves a visual inconsistency.
Original PR description
Bug === Some emoji like `👨🚒` are separated, because they are built using `👨 + Emoji_Modifier + 🚒` (`\uFE0F` can also be used to get the variant of the emoji). Adapt the regex to take into account those Unicode variations. Task-5491124 Forward-Port-Of: odoo/odoo#271373 Forward-Port-Of: odoo/odoo#269719
This update improves the speed and efficiency of automatically creating reconciliation rules for bank statements. The previous method consumed excessive memory and time when processing long payment references, leading to errors. This change uses a more efficient algorithm to find common substrings, significantly reducing processing time and memory usage, particularly for large transactions.
Original PR description
When setting an account to an account.bank.statement there is a step to automatically create a reconciliation rule/model if one does not exist already. To do so, we retrieve 5…
When setting an account to an account.bank.statement there is a step to automatically create a reconciliation rule/model if one does not exist already. To do so, we retrieve 5 account.bank.statement.lines and use them to define the reconciliation model config. A matching is done on the payment_ref of the account.bank.statement.lines by finding the longest common substring in the reference. ### Current Implementation The current algorithm does so by first generating all the possible substrings for all the payment_ref before doing the intersection between these sets and returning the max if `len(substring) >=10`. This is reasonable when the payment_ref follows either a SEPA communication national standard like the Belgian one or the Creditor Reference standard (ISO 11649). For transactions with large, unstructured communication with more than 100 chars, the method `_get_common_substrings` quickly overfill the memory, sometimes raising a MemoryErorr, and takes a significant amount of time. That's because the nested function `_generate_all_substrings` generates n*(n+1)/2 substrings, with n being the lenght of a payment_ref, called `label` in `generate_all_substrings`. ### Proposed Fix This commit introduces another algorithm to find the largest common substring. It starts by taking the two smallest labels to find their substrings intersection. We know that for an arbitrary collection of labels, the intersection of their substrings sets A ∩ B ∩...∩ Z is included in the intersection of any two substrings sets. The underlying assumption of the first step is that for an arbitrary collection of labels the intersection of the substrings sets of the two smallest labels will be the smallest intersection of any given pair of substrings sets. This won't hold true everytime and using a metric such as label similarity instead of shortest string might be better. But on average this should be good enough and it's easier to implement + it removes the need of preprocessing the labels to compute the similarity. The point of the new nested function `common_substrings` is to discard common substrings as we build them. Using the current `generate_all_substsrings` on either the smallest label or both smallest labels would still generate and store a lot of substrings, especially for large labels. By yielding the common substrings as we find them, the memory footprint is vastly reduced. Lastly, the next substring in the common_substrings iterable is only checked against the remaining labels if it's longer than the current match. This speeds up the whole process ### speedup In a customer database with some account.bank.statement.line with payment_ref > 500 chars, setting a specific account (code 4970) on transactions goes from MemoryError to < 1Mb memory consumption. Because of the memory consumption it was not possible to gather timing value on the current version. Testing the new algorithm in a shell and using as labels the 5 longest payment_ref in the customer database (831, 831, 1117, 1178, 1300 chars), averaging to 2000 chars once normalised, the average time to execute `_get_common_substrings` is 900 ms ± 10.3 ms. Forward-Port-Of: odoo/enterprise#118824
This update fixes an issue where work order durations were inaccurately calculated due to overlapping time entries. By filtering and merging productive and performance time, the system now provides a more precise duration for valuation purposes. Additionally, a fix was implemented to prevent timestamp issues during testing, ensuring accurate duration calculations.
Original PR description
[[FIX] mrp: calculate real duration excluding non-productive intervals](https://github.com/odoo/odoo/pull/248381/changes/fac6b2540a32a015f56085c2c27ba4281eb659cf) and deduplicating overlaps * Current…
[[FIX] mrp: calculate real duration excluding non-productive intervals](https://github.com/odoo/odoo/pull/248381/changes/fac6b2540a32a015f56085c2c27ba4281eb659cf) and deduplicating overlaps * Current Situation: Currently real duration is total duration of each time tracking which is not consistent with the time that use to calculate the cost for valuation , see https://github.com/odoo/odoo/pull/205154 .The real duration of a work order was incorrectly summing all time tracking entries regardless of their loss type, and using simple addition which double-counts overlapping intervals. * Solution: - Filter time entries to only 'productive' and 'performance' loss types, excluding 'availability' and 'quality' as they represent downtime/blocking time, not actual work duration. - Pool all productive and performance entries into a single Intervals call so that overlaps across both types are merged in one pass. Note: the enterprise17 implementation groups time entries by loss_type into separate buckets before calling Intervals, which means overlaps between 'productive' and 'performance' entries are not merged and get double-counted. Pooling both types together before the Intervals call avoids this. * This also fix: - Fix _set_duration to ensure newly created time entries start after the latest existing entry's end date. Without this, calling _set_duration twice in quick succession (e.g. in tests) produces two entries with overlapping timestamps, which Intervals correctly merges into one, causing the computed duration to be half the expected value. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#248381
This update removes an unnecessary 'external' tag from a test class within the SendCloud delivery module. Previously, errors were only detected during nightly builds, not by the standard Continuous Integration (CI) process. Fixing this tag requires updating some tests to ensure accurate and consistent error detection.
Original PR description
Test class was tagged as external although calls are mocked. This means errors were only caught in nightly and not by CI. Removing the tag requires fixing some of the tests. For `test_multicollo`, we send the average weight of packages instead of the total since 97f82442c9fee7dcb3e8c5e9bacddcd6bb864e11. Forward-Port-Of: odoo/enterprise#120902 Forward-Port-Of: odoo/enterprise#111660
1 change
Resolved issues and error corrections
This update ensures that partner data created in the POS system is automatically synchronized with the DIAN government database after a refresh. Previously, changes weren't reflected immediately, leading to potential data inconsistencies. This fix guarantees accurate and up-to-date partner information for reporting and compliance.
Original PR description
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh…
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh icon` is visible: click on it. Observation: - the dialog is closed and partner is selected with "temp" name Expected: - with valid government credentials and a valid identification number, the refresh action should also update the partner data on the POS side Cause: - the refresh button triggers the `button_l10n_co_dian_refresh_data` action, which fetches the legal name and email from the government service - although the backend record is correctly updated, the new values are not immediately synchronized with the POS - when the refresh button is clicked, editPartner() first triggers `web_save` using the temporary "temp" name and immediately reads the partner data afterward - the refresh action executes later and updates the contact with the fetched legal information, but the POS is not aware of these subsequent changes Fix: - read the data again if there is any update caused by this action. - this is done by overriding `afterExecuteActionButton` of FormController class opw-6198035 Forward-Port-Of: odoo/enterprise#117527
6 changes
Resolved issues and error corrections
This update prevents an error that occurred when the 'Company Car (To order)' option was enabled in the salary configurator. The fix ensures that a car model is selected before attempting to process the option, resolving a previous issue that caused the system to crash. This ensures the company car functionality works correctly for all users.
Original PR description
## Steps to Reproduce: 1. Install `l10n_be_hr_contract_salary` without demo data. 2. Create a Belgian company and switch to it. 3. Create an employee. 4. Create a contract for the employee. 5. Click Generate Offer and open the Salary Configurator. 6. Enable the 'Company Car (To order)' option. ## Error: `AttributeError: 'NoneType' object has no attribute 'split'` ## Cause: When the salary configurator is used without demo data, no car model is selected. The method assumes that select_wishlist_car_total_depreciated_cost always contains a value and directly calls split() on it, resulting in an error, when the field is None. ## Fix: This commit checks that both the company car option is enabled and a car model has been selected before trying to extract the model ID. sentry-7554712017 Forward-Port-Of: odoo/enterprise#121138
This update ensures that partner data created in the POS system is automatically updated with the latest information from the DIAN government service after a refresh. Previously, changes weren't immediately reflected, requiring manual intervention. This fix streamlines the process and maintains accurate partner records.
Original PR description
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh…
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh icon` is visible: click on it. Observation: - the dialog is closed and partner is selected with "temp" name Expected: - with valid government credentials and a valid identification number, the refresh action should also update the partner data on the POS side Cause: - the refresh button triggers the `button_l10n_co_dian_refresh_data` action, which fetches the legal name and email from the government service - although the backend record is correctly updated, the new values are not immediately synchronized with the POS - when the refresh button is clicked, editPartner() first triggers `web_save` using the temporary "temp" name and immediately reads the partner data afterward - the refresh action executes later and updates the contact with the fetched legal information, but the POS is not aware of these subsequent changes Fix: - read the data again if there is any update caused by this action. - this is done by overriding `afterExecuteActionButton` of FormController class opw-6198035 Forward-Port-Of: odoo/enterprise#117527
This update fixes an issue where purchase order receipt deadlines weren't updating correctly after quantities were reduced to zero. The fix ensures that cancelled stock moves no longer incorrectly influence the calculated deadline, providing accurate delivery timelines for purchase orders. This improves the reliability of order fulfillment.
Original PR description
Steps to reproduce the bug:
- Create a Purchase Order with 2 products and confirm it
- Note the receipt's deadline (= date_planned of both lines)
- Set the quantity of one PO line to 0
- Update the scheduled date (date_planned) of the purchase order
Problem:
the receipt deadline does not update.
The receipt kept the old deadline from the cancelled move. When a PO line qty is set to 0, `_merge_moves` cancels the corresponding stock move via `_action_cancel`. Then `_update_move_date_deadline` correctly skips cancelled moves (filtered by `state not in ('done', 'cancel')`), so the cancelled move retains its original `date_deadline`. However, `_compute_date_deadline` on `stock.picking` used
`move_ids.filtered('date_deadline')`, which not checks move state, so the stale deadline of the cancelled move was included in the min/max computation.
opw-6292600
Forward-Port-Of: odoo/odoo#270985This update simplifies the process of updating the Account EDI UBL Cii reporting module. Previously, a fragile inheritance method caused potential conflicts with other Odoo templates. This change removes that complexity, making updates smoother and reducing the risk of issues.
Original PR description
**Description of the issue/feature this PR addresses:** As the new `xpath` is expecting a very specific type of `t-if` which is possibly changed in other templates of third parties or even Odoo itself which do not depend on this module, we take a more robust approach to identify the block **Current behavior before PR:** Issues with inherited views outside the dependency tree (because of primary=True) **Desired behavior after PR is merged:** Less friction and smoother identifier of the needed diff Info: @wt-io-it --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#270605
This update fixes an issue where work order durations were inaccurately calculated due to overlapping time entries. By filtering and merging productive and performance time, the system now provides a more precise duration for valuation purposes. Additionally, a fix was implemented to prevent incorrect duration calculations during testing.
Original PR description
[[FIX] mrp: calculate real duration excluding non-productive intervals](https://github.com/odoo/odoo/pull/248381/changes/fac6b2540a32a015f56085c2c27ba4281eb659cf) and deduplicating overlaps * Current…
[[FIX] mrp: calculate real duration excluding non-productive intervals](https://github.com/odoo/odoo/pull/248381/changes/fac6b2540a32a015f56085c2c27ba4281eb659cf) and deduplicating overlaps * Current Situation: Currently real duration is total duration of each time tracking which is not consistent with the time that use to calculate the cost for valuation , see https://github.com/odoo/odoo/pull/205154 .The real duration of a work order was incorrectly summing all time tracking entries regardless of their loss type, and using simple addition which double-counts overlapping intervals. * Solution: - Filter time entries to only 'productive' and 'performance' loss types, excluding 'availability' and 'quality' as they represent downtime/blocking time, not actual work duration. - Pool all productive and performance entries into a single Intervals call so that overlaps across both types are merged in one pass. Note: the enterprise17 implementation groups time entries by loss_type into separate buckets before calling Intervals, which means overlaps between 'productive' and 'performance' entries are not merged and get double-counted. Pooling both types together before the Intervals call avoids this. * This also fix: - Fix _set_duration to ensure newly created time entries start after the latest existing entry's end date. Without this, calling _set_duration twice in quick succession (e.g. in tests) produces two entries with overlapping timestamps, which Intervals correctly merges into one, causing the computed duration to be half the expected value. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#248381
This update fixes a display issue where negative combo extra prices were incorrectly shown with a '+' sign or incorrect currency formatting. The change ensures that negative extra prices are consistently and accurately displayed, improving the clarity and accuracy of pricing information in the POS and Kiosk interfaces.
Original PR description
When a combo choice has a negative extra price, the POS and Kiosk would incorrectly display a '+' sign in front of the negative price (e.g., '+ -0,30 €'). Additionally, depending on the currency formatting rules, a negative price might be displayed with the minus sign after the currency symbol (e.g., '$ -1.00'). This commit fixes this by conditionally displaying the '+' sign only when the extra price is strictly positive, and handling the minus sign manually to ensure it is always prepended correctly (e.g. '- $ 1.00'). task-id: 6226406 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268101 Forward-Port-Of: odoo/odoo#265210
3 changes
Resolved issues and error corrections
This update resolves an issue where foreign currency vendor bills were incorrectly flagged as 'Partially matched' when reconciling with GSTR-2B reports. The fix ensures that amounts are consistently compared in the company's base currency (INR), accurately reflecting the reported values from the GST portal.
Original PR description
**Steps to reproduce:** * Install the **l10n_in_reports** module. * Go to **Accounting → Configuration → Settings**, and enable **Multi-Currencies**. * Activate a foreign currency (e.g., USD) and set…
**Steps to reproduce:** * Install the **l10n_in_reports** module. * Go to **Accounting → Configuration → Settings**, and enable **Multi-Currencies**. * Activate a foreign currency (e.g., USD) and set an exchange rate. * Create a new vendor bill for an Indian vendor, setting the currency to USD. * Add lines to the bill and apply IGST/GST taxes, then confirm the bill. * Go to **Accounting → Reporting → GST Return Period** and initiate GSTR-2B matching for the period corresponding to the bill (using a valid JSON payload where the amounts are correctly reported in INR). **Observed behavior:** * The vendor bill is incorrectly marked as "Partially matched" instead of "Fully matched", accompanied by an exception stating that the total amount as per GSTR-2B does not match. **Cause:** * The GSTR-2B data fetched from the GST portal always reports values in the company's base currency (INR). * The `match_bills` method was directly comparing the GSTR-2B INR amounts ( `bill_total` and `bill_taxable_value`) against the bill's `amount_total` and `amount_untaxed` fields. * Because these fields return values in the document's foreign currency (e.g., USD), the mismatch triggers an exception and flags the bill as partially matched. **Fix:** * Modified the matching logic to compare GSTR-2B values against `abs(amount_total_signed)` and `abs(amount_untaxed_signed)`. * This ensures that the amounts evaluated during reconciliation are always correctly converted and compared in the company's base currency (INR). opw-6311097 Forward-Port-Of: odoo/enterprise#121468 Forward-Port-Of: odoo/enterprise#120967
This update resolves an error that occurred when the 'Company Car (To order)' option was enabled in the salary configurator. The fix ensures that a car model is selected before attempting to extract data, preventing a system crash. This improvement ensures the company car functionality works reliably for all users.
Original PR description
## Steps to Reproduce: 1. Install `l10n_be_hr_contract_salary` without demo data. 2. Create a Belgian company and switch to it. 3. Create an employee. 4. Create a contract for the employee. 5. Click Generate Offer and open the Salary Configurator. 6. Enable the 'Company Car (To order)' option. ## Error: `AttributeError: 'NoneType' object has no attribute 'split'` ## Cause: When the salary configurator is used without demo data, no car model is selected. The method assumes that select_wishlist_car_total_depreciated_cost always contains a value and directly calls split() on it, resulting in an error, when the field is None. ## Fix: This commit checks that both the company car option is enabled and a car model has been selected before trying to extract the model ID. sentry-7554712017 Forward-Port-Of: odoo/enterprise#121138
This update ensures that partner data on the POS system is automatically updated after a DIAN refresh, using government credentials. Previously, the system only updated the partner name initially, but not subsequent legal information. This fix guarantees accurate partner details are reflected on the POS.
Original PR description
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh…
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh icon` is visible: click on it. Observation: - the dialog is closed and partner is selected with "temp" name Expected: - with valid government credentials and a valid identification number, the refresh action should also update the partner data on the POS side Cause: - the refresh button triggers the `button_l10n_co_dian_refresh_data` action, which fetches the legal name and email from the government service - although the backend record is correctly updated, the new values are not immediately synchronized with the POS - when the refresh button is clicked, editPartner() first triggers `web_save` using the temporary "temp" name and immediately reads the partner data afterward - the refresh action executes later and updates the contact with the fetched legal information, but the POS is not aware of these subsequent changes Fix: - read the data again if there is any update caused by this action. - this is done by overriding `afterExecuteActionButton` of FormController class opw-6198035 Forward-Port-Of: odoo/enterprise#117527
1 change
Resolved issues and error corrections
This update resolves an issue where users could create private tasks without selecting a project, leading to errors. The change enforces the requirement of a project ID during task creation, ensuring tasks are properly associated and preventing errors. This improves data integrity and user experience.
Original PR description
Steps to reproduce: --------------------------------------- 1. Install the Timesheets. 2. Click on "Start" button in header. 3. In the timer component make project field empty. 4. Then click on "New" button in the dialog for tasks that open from the task. 5. Make the project field empty, then save it. Issue: ----------------------------------------------- - If the project field is empty, it will try to create a private task and then it will show an error. Cause: ----------------------------------------------- - The project_id field is currently not required. This needs to be changed to prevent private tasks from being created. Fix: --------------------------------------------------------------- - After this commit we are passing the context "time_task_creation" if it is true it will make the project_id field required. task-3552597
8 changes
Resolved issues and error corrections
This update resolves an issue where duplicate preparation cards or tickets were sometimes generated when using the UrbanPiper POS integration. A recent code change introduced redundant order creation processes. The fix reuses the existing, reliable flow that checks if the order has been sent to the kitchen, preventing duplicates and ensuring accurate ticket generation.
Original PR description
Steps to reproduce: = * Create a POS configuration with UrbanPiper enabled. * Open a POS session. * Place and accept an UrbanPiper quick order. Issue: = * In some cases, two preparation cards or preparation tickets are generated for the same order. Reason: = * A recent refactor of the preparation order/preparation order line flow introduced multiple code paths that could trigger preparation order creation for the same order. Fix: = * Reused the existing preparation order creation flow that already checks whether the order has been sent to the kitchen/preparation display. * This prevents duplicate preparation order creation and avoids generating multiple preparation cards/tickets for the same order. task-6273306
This update fixes a bug in the Preparation Time report for Point of Sale, ensuring that preparation durations are displayed correctly based on the user's current timezone. Previously, the report always used the timezone of the system administrator, leading to inaccurate data. This change improves reporting accuracy and provides users with reliable preparation time insights.
Original PR description
In POS, the Preparation Time report groups average preparation durations by hour. Those hour buckets were always computed with the timezone of the user who ran the module upgrade (OdooBot /…
In POS, the Preparation Time report groups average preparation durations by hour. Those hour buckets were always computed with the timezone of the user who ran the module upgrade (OdooBot / superuser), not the timezone of the user viewing the report. Changing the user, company, or browser timezone had no effect on the graph until the module was upgraded again. Steps to reproduce: ------------------- * Configure a Preparation Display and create POS orders with measured preparation times. * Open Point of Sale → Reporting → Preparation Time. * Note the hour bucket used for the orders. * Change your user timezone in Preferences and reload the report. > Observation: The hour buckets stay the same. Before the fix, they only changed after upgrading `pos_enterprise`, because the timezone was embedded in the SQL view created during `init()` as superuser. Why the fix: ------------ Replace the static PostgreSQL view with a dynamic `_table_query` so `order_hour` is computed with the current user's timezone on each report read. `init()` now only drops the legacy view instead of recreating it with a frozen timezone. opw-6220248 Forward-Port-Of: odoo/enterprise#118365
This update fixes a confusing issue in the budget report where budget lines were labeled with repetitive names. The change now includes related analytic accounts in the display name, making budget lines much easier to distinguish and understand. This improves report readability and data analysis.
Original PR description
Budget report grouping by budget line displayed the budget name for every line, which made different lines indistinguishable and produced labels like "Budget 2026 x", "Budget 2026 x (2)", etc. Compute a more specific display name for budget lines by appending the analytic accounts concerned by the line to the budget name. Also expose Budget Line as a first-class group-by in the Budget Report search view and apply it by default when opening the report. task-6293065 Forward-Port-Of: odoo/enterprise#121204
This update automatically updates the map routes when a user changes their location. Previously, users had to manually refresh the map to see the correct routes. This improvement ensures a smoother and more accurate user experience when navigating maps within the Odoo Enterprise application.
Original PR description
In this commit, we ensure that the map is updated with the newly computed routes if the user position changes. Prior to this commit, the user had to manually trigger an update to correctly view the updated routes. Forward-Port-Of: odoo/enterprise#120966
This update resolves an issue where appointment filters were incorrectly persisting across different views (Kanban to Gantt). Now, filters are automatically cleared when switching views, ensuring accurate appointment display and preventing bookings from being hidden. This improves the user experience for managing appointments.
Original PR description
In this commit: - When switching from Kanban to Gantt view, the POS-specific filters `date_filter` and `hour_filter` (added by `PosAppointmentSearchFilter`) were persisting on the shared SearchModel, incorrectly hiding bookings. - Now these filters are removed when activating the Gantt view. - Clear these filters when changing views and add a tour test to cover the Kanban → Gantt navigation flow. Also extract common appointment view tour helpers for reuse. Task:6276594 Forward-Port-Of: odoo/enterprise#120368
This update resolves an issue where tours were behaving unpredictably. The team refined the triggers used in the tours to ensure they consistently activate when intended, leading to a smoother and more reliable user experience. This change focuses on internal improvements to the Odoo Enterprise application.
Original PR description
Fix undeterministic tours by making some triggers more precise in a few steps.
This update fixes a reporting issue where tax tags weren't correctly applied to invoices using group taxes. The change ensures that all child tax tags associated with a parent tax are included in generic reports, accurately reflecting tax calculations for Philippine businesses. This improves the reliability of financial reporting.
Original PR description
When using group taxes, the base invoice lines only store the parent tax in the `account_move_line_account_tax_rel` table. Because of this, if a child tax within the group contains a specific tax report tag (e.g., tag 33A on the SC/PWD exempt component introduced in the base localization), the generic report query would previously fail to pick up those base lines. This commit updates the SQL join conditions in `l10n_ph_generic_report.py` to also match `account_tax.id` against the child taxes of the linked parent tax using the `account_tax_filiation_rel` table. This ensures that base lines are correctly reported under the tags of their respective child taxes. Task-6032306 See: odoo/odoo#270764
This update fixes an issue where scanning an unknown barcode in the Point of Sale (POS) system didn't automatically open the product creation form. The fix removes a redundant check for API keys, ensuring the form opens correctly regardless of whether a barcode lookup key is configured. Users can now consistently create products by scanning barcodes.
Original PR description
When scanning an unknown barcode in POS, the product creation form was never opened because `barcode_lookup()` was called with no barcode as an implicit API key check. Commit 0c8019a4aa7 ([FIX] product_barcodelookup: avoid crash on invalid image URLs) standardized `barcode_lookup_request()` to always
return a `requests.Response` object, removing the `{'authenticated': True}` dict it previously returned for HTTP 404 responses. As a result the JS check `response?.authenticated` was always falsy and the form never opened.
Fix: remove the API key check entirely. `allowProductCreation()` already gates on the user having product create rights, which is the only condition that matters. If a Barcode Lookup API key is configured the `_onchange_barcode` on the form will auto-fill product data; if not, the user can fill it in manually. Either way the form is always usable.
opw-6295221
Forward-Port-Of: odoo/enterprise#1202566 changes
Resolved issues and error corrections
This update corrects a previous issue where warnings from the IoT device were incorrectly treated as errors. Now, when a warning code is received, a notification is displayed, providing clearer visibility into the status of transactions. This ensures more accurate and timely alerts for Point of Sale operations.
Original PR description
Before this commit, all errors returned by the iot after a call to the blackbox were considered as errors. Actually, the errors are only the ones that do not start with 0 (no error) or 1 (warning). This commit changes the behaviour when handling warning. We now show a notification. task-id: 5062178 Forward-Port-Of: odoo/enterprise#109251 Forward-Port-Of: odoo/enterprise#93896
This update ensures that partner data created in the POS system is automatically synchronized with the DIAN (Colombian tax authority) after a refresh. Previously, changes weren't reflected, leading to potential data inconsistencies. This fix guarantees accurate partner information for reporting and compliance.
Original PR description
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh…
Step to reproduce: - install l10n_co_dian and pos - open pos and click on create a new partner from partner list - enter name ex. "temp", identification number, click on form - notice a `refresh icon` is visible: click on it. Observation: - the dialog is closed and partner is selected with "temp" name Expected: - with valid government credentials and a valid identification number, the refresh action should also update the partner data on the POS side Cause: - the refresh button triggers the `button_l10n_co_dian_refresh_data` action, which fetches the legal name and email from the government service - although the backend record is correctly updated, the new values are not immediately synchronized with the POS - when the refresh button is clicked, editPartner() first triggers `web_save` using the temporary "temp" name and immediately reads the partner data afterward - the refresh action executes later and updates the contact with the fetched legal information, but the POS is not aware of these subsequent changes Fix: - read the data again if there is any update caused by this action. - this is done by overriding `afterExecuteActionButton` of FormController class opw-6198035 Forward-Port-Of: odoo/enterprise#117527
This update fixes an issue where the Gantt chart would revert to displaying 'today' when changing its view scale (day, week, etc.). Now, the chart automatically centers on the date currently visible in the viewport, providing a more intuitive and accurate representation of the project timeline. This improves usability and ensures users always see the relevant time period.
Original PR description
This commit ensures that switching the Gantt view scale (day, week, month, year) anchors the new time period around the date currently centered in the viewport, rather than defaulting back to "today". Two coordinated changes make this possible: * **Range Selection:** `selectRangeId` now passes `getCurrentFocusDate()` (the pixel-computed center of the viewport) to `getRangeFromDate` instead of defaulting to `DateTime.now()`. * **Viewport Scrolling:** `focusDate` has been refactored to scroll the targeted date directly to the center of the viewport rather than its left edge. This is achieved by subtracting half the visible cell area width from the computed scroll position. The focusGroup behavior is removed since it is obsolete due to the fact that the default period only shows 1 group instead of 3. task-6314686
This update resolves a bug where the 'Suggest Forecasted Demand' button disappeared in the Master Production Schedule when the 'Forecasted Stock' row was hidden. Previously, the button's visibility was dependent on the 'Forecasted Stock' row being enabled, causing confusion for users. Now, the button remains visible regardless of the 'Forecasted Stock' row's status.
Original PR description
Steps to reproduce:
1. Install Manufacturing.
2. Enable 'Master Production Schedule' in the Settings.
3. Go to [Manufacturing -> Planning -> Master Production Schedule].
4. Ensure 'Demand Forecast' and 'Forecasted Stock' rows are enabled from the dropdown.
5. Observe the edit pencil button next to 'Forecasted Demand' is visible.
6. Hide 'Forecasted Stock' using the rows filter dropdown.
Issue:
The edit pencil button ("Suggest Forecasted Demand") next to the 'Forecasted Demand' row disappears when the 'Forecasted Stock' row is hidden.
Expected behavior:
The edit pencil visibility should not be affected by the 'Forecasted Stock' row.
opw-6240596This update resolves several errors in the Blackbox test suite for the Belgian POS system, ensuring accurate order processing and synchronization. Specifically, the tests were failing due to incorrect data setup, mismatched expectations regarding printer types, and issues with cost center assignments. These fixes improve the reliability of the testing process and the overall functionality of the system.
Original PR description
1. The `m160` and `m161` mutations for `sign_copy_sale` test didn't set the `l10n_be_short_signature` field on the order, so the `TicketScreen.print` override would fail the check and the…
1. The `m160` and `m161` mutations for `sign_copy_sale` test didn't set the `l10n_be_short_signature` field on the order, so the `TicketScreen.print` override would fail the check and the `blackbox.signCopy` would not be called, causing the test to fail. 2. The `l10n_be_pos_blackbox_urban_piper` tests would crash on `undefined id` on the prep display path of `pos_enterprise`, where the data service will try to load up the prep display data, but it's not loaded in the test bundle. So I created a special setupEnv method for blackbox with urban piper which unpatches the prep display (same mechanism as pos_enterprise) 3. After removing the path for the tests, they would fail for the `expectGeneralProperties` step. By default it expects the `ticketMedium` to be `PAPER`, but there is no printer configured on the tests, so the actual medium is `DIGITAL`. 4. The tests expect the cost center to be `PLATFORM`. There was a patch on `InputGenerator`, which would return platform if the order has a `delivery_provider_id` set. But the patch never fired. I moved the patch directly on the order model, which is where the cost center value is computed. 5. The `test_l10n_be_pos_blackbox_sign_sale_backend_offline` test would endTour prematurely before the orders finished syncing, then check that all the orders are synced. I added an extra isSynced() step to ensure the orders are synced before ending the tour Task-[6320705](https://www.odoo.com/odoo/1737/tasks/6320705)
This update fixes an issue where insurance information wasn't correctly transmitted to Envia, preventing insurance PDFs from being generated. The change updates how insurance details are sent to the Envia API, aligning with Envia's requirements for additional services. This ensures accurate insurance coverage is reflected in shipments.
Original PR description
Issue ----- Insurance set on the delivery method is not correctly being communicated to Envia. Steps to reproduce ----- - Create a MX company - Set up Envia - Fedex Nacional Economico (ground) - 10% insurance - Create a MX client - Create a product (with some weight) - Create a SO using the delivery method & confirm - Validate the picking > No insurance pdf is being printed Cause ----- We are passing the insurance value as a `insurance` field on the shipment, which is not what the API expects. We should instead pass it in `additionalServices` as shown in the example of https://docs.envia.com/docs/additional-services#how-to-add-services-to-a-shipment ----- Ticket: opw-5254952
7 changes
Resolved issues and error corrections
This update resolves an issue where a specific tax field was incorrectly appearing in Odoo instances not using the ID (Belarus) localization. The PR hides this field when it's not relevant to an ID company, ensuring data accuracy and a cleaner user experience. This prevents incorrect data from being displayed and simplifies the system for users.
Original PR description
Description of the issue/feature this PR addresses: this field pollutes into non-ID companies <img width="1905" height="810" alt="image" src="https://github.com/user-attachments/assets/65d80e78-addc-42d8-887f-67c1245b83dc" /> This PR hides it if it's not. --- I will check if other fields in this module also have similar issue
This update resolves an issue where newly uploaded documents related to vendor bills would disappear from the system after upload. Previously, the system failed to correctly link these documents to the associated vendor bill, causing data inconsistencies. This fix ensures documents are properly linked, improving data accuracy and usability.
Original PR description
**PROBLEM** There is missing values in the context of the document view of account.move, which means when you upload a new document, it's not linked to the account.move. **STEP TO REPRODUCE** 1. Go to the document app, and upload an invoice document (ubl, zugferd, something that can be imported to create a vendor bill). 2. Select the document and click on "Create Vendor Bill". 3. Go to Accounting/Vendors/Bills, and go on the created vendor bill. 4. Click on the "Documents" smart button. 5. Try uploading a new document from this view. 6. In 18.+, the document is uploaded, and then disappears from the view. In 19.+, there is a traceback. opw-6233400
This update adds a QR code and KSeF number to PDF invoices generated for Polish companies when sending invoices online for KSeF processing. This ensures compliance with Polish tax regulations and simplifies the invoice submission process for users. The QR code contains the necessary information for KSeF to validate the invoice.
Original PR description
Issue: While communicating outside KSeF, invoices should have a QR Code and their KSeF number displayed Steps to reproduce: - from a Polish company - invoice a customer - Confirm the invoice - send it to KSeF - once it is accepted - Print PDF Expected behavior: Invoice should have a QR Code and their KSeF number QR Code content spec is available here: https://github.com/CIRFMF/ksef-api/blob/main/kody-qr.md or from https://ksef.podatki.gov.pl/ksef-na-okres-obligatoryjny/wsparcie-dla-integratorow/ then "KSeF 2.0 przewodnik dla integratorów" opw-6211058
A recent test was failing due to a missing time zone setting in the testing environment. This update adds a fallback mechanism to ensure correct time zone handling, preventing the test failure. This resolves a technical issue impacting automated testing.
Original PR description
Currently the test test_holiday_in_week is failing in runbot tests This is due to the fact that during the tests the user tz in env is not set and hence it fails in the pytz library. Added a fallback to avoid the issue runbot issue opw-237623 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a bug in the Italian e-invoice system (l10n_it_edi) that was causing invoices to be rejected by the SDI due to lowercase 'Codice Fiscale' entries. The fix ensures the field always accepts uppercase input and improves the user experience by automatically capitalizing the text entered.
Original PR description
### Steps to reproduce: - Install "l10n_it_edi_website_sale" and switch to Italian company - Configure the website for this company - Open the website as customer - Add something to the cart, go up to delivery - There the field "Codice Fiscale" can be lowercase - When entering something lowercase here, the invoice is then rejected by SDI. - Same for "Destination Code (SDI)" ### Cause: The SDI requires the field to be uppercase. ### Solution: Change `_l10n_it_edi_normalized_codice_fiscale` to return the uppercase value. (Already the case for "Destination Code (SDI)") Add `text-uppercase` on the input so the text entered there is always capital (better for the user). opw-4655364
This update fixes an issue where Danish expense reports were incorrectly calculating taxes. Specifically, when using the 'K-EU-V-DelvisFradrag' tax, the journal entries were showing an incorrect tax amount. The change ensures that taxes with negative repartition values are handled correctly, aligning with previous Odoo versions.
Original PR description
### Steps to reproduce: - Install "l10n_dk" and switch to Danish company - Create an empty sale order - Create a new expense - Category "Communication" for example - Total of 100 for example - Select…
### Steps to reproduce: - Install "l10n_dk" and switch to Danish company - Create an empty sale order - Create a new expense - Category "Communication" for example - Total of 100 for example - Select "K-EU-V-DelvisFradrag" as a tax - Paid by company - Select the customer to reinvoice - Click "Create Report" > "Submit to Manager" > "Approve" > "Post Journal Entries" - Go to the Journal Entry and see the Journal Items - The tax is a 25% tax but the value in the journal entries is 20 (so 20%) ### Cause: When called from the Expense app `_get_tax_details` is called with `special_mode == total_included` ([see](https://github.com/odoo/odoo/blob/467ab37703a44ca6cf57552715b75b087dc77d0d/addons/hr_expense/models/hr_expense.py#L549)). The special mode makes all taxes computed as if they were included taxes. But taxes with negative lines should not be computed as included (as in 17.0). The code already handles that the base amount is not changed for these taxes ([see](https://github.com/odoo/odoo/blob/467ab37703a44ca6cf57552715b75b087dc77d0d/addons/account/models/account_tax.py#L1088-L1092)). But not the amount of the tax in question. ### Solution: In `_eval_tax_amount_price_included`, if the tax has `has_negative_factor` to `True` then compute the tax as excluded. opw-4532391
This pull request contains a simple test change to ensure the runbot is functioning correctly. The change involves a basic 'test' commit to verify the automated testing process. This is a low-risk update to maintain the stability of the Odoo build environment.
Original PR description
Just to test the runbot
3 changes
Resolved issues and error corrections
This update fixes a potential issue where WhatsApp messages were being created multiple times due to retry attempts from the WhatsApp Cloud API. The change adds a check to ensure a message isn't created twice, preventing data inconsistencies and improving the reliability of WhatsApp integrations. This ensures accurate message delivery and avoids potential errors.
Original PR description
When Meta's WhatsApp Cloud API does not receive a fast acknowledgment, it retries the webhook delivery with the same msg_uid. The handler was attempting to INSERT a duplicate whatsapp.message record, violating the whatsapp_message_unique_msg_uid constraint. Fix: Add an existence check on msg_uid before creating the record to make the handler idempotent under Meta's retry pattern. opw-6055334
This update fixes a performance issue within the Odoo gevent server by ensuring it properly initializes database registries. Previously, the server wasn't setting registry sizes, leading to slower performance. This change directly addresses a technical optimization for improved server responsiveness.
Original PR description
The code to set the registry size was moved to `preload_registries`. The gevent server does not preload registries and thus does not set the registries size. Instead of moving the code again, we can preload registries in the gevent server. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update ensures that partner bank accounts are usable within all child companies, even if the partner is associated with a parent company. Previously, this functionality was limited, causing potential disruptions for users managing multiple company branches. This change improves efficiency and simplifies bank account management across the Odoo system.
Original PR description
Even when a partner has the 'company_id' filled with the parent company, his bank account should be usable in the child companies. This was done in odoo/odoo#262173 from 19.2 but we need to backport it in stable task-6309694