Daily updates from Odoo
Tuesday, April 28, 2026
281 changes
48 changes
Resolved issues and error corrections
This update resolves an issue where the 'is_company' field calculation was not correctly reflecting company status in several Latin American localizations (AR, BR, EC). The change ensures accurate identification of companies, improving the reliability of business processes within these regions. This fix enhances data consistency and functionality for users in these markets.
Original PR description
*: l10n_{ar,br,ec}
In 19.1 we changed the `is_company` field to a computed
stored field.
This change needs to be reflected correctly in many localisations
where the default computed value is too naive.
This commit is introducing a generic fix for most l10n that depends
on the module `l10n_latam_base`.
Improve the test coverage for the computation.
Note: This is not strictly necessary for this fix
on Enterprise side, since we removed the invisibility
condition but in case of some customization relying
on it it's safer if we can deduce it correctly.
Enterprise: https://github.com/odoo/enterprise/pull/114403
Related: https://github.com/odoo/odoo/pull/211043
task-6141307
Forward-Port-Of: odoo/odoo#261414
Forward-Port-Of: odoo/odoo#260224This update resolves an issue where Peruvian identifiers (like driver licenses) were not being displayed correctly in the system. The team removed a restrictive visibility condition on these fields, ensuring they are always visible. This ensures accurate reporting and data capture for Peruvian businesses.
Original PR description
In 19.1 we changed the `is_company` field to a computed stored field. That change broke the visibility for some Peruvian identifiers (driver license, etc). This commit removes the visibility condition on those fields to be displayed all the time. Note: we still add the correct compute on related Community commit for sake of correctness and completeness. Community: https://github.com/odoo/odoo/pull/260224 Related: https://github.com/odoo/odoo/pull/211043 task-6141307 Forward-Port-Of: odoo/enterprise#115204 Forward-Port-Of: odoo/enterprise#114403
This update fixes a problem where Wise payments were failing due to slight differences in recipient information (like spacing or casing). Now, the system uses only bank account details (like account number and routing number) to match recipients, ensuring accurate and reliable payments. This also consolidates IBAN and SWIFT recipients for broader compatibility.
Original PR description
Previously, _generate_wise_key included partner name and email in the matching key. If these differed between Odoo and Wise (e.g. trailing spaces, casing), the match would fail and a duplicate recipient was created. Use only financial identifiers (account type, routing number, account number) which are the actual unique identifiers for bank accounts. This is for example important with IBAN accounts as the won't have an email stored in Wise. From this we combine IBAN and SWIFT recipients into one non-US group. Forward-Port-Of: odoo/enterprise#115209 Forward-Port-Of: odoo/enterprise#113234
This update fixes inaccuracies in how tax amounts are calculated for Argentina (l10n_ar) within Odoo. The changes ensure correct tax calculations by leveraging the core tax engine, improving accuracy and preparing for future adjustments to Argentina's tax regulations. This update is related to a larger effort to ensure accurate tax reporting.
Original PR description
This commit refactors the tax amount calculations on the `_get_vat` and `_l10n_ar_get_amounts` method so that it uses the tax computation engine helpers properly, to prepare for any future fixes done on how Argentina tax calculations differs from all other localizations. This replaces all move line queries with the proper `base_line` calculation, with the proper aggregating methods. related-enterprise-PR: https://github.com/odoo/enterprise/pull/92639 task-4891206 Forward-Port-Of: odoo/odoo#261256 Forward-Port-Of: odoo/odoo#223393
This update fixes inaccuracies in how tax amounts are calculated for Arabic VAT transactions within the Odoo system. By utilizing the system's tax calculation engine, the changes ensure more precise and reliable tax amounts are generated, particularly for sales and invoices. This improves financial reporting accuracy.
Original PR description
- Rewrite all tax amounts calculations on `_get_tributes` and `_get_line_details` to properly use the tax computation engine helpers (`base_line`, and aggregating methods) - Ensure that all final amounts from the calculation are formatted with `float_repr` with appropriate precision. related-community-PR: https://github.com/odoo/odoo/pull/223393 task-4891206 Forward-Port-Of: odoo/enterprise#115069 Forward-Port-Of: odoo/enterprise#92639
A minor visual issue in the loyalty wizard has been resolved. The 'Discard' button was missing its label, making it difficult for users to identify. This commit restores the label, ensuring clarity and ease of use for this feature.
Original PR description
The label on the Discard button was accidentally removed in forward-port commit 344661bb057bec1415651dadbd6069a1a543f208. Without the label, the button is not visible/identifiable in the popup. This commit restores the missing label. Before: <img width="1002" height="259" alt="image" src="https://github.com/user-attachments/assets/0651d5f8-379e-4084-ad42-5d5931eaeb52" /> After: <img width="1003" height="270" alt="image" src="https://github.com/user-attachments/assets/0d98b7d0-06e1-4d7f-be1f-9fd3e5a87f07" /> --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update addresses a minor issue where query counts weren't accurately reflected during post-installation testing of the demo data. The fix ensures that performance tests run correctly, providing more reliable results for the demo environment. This improves the overall stability and predictability of the Odoo demo.
Original PR description
Query counts were updated for demo data. Missed a query update in post install test in #260655. runbot-242325 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
A recent update introduced a search function on the Indian Company homepage, which triggered a technical error. This fix addresses a problem where the search functionality would fail due to an incorrect handling of report data. The update ensures a stable search experience for users on the Indian Company version.
Original PR description
Steps to reproduce: 1. Install l10n_in_reports and switch to Indian Company. 2. Go to homepage and try to type something and search on the search box. A traceback will appear. Cause: In recent updates, it is now possible to search report varients through the search menu, so while fetching varients while preparing search results, this leads us to `_is_available_for` method. The cause lies in how `.get()` is being used. `_get_external_ids` returns `id: []` if no external id is linked to it, and here we do `external_ids.get(report.id, [None])[0]` and this will always give us [] if no external id is there. hence trying to access the 0th element causes traceback. This commit fixes that by safely evaluating to `[None]`.
This update resolves an issue where the SBR tax report wizard would crash if an SBR certificate wasn't configured. The fix checks for the certificate's existence and displays a helpful message to the user, guiding them to the Accounting Settings. This ensures the report generation process remains stable and reliable.
Original PR description
In the SBR tax report wizard, the code previously attempted to access the `pem_certificate` attribute on a potentially empty recordset if no certificate was configured (see [here](https://github.com/odoo-dev/enterprise/commit/0b50021bdae54779396d75d3cddbd9eb42571553)). This resulted in an AttributeError before the validation check could trigger the intended RedirectWarning. This commit fixes the logic by: * Checking for the existence of the `cert_sudo` recordset immediately after retrieval. * Raising the RedirectWarning if the certificate record is missing, guiding the user to the Accounting Settings. * Accessing the certificate and private key content only after confirming the record exists. no-task
This update addresses a minor issue in the account reports module, specifically correcting a sign error for the 'cta' value. The change simplifies existing queries and functions, ensuring accurate reporting and data processing. This ensures consistent and reliable financial reporting.
Original PR description
Followup PR of odoo/enterprise#103529 * Simplification of some queries * Simplification of functions * Sign correction for cta value
This update addresses an issue where Coda bank statement files sometimes lacked transaction details, leading to empty payment reference fields in Odoo. This resulted in a 'No description' default being added to the statement line, which has now been corrected. This ensures accurate financial reporting.
Original PR description
It can happens that coda file with transaction have no communication or structure communication. This can cause problem since we will have an empty payment_ref for the statement line. This will add "No description" as a default value. task-6045138 Forward-Port-Of: odoo/enterprise#111300
This update corrects a problem where the AccountID in Odoo's FAIA XML export was not consistently matching account definitions. This ensures accurate financial reporting for Luxembourg (l10n_lu_reports) by aligning data across key Odoo systems. The fix was part of a larger effort to improve the reliability of FAIA exports.
Original PR description
This is one of several commits fixing the FAIA xml export. The Invoice/Line/AccountID element in SourceDocuments/SalesInvoices and SourceDocuments/PurchaseInvoices must match an account defined in MasterFiles/GeneralLedgerAccounts/Account/AccountID. As the latter uses account_code since PR #65221, the former should too. opw-5427296 [Link](https://www.odoo.com/odoo/unassigned-tasks/5427296) Forward-Port-Of: odoo/enterprise#114254 Forward-Port-Of: odoo/enterprise#113455
This update fixes an issue where group payments were incorrectly processing the full amount of bills with multiple installments. Now, payments accurately reflect the outstanding balance of the first installment of each bill, ensuring correct accounting and payment reconciliation. This improves the accuracy of financial reporting.
Original PR description
Steps to reproduce: 1- Install Accounting and make sure "Batch Payments" is enabled in settings 2- Go to [Accounting -> Vendors -> Bills] 3- Create two bills for the same vendor, ensuring one of them has multiple installments (i.e payment term with 3 installments) 4- Confirm the bills 5- In list view, select both bills and another bill from a different vendor and click on Pay 6- Select "Group Payments" and confirm the payment Description of issue: The batch payment of the first vendor has the full amount for both bills Expected behavior: The payment should consider the full amount of the first bill and the first installment only of the second bill opw-5969972 Forward-Port-Of: odoo/odoo#261371 Forward-Port-Of: odoo/odoo#257871
This update resolves an issue preventing account return tours from functioning correctly across all Odoo localization modules. The fix addresses a missing tag that caused errors, specifically related to submitting actions, ensuring consistent functionality for users with different language settings.
Original PR description
Before, the account return tour was not running with every l10n installed du to a missing tags. This leads to errors that were not catched like missing super call on a submit action. Forward-Port-Of: odoo/enterprise#115290
This update resolves an issue where copying and pasting content from the blog post editor unexpectedly modified the original field. The fix adds a setting to the editor to prevent copying outside of the editable area, ensuring data integrity and preventing unwanted changes to the source records.
Original PR description
Problem: When copying the blog post title and pasting it elsewhere, editing the pasted content unexpectedly modifies the original field source. Cause: The copied HTML retains `data-oe-*` attributes, causing the editor to treat the pasted content as a field binding and propagate changes back to the original record. Solution: `contenteditable="true"` should be added on fields (`o_savable`) to prevent copying outside of savable area. Steps to Reproduce: - Copy title of blog post. - Paste it elsewhere in editable. - Edit the pasted text. - Observe the original field source also changes. opw-6105714 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258880
This update resolves an issue where invoice transaction IDs in financial reports (FAIA export) didn't consistently match those in the general ledger. The fix ensures all transaction IDs are synchronized, improving the accuracy and reliability of financial data exports. This prevents potential discrepancies in reporting.
Original PR description
The Invoice/TransactionID element in SourceDocuments/SalesInvoices and SourceDocuments/PurchaseInvoices must match the corresponding Transaction/TransactionID in the GeneralLedgerEntries section. As the latter uses the entry name since PR odoo#58728, the former should too. opw-6111343, opw-542729 Forward-Port-Of: odoo/enterprise#113846
A bug in a test for the restaurant point-of-sale module caused order data to be incorrectly updated, leading to potential data inconsistencies. This fix addresses a timing issue within the test process, ensuring order information is accurately recorded and synchronized.
Original PR description
In the tour test_customer_alone_saved, the test was creating an order, then go on the ticket screen and then come back on the product screen to change the customer to go again on the ticket screen and come back on product screen to check that the customer did not changed. The problem was that when going to the ticket screen the first time, the order was synced with the server but the answer might come after the test changed the customer. When going the second time on the ticket screen, the order was changed with the information of the backend and the user was lost. This is all due to the test that are too fast. runbot-error: 238467 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253587
This update corrects and improves the Sri Lankan accounting integration (l10n_lk) within Odoo. It includes new chart of accounts (CoA) elements, revised tax settings, and adjustments to account mappings to align with Sri Lankan accounting standards. This ensures accurate financial reporting for Sri Lankan businesses using Odoo.
Original PR description
Updates the CoA with new accounts, updated taxes, and adjusted default account mapping to better reflect standard Sri Lankan accounting practice. Enterprise PR: https://github.com/odoo/enterprise/pull/114768 task-6141758 Forward-Port-Of: odoo/odoo#260920
This update simplifies the setup of financial accounts by reducing the complexity of Balance Sheet formulas. New equity and liability accounts have been added to the Balance Sheet, providing a more accurate and flexible reporting structure for Sri Lankan businesses. This change enhances the overall financial reporting capabilities within the Odoo Enterprise system.
Original PR description
Reduces Balance Sheet account code formulas from 3-digit to 2-digit prefixes to make the COA setup more flexible. New equity and liability lines are also added to the Balance Sheet. Community PR: https://github.com/odoo/odoo/pull/260920 task-6141758 Forward-Port-Of: odoo/enterprise#114768
This update fixes an error in how time off is calculated when 'Ignore Public Holidays' is enabled. Previously, the system incorrectly added public holidays to the leave duration, leading to inaccurate 'Approved Time Off' figures. The change ensures that public holidays are excluded from the calculation, aligning with the intended functionality.
Original PR description
# Setup You'll need a User with : - An active contract (for easiness of testing, a contract that started long ago with 8hrs/day) # How to reproduce - Create a new Time Off type with "Ignore Public…
# Setup
You'll need a User with :
- An active contract (for easiness of testing, a contract that started long ago with 8hrs/day)
# How to reproduce
- Create a new Time Off type with "Ignore Public Holidays" enabled
- Create a Public Holiday for Period X
- Create A Time Off request for the User for a Period Y that contains Period X
- Go to the Time Off Ledger
- Remove the Missing Hours filter and search for the dates in Period Y
Exemple of periods :
- Period X => Feb 10 2026 - Feb 10 2026
- Period Y => Feb 9 2026 - Feb 11 2026
# The problem
The "Approved Time Off" and "Difference" values are wrong.
With the given exemples, we'll see Feb 9 and Feb 11 with "Approved Time Off" values of 12hrs, which is wrong since the employee is supposed to work 8hrs a day, so he should have a time off of also 8hrs.
# Cause
The calculation for "Approved Time Off" is the following :
Divide the `number_of_hours` of a hr_leave
By the number of working days during the period of the leave
Using our exemple, we get :
`number_of_hours` = 24hrs
number of working days = 2
Approved Time Off = 24hrs / 2 => 12hrs, but we expect 8hrs
The `number_of_hours` is correct since we checked "Ignore Public Holidays" (which actually means : include the public holidays in the number of hours of a leave)
The problem is that the aggregation for the number of working days excludes automatically
public holidays, without paying attention to the value of "Ignore Public Holidays" :
https://github.com/odoo/odoo/blob/5e623af55fba64e812db6bcaf06d8f7c5d08f055/addons/hr_holidays_attendance/report/hr_leave_attendance_report.py#L193-L202
Explanation for this part of the query : we only keep days where there is no record in
resource_calendar_leaves (`WHERE rcl2.id IS NULL`) that contains that day
and that are considered public (`AND rcl2.resource_id IS NULL`)
# Proposed Solution
We add a `JOIN hr_leave_type` to be able to get the value for
`include_public_holidays_in_duration` ("Ignore Public Holidays").
Then, we make it so we exclude the Public Holidays only if that value is
false (`AND NOT lvt.include_public_holidays_in_duration`)
opw-6082422
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#261259
Forward-Port-Of: odoo/odoo#258963This update resolves an issue where duplicating an employee would incorrectly copy their bank account information, leading to salary payments being routed to the same account for both employees. The fix ensures that the bank account is cleared during duplication, preventing this duplication and maintaining accurate payroll processing.
Original PR description
Steps: - Duplicate an employee. - Check that the bank account is copied. - Modify the bank account on the duplicated employee. - Verify the original employee’s bank account. Issue: - When duplicating an employee, the bank account was copied as well, causing both employees to use the same account. Updating it for one also changed it for the other, leading to both salaries being paid to the same account. Fix: - Set the 'bank_account_id' field to not be copied during duplication, ensuring the field is cleared for the duplicated employee. task-6093406 Forward-Port-Of: odoo/odoo#261505 Forward-Port-Of: odoo/odoo#259405
This update resolves a failing test related to WorldLine integration within our self-order point-of-sale system. The fix ensures that the test only runs if both necessary modules (`pos_self_order_iot` and `pos_iot_worldline`) are installed, preventing errors and improving test reliability.
Original PR description
To test WorldLine in self order, we need both `pos_self_order_iot` and `pos_iot_worldline`. We then skip the test if `pos_iot_worldline` isn't installed. Forward-Port-Of: odoo/enterprise#115282
This update fixes an issue where the contact type for related contacts wasn't being translated in the contact list view. It now correctly displays the contact type in the user's preferred language, mirroring the translation seen in the Kanban view. This improves the user experience and ensures consistent data presentation.
Original PR description
Problem: When the contact type is set for a related (child) contact, the contact type is shown in English next to the contact name in the contact list view. It should be translated to the user…
Problem: When the contact type is set for a related (child) contact, the contact type is shown in English next to the contact name in the contact list view. It should be translated to the user language. It is correctly translated in the Kanban view. Steps to reproduce: 1. Install the Contacts app. 2. Create a contact or go to an existing contact 3. Add a related (child) contact and set its contact type to any type (i.e. Invoice Address) 4. Change the user language to any language other than English 5. Go back to the contact list view and check the name of the related (child) contact. See how the contact type appearing in the name is in English instead of being translated, while it is correctly translated in the Kanban view. Cause: The list view uses the 'complete_name' field which is not translated, while the Kanban view uses the 'display_name' field which is translated. Solution: Use the 'display_name' field instead of 'complete_name' in the list view. opw-5947987 Forward-Port-Of: odoo/odoo#261592 Forward-Port-Of: odoo/odoo#257539
This update fixes an issue where contact types for related contacts were displayed in English within the contact list view, regardless of the user's language setting. The change ensures that contact types are now correctly translated to the user's preferred language, matching the behavior in the Kanban view. This improves the user experience for international users.
Original PR description
Problem: When the contact type is set for a related (child) contact, the contact type is shown in English next to the contact name in the contact list view. It should be translated to the user…
Problem: When the contact type is set for a related (child) contact, the contact type is shown in English next to the contact name in the contact list view. It should be translated to the user language. It is correctly translated in the Kanban view. Steps to reproduce: 1. Install the Contacts app. 2. Create a contact or go to an existing contact 3. Add a related (child) contact and set its contact type to any type (i.e. Invoice Address) 4. Change the user language to any language other than English 5. Go back to the contact list view and check the name of the related (child) contact. See how the contact type appearing in the name is in English instead of being translated, while it is correctly translated in the Kanban view. Cause: The list view uses the 'complete_name' field which is not translated, while the Kanban view uses the 'display_name' field which is translated. Solution: Use the 'display_name' field instead of 'complete_name' in the list view. opw-5947987 Forward-Port-Of: odoo/enterprise#115331 Forward-Port-Of: odoo/enterprise#114786
This update fixes an issue where product URLs in multilingual websites incorrectly included the category path. Previously, the canonical URL wasn't properly handling language codes, leading to incorrect links. This change ensures that product URLs are correctly generated regardless of the website's language, improving SEO and user experience.
Original PR description
Issue: --- Canonical address is not correctly calculated in non-default lang. Steps to reproduce: 1- Create a website with 2 lang: en, fr 2- Create a product with a website category. 3- Navigate to…
Issue: --- Canonical address is not correctly calculated in non-default lang. Steps to reproduce: 1- Create a website with 2 lang: en, fr 2- Create a product with a website category. 3- Navigate to the shop in fr. 4- Open the category, then open the product. 5- Open console, and search for canonical. As you see, in the second language, the canonical address includes the category address which is wrong. If you visit in the default lang, the canonical correctly refers to the url without category. Cause: --- This is because `_get_canonical_url` override relies on `self.env['ir.http']._match`, which will not work with an url prefixed by language code, raising `NotFound`. This leads to rule to be set as `None`. As a result canonical address will be set as the canonical address from `website` module's implementation, which doesn't take website category case into account. This lead to canonical address of `/lang-code/shop/category/product` to be itself. opw-6086206 Forward-Port-Of: odoo/odoo#258834
This update resolves an issue where IoT events were missed due to a failure in the longpolling fallback mechanism. Now, if longpolling requests fail, the system automatically switches to using the more reliable WebSocket connection, preventing disruptions like failed Worldline payment confirmations. This ensures consistent event delivery.
Original PR description
Community PR: https://github.com/odoo/odoo/pull/260931 Before this commit, if `onMessage` in `iot_http_service` was called directly, it would fail to fallback to websocket if the longpolling request failed, causing events to be missed. One symptom of this is Worldline payments failing to confirm when using websocket. After this commit, the `_longpolling` method will now throw an error in this case, causing the fallback mechanism to attempt websocket instead. Forward-Port-Of: odoo/enterprise#115143 Forward-Port-Of: odoo/enterprise#114779
This update allows administrators to easily control the automatic resetting of subscription users, providing greater flexibility in managing user accounts. Previously, automated user resets were difficult to override, but this change simplifies the process and offers more control. This improves operational efficiency and reduces potential issues related to user account management.
Original PR description
After this commit, the auto resetting of subscription user is overridable. Doing business logic in CRUD methods makes them impossible to bypass, by encapsulating the logic in another method, it would be easily overridable. Forward-Port-Of: odoo/enterprise#114459 Forward-Port-Of: odoo/enterprise#114055
A minor bug preventing users from clocking in with the Blackbox POS was resolved. The fix corrects a typo that caused an error when generating receipt data, ensuring proper functionality for this key POS feature. This resolves a technical issue impacting POS operations.
Original PR description
There is a typo trying to assign the server version to `this` instead of the `data` object which is used for the receipt. This causes a `cannot set properties of undefined` error when trying to clock in with a blackbox Forward-Port-Of: odoo/enterprise#115098
This update corrects a discrepancy in the system's tests related to new Ecuadorian withholding tax percentages (as defined by a recent government regulation). The changes ensure accurate calculations for purchases and returns, aligning with current tax requirements. This ensures compliance and accurate reporting for our Ecuadorian clients.
Original PR description
In accordance with the implementation of the new withholding tax percentages according to "Resolución N.º NAC-DGERCGC26-00000009" for Ecuador, following internal implementation guidelines by TRESCLOUD. Unit tests are updated to be based on the new withholding percentages. BP #110343 Forward-Port-Of: odoo/enterprise#112957 Forward-Port-Of: odoo/enterprise#110712
This update resolves a bug preventing correct discount allocations when invoices are created with sales in foreign currencies. The fix ensures invoices are balanced accurately, addressing a previous error that caused invoice creation failures. This improves the reliability of our invoicing process for international transactions.
Original PR description
**STEP TO REPRODUCE** 1. Install the sale and accounting module. 2. Create 2 products, and setup each one with a different income account. 3. From the accounting settings, setup an account for Invoice Line discount -> Customer Invoice account. 4. Enable a currency, and create a pricelist for this currency. 5. Create the following SO: pricelist -> the pricelist you created previously. currency rate : 0.000717398539 line a: product_a, price 10, discount 57.85% line b: product_b, price 70, discount 57.85% From this SO, try to create an invoice. It will fail, saying the invoice it tried to create is unbalanced. opw-5974048 Forward-Port-Of: odoo/odoo#257897
This update fixes a minor visual issue where the IM status icon in the user menu was slightly misaligned. The change ensures the icon is centered within its container, creating a cleaner and more professional user interface. This improves the overall user experience.
Original PR description
**Current behavior before PR:** Since this https://github.com/odoo/odoo/pull/246182, the IM status icon in the user menu appears misaligned with its surrounding context, causing a slight visual offset. **Desired behavior after PR is merged:** This commit ensures that the IM status icon is properly aligned by centering it within its container. task-[6012657](https://www.odoo.com/odoo/project/1519/tasks/6012657) | Before | After | |--------|--------| | <img width="308" height="46" alt="image" src="https://github.com/user-attachments/assets/214083b2-5013-41ab-a02f-8f8d510b1ac5" /> | <img width="311" height="43" alt="image" src="https://github.com/user-attachments/assets/9a77718c-84d4-4be8-8cc4-a65516e957cd" /> | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261503
This update fixes a bug where bank statement reconciliations could incorrectly link transactions from different companies. The fix ensures that payments and bank statements share the same company hierarchy, preventing foreign tax lines from being added to the wrong company's financial records. This improves the accuracy of financial reporting.
Original PR description
ticket-5992100 When auto-reconciling bank statement lines, the end-to-end UUID lookup correctly checked that matched AMLs and their payment belong to the same company hierarchy, but missed checking that the payment also belongs to the same company hierarchy as the bank statement line itself. This allowed a payment from an unrelated company (sharing the same end-to-end UUID from an inter-company bank transfer) to be matched against another company's bank transaction, pulling foreign tax lines into the wrong company's journal entry. Fix by adding the same parent-path company check between the bank statement line and the payment. Forward-Port-Of: odoo/enterprise#114881 Forward-Port-Of: odoo/enterprise#113279
This update fixes issues with the AI chat interface, primarily addressing readability by reducing header font sizes and correcting formatting errors in AI responses. Specifically, the formatting of bold text within AI-generated content has been resolved, ensuring accurate display of text.
Original PR description
- The font-size of h1/h2 headers is large given the small size of chat channels which makes it harder to read the rest of the text. So, the font-size of h1/h2 headers is reduced in ai chat channels. - This commit removes the double border at the bottom of tables and updates the table borders by using table-bordered bootstrap class instead of border. - This commit also fixes an error where markdown2 2.4.11 doesn't detect the boundaries of bold markup properly causing asterisks to appear randomly inside AI responses. For example, "The **dog**, the **cat** and the **rat**" becomes "The <strong>dog<em>*, the *</em>cat<em>* and the *</em>rat</strong>" where it should only use <strong>dog/cat/rat</strong> task-6109286 Forward-Port-Of: odoo/enterprise#114592
This update fixes a technical issue that could cause the Odoo application to unexpectedly crash when multiple drag sequences were initiated. The fix ensures that the cancellation callback is available before the variable is assigned, preventing the crash in these specific, rare scenarios. This improves overall application stability.
Original PR description
### [FIX] web: fix crash when cancelling drag sequence Before this commit: drag sequences could be aborted by new drag sequences; the way this worked is that a new sequence would register its "cancel" callback in a global variable, and when another sequence is started, it calls that variable to cancel the previous one. The issue was that the variable was assigned too early; before the actual "cancel" callback was available. This means that in edge cases where 2 sequences would be triggered in less than (effectively) a resolved promise, the callback would not be available and a crash would occur. This commit moves the variable assignment *after* the "cancel" callback is made available, ensuring there is no crash. Runbot [243113](https://runbot.odoo.com/odoo/error/243113) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261345 Forward-Port-Of: odoo/odoo#260594
This update resolves an issue where the quick create feature for product variants in the Bill of Materials form was incorrectly creating new, unrelated product templates instead of the intended variants. To ensure correct variant creation, the 'Create' and 'Create and Edit' options have been disabled, requiring users to create variants directly on the product template.
Original PR description
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create".…
Steps to produce: --- - Install `mrp`. - Go to Manufacturing > Products > Bills of Materials. - Click Create, select a product. - In the Product Variant field, type any value and click "Create". Issue: --- Using quick create on the Product Variant field does not create a variant of the selected product template. Instead, it creates a completely new, unrelated `product.template`. This is because the `create()` method on `product.product` is overridden to call super() with context `create_product_product=False`, which suppresses direct variant creation and forces creation through `product.template` instead, see [1]. **Why passing `default_product_tmpl_id` does not help:** One might expect that passing `default_product_tmpl_id` in the field context would cause the newly quick-created `product.product` to be linked to the already-selected `product.template`. However, because of the `create()` override above (introduced in [commit]), the variant creation is always redirected to `product.template`, ignoring any `default_product_tmpl_id` passed in context. It is therefore not possible in any case to quick-create a `product.product` that is correctly and directly linked to the currently selected `product.template`. Fix: --- Disable the "Create" and "Create and Edit" options. Since there is no way to quick-create a `product.product` that is correctly linked to the currently selected `product.template`, the user must create the variant directly on the product template first. [1]https://github.com/odoo/odoo/blob/f04d79d44873d0f1c35303a1a892f3a3a394ea17/addons/product/models/product_product.py#L364-L368 [commit]: https://github.com/odoo/odoo/commit/7389345696720255a9d3c72ca1d9c2f4e4ecd7b8 opw-6127738 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261316 Forward-Port-Of: odoo/odoo#259776
This update resolves a technical issue preventing invoices sent to Poland's KSeF system from being properly processed. The fix ensures that email and phone number fields are only included in the invoice XML if the buyer actually has that information, avoiding errors that caused rejection by the KSeF system. This improves invoice compatibility and reduces processing delays.
Original PR description
Before this commit: Steps 1. Create a Polish company 2. Create and send an invoice to KSeF where the buyer has no email or no phone number 3. KSeF rejects the invoice with error code 450 (semantic verification error) This happens because `Email` and `Telefon` elements are always rendered inside `DaneKontaktowe`, even when their values are empty, producing invalid empty tags. After this commit: Add `t-if="buyer.email"` and `t-if="buyer.phone"` guards on each field so that `Email` and `Telefon` are only rendered when a value is present. opw-6124187 Forward-Port-Of: odoo/odoo#259646
This update ensures that the AI chat window opens in full-screen mode, regardless of how it's initiated – through the system tray or command palette. Previously, the chat would open in a background window, which has now been resolved for a better user experience.
Original PR description
Prior to this commit, when opening the chat with an agent from the systray button, the chat window was opened in the background. This commit fixes the issue by adding a call to `channel.open` which opens the chat when in full-screen mode. This commit also fixes an issue where the chat window wasn't properly opened when done from the command palette. task-5172978 Forward-Port-Of: odoo/enterprise#114840 Forward-Port-Of: odoo/enterprise#114598
This update ensures that when scanning a GS1 barcode on a packaged product, the system correctly incorporates the product's due date. Previously, the system ignored the due date information on the packaging, leading to inaccurate expiration tracking. This change improves inventory management accuracy for products sold in packaged form.
Original PR description
Issue
-----
Scanning a GS1 barcode containing:
- packaging
- lot
- due date
disregards the due date when creating the new lot.
Steps to reproduce
-----
- Enable GS1 nomenclature & packagings
- Create a product
- barcode 23456789012344
- packaging with barcode 01234567890128
- some on hand quantity
- Create a delivery for a full packaging of the product
- Open the delivery in barcode
- Scan 02 01234567890128 15 270101 10 LOT1
- Validate
- Open the lot
> Expiration date is set to today
Cause
-----
The code expects the product be scanned, there is no logic to retrieve it from the packaging when missing.
-----
Ticket:
opw-6073489
Forward-Port-Of: odoo/enterprise#114327
Forward-Port-Of: odoo/enterprise#112490This update fixes an issue where power buttons within the Knowledge editor were being hidden due to incorrect boundary calculations. The change ensures the editor accurately accounts for margins, guaranteeing that power buttons remain visible for all users. This improves the user experience and functionality of the Knowledge editor.
Original PR description
**Current behavior before PR:** - Power buttons in Knowledge were hidden incorrectly because `editableRect.width` was used as the boundary. Since the editable area has margins applied, this width no longer reflects the actual boundary, causing buttons to be hidden. **Desired behavior after PR is merged:** - Use `editableRect.right + referenceRect.left` instead of `editableRect.width` to determine the correct boundary, ensuring power buttons remain visible in when editable area has margin applied to it. task-6102944 Forward-Port-Of: odoo/odoo#259532
This update ensures that IoT boxes send the correct data to the Odoo database. A missing field was corrected in the 'subscribe' message, allowing the database to properly process information from the IoT devices. This improves the reliability of data updates from our IoT integrations.
Original PR description
In odoo/odoo#260380, a new required field was added to the websocket `subscribe` message, `check_outdated`. This commit adds this field to the subscribe message sent from the IoT box so that the DB can process it successfully. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261687
This update corrects a potential error in the account reports module where custom modules could cause conflicts when querying for the 'state' field. By using aliases for column references, the system now correctly identifies and resolves ambiguous column names, ensuring accurate reporting across all client configurations.
Original PR description
Issue: ------- There are cases where clients might have the same named 'state' field/column for custom modules in the models 'res.partner' or 'account.fiscal.position' and therefore they might get conflicted with the standard one's when the below query executes, https://github.com/odoo/enterprise/pull/84391/changes#diff-2f90e40d6e7b35681a4af03037e8e5ee0fddab2ba0876d9f148bf79786a91c29R1359 and can cause ``` File "/home/odoo/src/enterprise/account_reports/models/account_return.py", line 2204, in _check_suite_common_vat_report self.env.cr.execute(SQL( File "/home/odoo/src/odoo/odoo/sql_db.py", line 433, in execute self._obj.execute(query, params) psycopg2.errors.AmbiguousColumn: column reference "state" is ambiguous LINE 9: state = 'posted' ``` Solution: ------------ Use the corresponding alias while mentioning the column i.e; `move.state = 'posted'` OPW - 6044665 Forward-Port-Of: odoo/enterprise#114341
This update fixes an issue where stock wasn't being properly reserved for delivery orders when stock arrived at a child location within the warehouse system. Now, when a delivery order is waiting for stock to arrive at a child location, the system automatically reserves the appropriate quantity, ensuring accurate stock tracking. This prevents over-delivery and improves order fulfillment accuracy.
Original PR description
Steps to reproduce: - Create a storable product with no stock on hand - Create a delivery order from WH/Stock → state is "Waiting for Availability" - Create a receipt with destination WH/Stock/Shelf1 and validate it Problem: The incoming quantity is not reserved against the waiting delivery, even though WH/Stock/Shelf1 is a child of WH/Stock. opw-6124879 Forward-Port-Of: odoo/odoo#261334 Forward-Port-Of: odoo/odoo#261072
This update resolves two issues impacting how users manage manufacturing orders through the Barcode app. Previously, changing the UoM after confirmation or modifying the 'Produce Quantity' would reset, leading to data inconsistencies. This fix ensures that UoM changes are correctly applied and that entered quantity values are preserved, improving data accuracy and usability.
Original PR description
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not…
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not recalculate `product_qty` / `qty_producing`. The backend locks the UoM after confirm — the Barcode view did not. **2. `qty_producing` reset on wizard open/close** Typing a value in `qty_producing` then opening the "Change Qty to Produce" widget (even closing without saving) caused the typed value to vanish. Root cause: the widget's `onClose` calls `env.model.load()`, which refetches from DB and discards any unsaved form edits. ### Fix - `product_uom_id` in the Barcode MO form is now readonly once `state != 'draft'`, matching the backend. - `openChangeQtyWizard` now saves the record before opening the wizard, so pending edits survive the reload. ### Steps to reproduce **UoM bug** 1. Create an MO, confirm it. 2. Open it in the Barcode app. 3. Try to change the UoM → it was editable (bug). **Qty reset bug** 1. Open a confirmed MO in the Barcode app, go to the header product page. 2. Type a value in `qty_producing` (e.g. `3`). 3. Click the `/ X` button next to it (opens the Change Qty wizard) then close it without clicking "Set Quantity". 4. `qty_producing` reverts to its previous value (bug). ### After the fix - UoM field is greyed out once the MO is confirmed. - Typed value in `qty_producing` is preserved after opening and closing the wizard. opw-5809178 Forward-Port-Of: odoo/enterprise#114452 Forward-Port-Of: odoo/enterprise#114075
This update fixes a problem where payment reminder emails for subscriptions were missing the subscription's end date. The change ensures that all payment reminder emails, regardless of how they're generated (automated or manually through the email composer), accurately display the subscription's closing date. This improves the clarity and accuracy of communication with customers.
Original PR description
### Issue before this commit: When sending a payment reminder email for a subscription using the email composer, the template was not correctly populated with the expected dynamic values. In…
### Issue before this commit: When sending a payment reminder email for a subscription using the email composer, the template was not correctly populated with the expected dynamic values. In particular, fields such as the subscription closing date and the subscription code were missing. ### Steps to reproduce the issue: 1. Install subscription and go to that app 2. Open one subscription 3. Send message > Load template: "Subscription: Payment Reminder" 4. Sentence is incomplete: missing end date of the subscription ### Cause of the issue: The issue was caused by the absence of a proper context injection when rendering the email template from the mail.compose.message wizard. The template relied on context variables like date_close, but these values were not being computed nor passed during manual email composition. Unlike automated flows, the composer did not provide the subscription-specific context required by the template. ### Reason to introduce the fix: The fix makes the payment reminder and closing templates self-sufficient by replacing context-based values with fields and helper methods directly available on the subscription record. A dedicated method is introduced to compute the subscription close date consistently, so the templates render the expected values both in automated flows and when manually loaded from the email composer. opw-6031613 Forward-Port-Of: odoo/enterprise#114839 Forward-Port-Of: odoo/enterprise#111801
This update fixes an issue where stock quantities weren't always correctly reflected in the unit of measure of purchase orders. It now automatically creates pickings for partial and empty orders, ensuring accurate stock tracking. Additionally, the demo stock data was adjusted to prevent negative stock levels, maintaining the integrity of our demo environment.
Original PR description
Make sure that the quantity received is in the unit of measure of the purchase order line. Also, when installing stock, create pickings for partial and empty sale/purchase orders. Finally, since creating we're creating more pickings, we need to raise the demo stock of product_product_12 to not be in negative stock for other modules demo data. task 5431550 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245281
A minor technical issue was resolved where the wrong function was being utilized within the VoIP sales module. This fix ensures accurate processing of VoIP calls related to sales transactions. The change improves the stability and reliability of the sales process.
Original PR description
Shh! We used the wrong function. Forward-Port-Of: odoo/enterprise#114869
This update fixes an issue where the ‘Ordered Quantity’ on the delivery slip was incorrectly calculated, leading to inaccurate reporting. Now, the ‘Ordered Quantity’ always matches the actual delivered quantity, ensuring accurate inventory tracking and reporting, especially when no backorders are used.
Original PR description
**Steps to reproduce:** * Install the *Inventory* (`stock`) module. * Create a *Storable Product* and set some *On Hand* quantity. * Go to *Inventory → Operations → Receipts*. * Create a new receipt.…
**Steps to reproduce:**
* Install the *Inventory* (`stock`) module.
* Create a *Storable Product* and set some *On Hand* quantity.
* Go to *Inventory → Operations → Receipts*.
* Create a new receipt.
* Add the product with a *Demand* quantity (e.g. 10).
* Validate the receipt:
* Case 1: Validate with less quantity than demand (e.g. 8) and choose *No Backorder*.
* Case 2: Validate with more quantity than demand (e.g. 12).
* Click on *Print( Delivery Slip)*.
**Observed behavior:**
* The *Ordered Quantity* is equal to the *Delivered Quantity*.
* Case 1 (Demand=10, Done=8):
* Ordered = 8, Delivered = 8.
* Case 2 (Demand=10, Done=12):
* Ordered = 12, Delivered = 12.
**Expected behavior:**
* Case 1 (Demand=10, Done=8):
* Ordered = 10, Delivered = 8.
* Case 2 (Demand=10, Done=12):
* Ordered = 10, Delivered = 12.
**Cause:**
* Clicking on *Print* triggers `stock.action_report_delivery`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/views/stock_picking_views.xml#L156
* This renders `stock.report_deliveryslip`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/report/stock_report_views.xml#L14
* The QWeb template calls `report_delivery_document`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/report/report_deliveryslip.xml#L288-L292
* Which relies on `_get_aggregated_product_quantities`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/report/report_deliveryslip.xml#L157
CASE- 1
* When validating with *less quantity* and *no backorder*:
* In `_get_aggregated_product_quantities`, `qty_ordered` is initialized to `None` and only set when `backorders and not kwargs.get('strict')`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move_line.py#L881
* If no backorder exists, the condition fails and `qty_ordered` remains `None` and it come out of condition
* where it take quantity `'qty_ordered': qty_ordered or quantity,` https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move_line.py#L898
* As a result, *Ordered Quantity* becomes equal to *Delivered Quantity*.
CASE-2
* When validating with *more quantity* than demanded:
* `_action_done` creates an extra move using `_create_extra_move()`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move.py#L1936
* The extra move is merged back via `_action_confirm(merge_into=self)`: https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move.py#L1878
* The original move keeps `product_uom_qty = 10` but now has two move lines (10 + 2).
* In `_get_aggregated_product_quantities`: Both move lines share the same `line_key`
- **ML1** → `line_key` not yet in dict → enters [if] https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move_line.py#L880 **ML2** → `line_key` already in dict → enters `else` block https://github.com/odoo/odoo/blob/5c1000cb11da64bf317f9bd9b0ae71f6fbea910d/addons/stock/models/stock_move_line.py#L901-L903
→ `qty_ordered += 2` → `qty_ordered = 12` ✗ (surplus added to demand)
→ `quantity += 2` → `quantity = 12` ✓
* The `else` branch was designed to aggregate multiple lines of the
same product (e.g. two lot lines). The bug was that it added the
**done qty** of each line to `qty_ordered` unconditionally, causing
the surplus from over-delivery to inflate the ordered quantity.
* After the fix:
* Case 1 (Demand=10, Done=8):
* Ordered = 10, Delivered = 8.
* Case 2 (Demand=10, Done=12):
* Ordered = 10, Delivered = 12.
* NOTE:
Adapt the existing test case `test_kit_packaging_delivery_slip`
to reflect the corrected behavior of delivery validation.
The test was originally introduced in this [commit](https://github.com/odoo/odoo/pull/161920/changes/47da1ec13a2189e826d3b0539e6494e35990ccc1).
Its main objective is to ensure that the Delivery Slip report prints successfully
Previously, when validating a transfer with:
Delivered quantity less than the demanded quantity, No backorder created
the Ordered Quantity was being reduced(24->12) to the delivered quantity.
After the fix, the Ordered Quantity correctly remains equal(24->24) to the original demand.
<details>
<summary>Click here to see the results:</summary>
<p><strong>Before:</strong></p>
<div>
<img src="https://github.com/user-attachments/assets/88d24079-b278-4ef9-bff2-c7f14fe7ecb7" />
<img src="https://github.com/user-attachments/assets/c6181771-7d91-4ffe-9ed8-17dffac346f7" />
</div>
<p><strong>After:</strong></p>
<div>
<img src="https://github.com/user-attachments/assets/6ed57881-8af3-42ad-94d4-7c44a5b9b00e" />
<img src="https://github.com/user-attachments/assets/b5506c81-3ed9-416b-8099-108a75588b13" />
</div>
</details>
---
opw-5874759
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#261612
Forward-Port-Of: odoo/odoo#250587This update resolves an issue where expense card payments were incorrectly rejecting transactions from airlines, car rentals, and hotels due to missing Merchant Category Codes (MCCs). The update adds the necessary MCC ranges to the system, ensuring these expense types can be processed correctly. This improves the functionality of the Stripe expense card.
Original PR description
In the expense card, when a payment is made. The card can be filtered to only allow certains category of merchant. However, the 3 ranges of MCC we not added: - Airlines, air carriers: MCC's from 3000 to 3350 - Car Rental Agencies: MCC's from 3351 to 3500 - Lodging, hotels, motels and resorts: MCC's from 3501 to 3999 And since the MCC are not present in the list, they are rejected by default even the card is set to accept all MCCs. task-5486945 Forward-Port-Of: odoo/enterprise#115379 Forward-Port-Of: odoo/enterprise#114154
12 changes
Resolved issues and error corrections
A recent update caused newly added overtime lines on attendance records to disappear. This fix disables the ability to add new overtime lines, resolving the synchronization problem and preventing data loss. This ensures accurate work entry tracking.
Original PR description
Steps to reproduce: - On an attendance with overtime, click the "Add a line" button and add a new overtime line - Refresh the page - The newly added line has disappeared and navigating to work entries causes a traceback How it was fixed: Disabled the ability to add a new overtime line. Task ID: 5899657 Forward-Port-Of: odoo/odoo#261224 Forward-Port-Of: odoo/odoo#248431
This update corrects a bug that was causing overtime work entries to incorrectly generate on previous days. The fix adjusts how work entries are regenerated, considering employee timezones to accurately determine the correct start date for overtime calculations. This ensures payroll reports are reliable.
Original PR description
How to reproduce: - Select an employee with an overtime ruleset and work entries based on attendances - Create attendance with an approved overtime - Go to "Work Entries" in Payroll, and regenerate…
How to reproduce: - Select an employee with an overtime ruleset and work entries based on attendances - Create attendance with an approved overtime - Go to "Work Entries" in Payroll, and regenerate the work entries for the following day of the attendance - A new overtime work entry is generated on the first day. Reason: Because of how regenerating work entries is done, the computed date for searching overtime lines took into account the previous day (i.e. regenerating a work entry for a tuesday in an UTC+1 timezone made it so the starting date was on monday at 23:00:00), and since the _read_group only looked at the date part of the time start without taking into account the hour, it included the overtime of the previous day. How it was fixed: The domain now takes into account the timezone of the employee to generate the domain for the _read_group to ensure the correct day is selected Task ID: 5899657 Forward-Port-Of: odoo/enterprise#115032 Forward-Port-Of: odoo/enterprise#107266
This update fixes an issue where power buttons within the Knowledge editor were being hidden due to incorrect boundary calculations. The change ensures the editor accurately accounts for margins, guaranteeing that power buttons remain visible and functional for all users.
Original PR description
**Current behavior before PR:** - Power buttons in Knowledge were hidden incorrectly because `editableRect.width` was used as the boundary. Since the editable area has margins applied, this width no longer reflects the actual boundary, causing buttons to be hidden. **Desired behavior after PR is merged:** - Use `editableRect.right + referenceRect.left` instead of `editableRect.width` to determine the correct boundary, ensuring power buttons remain visible in when editable area has margin applied to it. task-6102944 Forward-Port-Of: odoo/odoo#259532
This update resolves two issues impacting how production orders are managed within the Barcode app. Previously, changes to the unit of measure and production quantities were not saved correctly, leading to inconsistencies. Now, these changes are reliably saved and reflected, ensuring accurate production tracking.
Original PR description
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not…
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not recalculate `product_qty` / `qty_producing`. The backend locks the UoM after confirm — the Barcode view did not. **2. `qty_producing` reset on wizard open/close** Typing a value in `qty_producing` then opening the "Change Qty to Produce" widget (even closing without saving) caused the typed value to vanish. Root cause: the widget's `onClose` calls `env.model.load()`, which refetches from DB and discards any unsaved form edits. ### Fix - `product_uom_id` in the Barcode MO form is now readonly once `state != 'draft'`, matching the backend. - `openChangeQtyWizard` now saves the record before opening the wizard, so pending edits survive the reload. ### Steps to reproduce **UoM bug** 1. Create an MO, confirm it. 2. Open it in the Barcode app. 3. Try to change the UoM → it was editable (bug). **Qty reset bug** 1. Open a confirmed MO in the Barcode app, go to the header product page. 2. Type a value in `qty_producing` (e.g. `3`). 3. Click the `/ X` button next to it (opens the Change Qty wizard) then close it without clicking "Set Quantity". 4. `qty_producing` reverts to its previous value (bug). ### After the fix - UoM field is greyed out once the MO is confirmed. - Typed value in `qty_producing` is preserved after opening and closing the wizard. opw-5809178 Forward-Port-Of: odoo/enterprise#114452 Forward-Port-Of: odoo/enterprise#114075
This update resolves issues causing discrepancies between imported BIS3 invoices and their source XML files. The changes improve the accuracy of invoice totals by streamlining the import process and ensuring values are correctly applied. The team has also implemented a new, more manageable testing approach for BIS3 imports.
Original PR description
This commit refactors the import code of BIS3 Invoice to fix various issues about unsynchronized values between the imported invoice and the source XML file. The new way we import BIS3 invoice can be…
This commit refactors the import code of BIS3 Invoice to fix various issues about unsynchronized values between the imported invoice and the source XML file. The new way we import BIS3 invoice can be categorized as: - collecting all the values from the XML to a dictionary object - prepare the values and amounts to write to the invoice in its entirety using the tax computation engine helpers - write the whole processed values to the invoice (as a single write) - (in 18.0 ~ 18.2) recalculate discrepancies and update the invoice lines (if needed) with the corrected amounts This commit also includes a new test suite for BIS3 import, and a new approach of import testing, "Partial Imports", is introduced to better atomize the big import test files (and make it understandable). In the long term, `l10n_account_edi_ubl_cii_tests` will eventually be removed in favor of these small-but-many partial tests. task-id: 5058687 Co-authored-by: Yosua Nicolaus <yoni@odoo.com> Forward-Port-Of: odoo/odoo#260803 Forward-Port-Of: odoo/odoo#250160
This update enhances the accuracy of invoice imports by adding a key field (`partner`) to the query builder for move lines. This resolves issues with unsynchronized values during import, particularly related to invoices generated with UBL formats. It's part of a larger effort to improve data consistency within the Enterprise version.
Original PR description
This commit is part of a bigger commit on the community side- to refactor the import code of BIS3 Invoice to fix various unsynchronized values issues. task-id: 5058687 Forward-Port-Of: odoo/enterprise#114717 Forward-Port-Of: odoo/enterprise#108356
This update resolves a potential error in the account reports module where clients with custom modules could experience conflicts when querying standard 'state' fields. By explicitly using column aliases in queries, this fix ensures data integrity and prevents ambiguous column references, improving report accuracy.
Original PR description
Issue: ------- There are cases where clients might have the same named 'state' field/column for custom modules in the models 'res.partner' or 'account.fiscal.position' and therefore they might get conflicted with the standard one's when the below query executes, https://github.com/odoo/enterprise/pull/84391/changes#diff-2f90e40d6e7b35681a4af03037e8e5ee0fddab2ba0876d9f148bf79786a91c29R1359 and can cause ``` File "/home/odoo/src/enterprise/account_reports/models/account_return.py", line 2204, in _check_suite_common_vat_report self.env.cr.execute(SQL( File "/home/odoo/src/odoo/odoo/sql_db.py", line 433, in execute self._obj.execute(query, params) psycopg2.errors.AmbiguousColumn: column reference "state" is ambiguous LINE 9: state = 'posted' ``` Solution: ------------ Use the corresponding alias while mentioning the column i.e; `move.state = 'posted'` OPW - 6044665 Forward-Port-Of: odoo/enterprise#114341
This update fixes a recent issue where users needed to manually pair their Bluetooth devices with the IoT Box. The fix resolves a technical problem where the device was forcibly disconnecting Bluetooth connections at startup. Now, supported devices should automatically connect when in range, improving the user experience.
Original PR description
According to the IoT Box documentation written in 10/2019, supported Bluetooth devices should connect automatically whenever they are in range of the IoT Box: https://github.com/odoo/documentation/commit/16f2f26f8ae6d9040195c854da337e0dcbbff955#diff-b5974750d9a7f12db80e4922399a7cacd26228dec979ca0fbb504faac386efc8R27 This behavior had broken at some point, requiring manual pairing via bluetoothctl on the IoT Box to establish a connection. Root causes identified and fixed: - The interface was forcibly disconnecting all already-connected BLE devices at startup, kicking them mid-GATT handshake - No BlueZ pairing agent was registered, causing AuthenticationFailed during the pairing negotiation Automatic connection on proximity is now restored. opw-5473691 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where selling a main asset with a closed child asset resulted in incorrect accounting entries. The fix ensures that only non-closed assets are considered during the sale process, preventing double-entry errors and maintaining accurate fixed asset, depreciation, and gain calculations. A new test case confirms the resolution.
Original PR description
This commit fixes the double entries created when selling the main asset after disposing the child asset. Previously, the sale of the main asset with a closed child asset created 2 entries which resulted in wrong values in fixed asset, depreciation, and gain accounts. This commit filters the non-closed/non-cancelled assets, while previously it would try to close/sell all assets even if it was already closed/cancelled. Test case added to verify fix. opw-6018649 Forward-Port-Of: odoo/enterprise#115115
This update fixes an issue where stock quantities weren't always correctly reflected in the unit of measure of purchase orders. It now automatically creates pickings for both partial and empty sale/purchase orders, ensuring accurate stock tracking. Additionally, the demo stock for a key product has been adjusted to prevent negative stock levels in other demo data, maintaining data integrity.
Original PR description
Make sure that the quantity received is in the unit of measure of the purchase order line. Also, when installing stock, create pickings for partial and empty sale/purchase orders. Finally, since creating we're creating more pickings, we need to raise the demo stock of product_product_12 to not be in negative stock for other modules demo data. task 5431550 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245281
This update corrects a previous issue where expense cards were not recognizing payments from airlines, car rental agencies, or hotels. The system now includes the necessary Merchant Category Codes (MCCs) to process these transactions, ensuring users can accurately track and categorize their expenses. This resolves a rejection of payments that would otherwise have occurred.
Original PR description
In the expense card, when a payment is made. The card can be filtered to only allow certains category of merchant. However, the 3 ranges of MCC we not added: - Airlines, air carriers: MCC's from 3000 to 3350 - Car Rental Agencies: MCC's from 3351 to 3500 - Lodging, hotels, motels and resorts: MCC's from 3501 to 3999 And since the MCC are not present in the list, they are rejected by default even the card is set to accept all MCCs. task-5486945 Forward-Port-Of: odoo/enterprise#115379 Forward-Port-Of: odoo/enterprise#114154
This update makes the timesheet assistant view more user-friendly by implementing small adjustments for better clarity. These changes enhance the overall experience for users managing their timesheets within the Odoo Enterprise system. The update focuses on improving usability and streamlining workflows.
Original PR description
Improve the assistant view with small adjustments to enhance clarity and user‑friendliness. Forward-Port-Of: odoo/enterprise#114339
2 changes
Resolved issues and error corrections
This update corrects a potential error in the account reporting module that could occur when clients use custom fields with the same name as standard Odoo fields. The fix ensures that column references are clearly defined, preventing conflicts and ensuring accurate report generation. This improves data reliability for our clients.
Original PR description
Issue: ------- There are cases where clients might have the same named 'state' field/column for custom modules in the models 'res.partner' or 'account.fiscal.position' and therefore they might get conflicted with the standard one's when the below query executes, https://github.com/odoo/enterprise/pull/84391/changes#diff-2f90e40d6e7b35681a4af03037e8e5ee0fddab2ba0876d9f148bf79786a91c29R1359 and can cause ``` File "/home/odoo/src/enterprise/account_reports/models/account_return.py", line 2204, in _check_suite_common_vat_report self.env.cr.execute(SQL( File "/home/odoo/src/odoo/odoo/sql_db.py", line 433, in execute self._obj.execute(query, params) psycopg2.errors.AmbiguousColumn: column reference "state" is ambiguous LINE 9: state = 'posted' ``` Solution: ------------ Use the corresponding alias while mentioning the column i.e; `move.state = 'posted'` OPW - 6044665 Forward-Port-Of: odoo/enterprise#114341
This update fixes an issue where payment methods weren't correctly displayed for branch companies within Odoo. Now, when working with a branch company, the 'Payment Method' field in the partner and account move forms will consistently show available methods from the parent company, ensuring accurate financial processing.
Original PR description
**Steps to reproduce:** - Install Contacts and Accounting - Create a branch company - Switch to the branch company **Issue:** In the partner form, "Payment Method" field doesn't propose the methods coming from the parent company. Same issue on the account move form. However, in the payment wizard opened from an invoice, the payment methods from the parent company are available. The behavior should be consistent. The payment methods from the parent company should be available from a branch company opw-6001573 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260168
3 changes
Resolved issues and error corrections
This update fixes an error in how emission factors are converted within the ESG module. The previous process resulted in incorrect calculations, particularly when using kilograms as the unit. This change ensures accurate reporting of emissions based on the chosen factors.
Original PR description
Issue: ---------------------------------------- The conversions using Emission factors are done in the wrong way. Steps to reproduce: ---------------------------------------- - Install `esg` module - Create an Emission Factor from ton to kg of 1000 - Create a new Emission using the new factor, set the unit as kg - Notice the conversion is wrong Cause: ---------------------------------------- The two uom are inverted when calling `_compute_quantity()`. Same occured for the currencies. opw-6152413
This update resolves two issues impacting how manufacturing orders are managed within the Barcode app. Previously, changing the UoM after confirming an order or resetting the 'Produce Quantity' would cause data inconsistencies. The fix ensures that UoM changes are correctly reflected and that entered quantity values are preserved, improving order accuracy and workflow.
Original PR description
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not…
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not recalculate `product_qty` / `qty_producing`. The backend locks the UoM after confirm — the Barcode view did not. **2. `qty_producing` reset on wizard open/close** Typing a value in `qty_producing` then opening the "Change Qty to Produce" widget (even closing without saving) caused the typed value to vanish. Root cause: the widget's `onClose` calls `env.model.load()`, which refetches from DB and discards any unsaved form edits. ### Fix - `product_uom_id` in the Barcode MO form is now readonly once `state != 'draft'`, matching the backend. - `openChangeQtyWizard` now saves the record before opening the wizard, so pending edits survive the reload. ### Steps to reproduce **UoM bug** 1. Create an MO, confirm it. 2. Open it in the Barcode app. 3. Try to change the UoM → it was editable (bug). **Qty reset bug** 1. Open a confirmed MO in the Barcode app, go to the header product page. 2. Type a value in `qty_producing` (e.g. `3`). 3. Click the `/ X` button next to it (opens the Change Qty wizard) then close it without clicking "Set Quantity". 4. `qty_producing` reverts to its previous value (bug). ### After the fix - UoM field is greyed out once the MO is confirmed. - Typed value in `qty_producing` is preserved after opening and closing the wizard. opw-5809178 Forward-Port-Of: odoo/enterprise#114452 Forward-Port-Of: odoo/enterprise#114075
This update resolves an issue where generating timesheets after archiving an employee would trigger an error. The fix prevents timesheets from considering time off requests for previously archived staff, ensuring accurate reporting. This improves data integrity and simplifies time management processes.
Original PR description
[FIX] project_timesheet_holidays: Exclude archived employees from time-off # Description of the issue/feature this PR addresses: ## Steps to Reproduce: 1. Create a time off for Employee A (it should…
[FIX] project_timesheet_holidays: Exclude archived employees from time-off # Description of the issue/feature this PR addresses: ## Steps to Reproduce: 1. Create a time off for Employee A (it should affect the timesheets). 2. Create a new public holiday (global time off) that overlaps with Employee A’s time off. 3. Archive Employee A. 4. Delete the public holiday created in step 2. 5. An error related to timesheet generation appears. ## Expected Behavior: - The public holiday / global time off should be deleted without any error. # Desired behavior after PR is merged: ## Fix (Implemented): When regenerating timesheets due to changes in holidays or time off, leaves related to archived employees should not be taken into account. A check was added inside the `_generate_timesheets` function in `project_timesheet_holidays/models/hr_holidays.py` to exclude leaves belonging to archived employees. ## Alternative Fix (Not Implemented): Instead of filtering out leaves linked to archived employees, we could delete those leaves when an employee is archived. However, this approach is not ideal, as archived employees may be reactivated later and would still need their previously requested time off to be preserved. ## Version: This bug appears in both version 17.0 and 19.0. I assumed that it also appears in 18.0 but didn't directly test ## Task: [5474038](https://www.odoo.com/odoo/project/4105/tasks/5474038) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260725 Forward-Port-Of: odoo/odoo#244203
2 changes
Resolved issues and error corrections
This update resolves an issue where the custom declaration field for international World Express Pro shipments within the BPost module was not being automatically filled. Now, the system correctly populates this critical field, ensuring accurate customs documentation for international orders. This improves compliance and reduces potential delays.
Original PR description
Before this commit, the bpost module was not filling the custom declaration in case of international shipping (World Express Pro) After this commit, the section is filled opw-4932970 Forward-Port-Of: odoo/enterprise#101476
This update ensures that barcode receipts are properly validated, even when the 'Force a destination' setting is enabled. The change adds a check to confirm a destination scan before validation, preventing issues where receipts wouldn't validate correctly. This ensures consistent and reliable barcode scanning functionality.
Original PR description
### Steps to reproduce: - In the settings: Enable "Storage Locations" - Inventory > Configuration > Warehouse Management > Operation Types - On receipts, in the Barcode App tab enable: "Force a…
### Steps to reproduce: - In the settings: Enable "Storage Locations" - Inventory > Configuration > Warehouse Management > Operation Types - On receipts, in the Barcode App tab enable: "Force a destination on all products" - Open the barcode app, create a new receipt - Scan a product > Validate #### > You are not blocked by the fact that you did not scan any destination even just to validate the default one ### Cause of the issue: The `barcode_validation_after_dest_location` operation type setting is not used at any point in the barcode app. ### Note: Line in the barcode app are always created a with a `location_dest_id`: https://github.com/odoo/enterprise/blob/a220fc61d9076decdb987421df9330a1c2c20546/stock_barcode/static/src/models/barcode_picking_model.js#L1310-L1322 In particular, even if the setting says: Force a destination on all products. It should rather be interpreted as force a destination scan before validation. Note that a destination scan will not necessarily update a single line but rather all concerned lines at once: https://github.com/odoo/enterprise/blob/a220fc61d9076decdb987421df9330a1c2c20546/stock_barcode/static/src/models/barcode_picking_model.js#L1558-L1576 It is therefore a valid call to check if a location dest was scanned to determine if the a destination was set on each product before validation of the picking, even if it is just to confirm the default destination. ### Note 2: We modify the `_get_barcode_config` to only provide a `barcode_validation_after_dest_location` if locations re enabled otherwise users enabling the option without the ability to scan locations would be soft lock and unable to validate their picking. That same logic already being applied to the `restrict_scan_dest_location` config parameter: https://github.com/odoo/enterprise/blob/6afe02e3e836df2822d7cae8aebbd5bdde6b34cc/stock_barcode/models/stock_picking_type.py#L109 opw-6110690 Forward-Port-Of: odoo/enterprise#114429
8 changes
Resolved issues and error corrections
This update resolves two issues impacting manufacturing order processing within the Barcode app. Previously, changing the unit of measure or production quantity after confirming a MO would reset, leading to data inconsistencies. The fix ensures that UoM changes are correctly applied and that entered production quantities are preserved, improving data accuracy and workflow reliability.
Original PR description
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not…
### Issue Two bugs reported in the Barcode app / Manufacturing Order flow: **1. UoM change after confirm leaves MO inconsistent** Changing the UoM on a confirmed MO via the Barcode app does not recalculate `product_qty` / `qty_producing`. The backend locks the UoM after confirm — the Barcode view did not. **2. `qty_producing` reset on wizard open/close** Typing a value in `qty_producing` then opening the "Change Qty to Produce" widget (even closing without saving) caused the typed value to vanish. Root cause: the widget's `onClose` calls `env.model.load()`, which refetches from DB and discards any unsaved form edits. ### Fix - `product_uom_id` in the Barcode MO form is now readonly once `state != 'draft'`, matching the backend. - `openChangeQtyWizard` now saves the record before opening the wizard, so pending edits survive the reload. ### Steps to reproduce **UoM bug** 1. Create an MO, confirm it. 2. Open it in the Barcode app. 3. Try to change the UoM → it was editable (bug). **Qty reset bug** 1. Open a confirmed MO in the Barcode app, go to the header product page. 2. Type a value in `qty_producing` (e.g. `3`). 3. Click the `/ X` button next to it (opens the Change Qty wizard) then close it without clicking "Set Quantity". 4. `qty_producing` reverts to its previous value (bug). ### After the fix - UoM field is greyed out once the MO is confirmed. - Typed value in `qty_producing` is preserved after opening and closing the wizard. opw-5809178 Forward-Port-Of: odoo/enterprise#114452 Forward-Port-Of: odoo/enterprise#114075
This update resolves an issue where portal users were incorrectly seeing the 'View Timesheets' button, even when they lacked the necessary permissions. The fix utilizes a new helper method to accurately control button visibility, ensuring users only see options they are authorized to access. This improves the user experience and prevents confusion.
Original PR description
**Issue:** The 'View Timesheets' button is shown to the portal user even though they don’t have access to view timesheets. Currently, we have added _sale_order_get_page_view_values in the sale module, which is overridden in sale_timesheet. We are using it here. task-4745519 Forward-Port-Of: odoo/enterprise#115193 Forward-Port-Of: odoo/enterprise#113481
This update corrects a potential error in the account reports module where custom modules could cause conflicts when referencing the 'state' column. By explicitly using column aliases, the system now correctly identifies and resolves ambiguous column references, ensuring reports run smoothly across all client configurations.
Original PR description
Issue: ------- There are cases where clients might have the same named 'state' field/column for custom modules in the models 'res.partner' or 'account.fiscal.position' and therefore they might get conflicted with the standard one's when the below query executes, https://github.com/odoo/enterprise/pull/84391/changes#diff-2f90e40d6e7b35681a4af03037e8e5ee0fddab2ba0876d9f148bf79786a91c29R1359 and can cause ``` File "/home/odoo/src/enterprise/account_reports/models/account_return.py", line 2204, in _check_suite_common_vat_report self.env.cr.execute(SQL( File "/home/odoo/src/odoo/odoo/sql_db.py", line 433, in execute self._obj.execute(query, params) psycopg2.errors.AmbiguousColumn: column reference "state" is ambiguous LINE 9: state = 'posted' ``` Solution: ------------ Use the corresponding alias while mentioning the column i.e; `move.state = 'posted'` OPW - 6044665 Forward-Port-Of: odoo/enterprise#114341
This update ensures that when a company is quickly created through the equity module, the system correctly identifies it as a company. Previously, this wasn't happening, leading to incorrect data. The fix also includes a minor typo correction within the equity views.
Original PR description
The partner_id field on all equity models represents a company. Therefore, quick-creating a partner_id should create it with is_company set to True. However, that wasn't the case. This commit fixes this issue by making sure that partner_id when quick-created in equity models has is_company set to True. It also fixes a typo in the string attribute of valuation list and form views. task-6132343
This update corrects a technical issue where styling applied to a list view was incorrectly affecting other views within the account reports module. The fix ensures that styling is applied only to the intended list view, improving the visual consistency of reports. This resolves a minor cosmetic problem.
Original PR description
The css selector used to add the small border at the start of the line. So it end-up being applied in other view as well. task-6141685
This update resolves an issue where time off allocations couldn't be deleted after a payslip was validated. The fix adjusts the system to recognize that time off created *after* payslip validation can be safely deleted, removing a previous restriction. This improves usability for HR and payroll teams.
Original PR description
## Issue When creating a time off for a date that is already covered by a confirmed payslip, that time off cannot be deleted. ## Steps to reproduce 1. Install *Time Off in Payslips*…
## Issue
When creating a time off for a date that is already covered by a confirmed payslip, that time off
cannot be deleted.
## Steps to reproduce
1. Install *Time Off in Payslips* (`hr_payroll_holidays`)
2. Create or use an employee E with a running contract, e.g.:
- Contract: Jan 1 to Indefinite
- Wage: $1000/month
3. In Payroll > Payslips, create a new Off-Cycle for Employee E:
- Period: March 1 - March 31
- *Compute Sheet*, *Confirm* and *Mark as paid*
4. In Time Off > Management > Time Off, create a new time off allocation for Employee E:
- Date: anywhere during March
- *Save* and *Validate*
5. Try to delete the allocation
6. **An error occurs: _"The pay of the month is already validated with this day included. If you need to adapt, please refer to HR."_**
## Cause
The condition under which this error is raised is defined in `_check_uncovered_by_validated_payslip`:
https://github.com/odoo/enterprise/blob/0226ad15abc8db70f8e379fddec3d83d15749c85/hr_payroll_holidays/models/hr_leave.py#L195-L203
It was originally added by https://github.com/odoo/enterprise/commit/1abb4a815ecb32557fc773cae54baf3e205d9b8c to prevent the deletion of holidays created **before** validating a payslip.
The condition does not take in account the moment when the leave was created. If a leave is created after the computation of the payslip, it did not impact that payslip, and thus can be deleted without risk.
opw-6089990This update resolves an issue where the automated vendor invoice retrieval process (cron job) didn't correctly identify the target company within a multi-company Odoo setup. The fix ensures invoices are fetched from the correct company, preventing errors and improving data accuracy. This improves the reliability of reporting for businesses using multiple companies.
Original PR description
In a multi-company context, the cron might be run with a user having a default company that is not the same as the target moves companies, maybe raising a `RedirectionWarning` (if the current company is not fully set-up). This commit ensure to fetch the invoice in move's target company. opw-5225553 Forward-Port-Of: odoo/enterprise#115192 Forward-Port-Of: odoo/enterprise#113254
This update resolves an issue where payroll document validation incorrectly flagged users as unauthorized document owners in multi-company environments. The fix replaces a company-dependent field with a stored employee flag, ensuring accurate validation during background tasks like payroll generation. This prevents errors and ensures proper document access.
Original PR description
Steps to reproduce- 1) In a multi-company environment, create an employee in a secondary company. 2) Link a Portal User to this employee via the user_id field. 3) Create and validate a payslip for…
Steps to reproduce- 1) In a multi-company environment, create an employee in a secondary company. 2) Link a Portal User to this employee via the user_id field. 3) Create and validate a payslip for this employee. 4) Run the 'Payroll: Generate pdfs' cron. Error - ValidationError: The following user(s) cannot own root documents/folders: portal_employee: Payslip - portal_employee Cause - The validation logic uses the employee_id field on res.users to check if a user is an employee. Since employee_id is a non-stored computed field, its value depends on the current company context (self.env.company). When the payroll cron runs under the OdooBot user in the default company context (ID = 1), it cannot resolve the employee_id for users belonging to other companies. The field evaluates to False, causing the system to incorrectly flag the user as an unauthorized document owner. Fix - Replace the validation check with the employee boolean field. Unlike the computed Many2one, employee is a stored field that is not restricted by the active company context. This ensures that a user's employee status is correctly identified during background tasks across all companies. opw-6143042 Co-authored by Tina Lin (liti)
4 changes
Resolved issues and error corrections
This update ensures that a delivery is automatically created when a POS order is refunded through the backend. The previous version filtered out move lines during refund creation, leading to missing deliveries. This fix maintains the existing logic to ensure consistent behavior across versions and refund methods.
Original PR description
When creating a refund of a pos order linked to a SO the delivery is not created. Steps to reproduce: ------------------- * Create a product tracked by quantity * Create a SO with the product and…
When creating a refund of a pos order linked to a SO the delivery is not created. Steps to reproduce: ------------------- * Create a product tracked by quantity * Create a SO with the product and confirm it * Open a session and settle the SO * Go backend * Refund the order & pay it * See the delivery created > Obsrevation: it has no move lines. The pos order that settled the SO has move lines. Why the fix: ------------ Version 18.0 is the only version that filters the lines when creating moves. We notice the following commit: https://github.com/odoo/odoo/commit/e6678442ffe90e35a00e8b752e607d839920bee6 In the next version we're back with the original line as the logic was moved to a newly created module: https://github.com/odoo/odoo/commit/42bcc2b49d46695c4afc518bb0f89254e24c12dc Having a consistent code across version would solve this issue without triggering any issue on the test but the test was passing without the original fix. So instead we'll add a specific fix here as well to keep the original logic. A different behavior can be observed if we're refunding from the front or backend. When refunding from the front the refund order is not linked to the original SO thus `lines` don't get filtered. The difference with the backend comes from the fact that the refund is linked to the SO and thus the lines are filtered and we end up using no pos lines for creating move lines. As this behavior is consistent across versions we don't want to modify it for only 1 version. Plus if we modify the front behavior we still have the issue anyway. So not if the order has an origin SO id but is a refund of that original SO we don't filter it out for moves. opw-5963829
This update corrects an issue where the Partner Ledger displayed incorrect initial balances when the date range filter wasn't used. The fix ensures that the total balance accurately reflects the sum of all invoices, resolving a discrepancy between the ledger's summary and individual transactions. This improves the accuracy of financial reporting.
Original PR description
To reproduce the issue: 1) Create an invoice of 100 € for partner A in 2025 2) Create another invoice of 200€ for the same partner in 2026 3) Open the Partner Ledger for 2026. Unfold A. It shows an initial balance of 100€ and a total of 300€. 4) In debug mode, open the Partner Ledger's form view and uncheck the date range option. 5) Open the Partner Ledger like in step 3) ====> An initial balance of 300€ shows, making the total of Partner A (still 300€) inconsistent with the sum of its sublines (600€) feedback-6042305
This update fixes an issue where invoices weren't correctly generated for kit products with extra components. The change ensures that the system accurately handles inventory valuation and unit of measure discrepancies during the invoice creation process, preventing errors related to automatic accounting.
Original PR description
### Steps to reproduce: - In the settings Enable: "Automatic accounting" - Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time')…
### Steps to reproduce:
- In the settings Enable: "Automatic accounting"
- Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time') inventory valuation.
- Create a kit product with a component invoiced on delivered qty
- Create and confirm a sale order for 1 units of your kit
- On the delivery add a new move for 1 unit of your kit and save
#### > The new line should be exploded into the component
- Set the quantity on both moves and validate
- On the sale order > Create draft invoice > confirm
#### > User Error: The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure False defined on the product. Please correct the unit of measure defined on the order line or on the product. They should belong to the same category.
### Cause of the issue:
The issue occurs when the `_stock_account_get_anglo_saxon_price_unit` is launched on the account move line created for the extra component because the moves where generated from a kit and hence are associated with a `bom_line_id` but the the product it self is not a kit so that no bom will be found here:
https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L12-L23 In particular, the rest of the call that tries to treat it as a kit will fail because no bom is and should be provided to this line: https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L34
opw-6041375
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where test tags containing special characters like brackets were not being parsed correctly, leading to errors. The changes enhance the parser's ability to handle complex tag structures, ensuring accurate test execution and stability.
Original PR description
When using test tags for js tests, some tests are not parsed correctly when containing brackets `[ ]` This is because the tag selector use them to set parameters bounds as in…
When using test tags for js tests, some tests are not parsed correctly when containing brackets `[ ]` This is because the tag selector use them to set parameters bounds as in `.test_method[test_param]` The previous implementation using a regex could generate invalid test tags when the params contains comma, and brackets This commits fixes this two ways: Nested brackets will work, meaning that something like `.test_method[test, witch brackets[]]` will be correctly parsed as a tag `.test_method` with a parameter `test, witch brackets[]`since the brakets are balanced. Before, it was parsed as twho tags, `.test_method[test` and ` witch brackets[]]` the second one being considered invalid and spamming logs with errors Brackets and backslashes can be escaped with a backslash, meaning that something like `.test_method[test, with brackets], and backslash\]` can be escaped as `.test_method[test, with brackets\], and backslash\\]` Note that the parser will make it's best effort to parse non escaped strings, so a \ not followed by and escaped character will remain there in order to make potential copy paste easier. For the previous example `.test_method[test, with brackets\], and backslash\` will work the same way. So in practice, we only really need to escape \ when followed by another backslash or a bracket, and we need to escape brackets when they are not balanced. Comma in hoot tests are also a problem since they are used to separate parameters, this can easily be tested by only splitting on `,@` since all hoot test should start with a @ and parameters of test_unit_* tests should be a list of hoot tests. A followup pr will introduce the params to the canonical tag, and escape it as needed
2 changes
Resolved issues and error corrections
A technical update to the Odoo LDAP authentication system has been resolved. The original unit test was causing database issues and has been replaced with a simpler approach using an `HttpCase`. This fix prepares the unit test class for future improvements and bug fixes related to LDAP authentication.
Original PR description
The unit test is tagged `-standard` and `database_breaking` because it was leaving left overs in the database. Using an `HttpCase` over a `BaseCase` solves that issue in addition to make the code way simpler. We want to resurrect this unit test class because we plan to add another unit test in that class for a bug fix.
This update resolves an issue where self-billing invoices weren't correctly identified as credit notes when generating UBL documents for Peppol. By ensuring the correct document type is used, the system now accurately processes self-billing transactions. A demo setup has also been added for testing.
Original PR description
To reproduce: - Activate Peppol - Activate selfbilling on your purchase journal - Create a Vendor Refund - Generate the UBL => The InvoiceTypeCode is 389, meaning it's considered a selfbilling invoice, not a selfbilling credit note. The issue is that we never put the document type of credit_note for selfbilling documents as it wasn't expected. invoice was, due to a else encompassing invoices and bills. Also add a handle demo to be able to create selfbilling documents in demo mode. opw-6132226 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr