Daily updates from Odoo
Saturday, June 13, 2026
56 changes · master
New functionality added to Odoo
This update adds a new field to Odoo invoices for Brazil, allowing users to specify the required 'cClassTrib' tax classification code. This is necessary to comply with Brazilian tax regulations when submitting electronic invoices (EDI) through Avalara, ensuring accurate tax reporting.
Original PR description
Purpose: In Brazil, the tax classification code, cClassTrib, is necessary to classify specific taxes during EDI requests. To support this requirement, a tax classification code field, c_class_trib, is added to the operation type's taxes settings, allowing users to define specific taxation classification per tax and override Avalara's default value when submitting NF-e invoices to the EDI. task-6206607
Enhancements to existing features
This pull request enhances the user experience for US-specific reports and tax forms. The l10n_us modules have been renamed for clarity and consistency, and key menu items related to 1099 reporting have been reorganized under the "United States" section. This simplifies navigation and improves the overall usability of the system for US-based businesses.
Original PR description
*1099, check_printing, payment_nacha, reports Improvements: - Renamed l10n_us related modules to be prefixed by "United States - " for consistency - move the 1099 Boxes and 1099 Report menu items to be under the parent menu section, United States - Set the Comparison Period to be Ascending for reports if the current company is US or Canada task-6182444
This update streamlines the process of creating dashboards from spreadsheets by removing an unnecessary intermediary step. The direct use of the spreadsheet JSON within the dashboard creation flow reduces complexity and improves efficiency. This change enhances the overall performance and stability of the dashboard feature.
Original PR description
Remove the save_spreadsheet_snapshot indirection when creating a dashboard from a spreadsheet document. The current spreadsheet JSON is now passed through the wizard context and used directly to create the dashboard. This reduces the public surface of the flow and avoids an extra method used only for this action. Task: 6217816
This update ensures Odoo complies with Serbian accounting regulations by automatically fetching the official mid-market exchange rate from the National Bank of Serbia. This improves the accuracy of financial reporting and transactions for Serbian users, aligning with legal requirements.
Original PR description
[IMP] currency_rate_live: Fetch exchange rates National Bank Serbia To ensure compliance with the Serbian Law on accounting, fetch official middle exchange rate from the National Bank of Serbia task-6159555 Forward-Port-Of: odoo/enterprise#116935
This update introduces a new rule for calculating superannuation contributions in Australia, aligning with Australian Taxation Office (ATO) requirements. Specifically, it now separates qualifying earnings (QE) from ordinary time earnings (OTE) and calculates superannuation streams per pay run, effective July 1st, 2026.
Original PR description
Added new salary rule for Qualifying earnings. Super Streams now per payrun. task-6012509 Forward-Port-Of: odoo/enterprise#117367
Resolved issues and error corrections
This update fixes a warning related to how Odoo generates PDFs using the PyPDF library. The change ensures that PDF pages are handled correctly, preventing potential errors and improving the stability of our PDF generation process. This resolves a technical issue that could have impacted PDF output quality.
Original PR description
In recent versions of PyPDF, modifying a `PageObject` directly from a `PdfFileReader` instance triggers a `PageObject.replace_contents` deprecation warning. As identified in the pypdf library's…
In recent versions of PyPDF, modifying a `PageObject` directly from a `PdfFileReader` instance triggers a `PageObject.replace_contents` deprecation warning. As identified in the pypdf library's architecture updates (specifically PR #3638 [^1] and PR #3669 [^2]), a reader's page is intended to be read-only. Mutating it directly (e.g., using `mergePage` or `compressContentStreams`) before attaching it to a writer can break internal object references and cause `NullObject` errors. This commit resolves the warning by inverting the order of operations to ensure we only mutate writable objects. The fix implements the following flow: 1. Add the unmodified source page directly to the `PdfFileWriter`. 2. Retrieve the newly created, writable output page. 3. Apply `mergePage` and `compressContentStreams` exclusively to the writer's copy of the page. [^1]: https://github.com/py-pdf/pypdf/pull/3638 [^2]: https://github.com/py-pdf/pypdf/pull/3669 Forward-Port-Of: odoo/enterprise#119694 Forward-Port-Of: odoo/enterprise#119239
This update prevents the generation of empty ICS calendar files when attempting to add open shifts to a calendar. Previously, the system would create an empty file when a matching time slot wasn't found. Now, the ‘Add to Calendar’ button is hidden and the ICS file is only generated when a valid time slot is linked to an employee.
Original PR description
**Step:** - install planning - create a resource - create an open shift for a future date - in Gantt view: - publish shift and select the created resource - click “Publish & Send” - check the email and click “Add to Calendar” **Issue:** Currently, clicking “Add to Calendar” generates an empty ics file. **Reason:** During ics file generation, the planning token to find a slot using the planning date and employee. but, no matching slot is found, so the process returns an empty slot, resulting in an empty ics file. **Fix:** Generate the `planning_url_ics` only when a slot is linked with an employee. Otherwise, hide the “Add to Calendar” button and do not generate the ics file. Forward-Port-Of: odoo/enterprise#119945 Forward-Port-Of: odoo/enterprise#118978
This update fixes an issue where purchase transactions were incorrectly identified as intra-state, leading to inaccurate reporting. The change separates sales and purchase transactions during computation, ensuring the correct transaction type is assigned for all transactions, including vendor bills. A migration script has also been added to update existing databases.
Original PR description
Previously, for purchase journals, `l10n_in_state_id` was always computed using the current company `state_id`. However, in `_compute_l10n_in_transaction_type`, the `l10n_in_state_id` was compared with the company `state_id` for both sales and purchases. As a result, all purchase transactions were always computed as intra-state, including inter-state vendor bills. This commit handles sales and purchase transactions separately while computing `l10n_in_transaction_type` to ensure the correct transaction type is assigned. Migration also added to update it in existing dbs. Forward-Port-Of: odoo/enterprise#118297
This update fixes an issue with how the Stripe cardholder address is formatted, aligning with Stripe's requirements for ISO 3166-2 state codes. Previously, the system incorrectly handled state information, which caused failures when Stripe started validating US addresses. This ensures compatibility with Stripe's systems and avoids potential issues.
Original PR description
Stripe says that address.state is "State, county, province, or region (ISO 3166-2)". There didn't seems to be any issues since it seems that it's not checked for the EU. However, this is still wrong and could raise an issue if Stripe decide to start checking them. Also, with the US coming soon, it's being checked and failed. Forward-Port-Of: odoo/enterprise#120096 Forward-Port-Of: odoo/enterprise#114480
This update resolves an issue preventing Belgian employees on flexible work schedules from correctly requesting multi-day leave. The fix ensures that the system doesn't incorrectly subtract normal work intervals when processing leave requests for flexible employees, allowing for accurate leave calculations. This improves the functionality for a key segment of our Belgian users.
Original PR description
## Steps to reproduce: - Install l10n_be_hr_payroll module - Create a flexible working schedule and set the company to the Belgian company - Create an employee and assign the created schedule to him…
## Steps to reproduce: - Install l10n_be_hr_payroll module - Create a flexible working schedule and set the company to the Belgian company - Create an employee and assign the created schedule to him - Try to take a multi-day leave for this employee - Notice number of days is 0 - Try to validate the leave - An exception is raised 'The following employees are not supposed to work during that period' ## Cause: When fetching the work intervals for a belgian flexible employee we first fetch the normal work intervals then we call the same method but to filter the time credit attendance and since for the flexible employee there are not specific attendances we return the same normal work intervals and it will subtract those from the main work intervals which will result in an empty intervals to be returned ## Fix: Check if the working schedule is flexible and if so we don't check the time credit attendances at all. opw-6237642 Forward-Port-Of: odoo/enterprise#118870 Forward-Port-Of: odoo/enterprise#118528
This update resolves an issue where users could view financial budgets created in other companies within the Odoo Enterprise system. The fix adds a security rule to the budget model, ensuring that users only see budgets associated with companies they are actively connected to, improving data security and user experience.
Original PR description
**Steps to reproduce:** - Install the `account_reports` module. - Create a new company. - Navigate to Accounting > Configuration > Financial Budgets. - Create a new budget record. - Switch to another company. - Open the list view of Financial Budgets. **Observation:** The budget record created in another company is still visible. **Root Cause:** The model `account.report.budget` does not have any record rule restricting access based on company. As a result, users can see financial budgets belonging to other companies even if they are not connected to them. **Fix:** This commit allows users to hide financial budgets from companies they are not connected to by adding a record rule on `account.report.budget` opw-6083892 Forward-Port-Of: odoo/enterprise#120149 Forward-Port-Of: odoo/enterprise#114771
A bug causing a traceback when clicking calendar slots within Knowledge articles has been resolved. The issue stemmed from an incorrect reference to a component variable, which has now been corrected. This ensures that calendar slots function correctly and prevents errors for users.
Original PR description
How to reproduce: 1. Create a new Knowledge article 2. Insert an "item calendar" embedded view by typing /calendar 3. Click anywhere to create an article item 4. Go back to the parent article 5. Click on the calendar slot -----> Traceback ### Technical The [commit] adds the `this.` to migrate templates to access values from the component correctly in the owl3. It mistakenly added `this.` too when accessing the `slot` in the template `knowledge.ArticleItemsCalendarCommonPopover.body`. But the `slot` isn't a variable associated with the component. It's associated with the owl3, which must be accessed directly. Therefore, we revert the change from [commit] inside Knowledge's item_calendar. [commit]: https://github.com/odoo/enterprise/commit/e43f89a0bb8e85521bbf062ab70e7a7b4bda2eb8 Task-6279097 Forward-Port-Of: odoo/enterprise#120058
This update resolves a performance issue that caused significant lag when hovering over account reports with many columns. The change optimizes CSS styling to reduce unnecessary calculations, resulting in a smoother and faster user experience. This improves the responsiveness of a key business reporting tool.
Original PR description
Forward-Port-Of: odoo/enterprise#120038 Forward-Port-Of: odoo/enterprise#119242
This update resolves a problem where multi-country tax grids on the journal report were not functioning correctly, specifically when more than two countries were selected. The fix ensures that country names are displayed accurately in the header, and that all countries are visible within the tax grid. This improves the accuracy of financial reporting across multiple regions.
Original PR description
When more than 2 country are used in the taxes, the colspan of the header is wrong. When more than 2 country are used in tax grids, the country isn't displayed anymore. Forward-Port-Of: odoo/enterprise#120140 Forward-Port-Of: odoo/enterprise#119348
This update resolves a technical issue that was preventing the system from correctly handling failed meta requests within the social module. The fix ensures that the system gracefully manages errors by returning a list of 'None' values when requests fail, preventing a critical type error. This improves the stability and reliability of social features.
Original PR description
Error: ``` TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' ``` Cause: - `None * len(queries_batch)` is invalid because `None` cannot be repeated with`*`. Solution: - The result should contain one None for each request in the failed batch. sentry-7541540366 Forward-Port-Of: odoo/enterprise#120044
This update corrects a reporting issue where tax reports for Moroccan businesses incorrectly included zero-balance entries. The fix filters out these unnecessary lines, ensuring that tax reports accurately reflect financial data. This improves the reliability and clarity of tax reporting for our Moroccan clients.
Original PR description
When generating the tax report for a Moroccan company, entries with a zero balance were appearing in the report. Steps to reproduce: ------------------- * Create a Moroccan company * Create a bill with a tax to pay * Change the bill date and accounting date to a past date * Make a first payment of the bill, with a date to today * Unreconcile the payment, and make a second payment with a date in the past (the same one as the bill date for example) * Now generate the tax report for the period of today > Observation: The report contains useless entries with a zero balance. Why the fix: ------------ We add `HAVING SUM(account_move_line.balance) != 0` to filter out the line that have a zero balance. opw-5911669 Forward-Port-Of: odoo/enterprise#113956
This update aligns Odoo's GSTR-3B and GSTR-2B reports with new Indian tax regulations regarding purchase composition supplies. The changes ensure accurate reporting of these transactions, streamlining tax compliance for our users.
Original PR description
As a new GSTR section for purchase composition supplies has been introduced, the related report domains also need to be updated accordingly. With this commit: GSTR-3B domains are updated to properly include purchase_composition_supplies transactions in the relevant report section. GSTR-2B now includes a separate line for composition supplies, aligned with the government utility format. task-6239870 Forward-Port-Of: odoo/enterprise#120117 Forward-Port-Of: odoo/enterprise#118312
This update clarifies the status shown when a user signs a document on behalf of another. Previously, it always displayed the sender's name and date. Now, it correctly shows 'via [user]' only when signing for someone else, maintaining consistency for self-signed documents.
Original PR description
Before this commit, the signer status always displayed "On <date> via <sender>". Now the message only mentions "via <user>" when the document was actually signed by a different user (for example, when an admin is logged in and signs through a signer's link). When the signer uses their own link, only the date is shown. task-6216243 Forward-Port-Of: odoo/enterprise#117460
This update resolves an issue where PDF links within the Odoo viewer were not functioning correctly. The fix adjusts the layering of elements to ensure clicks are properly directed to the PDF links, improving the user experience when working with documents containing internal and external links. This ensures all links within the PDF viewer are accessible.
Original PR description
Version - 18.0 Steps to reproduce: 1. Upload a PDF document containing bookmarks and internal/external links 2. Open the document 3. Click on the links, some work and some do not Issue: `canvas_layer_0` is positioned over the PDF viewer with `z-index: 1`, intercepting clicks intended for PDF link annotations and making internal/external links unresponsive. The `.textLayer` already has `z-index: 2 !important` in iframe.css to prevent the same problem for text selection Fix: Added `z-index: 2 !important` to `.annotationLayer section` in `iframe.css` raising it above `canvas_layer_0`. Taskid = 6237688 Forward-Port-Of: odoo/enterprise#118040
This update fixes an issue where automation rules using dotted field paths for user assignment in activity creation didn't correctly populate the activity description. The change utilizes a mapping approach, mirroring a recent fix in the mail module, to reliably handle relational field chains and ensure accurate user assignment.
Original PR description
Steps to reproduce: ------------------------------------ 1. Install `ai` and `contacts` modules 2. Create an automation rule on Contact model: * Trigger: On Creation * Action To Do: Execute AI Action…
Steps to reproduce:
------------------------------------
1. Install `ai` and `contacts` modules
2. Create an automation rule on Contact model:
* Trigger: On Creation
* Action To Do: Execute AI Action
* Add a server action tool with 'Create Next Activity' action
* Set Activity User Type to Dynamic
* Set User Field to a dotted path (e.g., user_ids or partner_id.user_id)
3. Create a contact with a linked user
Observation:
------------------------------------
The activity description in the toast message fails to retrieve the user when using dotted field paths
Issue:
------------------------------------
The direct field access `record[self.activity_user_field_name]` in `_ai_get_action_description` method doesn't support dotted paths like 'partner_id.user_id'. This causes the same issue as in the mail module where relational field chains cannot be traversed
Solution:
------------------------------------
Use `record.mapped()` to support dotted paths by traversing the relational chain, consistent with the fix applied to the mail module
opw-6191715
Related Community PR: https://github.com/odoo/odoo/pull/263530
Forward-Port-Of: odoo/enterprise#119179
Forward-Port-Of: odoo/enterprise#118921This update fixes an issue where currency rates from the Bank of Mexico were incorrectly displayed. The change shifts the rate date by one day to align with the Bank of Mexico's data retrieval process, ensuring accurate currency conversions within the Odoo Enterprise system. This ensures financial reporting and transactions are based on the most current exchange rates.
Original PR description
banxico fetches the rates applied on the previous day, when we introduced using previous day's currency rate (here: https://github.com/odoo/odoo/pull/231948), we broke their logic. shift the rates date by one day to account for the change. task-6264708 Forward-Port-Of: odoo/enterprise#118999
This update ensures that Quality Checks and Mass Produce options remain accessible on the Shop Floor, regardless of whether production is automatically closed. Previously, disabling auto-close would hide these critical features, preventing users from completing quality checks and generating serial numbers. Now, these options are consistently available to ensure smooth production workflows.
Original PR description
### *Why this commit*: --- Ensures Quality Checks and Mass Produce options remain available on the Shop Floor regardless of the "Auto-close Production" setting. ### *Steps to Reproduce* --- 1. Define…
### *Why this commit*: --- Ensures Quality Checks and Mass Produce options remain available on the Shop Floor regardless of the "Auto-close Production" setting. ### *Steps to Reproduce* --- 1. Define a product tracked by Serial Numbers with a Manufacturing BoM. 2. Create a Quality Control Point for the product on the Manufacturing operation. 3. In Inventory Configuration, disable "Auto-close Production" on the Manufacturing operation type. 4. Create a Manufacturing Order (MO) and open it in the Shop Floor view. 5. If the MO has no operations, try to use Mass Produce. ### *Before this PR* --- When auto_close_production was set to False, the Shop Floor card footer incorrectly hid both the Quality Checks and Mass Produce buttons. This blocked users from registering Serial Numbers and completing mandatory quality check steps. Additionally, for products without BoM operations, clicking Mass Produce triggered quality check validation instead leading to errors, preventing the generation of serial numbers. ### *After this PR* --- The visibility logic for Shop Floor actions is now decoupled from the closing permission. The workflow follows this corrected sequence: Mass Produce: Stays visible to allow serial registration and backorder creation even if the MO cannot be closed from the Shop Floor. Quality Checks: Remain accessible to ensure all mandatory tests are passed before production progresses. Close Production: Only appears if "Auto-close Production" is enabled on the operation type. OPW: 5473839 Forward-Port-Of: odoo/enterprise#119875 Forward-Port-Of: odoo/enterprise#103926
This update resolves a tour test failure caused by a dependency on a specific module. The fix ensures the tour correctly identifies when a page has loaded, even in installations without the necessary component, and addresses a bug where progress bars weren't displaying for employees without email addresses.
Original PR description
The tour relied on the chatter loading to know when the page was done loading. Unfortunately, the chatter on that model is only added if planning_field_service is installed, so the test fails in single module installs. The "See employee progress bar" then failed because some employees do not have an email adress but we do not close the employee_no_email_list_wizard modal before checking the progress bars. We now click on action_send before the failing step. runbot-938958 Forward-Port-Of: odoo/enterprise#118492
This update fixes an issue where the shop floor displayed component quantities with excessive decimal places, leading to inaccurate readings. The fix addresses a floating-point calculation error that resulted in a slight rounding discrepancy. This ensures more precise and reliable component tracking on the shop floor.
Original PR description
**Issue** In the shop floor, floating-point values may display excessive decimals. **Steps to reproduce** - Create a BoM for a product, with a component tracked by lots - Set the component to be…
**Issue** In the shop floor, floating-point values may display excessive decimals. **Steps to reproduce** - Create a BoM for a product, with a component tracked by lots - Set the component to be consumed in a work order operation - Create several lots for the component, per ex 2: - LOT01 with 16.528 units - LOT02 with 10,000.00 units - Create an MO for 220.800 units of the finished product - Click on the shopfloor icon - Click to register the component consumption for the component. - Choose the first lot - Then choose the remaining units from the second lot -> This will display the quantity consumed as 220.79999999999998, even if the decimal accuracy is set to only 2 digits. **Cause** Since, there are 2 `moveLines`, one for each lot, the getter `quantityDone` add 2 floating point together: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L63-L69 inducing a floating-point precision error. The result is rendered directly in the XML template: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.xml#L8-L14 without rounding. opw-6243804 Forward-Port-Of: odoo/enterprise#118976
This update fixes a misleading warning message displayed in the expense settings for users with certain localization settings. The system now accurately checks if a company's country supports Stripe issuing based on its fiscal country ID, ensuring a more reliable experience. This resolves a potential confusion for users and improves the accuracy of expense processing.
Original PR description
In the Expense settings, under 'Expense Card', the warning 'Stripe issuing is not yet supported for your localization' was displayed when the checkbox 'Expense Card' was unchecked, even if the stripe issuing is supported by the current localization. We now use the fiscal country id of the company to check if the company's country supports stripe issuing. task-6253582 Forward-Port-Of: odoo/enterprise#118654
This update resolves an issue where the systray timer highlight test was failing. The change ensures the system's task queue is properly cleared, allowing the test to accurately verify the timer's functionality. This improves the reliability of the test and ensures the timer feature works as expected.
Original PR description
This PR replaces the `tick` with an `advanceTime` when clicking the timer input in the corresponding test, to make sure the macrotask queue is cleared and that the setTimeout to select the field has had time to run. Forward-Port-Of: odoo/enterprise#119975
This update corrects a minor error in how email notifications are sent within the scheduling module. The previous configuration was incorrect, preventing the email composer from opening. This fix ensures that email notifications function as expected, allowing users to easily send emails directly from the scheduling interface.
Original PR description
the used action name for the Send Email action was false its supposed to be action_send and not action_send_email task: 6244506 Forward-Port-Of: odoo/enterprise#119674 Forward-Port-Of: odoo/enterprise#118334
This update resolves an issue where users without specific accounting permissions were encountering an error when selecting templates within the knowledge article feature. The fix delays access to sensitive audit reporting data, ensuring the feature works correctly for all users, regardless of their access rights. This improves the usability and reliability of the knowledge article system.
Original PR description
Steps to reproduce: 1. Install `accountant_knowledge` with `demo data` 2. Remove demo user from bookkeeper access right and give some lesser right 3. Open knowledge and create a new artical with demo user 4. Click on Load template for example `Meeting Minutes` Issue: It gives a access error: `This operation is allowed for the following groups: - Accounting/Bookkeeper` Cause: - accountant_knowledge was doing accounting-only work during generic template loading. Immediately calling `target_article._get_inherited_audit_report()` that returns `inherited_audit_report_id`, which is a computed relation to audit report. `audit.report` is only readable by `account.group_account_user` Solution: - delay that access until it is actually needed, - only if the template contains data-embedded="accountReport" opw-6067390 Forward-Port-Of: odoo/enterprise#117292 Forward-Port-Of: odoo/enterprise#112946
This update corrects a problem in the POS system where test products were incorrectly converting prices due to missing company information. By setting the correct company ID for test products, the system now displays the accurate 5.10 PEN price, resolving a failure in the refund process. This ensures accurate pricing and functionality within the Odoo Enterprise system.
Original PR description
Description of the issue this commit addresses: The POS frontend converts prices using the product's currency_id. Test products created without a company_id had their currency_id fall back to the main company, causing the 5.10 PEN price to be converted unexpectedly and the l10n_pe_edi_pos refund tour to fail its orderline check. --- Desired behavior after this commit is merged: This commit sets the test product's company_id to the PE test company so its currency_id resolves to PEN. This prevents unintended currency conversion in the POS UI and restores the expected displayed price (5.10) in the refund tour. --- runbot-[242597](https://runbot.odoo.com/odoo/error/242597) Forward-Port-Of: odoo/enterprise#119834
This update streamlines the test connection process for the timesheet grid. The 'Close' button has been removed from the successful connection modal, and users are now automatically redirected to the timeline view after a successful connection, improving usability.
Original PR description
- Remove 'Close' button from connection successful modal - Change Redirect users to http://localhost:5600/#/timeline after successful connection. task-6272843 Forward-Port-Of: odoo/enterprise#120353 Forward-Port-Of: odoo/enterprise#119800
This update corrects a previous issue where website orders automatically generated CFDI invoices to the public. Now, invoices are only CFDI to public when the customer provides all necessary information, aligning with standard e-commerce practices. This ensures data privacy and compliance.
Original PR description
There is no reason why we would always cfdi to public when creating orders from the e-commerce. When the customer give all their info, the invoice should not be cfdi to public. opw-6180766 Forward-Port-Of: odoo/enterprise#119442 Forward-Port-Of: odoo/enterprise#116061
This update resolves an issue where the website rental planning module would crash when the quantity input field was removed. A recent architectural change moved data evaluation logic into the DaterangePicker component, and this fix prevents a crash caused by attempting to update the quantity selector when it's no longer present. This ensures the rental planning feature remains stable and functional.
Original PR description
Steps to reproduce: 1. Install website_sale_renting_planning 2. In rental module, create a product that is of type service and can be sold 3. Go to the website and remove the quantity selector input…
Steps to reproduce: 1. Install website_sale_renting_planning 2. In rental module, create a product that is of type service and can be sold 3. Go to the website and remove the quantity selector input field from the page and save. Issue: `TypeError: Cannot read properties of null (reading 'dataset')` Why this happens: Following architectural changes in v19.1, the rental data evaluation logic was moved directly into the DaterangePicker component lifecycle. Commit 4e5f71d introduces a new method to where, during initialization (`willStart`), the component triggers `setAddQtyInputMax()` to update the dataset attributes of the quantity selector input box. If the quantity selector has been removed via the website customizer `querySelector` returns `null`, causing the assignment to crash. In v19.0, this logic lived in the `WebsiteSale` interaction, executing only during post-render UI event listener triggers which kept it safe. opw-6268945 Forward-Port-Of: odoo/enterprise#119574
This update prevents unnecessary placeholder images from being sent during menu synchronization. It now only includes actual product image URLs, improving data transfer efficiency and reducing potential performance issues. This change ensures a cleaner and more streamlined menu display for users.
Original PR description
This commit prevents placeholder images from being included in the menu sync payload and only sends `img_url` when an actual image is configured on the product or category. Task-6251430 Forward-Port-Of: odoo/enterprise#120229 Forward-Port-Of: odoo/enterprise#119482
A technical glitch prevented users from successfully adding AI-generated images to product pages. This update corrects a flaw in the system's image handling process, ensuring that users can now seamlessly integrate AI-created visuals into their product listings. The fix ensures a smoother user experience when utilizing the 'Add More' feature for extra media.
Original PR description
A traceback is produced when trying to add AI-generated images to a product using "Extra Media" -> "Add More". **Origin of the problem** The `ProductAddExtraImageAction` in `website_sale` always opens the Media dialog with `props.multiImages = true` and the save handler expects `loadResult.imgEls` to be an array. The `aiSave` method patched onto `ProductAddExtraImageAction` by `ai_website_sale` did not account for this, and called `apply()` with a single image element instead of an array, causing a traceback. **Fix** In `aiSave`, wrap `imgEls` in an array before calling `apply()`. task-6263899 Forward-Port-Of: odoo/enterprise#119273
This update corrects a technical oversight during a recent port of code. Unnecessary code was inadvertently left in the l10n_pe_reports module, which has now been removed. This ensures the Peruvian reporting functionality operates correctly within Odoo Enterprise version 19.0.
Original PR description
During the FW port of https://github.com/odoo/enterprise/pull/117891 We forgot to remove the unnecessary code opw-5978673 Forward-Port-Of: odoo/enterprise#120183
This update resolves a bug preventing the daily sales report from displaying its title correctly when the Colombian EDI module is enabled. The change ensures compatibility with a related POS HR report, and also corrects a previous issue where the report would render without a title when the module was installed without DIAN enabled.
Original PR description
The daily report template was replacing `//h2[@id='daily_report_title']` entirely, removing the node from the XML source. This caused `pos_hr.single_employee_sales_report` (a primary template that applies its own xpaths against the same patched base) to crash at compile time since its xpaths could no longer find that node. Switch from `position="replace"` to `position="attributes"` + `position="after"`: the h2 stays in the XML source at all times so pos_hr's xpaths always resolve, while the original title is hidden at render time via t-if when CO EDI is enabled and the Colombian content is inserted as a sibling after it. As a side effect, this also fixes a pre-existing bug where installing the module with DIAN disabled would render the daily report with no title at all. opw-6265637 Forward-Port-Of: odoo/enterprise#119668 Forward-Port-Of: odoo/enterprise#119003
This update resolves an issue where thumbnails weren't automatically generated when attaching documents to messages within the composer. Previously, users wouldn't see previews of attached files. This change ensures that document thumbnails are now correctly displayed, improving the user experience when sharing documents.
Original PR description
When attaching a documents to a message in the composer, the thumbnail was not generated. This commit fix this issue. Task-5096039 Forward-Port-Of: odoo/enterprise#116188
This update resolves an issue where the LNA button in the POS navbar wasn't properly testing functionality for IoT Boxes. Now, the system correctly sends a status action when LNA is enabled for these IoT devices, ensuring accurate tracking and reporting.
Original PR description
The LNA button in the POS navbar wasn't testing LNA for IoT Boxes. We now send a status action for IoT Boxes with LNA enabled. Forward-Port-Of: odoo/enterprise#119998
This update simplifies spreadsheet management by disabling unnecessary versioning for spreadsheet and frozen spreadsheet documents. This reduces file size and improves performance, aligning with how spreadsheets already track their own history. The Manage Versions action is also hidden for these document types.
Original PR description
Spreadsheet documents already manage their own history through spreadsheet revisions. Running generic Documents versioning on top of that creates unnecessary history attachments and additional documents when spreadsheet data is written or when a spreadsheet is copied. Keep the default Documents versioning behavior for regular documents, but allow spreadsheet and frozen spreadsheet documents to opt out of Documents versioning. Also hide the Manage Versions action for those records. * enterprise commit 0e319d063ae868d6e48e9fd6741caf5156308eae disabling Documents versioning for spreadsheets; * this change hiding the Manage Versions action for spreadsheet records. Task: [6236496](https://www.odoo.com/odoo/project/2328/tasks/6236496) Forward-Port-Of: odoo/enterprise#120230 Forward-Port-Of: odoo/enterprise#118484
This update fixes a previous issue where sales employees transitioning to non-commission roles incorrectly accrued commission losses for public holidays and sick time. Now, employees in non-sales positions will no longer experience these inaccurate commission deductions, ensuring accurate payroll calculations.
Original PR description
If a salesman moves to another job that doesn't pay commission, he shouldn't have loss on commissions for public holidays and sick time off. Forward-Port-Of: odoo/enterprise#120386
This update fixes an issue where barcode scanning incorrectly displayed delivered quantities on sales orders. The fix ensures that quantities are accurately reflected when using lots and serial numbers, preventing backorders and ensuring accurate order fulfillment. This improves the reliability of the barcode inventory process.
Original PR description
Currently when user adds adds quantity in barcode using lots it leads to incorrect sale order quantities. ## Steps to replicate: - Install Sales and Barcode (no demo data). - Enable Lots & Serial…
Currently when user adds adds quantity in barcode using lots it leads to incorrect sale order quantities.
## Steps to replicate:
- Install Sales and Barcode (no demo data).
- Enable Lots & Serial Numbers in settings.
- Create Test Product with Tracking by Lots.
- Go to Inventory > Products>Lots & Serial Numbers and create 3 lots for the product.
- Update each lot’s on-hand quantity to 10 from the product page.
- Create and confirm a Sales Order for the product (lines: qty 3 and 2 units).
- Open the delivery in the Barcode app:
- Scan lot 2 > increase qty to 3 using +1 button
- Scan lot 3 > increase qty to 2 using +1 button
- Validate and go to the sale order.
## Observed Behavior:
The sale order delivered quantities are flipped and a backorder is created even though the quantity for the product is satisfied.
## Root cause:
The issue occurs because when a sales order is confirmed, the system defaults to
using lot 1 on the delivery receipt. When a user scans lot 2, the `_processBarcode` function is triggered, which calls `_findLine` at [1] to select the appropriate line on the receipt.
As the loop in `_findLine` iterates through `pageLines` with values like:
```
[{display_name: "Test product", quantity: 3, lot_id: { name: 'lot1' }},
{display_name: "Test product", quantity: 2, lot_id: { name: 'lot1' }}]
```
During the first iteration, `foundLine` is set at [2] for the line with quantity 3 . Since the subsequent if condition is not satisfied, the loop hits the continue block at [3].
On the next iteration, the line with quantity 2 causes `foundLine` to be overwritten at [2], and the continue block is executed again at [3].
This results in the line with quantity 2 being selected as the line to update at the end of the function.
When the user manually increases the quantity to 3, the line that originally required quantity 2 is updated and fulfilled.
Later, when lot 3 is scanned, the line that required quantity 3 is selected for update, and manually increasing the quantity to 2 before validating the order leads to a backorder and causes the delivered quantities to be flipped.
[1]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1335-L1337 [2]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1690-L1699 [3]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1727-L1729
## Solution:
Avoid grouping lines from different moves unless using batch transfers. This ensures that backorders are not created when the barcode lines are fulfilled.
opw-5423943
Forward-Port-Of: odoo/enterprise#120098
Forward-Port-Of: odoo/enterprise#109032This update resolves a technical issue that prevented the calculation of vacation days for employees with contracts exceeding 35 years. The original system had a limitation in its holiday table data, causing an error. The fix replaces the outdated table with a dynamic calculation based on Mexican labor law, ensuring accurate vacation day computation for all employees.
Original PR description
**Steps to reproduce:** 1. Install l10n_mx_hr_payroll. 2. Create an employee with a contract date over 35 years ago (e.g., 1985). 3. Create a payslip for this employee. 4. Click on "Compute Sheet". ```Error: KeyError(36) while evaluating``` **Cause:** The rule parameter [rule_parameter_holiday_table](https://github.com/odoo/enterprise/blob/c02c4571bb7db7197b07539ba390d4d20fdce9fe/l10n_mx_hr_payroll/data/hr_rule_parameters_data.xml#L722-L758) defines values only up to 35 years. Seniority exceeding this range causes a KeyError. **Solution:** Removed the rule parameter table and replaced with a `staticmethod` `_get_mx_holiday_days` on `HrPayslip` that computes vacation days dynamically using the Mexican Federal Labor Law (LFT) reform formula. opw-6090590 Forward-Port-Of: odoo/enterprise#113536
This update resolves a technical issue that caused the account reports audit tour to fail intermittently, specifically when accessing balances. The fix ensures the tour correctly waits for the Kanban view to be active, preventing premature actions and improving the overall user experience.
Original PR description
The account_reports_audit tour was failing at the "Balances" button step due to a race condition in the preceding steps. In environments with many modules, the "Open the working file" step was triggered prematurely while still on the return checks view, because its selector was too broad. This commit narrows the selector for "Open the working file" to ensure it only triggers once the Kanban view is actually active. [runbot-938920](https://runbot.odoo.com/odoo/runbot.build.error/938920) Forward-Port-Of: odoo/enterprise#118346
This update ensures that double holiday pay is accurately calculated when employees have a double holiday entitlement. Previously, the system wasn't properly prorating this pay based on legal leave rights, leading to potential inaccuracies. This fix corrects this calculation to ensure compliance and accurate payroll processing.
Original PR description
If you have a double holiday attest, we need to prorate the amount based on legal leave rights. The proration with regards to the previous work time rate wasn't done. Forward-Port-Of: odoo/enterprise#120403
This update fixes a technical issue that was causing errors in Odoo's IoT polling requests. By ensuring all listening requests are handled, the system now reliably avoids displaying tracebacks when polling fails. This improves the stability and reliability of the IoT integration.
Original PR description
We were not awaiting the listening request in every case, making poll requests failures display tracebacks. We now await in any case to avoid this. Forward-Port-Of: odoo/enterprise#120408
This update simplifies error handling within the French reporting module (l10n_fr_reports). Specifically, redundant error codes related to subscription checks have been removed. Now, all errors from this area will result in a generic internal error, reducing the detail provided to support staff.
Original PR description
This commit: https://github.com/odoo/enterprise/commit/23afa6f2520a676dcb4cd94867065f1be03708bc change a bit the error codes but removed the ones from the check subscription. By doing so, all the error from that wrapper will give an internal error, and no other info on the error. no task id Forward-Port-Of: odoo/enterprise#120393 Forward-Port-Of: odoo/enterprise#120286
This change prevents guest contact archiving during order validation from stopping picking confirmation emails. The original system silently removed guest contacts, disrupting the automated email notifications. This reversion restores the expected email flow for related pickings.
Original PR description
Archiving guest contacts upon SO validation breaks mail confirmations for related pickings. When a guest contact is archived, the ORM automatically filters it out from any search https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/odoo/orm/fields_relational.py#L673-L677 As a result, the partner is silently dropped from the `partner_ids` Many2Many on the mail composer even though we do write it https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/addons/mail/wizard/mail_compose_message.py#L538-L539 and the picking confirmation email is never sent. A potential fix would have been to disable this filtering at the ORM level but that would have impacted any flow that relies on archived partners being excluded. This reverts commit 5616a5bbf78c4a50b412a57609c5ff50b80b854d. opw-6232937 Forward-Port-Of: odoo/enterprise#120359 Forward-Port-Of: odoo/enterprise#119563
This update resolves an issue where extremely long invoice reference strings in the general ledger report were causing wkhtmltopdf to generate excessively large PDF files, leading to system errors. By limiting the length of the reference string, we prevent the report from becoming bloated and ensure reliable PDF generation.
Original PR description
The display name of the account.report.line in the general ledger report has the format of: INVOICE NAME (invoice refs) In the case where a client has hundreds of sales orders batched to a single…
The display name of the account.report.line in the general ledger report has the format of: INVOICE NAME (invoice refs) In the case where a client has hundreds of sales orders batched to a single invoice, the ref can become extremely long, e.g.: INV/2026/00001 (S12123, S12152, S12159, S12140, S12165, S12161, S12162, S12110, S12099, S12124, S12145, S12128, S12114, S12131, S12097, S12185, S12154, S12133, S12190, S12118, S12116, S12102, S12155, S12153, S12158, S12150, S12100, S12142, S12121, S12122, S12111, S12187, S12172, S12177, S12095, S12117, S12144, S12137, S12092, S12138, S12186, S12182, S12112, S12148, S12183, S12101, S12178, S12119, S12169, S12115, S12146, S12093, S12126, S12160, S12163, S12129, S12098, S12151, S12096, S12174, S12120, S12130, S12147, S12180, S12191, S12164, S12141, S12105, S12136, S12139, S12109, S12106, S12104, S12103, S12175, S12179, S12188, S12113, S12173, S12167, S12171, S12134, S12094, S12184, S12166, S12170, S12125, S12135, S12143, S12176, S12189, S12156, S12181, S12107, S12157, S12132, S12149, S12127, S12108, S12168...) Because the length of the account.report.line is unchecked in account_general_ledger.py label builder, the pdf can clog to one or two account.report.lines per page, skyrocketing the pdf page length. As wkhtmltopdf processes the report from html to pdf it makes a system call openat() to the /tmp/report.footer.tmp.x.html file for EACH page of the pdf. You can see the TODO comment in the spoolTo function in wkhtmltopdf (both in Odoo and the original repo) saying that the header and footer need to be freed, on each page processing, not just null pointed. https://github.com/odoo/wkhtmltopdf/blob/2c884bd1545b8a639847de22f24754ee5a6fc44c/src/lib/pdfconverter.cc#L794 I verified that that the number of openat calls to the /tmp/report.footer.tmp.x.html file equals the exact number of pages in the pdf to be generated if the report HAD generated successfully by setting the footer input into _run_wkhtmltopdf to None, generating the report without footers, then separately running an strace on wkhtmltopdf when the report fails to generate. See related ticket linked at bottom. The linux machine used on sh instances has a ulimit -n of 1024 file descriptors. Because the footer file descriptors accumulate, once a pdf has about 1010+ pages (~a dozen fd's are allocated for other purposes), over 1024 file descriptors are opened and the system fails with: Wkhtmltopdf failed (error code: -6). Message: QEventDispatcherUNIXPrivate(): Unable to create thread pipe: Too many open files QEventDispatcherUNIXPrivate(): Can not continue without a thread pipe Since wkhtmltopdf is archived and Odoo has a replacement in development, I suggest that we limit the display_name of the account.report.line to 200 to keep the bloat minimized, preventing one account.report.line's name from taking up an entire page of the general ledger pdf. This allows many more batched invoices to be shown in the report and a much greater time range of data to be printed without hitting the fd limit. I suggest changing it at the general ledger report level rather than in the account.move.line _compute_display_name function, as we probably still want to see the full display_names at the invoice level. On runbot, the machine has different memory constraints than on sh / local, so it hits the following error before the one above: Wkhtmltopdf failed (error code: -11). Memory limit too low or maximum file number of subprocess reached. Message : Steps to Reproduce on 19.0 newdb: 1. newdb -n test_gl -v 19.0 2. ensure ulimit is set to 1024 in shell that runs odoo instance by running ulimit -n 1024 to mimic ulimit of sh environment 3. run db with python3 odoo-bin, ensuring high enough memory constraints to simulate multi worker sh instance, i.e. --limit-memory-soft=12884901888 --limit-memory-hard=1288490188 4. install sales, accounting, stock 5. install demo data 6. create invoices with 100+ associated sales orders 7. generate the pdf 8. Increase the amount of invoices till the general ledger page count hits ~1010+, where you will hit the error. Notes: opw-ticket-6201508 closes #118067 Forward-Port-Of: odoo/enterprise#120137 Forward-Port-Of: odoo/enterprise#118067
This update resolves an issue where canceling a Global Invoice on a Mexican POS order prevented the creation of a new Global Invoice for the same order after a partial refund. The fix ensures that the refund process correctly updates CFDI documents, allowing for seamless invoice management following a refund.
Original PR description
Steps to reproduce 1. With a Mexican POS configured, create a POS order and sign a Global Invoice for it. 2. Open a new session and partially return the order; close the session. 3. On the original…
Steps to reproduce 1. With a Mexican POS configured, create a POS order and sign a Global Invoice for it. 2. Open a new session and partially return the order; close the session. 3. On the original order, cancel the Global Invoice through the CFDI page. 4. Try to create a new Global Invoice for the original order. Issue The wizard raises "Orders <REFUND-NAME> are already sent or not eligible for CFDI." Validating the refund auto-signs an `invoice_sent` CFDI on the refund pos.order because its parent is `global_sent`, see `_l10n_mx_edi_check_autogenerate_cfdi_refund` at https://github.com/odoo/enterprise/blob/5af8048f0b0956a024d7eaeb10600eec74bdf3ee/l10n_mx_edi_pos/models/pos_order.py#L98. Cancelling the GI only flips its own document to `ginvoice_cancel`; the refund's `invoice_sent` doc stays untouched, so the refund's computed `l10n_mx_edi_cfdi_state` stays `'sent'`. The chain check in `_l10n_mx_edi_check_orders_for_global_invoice` at https://github.com/odoo/enterprise/blob/5af8048f0b0956a024d7eaeb10600eec74bdf3ee/l10n_mx_edi_pos/models/pos_order.py#L184 then rejects the refund as already sent and the new GI cannot be created. opw-6181136 Forward-Port-Of: odoo/enterprise#120349 Forward-Port-Of: odoo/enterprise#117211
This update resolves a crash issue that occurred during pivot table autofill operations, specifically with formulas like `=PIVOT(1)`. The fix ensures simple `=PIVOT(...)` formulas remain consistent, preventing unexpected crashes and improving the overall stability of the spreadsheet edition.
Original PR description
Current behavior before PR: - Autofill on formulas like `=PIVOT(1)` could crash after the refactor in e34c0a3, the new logic tried to process all pivot formulas. - However, simple `=PIVOT(...)` cases do not require any change in formula during autofill. Desired behavior after PR is merged: - Add an early return for pivot formulas that are not `PIVOT.VALUE` or `PIVOT.HEADER`, avoiding unnecessary processing. - Ensure `=PIVOT(...)` formulas remain unchanged during autofill, preventing crashes and keeping behavior consistent. Task: [6158888](https://www.odoo.com/odoo/project/2328/tasks/6158888) Forward-Port-Of: odoo/enterprise#119390
This update fixes an error in how Odoo validates invoice dates for Colombian DIAN reports. Previously, the system incorrectly interpreted dates due to timezone differences, causing validation failures. Now, the system uses Bogota local time for accurate date comparisons, ensuring correct DIAN report generation.
Original PR description
**Steps to reproduce:** * Install `l10n_co_edi` module with DEMO DIAN mode enabled. * Go to Accounting > Vendor > Bills and create a new bill. * Select any Colombian partner different from…
**Steps to reproduce:** * Install `l10n_co_edi` module with DEMO DIAN mode enabled. * Go to Accounting > Vendor > Bills and create a new bill. * Select any Colombian partner different from `Consumidor Final`. * Set the invoice date to 6 days in the past. * Select the DIAN Support Documents journal and a product with UNSPSC category. * Confirm the bill and click `Send Support Document to DIAN` after 5 PM Colombia time. **Observed behavior:** * An error is raised stating the issue date cannot be older than 6 days or more than 6 days in the future, even though the invoice date is within the allowed window in Colombia local time. **Cause:** * The date window validation in `_check_move_configuration` used `fields.Datetime.now()` which returns UTC time. Since Colombia is UTC-5, after 5 PM local time the UTC clock has already rolled over to the next calendar day, making a 6-day-old invoice appear 7 days old and failing the validation incorrectly. **Fix:** * Convert the current UTC datetime to the `America/Bogota` timezone and extract its local date before computing the allowed date window. * Compare directly against `move.invoice_date` (a `date` field) instead of using `fields.Datetime.to_datetime()`, keeping the comparison consistent as `date` vs `date`. opw-6011502 Forward-Port-Of: odoo/enterprise#120384 Forward-Port-Of: odoo/enterprise#115256
This update resolves an issue where report customizations made in Odoo's Studio were incorrectly applied to other reports, leading to potential rendering problems. The fix ensures that report edits are now stored within the specific report document view, preventing unintended side effects and improving Studio's stability.
Original PR description
Report edits could be applied on shared layouts such as web.basic_layout instead of the report-specific document view. This caused Studio customization diffs to affect unrelated reports and could…
Report edits could be applied on shared layouts such as web.basic_layout instead of the report-specific document view. This caused Studio customization diffs to affect unrelated reports and could also lead to rendering errors when report-specific fields were evaluated in a different report context. The issue occurred because content was inserted directly into the shared layout article section instead of the nested report document view. Steps to reproduce: 1. Open Studio on any module and create or edit a report. 2. Select any of the External, Minimal, or Blank report types. 3. Add content to the report body and save the report. 4. Open another module and create a report using the same report type. 5. Observe that the previous customization is already present. Before this fix, the generated diff could inherit from web.basic_layout. After this fix, body edits are kept inside the report-specific document view. Related Ticket: opw-6245485 Forward-Port-Of: odoo/enterprise#120357 Forward-Port-Of: odoo/enterprise#118880
This update resolves an issue preventing valid vendor bills from being created in the GT accounting system. The system was incorrectly restricting document types based on company affiliation. This change now allows all legally valid document types to be used for purchase bills, ensuring accurate record-keeping.
Original PR description
Currently, the system restricts fiscal document types for both sales and purchases based on the company’s VAT affiliation, which prevents valid vendor bills from being recorded. **Steps to…
Currently, the system restricts fiscal document types for both sales and purchases based on the company’s VAT affiliation, which prevents valid vendor bills from being recorded. **Steps to reproduce:** - Install the `l10n_gt_edi` module and switch to a `GT company`. - Navigate to Accounting > Vendors > Bills. - Create a vendor bill. - Try to select a document type such as `FPEQ` or `FCAP`. **Observation:** The system hides valid vendor document types (e.g., `FPEQ`, `FCAP`) if they do not match the company’s VAT affiliation. **Root Cause:** At [1], the method `_compute_l10n_gt_edi_available_doc_types` filters document types using the company’s VAT affiliation (`l10n_gt_edi_vat_affiliation`) for all move types. This logic is correct for sales (where the company is the issuer), but incorrect for purchases (where the vendor determines the document type). As a result, valid purchase document types are wrongly excluded. **Fix:** This commit updates the computation logic to: - Apply affiliation-based filtering only for sales (`out_*`). - Bypass the restriction for purchases (`in_*`), allowing all valid document types. This ensures that vendor bills can include any legally valid document type regardless of the company’s affiliation, while preserving the existing restrictions for sales workflows. [1]: https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_gt_edi/models/account_move.py#L162-L166 opw-6099863 Forward-Port-Of: odoo/enterprise#120413 Forward-Port-Of: odoo/enterprise#113133
This update resolves an issue where the timesheet assistant wouldn't function correctly when rules were created without a specified template. The fix ensures that all timesheet rules require a template, guaranteeing accurate display name generation and overall timesheet assistant operation. This improves the reliability of the timesheet feature.
Original PR description
## [FIX] timesheet_grid: make template field required in AW rule Before this commit, the template field in AW rule was not required and if one rule without any template is set, timesheet assistant will not be able to work correctly to build the display name for the key events found. This commit makes sure the template field is required. ## [FIX] timesheet_grid: ignore rules without template defined Before this commit, when the user creates a rule without any template set, the timesheet assistant will no longer work because it assumes the template is required. This commit adds a condition in the domain when we fetch all AW rules, to ignore the ones without template set. Forward-Port-Of: odoo/enterprise#119744 Forward-Port-Of: odoo/enterprise#119411
This update fixes an issue where both units of a quality check were incorrectly moved to the failure location after a partial QC failure. The fix ensures that only the quantity of goods actually failing is moved, preventing the other unit from being misdirected. This ensures accurate inventory tracking and prevents potential stock discrepancies.
Original PR description
Version: ---------- - 18.0+ Steps to reproduce: ------------------- 1. Install *quality_control* module. 2. Go to *Settings* and enable *Storage Locations*. 3. Open Quality module go to the Quality…
Version:
----------
- 18.0+
Steps to reproduce:
-------------------
1. Install *quality_control* module.
2. Go to *Settings* and enable *Storage Locations*.
3. Open Quality module go to the Quality control -> Quality points
4. Create a *Quality Point* with:
* *Product* set.
* *Control per* set to *Quantity*.
* *Operation* set to *Receipts*.
* *Failure Location* set to *WH/Stock/Shelf1*.
5. Create a *Receipt* with demand of *2 units* for the product used in QP.
6. Mark the quality check as *To Do*.
7. Update the *Done Quantity* to *1*.
8. Open the quality check and click *Fail*.
9. Update the *Done Quantity* back to *2* and save.
10. Open the quality check again, click *Pass*, and validate the receipt.
11. Open the *Detailed Operations* to inspect move lines.
Issue:
------
* Both units (failed and passed) are moved to the *failure location*.
Cause:
------
When a user fails a move line via the QC wizard, the flow is:
do_fail() → show_failure_message() → confirm_fail()
→ check._move_to_failure_location(failure_location_id, failed_qty)
Inside `_move_to_failure_location`, when `failed_qty == move_line.quantity`,
the condition:
https://github.com/odoo/enterprise/blob/a33f580455a54a81d89a848f7b493d9dcc9ba2b2/quality_control/models/quality.py#L458
e.g. 1 == 1
was True even when `move.product_uom_qty = 2` (demand still 2). It only
compared the done quantities, ignoring that unfulfilled demand remained.
As a result, `move.location_dest_id` was set to the failure location.
Later, when the user increases the quantity from 1 to 2 on the move form,
the flow is:
_set_quantity → process_increase → _set_quantity_done → _prepare_move_line_vals
In `_prepare_move_line_vals` :
'location_dest_id': self.location_dest_id.id,
https://github.com/odoo/odoo/blob/47bf284e1e9d8be0d4255418e0a3f67c74fa5114/addons/stock/models/stock_move.py#L1688
The new move line inherits `move.location_dest_id` directly, which at this
point is already the failure location.
When the user then calls `do_pass()` on the second unit, `do_pass()` only
writes `quality_state = 'pass'` and never touches `location_dest_id`. So
the second (passed) move line silently retains the failure location.
Solution:
---------
Add the guard `move.product_uom_qty <= move_line.quantity` to the condition
so the entire move's destination is only redirected when there is genuinely
no remaining unfulfilled demand:
When demand > done qty, the else-branch runs instead: it reduces the
original move's demand and creates a new separate move pointing to the
failure location, leaving the original move's `location_dest_id` pointing
to stock. Any subsequent move lines created on the original move therefore
correctly inherit the stock destination.
---
opw-6080871
Forward-Port-Of: odoo/enterprise#120394
Forward-Port-Of: odoo/enterprise#112859Code cleanup and technical improvements
This update improves the generation of France's fiscal reports by introducing a centralized utility file and refining existing report handlers. Crucially, new test cases have been added to ensure accurate data extraction and XML report formatting for these reports, aligning with French tax regulations.
Original PR description
-Created a utils file for france fiscal reports that has the common functions, and refactored some parts of the code in the report handlers. -Created test cases for adding and removing lines from a report, extracting the data, and exporting the report as xml for the france localization fiscal report. task-6138193 Forward-Port-Of: odoo/enterprise#115831