Daily updates from Odoo
Friday, June 5, 2026
50 changes · saas-19.2
New functionality added to Odoo
This update incorporates Azerbaijan's states into the Odoo system, aligning with international standards (ISO 3166-2). It now displays state names instead of country codes for Azerbaijani addresses, improving data accuracy and usability. This change enhances the system's ability to handle international address data correctly.
Original PR description
Added the states of Azerbaijan to align with official ISO 3166-2 standards. Also changed the address format of the country to show state name instead of state code. task-6236667 Forward-Port-Of: odoo/odoo#265959
Enhancements to existing features
This update adjusts the Obox application's position within the main menu. It now appears at the end of the list, just before 'Apps' and 'Settings'. This change improves user discoverability and simplifies navigation for Obox users.
Original PR description
This commit changes the Obox menu sequence so that the app appears at the end of the apps list by default (just before Apps and Settings). task-6275407 Forward-Port-Of: odoo/enterprise#119337
Resolved issues and error corrections
This update resolves a critical issue where the Swedish SIE 4 report export would crash due to excessive memory usage. The fix dramatically improves performance by optimizing the database query and reducing the amount of data processed in Python, allowing for handling of large datasets efficiently.
Original PR description
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive…
### Description of the issue/feature this PR addresses: Prevent Out of Memory (OOM) crashes and drastically improve execution speed when generating the Swedish SIE4 verification export for massive datasets. ### Current behavior before PR: When exporting a large volume of journal entries (e.g., 190,000+ account moves), the `_export_l10n_se_sie4_verification` method relies on iterating through heavy ORM recordsets and accessing relational child fields (move.line_ids) inside a loop. This triggers a severe N+1 query problem, maxing out server RAM and causing an OOM crash. ### Desired behavior after PR is merged: The method now utilizes a hybrid data extraction approach: - The ORM is used strictly to safely evaluate domains (multi-company rules, dates, states) and fetch a lightweight list of valid move_ids. - A single SQL query with JOIN statements fetches all parent moves, child lines, and account codes in exactly one database query. - itertools.groupby chunks the flat, lightweight dictionary results back into their respective journal entries. The export now handles massive datasets in seconds with minimal memory overhead, while remaining perfectly secure. ### Benchmark: For Memory: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 407MB| | ~200,000 moves | 1.8GB | 174.8 MB| For Speed: | # Input Data | Before PR | After PR | | -------- | -------- | -------- | | ~190,000 moves | MemoryError | 5.10s | | ~200,000 moves | 1m29s| 5.3s| ### Reference: opw-6067999 Forward-Port-Of: odoo/enterprise#118849 Forward-Port-Of: odoo/enterprise#113227
This update fixes a minor issue in the Odoo Enterprise spreadsheet functionality. A recent change in the underlying spreadsheet library required updating the way cell corner properties are named. This ensures the spreadsheet component functions correctly and avoids potential display problems.
Original PR description
Since https://github.com/odoo/o-spreadsheet/pull/6063, the props name for cellCorner have been changed to use kebab-case. Forward-Port-Of: odoo/enterprise#119329
This update resolves an issue where color selections within the HTML editor's collapsed mode weren't consistently applying. The fix adjusts the selection offset to prevent browser normalization, ensuring colors are correctly applied when changing them from the color picker. This improves the user experience and accuracy of color formatting.
Original PR description
Steps to Reproduce: - Apply color on a collapsed selection in mobile - Type some text - Change color from the color picker Description of the issue: - The color picker closes, but the selected color is not applied. Cause: - The color was being applied correctly, but the selection was positioned at offset 0 of the newly created font node. As a result, the browser normalized the selection back to the previous font node, making it appear as though the color was not applied. Solution: - When applying color on a collapsed selection, set the selection offset to 1 instead of 0. This prevents browser normalization and keeps the cursor inside the newly created font tag, ensuring the color is applied correctly. task-6201171 Forward-Port-Of: odoo/odoo#267807 Forward-Port-Of: odoo/odoo#265438
This update resolves an issue where the `google_address_autocomplete` widget remained editable even in read-only mode. The change ensures the widget correctly displays the field's value when set to read-only, improving the user experience and data consistency.
Original PR description
**Issue:** The `google_address_autocomplete` widget remained editable even when the view or field was set to `readonly`. **Solution:** Modified the `AddressAutoCompleteTemplate` to conditionally render the component. If `props.readonly` is true, the template now renders a `<span>` with the field value. Task~5182770 Forward-Port-Of: odoo/odoo#268109 Forward-Port-Of: odoo/odoo#260952
This update resolves an issue where setting a non-numeric value for the 'next check number' in the accounting module would cause an error. The change ensures that the system only attempts to convert the number to an integer if it contains valid digits, improving data entry reliability.
Original PR description
Currently, an error occurs when a user sets a non-numeric value as the journal's next check number. **Steps to Reproduce:** - Install the `account_check_printing` module with demo data. - Go to…
Currently, an error occurs when a user sets a non-numeric value as the journal's next check number. **Steps to Reproduce:** - Install the `account_check_printing` module with demo data. - Go to `Invoicing` > `Configuration` > `Accounting` > `Journals`. - Open the `bank journal`. - In the `Outgoing Payments` tab > Enable `Manual Numbering`. - Set the `next check number` to a `non-numeric` value `(e.g. FA1234)` and `save`. `ValueError: invalid literal for int() with base 10: 'FA1234'` After [this commit], the next check number is converted to an integer without first validating that it contains only numeric characters [1]. Since the value can be non-numeric, converting it directly to an integer raises the error. This commit ensures that the next check number is converted to an integer only after verifying that it contains numeric characters only. [this commit]: https://github.com/odoo/odoo/commit/cc2004404462ecb523f7877569ce6a06b05341b4 [1]- https://github.com/odoo/odoo/blob/00dd75f345d7f5ddb04cecf52eca07e5a22c7d3c/addons/account_check_printing/models/account_journal.py#L57-L61 sentry-7498755988 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266280
This update fixes a minor issue in the HTML editor where a shortcut key was incorrectly triggering a formatting action. Now, pressing the correct shortcut will reliably remove formatting from selected text, improving the user experience and ensuring consistent editing. This change ensures the HTML editor functions as intended for users.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267950
This update resolves an error that occurred when users clicked the 'translate' button in the CRM module. Specifically, the system was failing to correctly open the translation dialog in certain scenarios, leading to a technical error. This fix ensures the translation button functions reliably for all users.
Original PR description
Currently, an error occurs when the user clicks on the translate button. **Steps to Reproduce:** - Install the `CRM` module. - Go to `settings` and in `Languages` add 1 more language. - Go to `CRM` >…
Currently, an error occurs when the user clicks on the translate button. **Steps to Reproduce:** - Install the `CRM` module. - Go to `settings` and in `Languages` add 1 more language. - Go to `CRM` > `Configuration` > `Pipeline` > `Tags`. - Click `New` and, in the `Name` field click the `translate button` on the right. **Behavior in 18.0** When the tag name is not set, the translation dialog opens immediately. If a tag name is entered, the translation dialog shows the translated value on the second click. **Behavior in saas-19.1** `AssertionError: Invalid falsy real id` Error: After this [recent commit], when the user clicks on the translate button, if the record has a root record, the root record is saved before opening the translation dialog. However, in the case of an editable DynamicList view, the record does not have a root record so saving the record returns a promise instead of the resolved value [1]. Because of this promise, the condition fails [2], and the translation dialog is opened with a falsy ID since the record is not yet saved [3]. In saas-19.1, this issue raises Invalid falsy real id error after [this commit](https://github.com/odoo/odoo/commit/4290724a4c8c57fba4f4d3d688d38f65dadcc38f). This commit ensures that await is used so the resolved value is returned after the record is saved before opening the translation dialog. [recent commit]: https://github.com/odoo/odoo/commit/5245ec39a12e7d3a10fcc4c2c92b0f7dbf52d3be [1]: https://github.com/odoo/odoo/blob/9e3fc9568fcebcb1de6486d2ab7134e8a12087b7/addons/web/static/src/views/fields/translation_button.js#L23 [2]: https://github.com/odoo/odoo/blob/9e3fc9568fcebcb1de6486d2ab7134e8a12087b7/addons/web/static/src/views/fields/translation_button.js#L24-L26 [3]: https://github.com/odoo/odoo/blob/9e3fc9568fcebcb1de6486d2ab7134e8a12087b7/addons/web/static/src/views/fields/translation_button.js#L29-L41 sentry-7384270487 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267914
This update resolves an issue where the invoice creation process would sometimes fail due to the invoice line not being fully added before proceeding. Adding a brief delay after product selection ensures the invoice line is created correctly, preventing tour steps from failing and improving overall system stability.
Original PR description
When a product is selected from the kanban view, the tour sometimes returns to the invoice form before the product is fully added. As a result, the invoice line is not created and the `.o_field_product_label_section_and_note_cell` element is missing from the table, causing the next tour step to fail. Add a short delay after selecting a product to ensure it is fully added to the invoice before proceeding with the following steps. runbot-238400 Forward-Port-Of: odoo/odoo#261295
This update resolves an issue where the system incorrectly blocked sending invoices via the 0225 Peppol EAS server. The change allows all partners to send 0225 invoices, even without the French PDP localization module, which was previously automatically installed. This fix also addressed a problem with demo data installation for French companies.
Original PR description
Previously we blocked the 0225 peppol_eas when `l10n_fr_pdp` is not installed. But you should still be able to send to 0225 partners with just peppol. Since the PDP module is auto installed with the French localization and we block the 0225 EAS server side on the peppol (non-PDP) server it should be fine to just allow it for everyone. It also caused an issue when installing the demo data for the `hair_salon` industry in a French company on trial. opw-6268629 Forward-Port-Of: odoo/odoo#268146 Forward-Port-Of: odoo/odoo#267993
This update fixes an issue where generated invoices for Colombia (l10n_co_dian) were incorrectly exporting a generic line number instead of the required document ID. This prevented the invoices from passing validation checks with DIAN and external systems. The fix ensures the correct document ID is used, resolving compatibility problems.
Original PR description
### Issue When generating the attached document (AttachedDocument) for Colombia, the parent document reference tag <cbc:ID> incorrectly exported a generic line counter instead of the actual document…
### Issue
When generating the attached document (AttachedDocument) for Colombia, the parent document reference tag <cbc:ID> incorrectly exported a generic line counter instead of the actual document identification number
While the DIAN platform itself accepted the file, this caused rejections in external validation tools and third-party software because they could not resolve the link back to the original invoice
DIAN Documentation: https://www.dian.gov.co/impuestos/factura-electronica/Documents/Anexo_tecnico_factura_electronica_vr_1_7_2020.pdf
On page 213 there is an example for ParentDocumentLineReference
On page 216 there is the specification that does not show any check
Example of the incorrect XML structure:
```xml
<cac:ParentDocumentLineReference>
<cbc:LineID>1</cbc:LineID>
<cac:DocumentReference>
<cbc:ID>1</cbc:ID>
</cac:DocumentReference>
</cac:ParentDocumentLineReference>
```
Expected XML structure:
```xml
<cac:ParentDocumentLineReference>
<cbc:LineID>1</cbc:LineID>
<cac:DocumentReference>
<cbc:ID>SETP990001021</cbc:ID>
</cac:DocumentReference>
</cac:ParentDocumentLineReference>
```
### Cause
In the template, the value for <cbc:ID> was retrieved using `parent_document.get('id')` which fetched the sequential loop index https://github.com/odoo/enterprise/blob/cd25713fd2c35737d98db29df72b2d07ae9146e8/l10n_co_dian/views/templates.xml#L272-L275
The dictionary parsing logic did not extract the true document identifier from the XML tree response or the original XML data https://github.com/odoo/enterprise/blob/13dc30679e382df5845993c880a97df600c39ed4/l10n_co_dian/models/l10n_co_dian_document.py#L429-L432
### Steps to reproduce
- Install `l10n_co_dian`
- Setup DIAN configuration
- Generate an attached document for a commercial event or invoice
- Open the generated XML file
Before the fix, the `<cac:ParentDocumentLineReference>/<cac:DocumentReference>/<cbc:ID>` tag contains a technical integer like "1" instead of the official document sequence number
opw-6164321
Forward-Port-Of: odoo/enterprise#118319A recent change incorrectly configured the Gantt view for appointments, causing new bookings to default to midnight instead of the intended start time. This fix corrects the override to the correct method, ensuring bookings now use the expected time logic. This resolves a scheduling issue impacting appointment creation.
Original PR description
The [commit] replaced the `onAddClicked` method with `_onNewClicked`, and updated all related calls and overrides accordingly. However, the appointment Gantt view override was mistakenly changed to override a non-existent `_onAddClicked` method, leaving the custom logic unused. As a result, bookings created through the `New` button in the Gantt view used midnight (12:00 AM) instead of the time derived from the custom logic as the default start datetime. This commit fixes the issue by correctly overriding `_onNewClicked`. [commit]: https://github.com/odoo/enterprise/commit/bc779c9ec5295f8d1fe06e8432c518c78c606ea2 Forward-Port-Of: odoo/enterprise#118799
This update enables users to modify vendor bills imported from the Italian tax agency (SDI). Previously, these bills were treated as final and unchangeable. This change ensures compliance with Italian regulations by allowing adjustments to imported invoices before they are submitted to the tax authority, resolving a limitation in the system.
Original PR description
- Install l10n_it_edi - Create and confirm vendor bill - Use studio to make the field l10n_it_edi_transaction editable - Input any value - The reset to draft button disappears In _compute_show_reset_to_draft_button we hide the reset to draft button if l10n_it_edi_transaction is populated in order to filter out moves already sent to the tax agency. Normally invoices and bills sent to the SDI cannot be modified. However it is possible to import vendor bills from the SDI, and their transaction field is also imported. It should be possible to modified those imported invoices. opw-6222891 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#265748
This update resolves an issue where Mollie payments would fail if a customer's billing address was incomplete. Mollie now requires a fully populated billing address (street, postal code, city, and country) to process payments, ensuring consistent payment processing with our Mollie integration. This change improves payment reliability and avoids potential transaction failures.
Original PR description
Steps to reproduce: 1. Setup a Mollie online payment method. 2. Make a payment with a customer that has an incomplete* billing address. Expected behaviour: The payment request is initiated. Actual behaviour: Mollie rejects the payment request. *: Mollie will either accept no billing address, or a full address (must include street, postal code, city and country). If only some of these fields are present, Mollie will reject the payment request. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268188
This update resolves an issue where POS users couldn't successfully initiate Mollie payments. By using a special, elevated provider for Mollie API calls, the system now correctly handles payment requests without requiring specific system-level access. This ensures a smoother payment experience for all POS users.
Original PR description
Description of the issue/feature this PR addresses: POS users can trigger Mollie terminal payments without having access to the mollie_api_key field, which is only available to base.group_system. Use a sudoed Mollie provider when checking the API key and when calling the Mollie API, matching the access pattern used by other POS terminal integrations to avoid this issue. Current behavior before PR: POS user tries to initiate a payment via mollie, receives and AccessError. Desired behavior after PR is merged: POS user can successfully initiate a payment without the need for the base.group_system. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264646
This update fixes an issue where checkboxes in project task descriptions were incorrectly displayed as bullet points. The fix ensures the necessary styling from the 'html_editor' module is loaded, resulting in the correct visual representation of checkboxes in shared projects. This improves the user experience for portal users accessing project details.
Original PR description
**Steps to reproduce:**
- Create a project
- Create a task and add a checkbox in the task description
- Share the project with a portal user
- Login as the portal user and open the task description
**Issue:**
In project sharing, checkboxes in the task description are displayed as bullet points.
**Cause:**
The required styles from `html_editor` were not loaded in the project sharing assets, so the related SCSS was not applied.
**Fix:**
Load the following missing SCSS files in the project sharing assets:
- html_editor/static/src/scss/html_editor.common.scss
- html_editor/static/src/scss/base_style.scss
Forward-Port-Of: odoo/odoo#267945This update resolves an issue where the website builder's column creation tool was incorrectly enabled, even when it shouldn't have been. The fix ensures that column creation is only allowed when a node is editable, preventing users from saving changes to newly created columns. This improves the stability and usability of the website builder.
Original PR description
When using the website builder, the tool in the powerbox to create columns is available, even when the node modified to create the columns is not `contenteditable`. This commit adds a condition for the availability of "columnize" tools: when there is no existing columns, check if the closest block ancestor (which will be replaced by the created node containing columns) is in a content editable node. Steps to reproduce: - Open website builder - Click in "Copyright" at the bottom of the footer - Type `/column` - Select "2 columns" in the powerbox - Bug: the created columns can be edited but will not be saved task-6247071 Forward-Port-Of: odoo/odoo#266420
This update resolves an issue where Instagram video backgrounds weren't displaying correctly in Odoo's website builder. The problem stemmed from an unnecessary addition of a URL parameter that was conflicting with Instagram's embed code. This change removes that parameter, ensuring Instagram videos now function as expected.
Original PR description
Steps to reproduce: =================== 1. Edit a page, add a Cover/Banner block. 2. Set its background to a video, paste an Instagram URL 3. Save and open the published page. => Instagram embed is…
Steps to reproduce: =================== 1. Edit a page, add a Cover/Banner block. 2. Set its background to a video, paste an Instagram URL 3. Save and open the published page. => Instagram embed is broken (iframe shows nothing / error). Cause: ======= Background videos broke for Instagram because the BackgroundVideo interaction unconditionally appends "&enablejsapi=1" to the iframe URL on start. Instagram embed URLs have no query string (`//www.instagram.com/p/<id>/embed/`), so the append produces `//www.instagram.com/p/<id>/embed/&enablejsapi=1` the `&` ends up in the path and Instagram refuses to render. The unconditional append is itself a regression from the public-widget → interaction refactor in [2]. The original code in 18.0 only added the param when `isYoutubeVideo && isMobileEnv`, as a workaround for old YouTube records that lacked it. Since [1], `enablejsapi=1` is already injected server-side in `html_editor/tools.py` / `web_editor/tools.py` when building YouTube autoplay embed URLs, so any YouTube background saved via the media dialog from 17.0 onward already has it. The JS append is redundant for YouTube and harmful for Instagram. Solution: ========= remove the unconditional append of `&enablejsapi=1` in the BackgroundVideo interaction [1]: https://github.com/odoo/odoo/commit/ca60af9dadc25adbc9eb159870ce1233a2886492 [2]: https://github.com/odoo/odoo/commit/b9b3a605e0f4 opw-6233081 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267016
This update resolves an issue where UBL invoices with tax percentage information were failing to import correctly, resulting in empty invoices. The fix ensures the system accurately parses and processes tax percentages from these invoices, improving invoice creation reliability.
Original PR description
Steps to reproduce: - Upload a Peppol XML bill having the tax percent reported under "TaxTotal/TaxSubtotal/Percent" Issue: Bill will be created empty. The chatter will report the error ``` Error importing attachment 'bill.xml' (type=account.edi.xml.ubl_bis3): This specific error occurred during the import: float() argument must be a string or a real number, not 'lxml.etree._Element' ``` opw-6227637 [Ticket link](https://www.odoo.com/odoo/project/49/tasks/6227637) Forward-Port-Of: odoo/odoo#266307
This update prevents incorrect tax calculations on COGS lines generated from vendor bills. Previously, manual tax adjustments were overwritten due to the system applying product taxes to these internal lines. This fix ensures that COGS lines accurately reflect internal operations without tax implications.
Original PR description
Issue: After manually modifying the taxes on a vendor bill that generates COGS lines, confirming the vendor bill causes the taxes to revert to their original values before the manual edit. This…
Issue: After manually modifying the taxes on a vendor bill that generates COGS lines, confirming the vendor bill causes the taxes to revert to their original values before the manual edit. This happens because the product’s purchase taxes are applied to the generated COGS lines, which triggers the tax recomputation logic and overwrites the manually adjusted tax amounts. However, COGS lines represent internal operations and should not have taxes applied to them Steps to reproduce: 1. Turn on Anglo-Saxon accounting 2. Turn on automatic accounting 3. Make a FIFO product category and make the valuation automatic 4. Make a new product and set the FIFO product category on it 5. Make sure the product has a vendor tax set 6. Make a purchase order for 10 of the FIFO product category at $10 7. Create and validate the receipt for 10 8. Make a sales order for 6 of the FIFO product category at $10 9. Create and validate the delivery for 6 10. Create the vendor bill for 10 the purchase order created above (make sure that there is a tax set on the vendor bill; the vendor tax that was set on the product). Make this vendor bill set for 10 at $20 11. Edit the tax at the bottom of the total 12. Confirm the vendor bill 13. Notice that the tax at the bottom of the total changes 14. Reset the vendor bill 15. Remove the purchase tax from the product 16. Confirm the vendor bill again and notice that the tax at the bottom of the total does not change this time Cause: On confirmation, the COGS lines on the vendor bill will be generated and “_compute_tax_ids” will be triggered on those lines. Since COGS lines have a “product_id” set on them, those lines will receive the purchase tax set on the product. Setting the “tax_ids” on those COGS lines will cause tax computation to trigger again, which will reset the manually edited tax amount to the new computed amount. However, since COGS lines come in pairs that are equal and opposite in amount, the taxes from both COGS lines will cancel out, and the new computed tax amount does not change Solution: Skip setting the purchase taxes of the product onto COGS lines in “_compute_tax_ids” opw-6110692 Forward-Port-Of: odoo/odoo#268269 Forward-Port-Of: odoo/odoo#265352
This update resolves an issue where refunded orders were still visible in the 'Orders to Settle' list when linked to a customer account. The fix ensures that orders and their associated refunds are removed from this list when the customer account balance is zero, streamlining the settlement process for users.
Original PR description
Currently, if you refund an order made on the customer account with the customer account as well, you can still see the order in the list of orders to settle. Steps to reproduce: -------------------…
Currently, if you refund an order made on the customer account with the customer account as well, you can still see the order in the list of orders to settle. Steps to reproduce: ------------------- * Open shop * Make an order using the customer account for a customer, don't invoice it * Refund one of the order using the customer account, don't invoice it * Make a new order using the customer account * In the customer list, find the customer used and select "Settle Orders" > The 2 orders are present in the list Why the fix: ------------ Originally the list would only show the orders for chich the customers have due (>0). https://github.com/odoo/enterprise/commit/bf4b6043b999b4a081b1afa73fc4113bf4db28f8 But recently the code we also see the refunds in the list as well. https://github.com/odoo/enterprise/commit/12af23d5382e972facfaa999e4c5ab30c97e8d1f However this new behavior is not visible if, with the refund, the customer account temporarily falls to 0. So currently we have some refunds that impact the amount to settle and some that don't. Originally we were thinking that either we should show all refunds in that list (given they use the customer account) or we shouldn't show any as it was previously. Both solutions are not ideal. * Showing them all would get the list bigger than it is and would require the customer to select the order and its refund(s) and settle them together. Since refunds are not usually done right after the order they would not be close it that list. However this solution would enable the option to remove the orders from the list requiring a few step from the customer. * Showing none isn't idea either with this use case as it means that we still see orders that were cancelled out by their refunds. To remove to order the customer has two options. Either going backend and searching the order and its refund(s) and invoice them, either settling the order but that means that now there's money deposited on the customer account. Any of the two option isn't perfect a it still requires manual intervention from the customer and wouldn't work on previous data. Creating a server action to correct those data wouldn't have been feasible either. Instead, the approach we're taking is the following: When loading the list of order to settle we want to remove the orders and the potential refunds were the customer account is evened out. We only need to look at the orders of the partners that contains refunds for which the customer account was used. If the sum of the transactions made on the customer account is 0 we can say that the order and its refunds have cancelled out each other (in terms of customer account) and we don't show them if the list of orders remaining to settle. opw-6170830 Forward-Port-Of: odoo/enterprise#117725
This update dynamically adjusts the number of pages processed when uploading PDFs to the AI chat feature. Previously, uploads were limited to 5 pages. Now, the system can handle entire documents, improving the efficiency of AI-powered conversations. This change ensures agents can fully utilize the AI's capabilities with PDF attachments.
Original PR description
Prior to this commit, when uploading a document (i.e. during a chat with an agent). Only a part of its pages would get parsed and sent to the API (5 pages). With this commit, the number of pages is made dynamic by the use of a new context key `ai_max_pdf_pages`. This variable is still set for the document autosorting features since it is not required to read the full document. Default value is None (no limit). Forward-Port-Of: odoo/enterprise#119338
This update fixes an issue where check amounts were not being properly rounded when generated in the Philippines. The change ensures that check amounts are displayed accurately, removing the "ONLY" suffix and improving the overall payment process for PH customers. This ensures compliance with local regulations and provides a more professional customer experience.
Original PR description
Current behaviour: --- When paying with checks, the amount is not rounded in the check amount in words string. Steps to reproduce: --- 1. Switch to PH company 2. Set setting Check Layout as "Print Check - PH" 3. Create a new vendor bill 4. Add a product with a specific price like 91490.15 5. Confirm the bill, click on Register Payment 6. Select Payment Method "Checks", Create Payment 7. Go to the payment, Amount in Words is wrong 8. Ninety-One Thousand Four Hundred Ninety And 15000000001/100 ONLY Expected behaviour: --- The decimal amount should be rounded, and "ONLY" shouldn't appear. Fix: --- Rounded the pay amount And backported: https://github.com/odoo/enterprise/commit/bb6c9848665709c14c5113b2c98976f869cd473b opw-6058344 Forward-Port-Of: odoo/enterprise#117679 Forward-Port-Of: odoo/enterprise#116717
This update resolves a critical issue preventing Odoo's financial reports from passing validation with the National Bank of Belgium (NBB). The fix adds missing data points to the XBRL report, ensuring compliance and accurate submissions. This change specifically addresses datapoints related to balance sheet figures.
Original PR description
This commit adds missing explanatory disclosure datapoints to the generated XBRL report. The missing disclosures resulted in failing validation when report is submitted to NBB. The datapoints are only added if the original value was non-zero. For example, the tangible assets disclosures are only added if the tangible assets in balance sheet is non-zero. Additionally, only disclosures that were reported as causing a failing validation were added. task-5977199 Forward-Port-Of: odoo/enterprise#117853
This update fixes a visual issue where alert content was misaligned in the Odoo portal. The problem stemmed from styling applied to the alert elements, which has now been removed. This ensures a cleaner and more professional appearance for portal users.
Original PR description
The alert content is misaligned these changes are side effects of commit[1], the `h5` and `p` in the alert have margin that creates whitespace in the alert. Commit[2] addressed a misalignment issue and alignment issue due to nested `row` but these became irrelevant with commit[1]. This is why we remove the styling. task-5262108 [1]: odoo/odoo@513931a5e540f22f37e317f80fd131701cbbc8f0 [2]: odoo/odoo@d64dbaadcb1bef27d89a89e9d42bdb38890c73e0 | Before | After | |--------|--------| | <img width="1029" height="523" alt="image" src="https://github.com/user-attachments/assets/ff3f827b-652a-4a84-ad7e-205200cf3256" />| <img width="1022" height="486" alt="image" src="https://github.com/user-attachments/assets/b86163d8-bedd-4cb6-a950-ba36a6b401ee" /> | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267776
This update resolves a technical issue within the Odoo interval inversion function that was causing incorrect results for specific input scenarios. The fix ensures accurate interval calculations across a wider range of values, improving the reliability of this core tool. The changes include added test cases to verify the corrected functionality.
Original PR description
The [commit] introduced the method for inverting the interval inside the given limits. The method was failing for the following edge cases: ```python >>> invert_intervals([(1, 2), (4, 5)], 0, 10)…
The [commit] introduced the method for inverting the interval inside the given limits. The method was failing for the following edge cases: ```python >>> invert_intervals([(1, 2), (4, 5)], 0, 10) result - [(2, 4), (5, 10)] expected - [(0, 1), (2, 4), (5, 10)]? >>> invert_intervals([(-2, -1)], 0, 10) result - [(0, 10)] expected - same >>> invert_intervals([(11, 12)], 0, 10) result - [] expected - [(0, 10)] >>> invert_intervals([(-1, 1), (2, 5), (8, 12)], 0, 10) result - [(1, 2), (5, 8)] expected - same >>> invert_intervals([(2, 5), (8, 12)], 0, 10) result - [(5, 8)] expected - [(0, 2), (5, 8)] >>> invert_intervals([(2, 5), (11, 12)], 0, 10) result - [] expected - [(0, 2), (5, 10)] ``` This commit fixes the function to correctly handle all the cases. The test cases are also added to test all the edge cases. [commit]: https://github.com/odoo/enterprise/commit/53450065be0c3ec9d648d4fd39ec3a9a912bd06c Forward-Port-Of: odoo/odoo#268161 Forward-Port-Of: odoo/odoo#267917
This update resolves an issue with the tax report generated for Lithuanian businesses. Specifically, a technical correction was made to ensure accurate tax calculations by negating certain lines within the report data. This ensures compliance with Lithuanian tax regulations and improves the reliability of financial reporting.
Original PR description
Lines 29 to 34 in the tax report should be negated opw-5985774 Forward-Port-Of: odoo/odoo#259147
This update resolves an issue where the forum toolbar wasn't consistently visible or repositioning correctly within website forums, specifically when content was displayed in an iframe. The fix ensures scroll events are properly triggered within the iframe's view, guaranteeing the toolbar appears and adjusts correctly for all users.
Original PR description
Description of the issue: - In website forums, the toolbar was either not visible or did not reposition correctly after scrolling. Cause: - This issue occurred only in forums when an iframe was present. In that case, scroll events were not triggered on the window visual viewport, preventing toolbar repositioning. Solution: - Attached scroll events to the iframe’s visual viewport instead of the window visual viewport when an iframe is present. task-6201171 Forward-Port-Of: odoo/odoo#265221
This update resolves an issue where extra spaces within code blocks were incorrectly displayed as ` ` characters. The fix converts these ` ` characters to regular spaces, ensuring accurate syntax highlighting and a cleaner user experience when creating code blocks in To-Do items.
Original PR description
Step to reproduce: - Go to To-Do → Create New - Type text with multiple consecutive spaces in the same line - In the same line → insert a /code block Description of the issue: Multiple spaces are converted into ` ` inside the code block. Cause: When the code block is processed for syntax highlighting, its `innerHTML` is used as the source text. During this process, ` ` is not handled as a result it remains as literal text, so syntax highlighting displays ` ` instead of a normal space. Solution: Convert ` ` into a normal space before the content is used for syntax highlighting. task-6184686 Forward-Port-Of: odoo/odoo#267299 Forward-Port-Of: odoo/odoo#263053
This update resolves an error that occurred when updating quality checks on Manufacturing Orders (MOs). The change adjusts how the system handles lot references, ensuring compatibility after a previous update. This prevents quality checks from failing due to outdated data.
Original PR description
## Steps to reproduce: - Install the `quality_mrp` module. - Create a new product. - Create a Quality Point with: Type: Measure, Control per: Product/Operation Operations: Manufacturing - Create and…
## Steps to reproduce: - Install the `quality_mrp` module. - Create a new product. - Create a Quality Point with: Type: Measure, Control per: Product/Operation Operations: Manufacturing - Create and confirm MO for the product. - Update the Quality Point: Remove the 'manufacturing' operation type and add 'receipts' type. Change Control per to 'Quantity'. - Open the MO and start a quality check. - Enter an invalid measure and try to validate it. ## Error: `AttributeError - 'mrp.production' object has no attribute 'lot_producing_id'` ## Cause: Since commit https://github.com/odoo/odoo/commit/4bb4e08066449177f89382718ceadd840ce90d0e, the `lot_producing_id` field on MO was replaced by the Many2many field `lot_producing_ids`. Invalid references to the removed field lead to an error. ## Fix: This commit uses the first lot/serial from the MO. Note: Multiple produced lots are only possible for serial-tracked products. sentry-7511513479 Forward-Port-Of: odoo/enterprise#119231
This update fixes an error in the import of Italian vendor invoices (l10n_it_edi) where pension fund tax was incorrectly applied to all invoice lines with the same VAT rate. The fix now accurately extracts the tax exemption reason from the invoice data, ensuring the correct tax is applied to each line, leading to accurate financial reporting.
Original PR description
In `l10n_it_edi` vendor bill import, the pension fund tax was incorrectly applied to all invoice lines sharing the same VAT rate, even though they have different `l10n_it_tax_exemption_reason`s, resulting in wrong entries and document total. We now extract the Tax Exemption reason from the `DatiCassaPrevidenziale` node, and use it to search the correct tax. Steps to reproduce: 1. Install `account` and `l10n_edi_it` 2. In the `4% INPS` tax, set `TC22` in pension fund type and `N2.2` in exoneration 3. Import bill from the ticket 4. See the pension fund tax is applied to all the lines. It should only be applied only to the first one. Ticket [link](https://www.odoo.com/odoo/project.task/6212975) opw-6212975 Forward-Port-Of: odoo/odoo#267066 Forward-Port-Of: odoo/odoo#265821
This update resolves an issue where Verifactu document generation would fail when invoicing an order after it had been created in the Point of Sale. The fix allows invoicing directly, mirroring the original PoS flow, and ensures the cancellation process works correctly. It's a minor improvement that streamlines invoice generation.
Original PR description
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step…
**Steps to reproduce:** - Setup a Verifactu installation and a Spanish company - Go to the PoS, make a Sale - Keep the ticket - Go to the /pos/ticket URL and enter the ticket informations - Last step also works when requesting an invoice in the backend on the order - Go to the order in the backend, an error is shown, the cancellation didn't go through **Veri*Factu documents can only be generated for paid or posted Point of Sale Orders.** **Why the fix:** When we directly invoice an order, we do not go through the verification of being paid and done. This is why is works, but when making the invoice after the sale is done, we cancel the order first, then we register the invoice instead. When trying to cancel the order, we check if the order is either paid or done, but it is currently invoiced as we just generated the invoice. We now allow no errors if the order is in the invoiced state, and let it pass through. With this flow we get the same result as the direct invoice from the PoS. The new cancellation on the order and submission on the invoice may take a bit of time to get accepted but they will be eventually. opw-6139200 Forward-Port-Of: odoo/odoo#267869 Forward-Port-Of: odoo/odoo#264272
This update resolves an issue where PDP reporting flows could fail during form creation when due period dates were initially empty. The fix ensures the system handles missing dates gracefully before comparing them, preventing crashes and improving overall stability. This ensures accurate reporting for new and incomplete PDP flows.
Original PR description
PDP reporting flows compute their period status from the due period dates. On a new or incomplete flow record, those dates can still be empty during form/onchange initialization. The compute then tried to compare today's date with `False`, which could crash generic form creation. This patch makes the compute handle missing period dates before doing date comparisons. runbot.build.error-939459 Forward-Port-Of: odoo/odoo#268002
This update resolves an issue where Romanian E-Factura invoices were being rejected due to exceeding character limits for product names, descriptions, and notes. The system has been updated to enforce a maximum of 100 characters for names, 200 for descriptions, and 300 for notes, ensuring compliance with Romanian regulations. This prevents invoice errors and successful E-Factura transmission.
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_ro_edi - Switch to a Romanian localization (e.g. RO Company) - Configure Romanian E-Factura - Create an invoice with a product having a name…
**Steps to reproduce:** - Install Accounting and l10n_ro_edi - Switch to a Romanian localization (e.g. RO Company) - Configure Romanian E-Factura - Create an invoice with a product having a name longer than 100 chars - Confirm the invoice - Send E-Factura to SPV - Fetch E-Factura status **Issue:** The invoice is rejected with the following error: "[BR-RO-L100]-The allowed maximum number of characters for the Item name (BT-153) is 100." **Similar issue with the product description:** "[BR-RO-L200]-The allowed maximum number of characters for the Item description (BT-154) is 200." **Similar issue with the note (i.e. Terms and Conditions):** "[BR-RO-L300]-The allowed maximum number of characters for the Invoice note (BT-22) is 300." **Solution:** Truncate the name of the product to 100 chars in the electronic invoice, the description of the product to 200 and the note to 300. opw-5964904 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268192 Forward-Port-Of: odoo/odoo#265811
This update resolves a problem where validating delivery costs on confirmed sales orders (with real-cost carrier pricing) would trigger an error. The fix prevents the system from incorrectly updating delivery line prices and names on locked orders, ensuring smooth order processing. This improves the user experience for sales teams managing confirmed orders.
Original PR description
Sale module has setting `Lock Confirmed Sales`, which particularly doesn't allow order line modification on a confirmed order. However, when a delivery carrier is set up with Invoicing Policy = Real cost, validating the picking pushes the actual carrier price onto the delivery line, writing `price_unit` and `name`. On a locked SO this raises a UserError. Fix it by excluding the delivery line's `price_unit` and `name` from the protected fields, only when the write originates from `_add_delivery_cost_to_so`. The code path is identified by the context `allow_delivery_cost_update`, so a regular UI edit of those fields on a locked SO is still blocked. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#266511 Forward-Port-Of: odoo/odoo#265721
This update resolves an issue where users were blocked from uploading documents to requests linked to records they didn't have full access to. By adding a special permission bypass, the system now allows uploads regardless of user access rights, streamlining the document request process. This ensures users can contribute documents even when dealing with records requiring specific permissions.
Original PR description
Issue: Users are currently blocked from uploading requested documents if the request is linked to a record they do not have access to (e.g., User A links Record X to a request assigned to User B, but User B lacks read/write access to Record X). The system throws an error because the user cannot create an attachment for that record. Fix: Add .sudo() on the attachment creation process. task-6107099 Forward-Port-Of: odoo/enterprise#113698
This update simplifies how Odoo determines user locations. It reverts a previous change and now defaults to using the user's recorded city if a country cannot be identified. This improves location accuracy and reliability, particularly in areas with incomplete geo-location data.
Original PR description
This reverts commit fd7e3393158fc637c555f612a54f3e8c7c72bd96. Then we provide a simpler fix by defaulting to the city record if a country cannot be resolved. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a performance issue in the Point of Sale interface where a large number of customers in the browser cache could cause slow loading and browser crashes. The change limits the number of partners rendered during searches, improving speed and stability for users.
Original PR description
Currently, it's possible to experience very slow loading speed of the partner list and/or browser crashes in the POS when there are thousands of customers stored in the browser cache. This appears to…
Currently, it's possible to experience very slow loading speed of the partner list and/or browser crashes in the POS when there are thousands of customers stored in the browser cache.
This appears to be caused by a few reasons compounding together:
1. While we limit the number of customers in the initial render of the list, there is no limit during the search. Therefore, if there are thousands of customers matching the search pattern loaded in the browser cache, the browser will attempt to render equally as many `PartnerLine` components.
2. A 100 ms debounce time is fast enough to trigger the render after each key stroke. 200~300ms is the industry standard for Software UI debounce.
3. For each customer rendered in the list, we may perform a search for its parent partner amongst all loaded customers with the function `PosStore.getPartnerCredit()`.
This PR aims at reducing the number of partner lines rendered in a short period of time and thus, at improving speed and avoiding crashes.
Steps to reproduce:
1. Create a fresh db + install the point_of_sale with demo data
2. Populate the res.partner model by a factor of 100 to reach 4000+ partners
3. Update the following system parameter to make sure that we load all partners in the browser cache when we open the POS session:
- `point_of_sale.limited_customer_count` -> 5000
4. Open a POS session and and click on the `Customer` button to render the partner list
5. Type `adm` in the search bar at normal typing speed
6. Crash
Ticket: opw-5435973
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#258667This update resolves an issue where inserting certain website snippets (like alerts) within restricted editable areas created invalid HTML. The fix prevents the snippet from being broken down into smaller elements, ensuring the website builder generates valid and functional code. This improves the reliability and usability of the website design tool.
Original PR description
### [FIX] website: prevent inserting block snippet with powerbox in inlines Inserting block snippet with powerbox when the selection is inside an editable part limited to an element that can only…
### [FIX] website: prevent inserting block snippet with powerbox in inlines Inserting block snippet with powerbox when the selection is inside an editable part limited to an element that can only contain inline nodes leads to invalid html (like `<div>` inside `<span>`). This commit disables insertion of block snippets when the selection is such a part of the document. Steps to reproduce: - Open website builder - Put cursor in "copyright" at the bottom of the footer - Type `/alert` and press enter - Bug: `<div>` element is inserted inside `<span>`, that is invalid html task-6259092 ### [FIX] website: prevent unwrapping `s_blockquote` on insert with powerbox When the snippet `s_blockquote` was inserted with the powerbox or pasted from clipboard in an unbreakable element which does not allow blocks as children, the `<blockquote>` element itself was abandonned and its children were inserted instead. This lead to insertion of a broken snippet. This commit marks the `s_blockquote` snippet as "unsplittable" so that always stays in one piece when inserted. Steps to reproduce: - Open website builder - Put cursor in a link - Type `/blockquote` and press enter - Bug: the snippet's children are inserted, instead of snippet itself task-6259092 Forward-Port-Of: odoo/odoo#267111
This update prevents Odoo from crashing when the Barcode Lookup API returns a broken image URL. Previously, an invalid URL would cause an error. Now, the system safely ignores these errors and continues to function correctly, ensuring a smoother user experience.
Original PR description
[FIX] product_barcodelookup: avoid crash on invalid image URLs **Steps to Reproduce:** - Install Sales module. - Configure a valid Barcode Lookup API key. - Create a product without an image. - Set a…
[FIX] product_barcodelookup: avoid crash on invalid image URLs
**Steps to Reproduce:**
- Install Sales module.
- Configure a valid Barcode Lookup API key.
- Create a product without an image.
- Set a barcode whose returned image URL is broken or returns HTTP 404
(e.g. `8426904171073`).
- Select the product and trigger the server action:
`Action -> Get Pictures from Barcode Lookup`
Issue:
**During image fetching:**
- Barcode Lookup API successfully returns product data and image URLs.
- `_get_image_from_url()` attempts to download the image.
- The image URL responds with HTTP 404.
- `barcode_lookup_request()` returns a dict for non-200 responses.
- `_get_image_from_url()` assumes the response is always a `requests.Response`
object and directly accesses: `response.status_code`
- This causes: `AttributeError: 'dict' object has no attribute 'status_code'`
**Root Cause:**
- `barcode_lookup_request()` returns inconsistent response types:
- `requests.Response` for successful requests
- `dict` for failed requests
- _get_image_from_url() does not handle the dict response before accessing
response attributes.
**Solution:**
- Make barcode_lookup_request() always return a One Response
object.
- Move the response validation to the callers instead of returning custom
dict objects.
**Result:**
- No RPC crash when image URLs are invalid or return 404.
- Broken image URLs are safely ignored.
**OPW-6200749**
Forward-Port-Of: odoo/enterprise#116925This update fixes an issue where discounts entered with a comma (used in some regions) were incorrectly interpreted as zero. The change ensures that discount values, regardless of the decimal separator used, are accurately applied to orders, preventing revenue loss and ensuring correct pricing.
Original PR description
Before this commit, if comma was used as decimal separator, the fixed discount valu was added to the order as zero discount. opw-6268557 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267954
This update optimizes how Odoo recalculates styles in large tables, like the Accounting > Balances Sheets. By using a more targeted approach, the system now responds faster during window resizing, scrolling, and sorting, leading to a smoother user experience.
Original PR description
Avoid using the :has() selector and use a specific class on the body instead to replicate the same behavior. This reduces work during the "Recalculate Style" phase (for example when hovering rows in large tables such as the Accounting > Balances Sheets). It lowers recalculation time during window resizes, heavy scrolling, and table sorting by preventing broad selector matches and limiting style checks to elements with the specific class. similar fix: https://github.com/odoo/enterprise/pull/118535 Forward-Port-Of: odoo/odoo#266954
This update fixes a restriction that prevented invoicing users from accessing key reporting data within Odoo. Now, invoice views can read related PDP flow information, allowing for accurate evaluation of e-reporting fields and buttons. This ensures invoicing users have the complete information they need.
Original PR description
Allow invoicing users to read PDP reporting flows. Invoice views can read PDP flow relations to evaluate e-reporting-related fields or buttons. Users with invoicing access could open the invoice but were blocked when Odoo tried to read the linked PDP flow. runbot.build.error-939457 Forward-Port-Of: odoo/odoo#268462
This update corrects a bug in the Point of Sale system's cash rounding method (DOWN). Previously, overpayments were incorrectly absorbed as rounding offsets, resulting in incorrect change calculations. This fix ensures accurate change calculations and a more reliable transaction experience.
Original PR description
With the DOWN cash rounding method, `asymmetricRound` used `this.isNegative(a)` to decide whether to invert the rounding direction. `isNegative` internally applies the configured method before comparing. This caused `asymmetricRound` to return 0 for genuinely negative remainders, making `appliedRounding` absorb the full overpayment as a rounding offset and zeroing out the change. opw-6268670 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268272
This update fixes an issue where a bank transaction creation process would unexpectedly crash when an error occurred. The fix ensures the quick create form is properly closed and the error is displayed, improving the user experience and preventing data loss. This resolves a minor disruption in the bank transaction workflow.
Original PR description
**Problem:** When an error is thrown upon creating a bank transaction in the kanban view, a traceback occurs due to trying to access the quickCreateState which does not exist in this context (`this` = BankRecQuickCreateController). **Steps to Reproduce:** - Force the suspense account of the bank journal to be False - Go to bank transactions of that journal in kanban view and try to create a new transaction -> Traceback **Solution:** The expected behavior is for the quick create to be closed, then throw the error. Therefore, onCancel() can be called before throwing the error. opw-6186901 Forward-Port-Of: odoo/enterprise#118842
This update resolves an issue where participant emails were unintentionally visible in notification emails within the eLearning gamification app. The fix removes unnecessary header information, ensuring participant privacy and preventing users from seeing each other's email addresses within the system. This improves the user experience and aligns with data protection best practices.
Original PR description
**Steps to reproduce:** - Install eLearning app with gamification - Go to Settings > Gamification Tools > Challenges - Set a challenge with multiple participants (portals / internals) - Set its state…
**Steps to reproduce:** - Install eLearning app with gamification - Go to Settings > Gamification Tools > Challenges - Set a challenge with multiple participants (portals / internals) - Set its state to Done - Notification email is sent to every participants - They can see each other in the mail header (portal user can see all other portal users, internal user can see all portal users) **Issue:** Since [1] external recipients are added in the mail header, but this is not adequate for every flows (here there is no need for the participants to be aware of each other). **Fix:** In [2] this issue was mitigated by removing the `'X-Msg-To-Add'` from the header for models which don't need it. Then in [3] the solution was replaced by a more generic approach using `_CUSTOMER_HEADERS_LIMIT_COUNT = 0`. [1] https://github.com/odoo/odoo/commit/42aaaef59d21558438c767c6dd8a21674e5df9df [2] https://github.com/odoo/odoo/commit/e6c13ce4436b3c8b3a2058d2ccf65a7da1b256b2 [3] https://github.com/odoo/odoo/commit/c4dbd868b9c7e26f11db4d2cacef7ffce6c87082 opw-6099745 Forward-Port-Of: odoo/odoo#267192
This update fixes an issue where credit notes couldn't be created if the system encountered archived bank accounts. The fix ensures that the system explicitly checks for inactive bank accounts, preventing validation errors and allowing credit notes to be successfully processed. This improves invoice confirmation and reduces potential disruptions to financial workflows.
Original PR description
When creating a credit note, it is possible for the compute method _compute_partner_bank_id to be called in a context where active_test is falsy, leading to moves that cannot be validated because it…
When creating a credit note, it is possible for the compute method _compute_partner_bank_id to be called in a context where active_test is falsy, leading to moves that cannot be validated because it would raise with the following error message: > The recipient bank account linked to this invoice is archived. So you cannot confirm the invoice. The state of the 'active_test' ctx key cannot be known in advance in a compute and should not be assumed as True; according to the framework team: > In practice, a compute method cannot expect active_test to have > a particular value. It may be invoked with any context. There is no > "context purge" done by the ORM. The computation may be "prepared" > with a context (the one of modified()) and actually done with another > context (code accessing the field before some explicit flush). In > other words, if the compute method searches for a record that matches > some conditions, and if that record cannot be inactive, then this > condition must be explicit in the search domain (or in the context). opw-6229286 Forward-Port-Of: odoo/odoo#267398
This update resolves a technical issue that prevented users from correctly sorting fiscal positions when they were linked to companies outside their authorized access. The fix ensures that the system handles company hierarchies properly, preventing errors and improving data accuracy. This change enhances the reliability of financial reporting.
Original PR description
_get_first_matching_fpos() sorts fiscal positions by company specificity using `f.company_id.parent_ids`. The `parent_ids` field on `res.company` is compute_sudo=True, but `convert_to_record` still builds the resulting recordset in the caller's environment and then calls `filtered('active')` on it. When the fiscal position belongs to a child company whose parent is outside the current user's allowed companies, reading `active` on the parent company record raises an AccessError.
opw-6266568
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#267747This update resolves an issue where enabling the 'Sales Credit Limit' setting caused access errors when creating new users. The problem stemmed from a default value being incorrectly applied to a restricted field due to inheritance within the system's data model. This fix ensures proper access controls are enforced during user creation.
Original PR description
# How to reproduce - Install the Accounting module - In the settings, enable "Sales Credit Limit" - Remove the Accounting access rights of the current user - Try to create a new user # The issue An…
# How to reproduce - Install the Accounting module - In the settings, enable "Sales Credit Limit" - Remove the Accounting access rights of the current user - Try to create a new user # The issue An access error is raised on the field `credit_limit` # Cause Enabling the "Sales Credit Limit" setting will create an `ir.default` for the `credit_limit` field. This field is restricted to a specific group : https://github.com/odoo/odoo/blob/e3b0ca11d99b2ef819cdad68b169112cd73668b6/addons/account/models/partner.py#L515-L518 When creating a record, we check field permissions before adding default values, so the creation of the user is fine. However, since `res.users` inherits from `res.partners`, a new partner will also be created, but this time with the default values in `vals_list`, which will trigger an access right error. # Proposed solution Back port of this commit : https://github.com/odoo/odoo/pull/267193 Access right checks when creating a record were introduced in 18.3 by : https://github.com/odoo/odoo/commit/15132342960df76fcefd3284a9eff2d4d3273150 opw-6240494 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268303 Forward-Port-Of: odoo/odoo#268039