Daily updates from Odoo
Navigate
Branch
Tuesday, May 6, 2025
59 changes
11 changes
New functionality added to Odoo
This update introduces a new AI app that lets businesses create AI assistants able to answer questions using uploaded documents or web pages. It also adds calendar integration so these assistants can help schedule meetings, providing an early foundation for AI-driven productivity inside Odoo.
Original PR description
This PR is a follow-up on the implementation of the new AI features. It backports the new AI app that introduce two new modules `ai` and `ai_calendar`, as well as a few fixes for these modules. Community PR: https://github.com/odoo/odoo/pull/208284
Enhancements to existing features
Returns are now created only when their deadlines are relevant: not before the company account opening date and within the next year. This helps avoid unnecessary or outdated return records and keeps Belgian reporting data clearer, with a minor wording correction for the Belgian collection center name.
Original PR description
Now, before generating a return, we compute the deadline of that return. If the return is before the account opening date, we do not generate it. We also only keep return with a deadline within a year from now. In continuation of https://github.com/odoo/enterprise/pull/81569
Users can now open return attachments directly in a preview instead of downloading them first. This makes reviewing related documents faster and keeps the workflow smoother within Odoo.
Original PR description
Clicking on an attachment should preview the attachment without downloading. task-4627315
Resolved issues and error corrections
The Belgian fleet disallowed expenses feature now correctly installs the required Belgian expense categories before using them. This prevents setup errors and ensures vehicle-related expense account rules work as expected.
Original PR description
Commit https://github.com/odoo/enterprise/commit/66ec6f497d1adfdffae6840899d08c168f6ab63a links particular BE disallowed expense categories to accounts and makes a vehicle required when using those accounts. The dependencies of `l10n_be_account_disallowed_expenses_fleet` did not ensure the creation of the Belgian expense categories. Fix --- Add `l10n_be_disallowed_expenses` as a dependency of `l10n_be_account_disallowed_expenses_fleet` Solves Runbot-181948
This fixes a mobile issue in the VoIP keypad where tapping buttons could use the wrong action and fail. Taps and clicks now follow the same behavior, improving reliability and preventing unwanted zooming when users double-tap on mobile devices.
Original PR description
The touchend event must be preventDefault-ed to prevent zooming on double-tab on mobile. However, the touchend handler was incorrectly set to this.props.onClickKey, which doesn't exist. This commit updates the code to trigger a click event on touchend so that the same handler is used whether the button is tapped or clicked, preventing similar situations where the click handler is updated but not the touchend handler, leaving the latter broken.
Miscellaneous changes
Steps to Reproduce: 1. Install industry_fsm_sale module. 2. Create a SO with at least one SOL. 3. Save the record. 4. Delete the line, then click the Catalog button without saving. Issue: - An error occurs indicating a missing record. Cause: - The action_add_from_catalog method is accessing self.task_id, but self still includes the deleted SOL, which no longer exists. As a result, accessing its fields raises an error. Fix: - Move the action_add_from_catalog method to the
Original PR description
Steps to Reproduce: 1. Install industry_fsm_sale module. 2. Create a SO with at least one SOL. 3. Save the record. 4. Delete the line, then click the Catalog button without saving. Issue: - An error occurs indicating a missing record. Cause: - The action_add_from_catalog method is accessing self.task_id, but self still includes the deleted SOL, which no longer exists. As a result, accessing its fields raises an error. Fix: - Move the action_add_from_catalog method to the sale.order model, which is the appropriate place to handle this logic, ensuring the method doesn't depend on potentially stale or deleted lines. opw-4760487 Forward-Port-Of: odoo/enterprise#84414
Steps to reproduce: - Install payroll, payroll Mexican localisation - Switch to the Mexican company - Choose an employee from the Mexican company - Change the contract to be hourly waged instead of monthly - Set a value for the wage/hour - Create some work entries for that employee - Generate a payslip for the employee in the duration you are testing - Edit the work entries you have to have some unpaid leaves - Generate another payslip for the employee Current Behavior: Payslip is g
Original PR description
Steps to reproduce: - Install payroll, payroll Mexican localisation - Switch to the Mexican company - Choose an employee from the Mexican company - Change the contract to be hourly waged instead of…
Steps to reproduce: - Install payroll, payroll Mexican localisation - Switch to the Mexican company - Choose an employee from the Mexican company - Change the contract to be hourly waged instead of monthly - Set a value for the wage/hour - Create some work entries for that employee - Generate a payslip for the employee in the duration you are testing - Edit the work entries you have to have some unpaid leaves - Generate another payslip for the employee Current Behavior: Payslip is generated without taking into consideration the number of hours actually worked and the unpaid leaves taken by the employee. It also generates the payslip with the value of the wage/month regardless of the value of the wage/hour you added. Issue: In df8f53b0cad4738537f18890e628c286dedaa141, Mexican localisation was implemented but with computing the amount of the `payslip_worked_days` using the `contract.wage` which is the fixed amount of wage/month. https://github.com/odoo/enterprise/blob/25caeeab01abc0b47f6bd6b02658c3bbbe0aba96/l10n_mx_hr_payroll_localisation/models/hr_payslip_worked_days.py#L19-L20 opw-4604675 Forward-Port-Of: odoo/enterprise#83135
The SpreadsheetName component is designed to grow indefinitely with the length of its text content. However, this means that it'll end up breaking the page layout. This revisions revisits the component structurea and embedding to prevent it from growing larger than the visible viewport of the client. Task: 4760366 Forward-Port-Of: odoo/enterprise#84664 Forward-Port-Of: odoo/enterprise#84410
Original PR description
The SpreadsheetName component is designed to grow indefinitely with the length of its text content. However, this means that it'll end up breaking the page layout. This revisions revisits the component structurea and embedding to prevent it from growing larger than the visible viewport of the client. Task: 4760366 Forward-Port-Of: odoo/enterprise#84664 Forward-Port-Of: odoo/enterprise#84410
The compute method was removed in this commit, but is declared in the field. Traceback: --- AttributeError: 'product.product' object has no attribute '_compute_pricer_display_price' This commit resolves the above error by skipping the compute method when it is called. commit : https://github.com/odoo/enterprise/commit/70d96c44bb834ecbe89b5720ae18a93038301796#diff-2f3d348951d6293f7e805819d7053ac4ec65994bbacc829dac5dc68b00c932c> sentry-6547636163 Forward-Port-Of: odoo/enterprise#835
Original PR description
The compute method was removed in this commit, but is declared in the field. Traceback: --- AttributeError: 'product.product' object has no attribute '_compute_pricer_display_price' This commit resolves the above error by skipping the compute method when it is called. commit : https://github.com/odoo/enterprise/commit/70d96c44bb834ecbe89b5720ae18a93038301796#diff-2f3d348951d6293f7e805819d7053ac4ec65994bbacc829dac5dc68b00c932c> sentry-6547636163 Forward-Port-Of: odoo/enterprise#83599
Following this commit : - Aggregator name is displayed on KOT i.e Ubereats,Zomato etc. - Since it is an online order, instead of Dine In/ Take out , Delivery/Online should be displayed. - Preparation time is also displayed. Community PR: https://github.com/odoo/odoo/pull/202003 task-4633156 Forward-Port-Of: odoo/enterprise#84647 Forward-Port-Of: odoo/enterprise#81559
Original PR description
Following this commit : - Aggregator name is displayed on KOT i.e Ubereats,Zomato etc. - Since it is an online order, instead of Dine In/ Take out , Delivery/Online should be displayed. - Preparation time is also displayed. Community PR: https://github.com/odoo/odoo/pull/202003 task-4633156 Forward-Port-Of: odoo/enterprise#84647 Forward-Port-Of: odoo/enterprise#81559
In GSTR-2B, while doing the matching for previous bills, we want to avoid The bills that are already reconciled and marked as partially matched or fully matched. Sometimes, it's possible that there can be more than one bill with the same The reference number and if any of them has been already reconciled then We want to avoid it again being reconciled in next return periods. opw-4744438 Forward-Port-Of: odoo/enterprise#84497
Original PR description
In GSTR-2B, while doing the matching for previous bills, we want to avoid The bills that are already reconciled and marked as partially matched or fully matched. Sometimes, it's possible that there can be more than one bill with the same The reference number and if any of them has been already reconciled then We want to avoid it again being reconciled in next return periods. opw-4744438 Forward-Port-Of: odoo/enterprise#84497
1 change
Resolved issues and error corrections
A problem in the web testing support code was fixed so creating linked records in many-to-many relationships no longer causes errors. This improves reliability for automated checks around web features without changing day-to-day user workflows.
Original PR description
Before this commit, using CREATE Command on a many2many field would result in an error. This is because upon record creation the inverse field would be set to the single id, which is incorrect for a many2many field. This commit fixes the issue by setting the inverse field of a many2many to a list containing the new id.
3 changes
Enhancements to existing features
The web client now opens without waiting for translation data to be recalculated every time. This reduces unnecessary server work and should make Odoo feel faster, especially for users working in translated interfaces.
Original PR description
Before this commit, a "translation hash" was calculated and added to the session_info. The method used to compute the hash needs to compute the translations, which can be slow, and only the hash is…
Before this commit, a "translation hash" was calculated and added to the session_info. The method used to compute the hash needs to compute the translations, which can be slow, and only the hash is cached. This hash is then used by the client to fetch the translations twice. Once directly in the page template, and once in the localization service. This is done to get the translations as quickly as possible. Normally, the browser cache should prevent from the second request from being made (since the hash is the same), but this doesn't always seem to work as expected, as all requests are started as soon as possible, so if there is a small delay in the first request the second is also be made. So in the worst case scenario, translations are calculated 3 times by the server, and the web client waits for them to finish before rendering. Now, a translation hash is no longer calculated to be placed in session_info, speeding up session_info and the page. The translation hash is sent to the web client with the translations themselves. Only the first time, the web client will waits for the translations to be rendered. The next time the user accesses the web client, the cached translations are used. Each time the user accesses the web client, the translations are fetched. If a cached translation exists, the hash of the cached translation is used to fetch the translations. The new route computes the current hash of the translations, compares it with the one it received and if it's the same simply replies that there has been no change; if the hash is different, it replies with the computed translations and the new hash. Note that when the hash is computed, the translations are kept in a cache to avoid having to compute the translations twice. opw-4737228 Co-authored-by: Rémy Voet <ryv@odoo.com>
Miscellaneous changes
A traceback occurs when attempting to view the 'Hierarchy and Subtotals' of an Account Group with a Financial Budget set in the 'Profit and Loss' report. Steps to reproduce: ------------------- * Open Accounting in debug mode * In Configuration > Accounting > Financial Budgets create a new budget * In Configuration > Accounting > Account Groups create a new group * Open Reporting > Statement Report > Profit and Loss * Select the budget and Hierarchy and Subtotals * Click on Revenues
Original PR description
A traceback occurs when attempting to view the 'Hierarchy and Subtotals' of an Account Group with a Financial Budget set in the 'Profit and Loss' report. Steps to reproduce: ------------------- *…
A traceback occurs when attempting to view the 'Hierarchy and Subtotals' of an
Account Group with a Financial Budget set in the 'Profit and Loss' report.
Steps to reproduce:
-------------------
* Open Accounting in debug mode
* In Configuration > Accounting > Financial Budgets create a new budget
* In Configuration > Accounting > Account Groups create a new group
* Open Reporting > Statement Report > Profit and Loss
* Select the budget and Hierarchy and Subtotals
* Click on Revenues
* Traceback
> Observation:
File '/home/odoo/src/enterprise/18.0/account_reports/models/account_report.py', line 1035, in compute_group_totals
hierarchy_total + (column.get('no_format') or 0.0) if isinstance(hierarchy_total, float) else hierarchy_total
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for +: 'float' and 'str'
Why the fix:
------------
Add float verification to ensure valid operation in the hierarchy.
opw-4628498
Forward-Port-Of: odoo/enterprise#84564
Forward-Port-Of: odoo/enterprise#83302Clicking on an attachment should preview the attachment without downloading. task-4627315 Forward-Port-Of: odoo/enterprise#84628
Original PR description
Clicking on an attachment should preview the attachment without downloading. task-4627315 Forward-Port-Of: odoo/enterprise#84628
44 changes
New functionality added to Odoo
Odoo now supports sending Greek customer invoice classifications to the myDATA tax platform and retrieving third-party invoices to prepare vendor bills for expense classification. This helps Greek companies meet digital tax reporting requirements directly from their invoicing workflow, including reference numbers, QR codes, and error tracking.
Original PR description
MyDATA is a platform created by Greece's tax authority, The Independent Authority for Public Revenue (IAPR), to digitize business tax and accounting information declaration. All companies performing…
MyDATA is a platform created by Greece's tax authority, The Independent Authority for Public Revenue (IAPR), to digitize business tax and accounting information declaration. All companies performing accounting, according to Greek accounting standards, will be required to transmit the information to the myDATA platform beginning in July of 2021. - Customer Invoices Customer Invoice form for Greece companies will now have a few fields required for specifying classification data to be send to MyDATA. In the Send & Print Wizard, a checkbox "Send to MyDATA"is added, and when activated, Odoo will generate an XML of the selected invoice(s) and send them to the MyDATA API. Any errors detected before and after the send will then be saved in a document object, displayed in the 'myDATA' tab in the move form view. - Vendor Bills In Greece, one's expense is another's invoice. When reporting to MyDATA for our expense classification, we need to fetch the invoice(s) issue by third-party issuer, fill the classification needed and send them back to MyDATA. To implement this behavior, we created a daily cron to fetch xml data from MyDATA related to the designated Greece companies, and create draft vendor bills based on that data. The user can then fill the myDATA classification data needed and send them back to MyDATA via a button in vendor bills view form after confirming the bill. task-id: 3358316
Enhancements to existing features
Odoo now lets businesses choose which taxes should be treated as allowance charges and assign the appropriate standard codes when generating UBL electronic invoices. This helps produced e-invoice files better match official requirements, reducing compliance issues with partners or tax authorities.
Original PR description
This commit aims to better align the ubl files generated by Odoo with the official standard by adding the flexibility for users to choose which tax are allowance charges and their accompanied codes. task: 4660683
This update renames Hong Kong accounting entries related to MPF to include more detail. The clearer labels help finance users identify payroll-related pension accounts more easily and reduce ambiguity in reports or account setup.
Original PR description
See also: odoo/enterprise#84595 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Accounting menus for analytic items are now better aligned with whether analytic accounting is enabled. This reduces confusion by preventing users from seeing analytic options that are not meant to be available in their setup.
Original PR description
Before this commit, the "Analytic Items" and "Analytic Report" menu items were visible even when the analytic feature was disabled, leading to potential confusion. To address this: - "Analytic Items": The solution is to restrict visibility by keeping only the `group_analytic_accounting` group and removing all the other groups. - "Analytic Report": After consideration, it was decided to leave this menu item with `group_account_readonly`. While this is not a perfect solution, it remains the best option compared to the alternatives: - Making it visible to everyone when the analytic feature is enabled, which would grant access too broadly. - Creating a dedicated parent menu item to set `group_account_readonly` at the parent level and `group_analytic_accounting` at the child level. However, this would introduce unnecessary complexity and negatively impact the UI/UX. task-4497442 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Employees using flexible work schedules can now request custom-hour leave without being capped by the average hours per day. This makes time-off requests better match actual flexible working arrangements and reduces unnecessary restrictions for HR and employees.
Original PR description
- when an employees has a flex calendar the custom hours leaves should not be limited to the avg_hours_per_day Task: 4744248 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Hong Kong payroll accounting setup has been revised so payroll entries are mapped to the appropriate accounts more accurately. This helps businesses using Hong Kong payroll produce cleaner accounting records and reduces the need for manual corrections.
Original PR description
See also: odoo/odoo#208257
Resolved issues and error corrections
Fixes an error in Spanish SII reporting where the equivalence surcharge tax total could include only the last invoice line instead of the full invoice amount. This helps ensure invoices sent to the Spanish tax authority contain accurate tax figures when multiple lines use the same surcharge taxes.
Original PR description
**Steps to reproduce:** - Install Accounting and l10n_es_edi_sii - Switch to a Spanish company (e.g. ES Company) - Create an invoice: * Customer: [a Spanish customer] (e.g. Ayuntamiento De Bilbao) *…
**Steps to reproduce:** - Install Accounting and l10n_es_edi_sii - Switch to a Spanish company (e.g. ES Company) - Create an invoice: * Customer: [a Spanish customer] (e.g. Ayuntamiento De Bilbao) * 1 invoice line with a "Sujeto" type tax (e.g. "4% G") and a "Recargo de Equivalencia" type tax (e.g. "0.5% SE") * another invoice line with the same taxes - Confirm the invoice - Send the invoice to "SII IVA Llevanza de libros registro (ES)" - Check the sent "jsondump.json" file in the attachments **Issue:** Value of "CuotaRecargoEquivalencia" in the json is incorrect. It only contains the tax amount of the "Recargo de Equivalencia" tax (i.e. "0.5% SE") of the second line, instead of the sum of the tax amount from both lines. **Cause:** When computing the details for the "Recargo de Equivalencia" taxes, each invoice line is grouped by their combination of taxes. For each combination, we keep the tax details of the recargo tax of one line (the latest one) overriding the previous values, instead of summing them. **Solution:** Sum the tax amount for each group of taxes. opw-4650892 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The bus service now uses the latest notification information shared across browser tabs instead of relying only on the main tab. This prevents users from being incorrectly told their page is outdated after a temporary connection drop.
Original PR description
The outdated page watcher checks whether bus notifications were missed when the bus reconnects after an unexpected disconnection. To do so, it checks if the last known notification id is still in the bus table. However, it relies on the main tab's last received notification which might not be available when the main tab didn't receive notifications after being elected. To fix this issue, this commit uses the global last notification stored in the local storage to ensure every tab has access to it. 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
Tasks created from service sale order lines now display the added line description when one is provided, rather than always showing the product name. This makes linked task information clearer for users and preserves the product name as a fallback when no description exists.
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Create a service product that creates a task; 2. add product to an order; 3. add an extra description to the sale order line; 4. confirm the order; 5. go to the task. Issue ----- The name of the sale order item linked to the task displays the product name instead of the extra line description. Cause ----- As 18.0, the first line of the sale order line name is always the product name. In earlier versions, the product name was only used as a fall-back value when no extra description was added to the line. Solution -------- Account for the guaranteed addition of the product name in the SOL name, and instead use the second line for the display name if it exists and is non-empty, else fall back on the product name as intended. opw-4634149
Changing a quotation template now clears the previously selected header and footer documents before applying the new template. This prevents sales quotations from being printed with documents from multiple templates, keeping customer-facing PDFs accurate and consistent.
Original PR description
## Version: 18.0 > 18.1 (test to fw up to master) 18.2+ fixed by https://github.com/odoo/odoo/pull/186649 ## Issue: Changing the `Quotation Template` on a quotation after ## Steps to reproduce:…
## Version:
18.0 > 18.1 (test to fw up to master)
18.2+ fixed by https://github.com/odoo/odoo/pull/186649
## Issue:
Changing the `Quotation Template` on a quotation after
## Steps to reproduce:
*Ensure `PDF Quote builder` is checked in `Settings` app*
- In `Sales / Configuration / Sales Orders:Headers/Footers`:
- Ensure there are at least 2 documents *(add them if needed)*;
- Set their `Document type` to `Header`;
- Go to `Sales / Configuration / Sales Orders:Quotation Templates`:
- Create 2 new templates (e.g. "test1" and "test2"):
- In "test1", under the `Quote Builder`, add one of the documents;
- In "test2", under the `Quote Builder`, add the second document;
- Create a new quote for any customer:
- Select "test1" as `Quotation Template`;
- Under the `Quote Builder`, select the header document;
- Change the `Quotation Template` for "test2";
- Select the header document;
- Change back to "test1" and see the header document is still selected;
- Print the quote via the action button;
- The PDF contains both "test1" and "test2" document headers.
## Fix:
Partial backport of https://github.com/odoo/odoo/pull/186649
opw-4709144This fix ensures point of sale order changes, such as deleted order lines, are not lost when a sync attempt fails. It also avoids errors when another device has already removed a related record, helping keep POS orders consistent across devices.
Original PR description
Before this commit, when an orderline was removed and the order failed to sync on the first attempt, the deletion command was already discarded. As a result, the order could be synced later with the previously deleted order line still present. Additionally, if a record is removed from another device but the change has not yet been synced, attempting to remove or modify that record can result in a "missing record" error. This commit resolves the issue by checking for the record's existence before performing any write operations. opw-4707596 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue in the Spanish TicketBAI electronic invoicing flow where certain tax reporting codes could be split and reported incorrectly. The update helps ensure compliant invoice XML output and adjusts tests to cover the corrected behavior.
Original PR description
The fw-port in https://github.com/odoo/odoo/pull/208205 was not changed correctly as the method on the taxes returned one element, but the calling method needed to return a list and as such the string was interpreted as a list giving two claves for e.g. 01. In the meantime, the tests are adapted as well. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes an issue where mapping accounts between companies could be blocked when one company used German accounting rules. The change ensures German account-code restrictions are only applied in the relevant German company, allowing cross-company account mapping to proceed correctly.
Original PR description
Writing the account code is restricted on l10n_de accounts. Odoo checks that the code we write is different from the old one, and if so it checks of there are already some entries for that accounts. If any of the condition is met, the write is prevented. When we try to map an account from another company to a l10n_de company, the _inverse_code function from the account mapping will try and update the account code in the other company, as the code is company dependent. The issue is that we check that the l10n_de code remains the same, even if we are in another, non l10n_de company. This PR adapts the check to l10n_de account to only check the code if we are writing it from the l10n_de company. opw-4711417
When a website ticket is created, Odoo now looks for an existing customer using the company from the current context. This prevents tickets in one company from being linked to a customer record belonging to another company, avoiding access errors for users limited to a specific company.
Original PR description
To reproduce: ============= 1. have a partner with email test@odoo.com in company1 2. allow to Demo only the company2 3. setup helpdesk team for company2 and enable it on website 4. create a ticket from website with email : test@odoo.com 5. check the ticket will be created with the partner from company1 6. try to open the ticket as Demo user, you will get an access error Problem: ========= `find_or_create` method of `res.partner` model is not taking into account the company_id from the context when searching for the partner. Solution: ========= The `find_or_create` method of `res.partner` model is modified to consider the company_id from the context when searching for the partner. opw-4699518 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Products that are not available for self-ordering are no longer loaded or shown in the Point of Sale self-order interface. This avoids confusing customers with items marked as out of stock when they should not appear at all.
Original PR description
Before this commit, products that were not available for self-ordering were still loaded into the PoS and displayed as "Out of stock." This could cause confusion for users. After this commit, unavailable products are no longer loaded or displayed in the PoS, ensuring that only available products are shown to customers. opw-4764785 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Point of Sale combo item prices now recalculate when a cashier changes the order's pricelist. This helps ensure customers are charged the correct promotional or customer-specific price for combo products.
Original PR description
- Fix issue where combo price were not recomputed when changing the pricelist of the order. - The issue was due to the fact that in the `pos_order.set_pricelist()` method we were only recopute the combo line that have a `price_type === "original"`, and that the combo line `price_type` was undefined. Now when a adding a combo product to the cart, all of its lines have a `price_type` set to `automatic` initially, and inside `pos_order.set_pricelist()` we now recompute the price of the combo line that have a `price_type === "automatic"`. Steps to reproduct: - Create pricelists and add it to pos config - Open PoS - Add combo product to cart - Change pricelist - => Price is not recomputed based on the pricelist as it should task-id: 4707663 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Fixes an issue where replenishing scrapped manufacturing components could make the manufacturing order show the wrong remaining component quantity. This helps production teams keep reservations accurate after scrap and replenishment, reducing inventory confusion and production delays.
Original PR description
Before PRs https://github.com/odoo/odoo/pull/154912 and https://github.com/odoo/odoo/pull/177079, _free_reservation preserved MTO links by retaining move_orig_ids, allowing Manufacturing Orders (MOs)…
Before PRs https://github.com/odoo/odoo/pull/154912 and https://github.com/odoo/odoo/pull/177079, _free_reservation preserved MTO links by retaining move_orig_ids, allowing Manufacturing Orders (MOs) to reserve components from replenishment pickings. PR https://github.com/odoo/odoo/pull/149054 added replenishment moves to the MO’s procurement.group and assigned move_dest_ids to link them to component moves, supporting 2-step manufacturing flows. PR https://github.com/odoo/odoo/pull/154912 introduced the stock.break_mto parameter to conditionally preserve move_orig_ids, while PR https://github.com/odoo/odoo/pull/177079 removed it, making move_orig_ids clearing unconditional for MTO-to-MTS transitions, reintroducing a regression due to the move_dest_ids assignment. Steps to Reproduce =================== 1. Create an MO with a component qty of 20 units and confirm it. 2. Scrap 5 units of the component with Replenish enabled. 3. Validate the replenishment transfer. 4. Check the MO component line. The component qty is reduced to 5. Issue ===== The move_dest_ids assignment to replenishment moves (from https://github.com/odoo/odoo/pull/149054) prevents _trigger_assign from reserving correct MO component quantities when move_orig_ids are cleared (per https://github.com/odoo/odoo/pull/177079), as the link to the original MO requirements is broken. Fix === Removed the move_dest_ids assignment for replenish moves enabling trigger_assign to automatically reserve the correct component quantities, while maintaining the MTO-to-MTS transition (cleared move_orig_ids) and the procurement.group assignment. Task: https://github.com/odoo/odoo/commit/44437975bdaf1e7c4f5540a5cb789d9db0ec0b0b
Point of Sale now sends the session closing notification to all connected devices even when the session is closed from the backend after an error. This helps staff stay aligned and avoids devices missing important closing updates.
Original PR description
Before this commit, the session closing message was in the method called from the UI. But in case of error during the closing control, the user must close it from the backend. In this case, the message was not sent to all devices. This commit moves the message to the write method of the session to ensure that the message is sent to all devices, even if the session is closed from the backend.
Integer ID fields can now hide thousand separators without disabling other formatting behavior. This prevents new list-view records from temporarily showing an incorrect “false” value before they are saved, improving clarity for users working with task and subtask lists.
Original PR description
Steps: Set enable_formatting to false on an Integer field (ex. ID). Turn the ID column to be visible in subtask list view. Add a new record using list view. Issue: The ID field displays false till saved. Reason: enable_formatting: false was used to remove regional formatting (e.g., thousand separators) for the ID field. But this also disabled all other formatters, including null value handling, resulting in false value in ID field. Fix: Introduced a new option skip_thousands_separator under the IntegerField formatting logic.When enabled, it disables only the thousands separator while preserving other formatting behaviors. task-4700791
Helpdesk tickets created from the website now match customers within the correct company instead of reusing a contact from another company with the same email address. This prevents access errors for users limited to one company and ensures tickets are assigned to the right customer record.
Original PR description
To reproduce: ============= 1. have a partner with email test@odoo.com in company1 2. allow to Demo only the company2 3. setup helpdesk team for company2 and enable it on website 4. create a ticket from website with email : test@odoo.com 5. check the ticket will be created with the partner from company1 6. try to open the ticket as Demo user, you will get an access error Problem: ========= `find_or_create` method of `res.partner` model is not taking into account the `company_id` when searching for the partner. Solution: ========= uses `_mail_find_partner_from_emails` method of `mail.thread` model to find/create the partner with extra domain containing `company_id`. opw-4699518
Indian GST reports now use the updated HSN reporting format based on a configurable effective date. If the setting is missing or incorrect, the system falls back to the government guideline date of 1 May 2025, helping businesses stay compliant without manual code changes.
Original PR description
Apply the HSN schema based on the 'l10n_in_reports.hsn_new_schema_apply_date' system parameter. If the parameter is missing or invalid, default to 2025-05-01 as per government guidelines.
Brazilian electronic invoicing with Avalara now preserves full invoice line descriptions without forcing customers to shorten them manually. Line breaks are converted before sending data to Avalara, avoiding a known processing issue while keeping the official PDF and XML output unchanged.
Original PR description
In some cases, it's not possible for customers to trim the description of an invoice line to the accepted length (e.g. for traceability or completeness). It turns out that Avalara will trim and transform the descriptions on our behalf to make them compatible with the government's API. As part of that process, they translate `\n` characters to ` | ` before sending it to the government. Unfortunately, there seems to be a bug with that process on their side. When a '\n' character is included in the description, they don't trim the description they send to the government sufficiently. Perhaps they trim before the '\n' to ' | ' translation, or perhaps they have some other bug. We sidestep the issue by doing that same translation on our side and sending them that. It doesn't result in any change on the EDI PDF or XML, and this way we can avoid hardcoding these limits on our side. task-4726372
This update makes account follow-up report tests adapt to the company’s configured currency symbol instead of assuming a fixed dollar sign. It helps prevent false test failures when a company uses a different currency display format, improving reliability without changing customer-facing behavior.
Original PR description
The aim of this PR is to prevent errors in the account_followup tests because of the symbol on the company currency. If the company currency is changed for some reason (for example USD dollar to…
The aim of this PR is to prevent errors in the account_followup tests because of the symbol on the company currency. If the company currency is changed for some reason (for example USD dollar to "USD" instead of "$" as typically used in Odoo), the test will fail raising an error similar to the following:
`[odoo.addons.account_followup.tests.test_followup_report:184](https://github.com/adhoc-cicd/odoo-enterprise/blob/74a5097e1d6ab79eb31ed302865aa075162494c2/account_followup/tests/test_followup_report.py#L184)
FAIL: TestAccountFollowupReports.test_followup_lines_branches
Traceback (most recent call last):
File "/data/build/adhoc-cicd-odoo-enterprise/account_followup/tests/test_followup_report.py", line 184, in test_followup_lines_branches
self.assertLinesValues(
File "/data/build/adhoc-cicd-odoo-enterprise/account_reports/tests/common.py", line 273, in assertLinesValues
self.fail('\n'.join(errors))
AssertionError:
==== Differences at index 0 ====
Current Values: ['INV/2016/00001', '01/01/2016', '01/01/2016', '', 'USD\xa0500.00']
Expected Values: ['INV/2016/00001', '01/01/2016', '01/01/2016', '', '$\xa0500.00']
==== Differences at index 1 ====
Current Values: ['', '', '', '', 'USD\xa0500.00']
Expected Values: ['', '', '', '', '$\xa0500.00']
==== Differences at index 2 ====
Current Values: ['', '', '', '', 'USD\xa0500.00']
Expected Values: ['', '', '', '', '$\xa0500.00']`
That's the reason why I refactor the test to first fetch the company currency symbol and then used it in the test assertions.The Colombian eCommerce invoicing flow now only matches the NIT tax ID type for Colombia. This prevents errors when another country has an ID type with the same name, helping customers complete checkout reliably.
Original PR description
Adding a condition to match contry to CO when looking for NIT latam ID type. Otherwise, adding another ID type named 'NIT' for a different country causes the search to return both, resulting in a traceback. Related to https://github.com/odoo/odoo/pull/189687 task-4318265
When a sales order includes both regular and subscription products, confirmed invoices now schedule the next invoice using the subscription billing period instead of defaulting to the next day. This prevents customers on monthly or other recurring plans from being invoiced too soon.
Original PR description
Issue ----- For sale orders where one of the products is a subscription, after confirming the invoice, the date for the next invoice is set to the next day regardless of the billing period specified on the SO. Steps to reproduce ----- - Create a subscription product - Type: Service - Invoicing Policy: Based on Delivered Quantity - Recurring Plan set to Monthly - Create a SO - Add a regular product and the subscription product - Recurring Plan: Monthly - Confirm SO - Set delivered quantities - Create a new Invoice from the SO - Confirm the Invoice -> The next invoice date is the next day instead of month Cause ----- Not all of the order lines are subscriptions, so the next invoice date is never increased by the planned billing period. Solution ----- Change the condition from all lines to any line. ----- Ticket: opw-4549344
Batch payments in foreign-currency journals now show residual amounts in the company currency when linked payments do not have journal entries. This prevents incorrect credit values during bank reconciliation and helps users match bank statement lines accurately.
Original PR description
Fix issue when computing `amount_residual` for batch payments linked to payments without a journal entry. In such cases, the `amount_residual` may be returned in the journal currency instead of the company currency, which causes issues during bank reconciliation. Steps to reproduce: 1. Create a journal in another currency (e.g. EUR, with USD as company currency) 2. Create two customer payments in this journal 3. Create a batch payment using those two payments, in the same EUR journal 4. In the reconciliation page of the journal, add a bank statement line and try to reconcile it The batch payment line in the reconciliation view will show a credit amount equal to the "amount in currency", because it was wrongly converted from EUR to EUR instead of EUR to USD. opw-4759842
Documentation and clarification updates
This pull request adds a contributor license agreement record for an individual contributor. It helps ensure the project has the necessary legal confirmation for accepting contributions, with no expected impact on product behavior.
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
This pull request adds an individual contributor license agreement document. It supports project governance and legal record-keeping without changing product functionality 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
Miscellaneous changes
Currently the reconciliation may create unnecessary exchange difference entries or have unnecessary residual amounts. This can happen in case we try to reconcile lines with multiple currencies. Consider e.g. the following case (c.f. the added test cases in the code): company currency: EUR foreign currency: USD rate: 1 EUR = 18.8777 USD (1 USD = 0.052972554919 EUR) rounding: Both EUR and USD are rounded to 2 decimal places (to 0.01) Lines to reconicle: line0 | 20000.00 USD | 377554
Original PR description
Currently the reconciliation may create unnecessary exchange difference entries or have unnecessary residual amounts. This can happen in case we try to reconcile lines with multiple currencies.…
Currently the reconciliation may create unnecessary exchange difference entries or have unnecessary residual amounts. This can happen in case we try to reconcile lines with multiple currencies. Consider e.g. the following case (c.f. the added test cases in the code): company currency: EUR foreign currency: USD rate: 1 EUR = 18.8777 USD (1 USD = 0.052972554919 EUR) rounding: Both EUR and USD are rounded to 2 decimal places (to 0.01) Lines to reconicle: line0 | 20000.00 USD | 377554.00 EUR line1 | -372239.38 EUR | -372239.38 EUR Perfect write-off line for a full reconciliation (w/o exchange difference or remaining residuals) line2 | -281.53 USD | -5314.62 EUR Since EUR: 377554.00 + -372239.38 = 5314.62 USD: 200000.00 + USD.round(-372239.38 * 0.052972554919) = 200000.00 + USD.round(-19718.47100006451) = 281.53 Note the actually used exchange rates during the reconciliation are not necessarily the ones from the currencies. They could also be (re)computed from the lines. Note that the "reconciliation currency" may be choosen differently in the following cases - the reconciled account is a payable (`liability_payable`) or receivable (`asset_receivable`) account - the reconciled account has another type In the code see - `recon_currency` in `_prepare_reconciliation_single_partial` - `is_rec_pay_account` in `_prepare_move_line_residual_amounts` #### Problem (1); receivable / payable account & partial reconciliation In this case we reconcile line0 and line1 and the account on the lines is either a payable or a receivable account. The following happens 1. Due to the account type we try to match the foreign currency (USD) amounts. line1: 20000.00 USD line2: 19718.47 USD (= USD.round(-372239.38 * ≈0.052972554919) = USD.round(-19718.47100006451)) USD: 19718.47 (= min(20000.00, 19718.47)) 2. Use the exchange rate (from line0) to compute the value in EUR (company currency) EUR: 372239.36 (= EUR.round(19718.47 * ≈18.8777) = EUR.round(372239.36111900007)) 3. We still have a residual of 0.02 EUR on line1. But since line2 was fully matched in step 1 we create an exchange difference entry (to cover for the residual in company currency) Issue: We could have matched 372239.38 EUR on both lines since the difference (0.02 EUR) is just a rounding error. Here 372239.38 EUR represents the full remaining amount in company currency on line1. Then there would have been no residual (and thus no need for an exchange difference entry) #### Problem (2); other account type & try full reconciliation with correct write-off line In this case we reconcile line0 and line1 and line2 and the account on the lines is neither payable nor receivable. First the reconciliation will reconcile line0 and line2 (roughly speaking since they have the same foreign currency). 1. Since both are in foreign currency we try to match these amounts first: USD: 281.53 (= min(20000.00, 281.53)) 2. We then use the exchange rate to compute the value in EUR (company currency) line0, EUR: 5314.64 (= EUR.round(281.53 * ≈18.8777) = EUR.round(5314.638881)) line2, EUR: 5314.62 (281.53 converted via the "custom" rate on line2) 3. We now have the following residuals line0 (residuals) | 19718.47 USD | 372239.36 EUR line2 (residuals) | 0.00 USD | 0.00 EUR We substracted 5314.64 EUR from line0 but only 5314.62 EUR from line2. 4. To account for the difference we create an exchange difference entry We could have matched 5314.62 EUR on both lines (since the difference is just a rounding error) This way we could void the exchange difference entry. And we would also have a "correct" residual on line0. The residuals on line0 will cause the full reconciliation to fail (see below). Next the reconciliation will match line1 with the residuals of line0 The following happens. 1. We try to match company currency amounts first (due to the account type) line0, EUR: 372239.36 line1, EUR: 372239.38 EUR: 372239.36 = min(372239.38, 372239.36) 2. Compute the amounts in currency line0, USD: 19718.47 (= USD.round(372239.36 * ≈0.052972554919)) line1, EUR: 372239.36 (= 372239.36 * 1) 3. We now have the following residuals line0 (residuals) | 0.00 USD | 0.02 EUR line1 (residuals) | 0.00 USD | 0.00 EUR 4. The reconciliation ends without creating an exchange difference entry #### Solution Problem (1) In case the remaining amount (in company currency) could be fully matched if not for rounding issues we will just match the full remaining amount. Problem (2) We match the company currency amounts of the individual lines to a common value if they are the same up to exchange rounding issues. #### References opw-4438542 Forward-Port-Of: odoo/odoo#208371 Forward-Port-Of: odoo/odoo#204746
Currently ssl certificates are only generated on odoo.com based on db_uuid and enterprise_code. Since we won't be needing enterprise_code anymore we adapt our code to still recover the ssl certificate and be able to recover and log the new 'error' values sent by odoo.com task-4585446 Related PR: https://github.com/odoo/internal/pull/3425 Forward-Port-Of: odoo/odoo#203834 Forward-Port-Of: odoo/odoo#203328
Original PR description
Currently ssl certificates are only generated on odoo.com based on db_uuid and enterprise_code. Since we won't be needing enterprise_code anymore we adapt our code to still recover the ssl certificate and be able to recover and log the new 'error' values sent by odoo.com task-4585446 Related PR: https://github.com/odoo/internal/pull/3425 Forward-Port-Of: odoo/odoo#203834 Forward-Port-Of: odoo/odoo#203328
Steps: ------ 1. Create a combo product and make it available in restaurant 2. In PoS, add this product to an order 3. Click the product line, and set the quantity to 2 let's 4. Click split button, it takes you to the split screen Observation: We can not select one of these 2 combos to split, it's either all of them, or none. Reason: ------- That's because combos are considered as non groupable in pos, see `is_pos_groupable` [1]. And then, when splitting a combo in `_splitQuantity`
Original PR description
Steps: ------ 1. Create a combo product and make it available in restaurant 2. In PoS, add this product to an order 3. Click the product line, and set the quantity to 2 let's 4. Click split button,…
Steps: ------ 1. Create a combo product and make it available in restaurant 2. In PoS, add this product to an order 3. Click the product line, and set the quantity to 2 let's 4. Click split button, it takes you to the split screen Observation: We can not select one of these 2 combos to split, it's either all of them, or none. Reason: ------- That's because combos are considered as non groupable in pos, see `is_pos_groupable` [1]. And then, when splitting a combo in `_splitQuantity` [2], we either take all the quantity or 0. Fix: ---- We update the split logic to account for special combo cases. [1]: https://github.com/odoo/odoo/blob/bee8b55d7783ea11f2362990cd9d7695b877b8e9/addons/point_of_sale/static/src/app/store/models.js#L829 [2]: https://github.com/odoo/odoo/blob/bee8b55d7783ea11f2362990cd9d7695b877b8e9/addons/pos_restaurant/static/src/app/split_bill_screen/split_bill_screen.js#L124-L127 opw-4737788 Forward-Port-Of: odoo/odoo#208266 Forward-Port-Of: odoo/odoo#208055
At the moment, whenever the partner is changed on an invoice, the l10n_latam_document_type_id field is recomputed and re-set to the default value corresponding to the partner and invoice type. We don't want this to happen if the existing l10n_latam_document_type_id is already compatible with the new partner. opw-4168385 Forward-Port-Of: odoo/odoo#208324 Forward-Port-Of: odoo/odoo#195581
Original PR description
At the moment, whenever the partner is changed on an invoice, the l10n_latam_document_type_id field is recomputed and re-set to the default value corresponding to the partner and invoice type. We don't want this to happen if the existing l10n_latam_document_type_id is already compatible with the new partner. opw-4168385 Forward-Port-Of: odoo/odoo#208324 Forward-Port-Of: odoo/odoo#195581
PROBLEM 1: Steps to reproduce: - Create branch company - Create a user for the branch company and assign the bookkeeper role - Log in as the newly created user - Inside accounting module navigate to Vendor menu -> Payment - Create a payment and set the amount - Attempt to edit the payment Error:- Access Error: Access to unauthorized or invalid companies. Cause: Before this pr, the context passed during the accessible branches calculation included 'journal_id.company_id' (i.e., t
Original PR description
PROBLEM 1: Steps to reproduce: - Create branch company - Create a user for the branch company and assign the bookkeeper role - Log in as the newly created user - Inside accounting module navigate to…
PROBLEM 1: Steps to reproduce: - Create branch company - Create a user for the branch company and assign the bookkeeper role - Log in as the newly created user - Inside accounting module navigate to Vendor menu -> Payment - Create a payment and set the amount - Attempt to edit the payment Error:- Access Error: Access to unauthorized or invalid companies. Cause: Before this pr, the context passed during the accessible branches calculation included 'journal_id.company_id' (i.e., the parent company_id). This led to an error during validation in the companies method of the env class, since the parent company_id is not valid for branch-specific operations/users. Solution: After this pr, remove the context modification introduced by the 'with_company()' method during the invocation of '_accessible_branches()', ensuring that the correct branch context is used for access validation. PROBLEM 2: Steps to reproduce: - First 3 steps are same as problem 1 - Inside accounting module navigate to bank reconciliation list view - Create new bank statement line - Attempt to edit the bank statement line Error:- Access Error: because of company rule employee Cause: Before this pr, in the '_synchronize_to_moves' method the 'company_currency' calculation included 'journal.company_id.currency_id' in which 'journal.company_id' is the parent company_id to which the user does not have access. Solution: After this pr, adding 'sudo()' method call at the time of accessing 'journal.comapny_id' (i.e., parent company_id) for bypassing the access rights. Task - 4654866 Forward-Port-Of: odoo/odoo#205548
**Steps to reproduce:** Create a new contact/company with more than 25 character **Issue:** The name field is partially shown as compared to version 16. **Cause:** The issue occurs after this change (odoo/odoo@a68cfbb) in version 17. The below CSS for the partner autocomplete field has been removed as the field has 'field_partner_autocomplete' widget. https://github.com/odoo/odoo/blob/05e60f226a0d15bfa3b71eaebe2786f4d687f23e/addons/partner_autocomplete/static/src/scss/partner_autocompl
Original PR description
**Steps to reproduce:** Create a new contact/company with more than 25 character **Issue:** The name field is partially shown as compared to version 16. **Cause:** The issue occurs after this change (odoo/odoo@a68cfbb) in version 17. The below CSS for the partner autocomplete field has been removed as the field has 'field_partner_autocomplete' widget. https://github.com/odoo/odoo/blob/05e60f226a0d15bfa3b71eaebe2786f4d687f23e/addons/partner_autocomplete/static/src/scss/partner_autocomplete.scss#L31-L34 **Solution:** Reintroduce partner autocomplete CSS fix (odoo/odoo@b9788544b7101e5a202cf87989bc3f5fc0495249) [opw-4686705](https://www.odoo.com/odoo/project/49/tasks/4686705) 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#205661
## Description I am experiencing slow processing times for incoming stock from vendors when the historical data contains a large number of records. Currently, my company has around 20 million `stock.valuation.layer` records. As a result, any transaction involving incoming stock takes approximately 5–21 seconds to complete, even for a small number of products (around 1–5 products). Through profiling, I have identified that the root cause is the compute function `_compute_value_svl`. This c
Original PR description
## Description I am experiencing slow processing times for incoming stock from vendors when the historical data contains a large number of records. Currently, my company has around 20 million…
## Description
I am experiencing slow processing times for incoming stock from vendors when the historical data contains a large number of records.
Currently, my company has around 20 million `stock.valuation.layer` records. As a result, any transaction involving incoming stock takes approximately 5–21 seconds to complete, even for a small number of products (around 1–5 products).
Through profiling, I have identified that the root cause is the compute function `_compute_value_svl`. This computed field is always triggered during incoming stock transactions when calculating the average cost or fixing rounding errors.
## Proposal
To improve performance, I propose implementing a Parallel Index-Only Scan. This method is effective for grouping large datasets while retrieving only fixed columns, optimizing query execution.
## Benchmark
| Before | After | Speedup |
|--------|--------|--------|
| 1.1 s| 97.8 ms | 11x|
### Before
```
Finalize GroupAggregate (cost=1000.56..397852.39 rows=538 width=80) (actual time=1040.355..1114.694 rows=1 loops=1)
Group Key: product_id
Buffers: shared hit=227534 read=330906 dirtied=83 written=683
-> Gather (cost=1000.56..397825.49 rows=1076 width=80) (actual time=1039.900..1114.679 rows=3 loops=1)
Workers Planned: 2
Workers Launched: 2
Buffers: shared hit=227534 read=330906 dirtied=83 written=683
-> Partial GroupAggregate (cost=0.56..396717.89 rows=538 width=80) (actual time=1036.758..1036.759 rows=1 loops=3)
Group Key: product_id
Buffers: shared hit=227534 read=330906 dirtied=83 written=683
-> Parallel Index Scan using stock_valuation_layer_index on stock_valuation_layer
(cost=0.56..392927.16 rows=302613 width=20) (actual time=0.608..975.431 rows=247487 loops=3)
Index Cond: ((product_id = 140) AND (company_id = 1))
Buffers: shared hit=227534 read=330906 dirtied=83 written=683
Planning:
Buffers: shared hit=9 dirtied=1
Planning Time: 0.139 ms
Execution Time: 1114.732 ms
```
### After
```
Finalize GroupAggregate (cost=1000.56..21876.83 rows=538 width=80) (actual time=91.888..97.719 rows=1 loops=1)
Group Key: product_id
Buffers: shared hit=12889 read=7121
-> Gather (cost=1000.56..21849.93 rows=1076 width=80) (actual time=91.636..97.704 rows=3 loops=1)
Workers Planned: 2
Workers Launched: 2
Buffers: shared hit=12889 read=7121
-> Partial GroupAggregate (cost=0.56..20742.33 rows=538 width=80) (actual time=87.579..87.580 rows=1 loops=3)
Group Key: product_id
Buffers: shared hit=12889 read=7121
-> Parallel Index Only Scan using idx_svl_company_product on stock_valuation_layer
(cost=0.56..16951.60 rows=302613 width=20) (actual time=0.044..46.642 rows=247487 loops=3)
Index Cond: ((company_id = 1) AND (product_id = 140))
Heap Fetches: 9188
Buffers: shared hit=12889 read=7121
Planning Time: 0.107 ms
Execution Time: 97.751 ms
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#206587
Forward-Port-Of: odoo/odoo#203038Fix an issue in the xml template where the custom import form reference is set at the wrong place, causing errors when it is in use at the same time as a customer reference. task-4761954 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208048
Original PR description
Fix an issue in the xml template where the custom import form reference is set at the wrong place, causing errors when it is in use at the same time as a customer reference. task-4761954 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#208048
#### [FIX] account_accountant: reco wizard: exchange rate rounding In the related community commit we improved the reconciliation behavior with regards to exchange rate and rounding issues. See there for more details. For one of the tests there we manually created the write-off line with the correct amount. Here we add a test to check that the wizard computes the right amounts for the write-off line / entry. opw-4438542 #### [FIX] account_accountant: reco wizard: show company amou
Original PR description
#### [FIX] account_accountant: reco wizard: exchange rate rounding In the related community commit we improved the reconciliation behavior with regards to exchange rate and rounding issues. See there…
#### [FIX] account_accountant: reco wizard: exchange rate rounding In the related community commit we improved the reconciliation behavior with regards to exchange rate and rounding issues. See there for more details. For one of the tests there we manually created the write-off line with the correct amount. Here we add a test to check that the wizard computes the right amounts for the write-off line / entry. opw-4438542 #### [FIX] account_accountant: reco wizard: show company amount The reconciliation wizard may create a write-off line / entry. Roughly speaking this happens in case - the amount of the input lines does not sum to 0 - and the "Allow partials" option is not ticked The write-off line can be in foreign currency. Currently the wizard only displays the amount in foreign currency but not the amount in company currency. So currently the company currency amount can not be checked before reconciling. After this commit the wizard also displays the amount in company currency. opw-4623933 Forward-Port-Of: odoo/enterprise#84652 Forward-Port-Of: odoo/enterprise#82865
Steps to Reproduce: 1. Install industry_fsm_sale module. 2. Create a SO with at least one SOL. 3. Save the record. 4. Delete the line, then click the Catalog button without saving. Issue: - An error occurs indicating a missing record. Cause: - The action_add_from_catalog method is accessing self.task_id, but self still includes the deleted SOL, which no longer exists. As a result, accessing its fields raises an error. Fix: - Move the action_add_from_catalog method to the
Original PR description
Steps to Reproduce: 1. Install industry_fsm_sale module. 2. Create a SO with at least one SOL. 3. Save the record. 4. Delete the line, then click the Catalog button without saving. Issue: - An error occurs indicating a missing record. Cause: - The action_add_from_catalog method is accessing self.task_id, but self still includes the deleted SOL, which no longer exists. As a result, accessing its fields raises an error. Fix: - Move the action_add_from_catalog method to the sale.order model, which is the appropriate place to handle this logic, ensuring the method doesn't depend on potentially stale or deleted lines. opw-4760487 Forward-Port-Of: odoo/enterprise#84414
If you have a company A that has a journal set up with bank synchronization, and a company B that is a branch of company A, you have access to the journal and the bank synchronization (account.online.link) of company A in company B. This causes an issue when fetching the transactions from the context of company B, as that will create the fetched transactions with a `company_id` set to B, which will cascade on the journal entries and items linked to these transactions. To ensure the correct
Original PR description
If you have a company A that has a journal set up with bank synchronization, and a company B that is a branch of company A, you have access to the journal and the bank synchronization…
If you have a company A that has a journal set up with bank synchronization, and a company B that is a branch of company A, you have access to the journal and the bank synchronization (account.online.link) of company A in company B. This causes an issue when fetching the transactions from the context of company B, as that will create the fetched transactions with a `company_id` set to B, which will cascade on the journal entries and items linked to these transactions. To ensure the correct company is set on the transactions, we force the company in the context when creating them. As a result: - When only company A is selected, transactions are correctly created in company A. - When both company are selected, no matter if the transactions are fetched from A or B, the transactions are correctly created in company A. - When only company B is selected, the user is faced with an access error, as Odoo is trying to open a view with the fecthed transaction, which belong to company A. To prevent this access error, it was decided that the "Fetch Transaction" buttons should not appear when the company owning the bank synchronization is not selected. A new computed field was then introduced on the account.online.account to check if we should allow fetching given the currenctly selected companies. That field is also added on the account.online.link as a logical conjunction of its account.online.account values of the field. These fields are then used to decide whether if we show the transaction fetching buttons on the dashboard and on the online link form view. Another issue with branches is the 'connect bank' button. With the same configuration as above, let's have companies A and B enabled, with B as the selected company. If you connect a bank to a journal belonging to company A by clicking on the 'connect bank' button on the dashboard, it will successfully connect, but the account.online.link will belong to company B. Then, if you try to access the accounting dashboard with only company A enabled, you will be faced with an access error, as the journal from company A tries to diplay informations computed with the above account.online.link of company B. To prevent this, we only make the 'connect bank' button appear if company A (i.e. the company owning the journal) is selected as the active company. This did not require a new field, and was done by adding an entry in the dashboard data. opw-4515862 Forward-Port-Of: odoo/enterprise#84363 Forward-Port-Of: odoo/enterprise#83134
If stock was not installed, we could not run skip test_prevent_advance_payment_delivered_quantity_product, as there is no qty_to_deliver field in sale.order.line model. By moving the test to sale_subscription_stock, we are solving this issue [link to broken tests](https://runbot.odoo.com/web#id=108148&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form) Forward-Port-Of: odoo/enterprise#75149
Original PR description
If stock was not installed, we could not run skip test_prevent_advance_payment_delivered_quantity_product, as there is no qty_to_deliver field in sale.order.line model. By moving the test to sale_subscription_stock, we are solving this issue [link to broken tests](https://runbot.odoo.com/web#id=108148&menu_id=424&cids=1&action=573&model=runbot.build.error&view_type=form) Forward-Port-Of: odoo/enterprise#75149
**issue:** When a task with an allocated time > 0.0 but no timesheets is created in a shared project (with edit rights), the portal user incorrectly sees 0.0 as the allocated time. **Steps to reproduce:** - Ensure the sale_timesheet module is installed. - Create a new project. - Create a task with allocated time and no timesheets. - Share the project with a portal user (edit permission). In the portal user's kanban view, the allocated time of the task is displayed as 0.0 instead o
Original PR description
**issue:** When a task with an allocated time > 0.0 but no timesheets is created in a shared project (with edit rights), the portal user incorrectly sees 0.0 as the allocated time. **Steps to reproduce:** - Ensure the sale_timesheet module is installed. - Create a new project. - Create a task with allocated time and no timesheets. - Share the project with a portal user (edit permission). In the portal user's kanban view, the allocated time of the task is displayed as 0.0 instead of the correct allocated time. opw-4582705 Forward-Port-Of: odoo/enterprise#82171
We remove unnecessary blackbox call in preSyncAllOrders method. Before we were calling the blackbox every time we were syncing orders with the server, even if it was not useful when there was no line change. Now we only call the blackbox when there is at least a line change. Forward-Port-Of: odoo/enterprise#75981
Original PR description
We remove unnecessary blackbox call in preSyncAllOrders method. Before we were calling the blackbox every time we were syncing orders with the server, even if it was not useful when there was no line change. Now we only call the blackbox when there is at least a line change. Forward-Port-Of: odoo/enterprise#75981
Before, `l10n_ar_edi` had only live test cases. This means that if there is an error in a PR or forward port, no tests would catch it as the were marked `external_l10n` and not ran. Using both `l10n_ke_edi_oscu` and and `l10n_br_edi_pos` recent mock setup as an example, this PR aims to mock the soap requests sent in the module. Notes: - As of now this is only one individual test case. More tests will come as there is time, but having 1 will prevent errors from happening again. - Within th
Original PR description
Before, `l10n_ar_edi` had only live test cases. This means that if there is an error in a PR or forward port, no tests would catch it as the were marked `external_l10n` and not ran. Using both…
Before, `l10n_ar_edi` had only live test cases. This means that if there is an error in a PR or forward port, no tests would catch it as the were marked `external_l10n` and not ran. Using both `l10n_ke_edi_oscu` and and `l10n_br_edi_pos` recent mock setup as an example, this PR aims to mock the soap requests sent in the module. Notes: - As of now this is only one individual test case. More tests will come as there is time, but having 1 will prevent errors from happening again. - Within this module, when the first record within an EDI journal is created, it will try to pull the sequence from the database, and if it can't find a suitable last sequence, it will query the API. This means that any onchange on the first journal entry that will recompute the name or sequence leads to the `_get_last_sequence` function being called and making an API request as the sequence isn't stored in the database yet. The point of this appears to be convenience when transfering from another system to odoo and pulling the latest invoice number they had. The main downside of this feature is that creating the first record now has around 5 API calls returning the same value due to different onchanges on the record. The main calls come from `_compute_name` in the base account module but the rest are from other methods that use the sequence or call `_compute_name` (like `_onchange_l10n_latam_document_type_id`) As this PR is only intended to write tests for the module, the test file matches what occurs in the front-end but future PRs can look into if there are improvements that can be made on stable to simplify this. task-4714096 Forward-Port-Of: odoo/enterprise#84704 Forward-Port-Of: odoo/enterprise#83553
Currently, an error occurs when changing the internal note of an order in **POS Restaurant** if all food items are removed before updating the order. **Steps to reproduce:** - Open a POS session for the **Restaurant** shop. - Select a table, add the food (e.g., "Cheese Burger") and place the order. - Add an `Internal Note` to the ordered food item. - Remove the food item and click the `Order` button (it shows '-1 Food'). - Observe the error. **Error:** `KeyError: 'qty'` The issue
Original PR description
Currently, an error occurs when changing the internal note of an order in **POS Restaurant** if all food items are removed before updating the order. **Steps to reproduce:** - Open a POS session for…
Currently, an error occurs when changing the internal note of an order in **POS Restaurant** if all food items are removed before updating the order. **Steps to reproduce:** - Open a POS session for the **Restaurant** shop. - Select a table, add the food (e.g., "Cheese Burger") and place the order. - Add an `Internal Note` to the ordered food item. - Remove the food item and click the `Order` button (it shows '-1 Food'). - Observe the error. **Error:** `KeyError: 'qty'` The issue occurs because when all food items are removed, `note_history` does not contain the `qty` key and it attempts to access `qty` from `note` at [1]. This commit resolves the issue by adding an additional check to ensure that 'qty' is in `note` before accessing the `qty` key. [1] - https://github.com/odoo/enterprise/blob/f1615134029860d32b95ade09738549a7bb1632d/pos_preparation_display/models/pos_order.py#L79-L80 Sentry - 6303446407 Forward-Port-Of: odoo/enterprise#80924 Forward-Port-Of: odoo/enterprise#79685