Daily updates from Odoo
Thursday, June 11, 2026
129 changes
20 changes
Enhancements to existing features
This update enhances order processing by allowing for timeouts when awaiting OBOX jobs in Point of Sale (POS) and Self Order systems. This ensures smoother operation when devices aren't on the same network as the OBOX, improving reliability and user experience.
Original PR description
Is now possible to await OBOX jobs with a specific timeout in PoS ans Self Order. This is usefull when the user device isn't connected on the same network as the OBOX and others hardware. taskId: 6248159
This update enhances the way Odoo handles communication with OBOX devices, particularly in Self and Point of Sale environments. It now includes a timeout feature, allowing for reliable operation even when devices aren't on the same network, improving overall system stability and usability.
Original PR description
Is now possible to await OBOX jobs with a specific timeout in PoS ans Self Order. This is usefull when the user device isn't connected on the same network as the OBOX and others hardware. taskId: 6248159
Resolved issues and error corrections
This update fixes a potential problem where users could accidentally trigger mass email campaigns bypassing intended filters. The change prevents users from directly retrying failed mailings linked to marketing automation, reducing the risk of unintended spam and ensuring emails are delivered correctly through the campaign's defined rules.
Original PR description
When a mailing is managed by a marketing automation campaign, its target domain is dynamically handled by the campaign's activities. If a user clicks the "Retry" button directly on the mailing…
When a mailing is managed by a marketing automation campaign, its target domain is dynamically handled by the campaign's activities. If a user clicks the "Retry" button directly on the mailing template, it bypasses the campaign filters and queues the mailing for the entire target model, causing unintended mass spam. This commit fixes the issue by: 1. Raising a UserError in `action_retry_failed` if the mailing is linked to marketing automation (`use_in_marketing_automation`). 2. Hiding the "Retry" button in the frontend view to prevent confusion. 3. Adding a unit test to ensure this edge case is caught in the future. Steps to reproduce: 1. Create a marketing campaign with a filter and an email activity. 2. Run the activity and ensure at least one email trace fails. 3. Open the mailing template via the "Templates" smart button. 4. Click the "Retry" button on the template form. 5. The mailing is placed in the standard queue, bypassing the domain and targeting all records of the underlying model. OPW-6220106 Forward-Port-Of: odoo/enterprise#119760 Forward-Port-Of: odoo/enterprise#118759
This update corrects a bug in how leads are assigned to sales teams, ensuring a more equitable distribution of leads. Previously, team members created earlier received a disproportionate number of leads, particularly when quotas were equal. The fix introduces random tie-breaking to ensure fair lead assignment across the team.
Original PR description
_assign_and_convert_leads() is biased towards team members created earlier because they're ordered by create_date, id. When members have equal quota, the round-robin order falls back to the order of the team members. If the amount of leads distributed across the team is not a multiple of the team size, then the oldest members will get more leads assigned. This advantage repeats each time the cron runs and can add up to a big difference, the provided test case ends up assigning all 30 leads to the more senior member without the fix. Note that the lead_day_count field used in _get_assignment_quota() doesn't solve the problem. It helps to balance leads assigned in the same 24 hour window, but because the same senior person always goes first inside one of those windows, they will always get more leads assigned to them. To fix it we break ties in the quota randomly. task-6119168 Forward-Port-Of: odoo/odoo#269015 Forward-Port-Of: odoo/odoo#259775
This update fixes an error in the Singapore localization (l10n_sg) where reverse charge GST calculations were incorrect. By activating inactive child tax rates, the system now accurately calculates and reports GST for reverse charge transactions, ensuring correct reporting in GST returns.
Original PR description
#### Description of the issue/feature this PR addresses: In the Singapore localization (l10n_sg), reverse charge is modelled as a group tax pairing a -9% SRRC child with a +9% TXRC child, so the GST…
#### Description of the issue/feature this PR addresses: In the Singapore localization (l10n_sg), reverse charge is modelled as a group tax pairing a -9% SRRC child with a +9% TXRC child, so the GST on a bill nets to zero while both legs are still reported in their respective GST return boxes. The child taxes "9% TXRC-TS" and "9% TXRC-ESS" shipped inactive, while their siblings "9% TXRC-N33" and "9% TXRC-RE" shipped active. Because children_tax_ids is a many2many onto account.tax (which has an active field), inactive children are filtered out of the group, so the groups "Reverse Charge - SRRC + TXRC-TS" and "Reverse Charge - SRRC + TXRC-ESS" only kept the -9% SRRC leg and computed a wrong GST amount, while leaving the +9% leg out of the GST return. #### Current behavior before PR: A vendor bill of S$10,000 taxed with "Reverse Charge - SRRC + TXRC-ESS" (or "+ TXRC-TS") shows 9% GST = -S$900.00 and a total of S$9,100.00 instead of net S$0.00 / S$10,000.00. The +9% TXRC leg never reaches Box 5 / Box 7 of the GST return. The sibling groups "+ TXRC-N33" and "+ TXRC-RE" are unaffected because their children are active. The only workaround is to manually activate the two child taxes. #### Desired behavior after PR is merged: The "9% TXRC-TS" and "9% TXRC-ESS" child taxes are active by default, so the group taxes aggregate both legs: a S$10,000 bill shows 9% GST = S$0.00 with a total of S$10,000.00, and both reverse charge legs land in their GST return boxes. New SG databases get this from the tax template; existing SG databases get the two taxes reactivated by a migration on upgrade. opw-6199248 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#267670
This update fixes a bug that allowed internal transfers to be validated without scanning the destination location. Previously, deleting a line would cause validation to succeed even if the location hadn't been scanned. The fix ensures validation only occurs after a destination location has been scanned, improving data accuracy and preventing incorrect transfer approvals.
Original PR description
Currently, when a user deletes a line and validates internal movement in the barcode system, the system allows validation even though specifying the destination location after each scan is required.…
Currently, when a user deletes a line and validates internal movement in the barcode system, the system allows validation even though specifying the destination location after each scan is required. ## Steps to produce: - Install the Inventory module - Go to Settings and enable Storage Locations. - Inventory > Configuration > Operation Types > Internal Transfers > Barcode App - Configure the Destination Location to require scanning after each product. - Create an Internal Transfer for Pedal Bin, demand 1. - Mark the transfer as To Do and open it in the Barcode app. - Add quantity using +1, then scan the barcode for the Pedal Bin(Barcode: 6016478556493). - Delete the newly added line and attempt to Validate. ## Observed Behavior: The system should prevent transfer validation when the destination location has not been scanned and display a notification to the user, similar to the behavior before user deleted the newly added line. ## Root cause: This issue occurs because when the delete button is pressed, the deleteLine function [1] removes the line, but the deleted line becomes the selected line due to [2] being triggered before the UI updates. As a result, the selected line is now undefined. Since the selected line is undefined, it fails to meet the condition at [3] during validation. This prevents notifications from being triggered and allows the transfer to be validated before the destination location has been scanned. [1]: https://github.com/odoo/enterprise/blob/3476d15bf8e75eb6530658dd623861b60963ab40/stock_barcode/static/src/models/barcode_model.js#L826-L836 [2] : https://github.com/odoo/enterprise/blob/327d4478128f33fb2e0c477533bd4983178abf17/stock_barcode/static/src/components/line.js#L129-L133 [3]: https://github.com/odoo/enterprise/blob/6ff158ca3a6d2d2b3d285a7f8317622844811688/stock_barcode/static/src/models/barcode_picking_model.js#L945-L948 ## Solution: We can prevent users from validating if any line has an unscanned destination location when destination-location scanning is mandatory after scanning each product. To enforce this behavior, we can track whether a line has been modified and whether a destination location has been scanned and applied to that line. This allows us to identify which lines still require destination location scanning before validation can proceed. However, line state information is currently discarded and recreated on every save. As a result, information about lines that were updated and already had their destination location scanned is lost. This may incorrectly require users to rescan the destination location, even though it was previously scanned. To address this, we preserve the destination-scanned and modified state by carrying it forward from existing lines to their corresponding newly created versions using a loop. This ensures that destination location scan status is retained and users are not asked to rescan unnecessarily. opw-6069614 Forward-Port-Of: odoo/enterprise#119761 Forward-Port-Of: odoo/enterprise#113618
This update fixes an issue where planned dates were lost when converting projects to project templates. The change ensures that the original planned dates are retained when creating a template, improving project tracking accuracy and consistency. This prevents data loss and simplifies project management workflows.
Original PR description
Steps to reproduce: -------- - Open a project with a planned date set. - Create Template of that project. - Observe the created project template. Issue: ---------- The planned dates of the project are lost when converting the project into a template. Cause: ----- When we create a project template from a project, the project gets archived.Because a new project template record is created, and the start and expiration fields have copy=False, those dates are not being copied. Fix: ------- Explicitly pass the planned date when copying the project, so the project template keeps the original planned date. task-5872500 Forward-Port-Of: odoo/enterprise#119997 Forward-Port-Of: odoo/enterprise#115035
This update corrects a bug in the accrual reports (like 'Bill To Receive') that was causing group totals to incorrectly show as zero. The fix ensures that the aggregated amounts are calculated accurately, which is essential for accountants to perform accurate period-end financial analysis. This resolves an issue impacting financial reporting accuracy.
Original PR description
### Issue before this commit: In accrual reports (e.g., "Bill To Receive", "Billed Not Received", "Invoices To Be Issued", and "Invoices Not Delivered"), when grouping the list view by fields such as…
### Issue before this commit: In accrual reports (e.g., "Bill To Receive", "Billed Not Received", "Invoices To Be Issued", and "Invoices Not Delivered"), when grouping the list view by fields such as Vendor, the group header totals for the "Received", "Billed", and "Amount" columns display 0.00 even if the interanl lines of the group are not 0.00. ### Steps to reproduce the issue: 1. Download Purchase Accounting and Sale Accounting 2. Go to one of this pages: Billed Not Received, Bill To Receive, Invoices To Be Issued, and Invoices Not Delivered 3. Ensure the view is in its default grouping (grouped by Vendor or Customer) 4. Observe the group header rows for the Received (or Delivered), Billed (or Invoiced), and Amount columns. They all display 0.00 5. Expand a group that contains records with values greater than zero 6. Observe that the individual records populate correctly, but the aggregated group header row continues to display 0.00. ### Cause of the issue: The commit ddc1b681656ea8c70f3231cda20b5a58b9ff7dd6 adapted the code to retrieve the new accrual reports but attempted to fetch grouped records using group[0].id as the dictionary key, while the grouped() method actually used the recordset object as the key. This mismatch caused the dictionary lookup to fail, resulting in 0.00 sums. https://github.com/odoo/enterprise/blob/c8535a7a0e2eae811048a34a0bae187a1fa45311/account_accountant/models/analytic_mixin.py#L40-L48 ### Reason to introduce the fix: This fix restores the core analytical utility of the accrual reports, which are crucial for accountants during period-end closings to evaluate totals at a glance. opw-6232273 Forward-Port-Of: odoo/enterprise#118399
This update optimizes the performance of account reports when hovering over tables, specifically addressing slow loading times and excessive browser recalculations. The change reduces the number of style checks by refining the CSS selectors used, resulting in a smoother and faster user experience.
Original PR description
Forward-Port-Of: odoo/enterprise#119915 Forward-Port-Of: odoo/enterprise#119242
This update resolves an issue preventing Belgian flexible employees from correctly requesting multi-day leave. The fix ensures that the system doesn't incorrectly subtract normal work intervals when calculating leave time for flexible schedules, allowing employees to properly manage their leave requests. 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#118701 Forward-Port-Of: odoo/enterprise#118528
This update resolves an issue where the system incorrectly calculated non-deductible amounts on vendor bills with high deductibility percentages (99%). The fix ensures that tax and non-deductible amounts are accurately reflected in journal entries, improving financial reporting accuracy. The change adds a key field to tracking for invoice calculations.
Original PR description
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part…
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part Additionally, changing the deductibility percentage on a line with taxes does not trigger an update of the non-deductible tax journal items, leaving the private part taxes unchanged ### Cause In the tax recomputation mechanism, `float_compare` was wrongly configured with `precision_rounding=2` instead of `precision_digits=2` when checking the `deductible_amount` field This rounding error caused 99.00 to be evaluated as equal to 100.00, skipping the creation of the non-deductible line Furthermore, `_sync_tax_lines` relies on `get_base_line_tracked_fields` to detect modifications that require a tax recalculation This tracked field list only included price, quantity, and discount. Modifying the deductibility percentage did not trigger any sync, preventing the non-deductible tax lines from adjusting ### Fix To fix the synchronization, `deductible_amount` is added to the tracked fields for invoices This straightforward approach is preferred here for simplicity However, a more restrictive condition may be needed for example only check it on lines with taxes ### Steps to reproduce - Install `account` - Create a Vendor Bill (Price: 1000$, Taxes: 15%, Professional %: 50) - Check the Journal Items tab to see the Private Part line at 500$ debit and Private Part (taxes) line at 75$ debit - Change the Professional % field on the invoice line to 75 Before the fix, the Private Part (taxes) line remains at 75$ debit - Change the Professional % field on the invoice line to 99 Before the fix, the private part lines completely disappear instead of adapting to 1% opw-6245909 Forward-Port-Of: odoo/odoo#267427
This update resolves an issue where users could view financial budgets created in other companies. The change adds a security rule to the `account_reports` module, ensuring that users only see budgets associated with the company they are actively working with. This improves 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#120059 Forward-Port-Of: odoo/enterprise#114771
This update resolves recent delays experienced when interacting with the Point of Sale (POS) and self-ordering systems on iOS devices. The team optimized the user interface by adding styling to elements, resulting in a smoother and more responsive experience for customers. This enhancement ensures a better customer experience and faster transaction times.
Original PR description
There was some issues when touching elements in the POS and self. We added the parameter role="button" to the elements that were not already and a pe-none to the images. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254027 Forward-Port-Of: odoo/odoo#253583
This update fixes an issue where the product image carousel wouldn't scroll correctly after a product variant was selected on the e-commerce site. The fix ensures that the carousel properly updates and responds to user interactions like scrolling, improving the shopping experience for customers.
Original PR description
Steps to produce: --- - Install `website_sale` module. - Create a product with a variant and add the images from the sale tab. - Go to the product on the e-commerce and change the variant. - Attempt…
Steps to produce: --- - Install `website_sale` module. - Create a product with a variant and add the images from the sale tab. - Go to the product on the e-commerce and change the variant. - Attempt to scroll through the product images (using the mouse wheel). Issue: --- - After changing a product variant on the eCommerce product page, attempting to scroll through the product images (using mouse wheel) has no effect. Root cause: --- - When a product variant is changed, `_updateProductImage` dynamically replaces the product image carousel DOM element (`#o-carousel-product`) by injecting new HTML and removing the old one. - The old CarouselProduct interaction instance remains in memory, causing a resource and event listener leak on the detached old DOM element. - The newly inserted `#o-carousel-product` element is ignored by the interaction service, meaning that the CarouselProduct interaction is never initialized on the new carousel. This leaves the new carousel static and unresponsive to user interactions. Solution: --- - Before replacing the carousel DOM node, manually notify the public.interactions service to clean up any active interactions on the old element. After the new DOM node is queried, start the interactions on the new element. opw-6229291 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269170 Forward-Port-Of: odoo/odoo#265537
This update fixes an issue where downpayments made in the Sale module weren't correctly reflected when processed through Point of Sale (PoS). The fix ensures that downpayments are accurately calculated as a percentage of the remaining balance, improving the accuracy of PoS transactions. This resolves a discrepancy in how downpayments were handled, leading to more reliable financial reporting.
Original PR description
**Steps to reproduce:** - Make a quotation - Make a downpayment of 50% for it - Go to PoS, make a downpayment of 50% for it - It will be a downpayment for 50% of the total price, even though it should be 50% of what's left **Why the fix:** Since 2736cf99f8f5e42b294366252d903111764ec352 the amount is now calcultated with the account helpers. But the flow with a downpayment that was already added to the SO in the Sale module was not implemented, meaning the full price will be displayed in the case of a % downpayment in POS. The issue is that the price of a downpayment in the baseLines will be 0, because the qty of a downpayment is 0 in the Sale module, and it's imported as is. So we first set it to -1 to make sure we subtract the price from what's left to pay. opw-6087777 Forward-Port-Of: odoo/odoo#268235 Forward-Port-Of: odoo/odoo#259215
This update fixes an issue where undoing the auto-plan feature would reset a shift's allocated hours, leading to inaccurate workload calculations. The change ensures that allocated hours remain consistent after undoing, allowing for correct percentage calculations based on the shift's duration.
Original PR description
Steps to Reproduce --- 1. Open the Planning module 2. Create an open shift with allocated_hours 3. Click Auto Plan 4. Click Undo on the auto-plan notification Issue --- Undoing an auto-plan operation…
Steps to Reproduce --- 1. Open the Planning module 2. Create an open shift with allocated_hours 3. Click Auto Plan 4. Click Undo on the auto-plan notification Issue --- Undoing an auto-plan operation triggers recomputation of allocated_hours, causing the shift to lose its original workload value. Current Behaviour --- When resource_id is set to False during undo: - _compute_allocated_hours is triggered (depends on resource_id) - _compute_allocated_percentage is triggered (depends on allocated_hours) - Both fields are recalculated, potentially changing allocated_hours from its pre-assignment value Expected Behaviour --- Undoing auto-plan should preserve allocated_hours at its pre-assignment value while allowing allocated_percentage to adapt to the new context (open slot vs assigned resource). Fix --- Use protecting context manager in action_rollback_auto_plan_ids to prevent allocated_hours from being recomputed when resource_id is removed. This allows allocated_percentage to recalculate naturally based on slot duration while keeping allocated_hours stable. task - 4952149 Forward-Port-Of: odoo/enterprise#119941 Forward-Port-Of: odoo/enterprise#102864
This update fixes an issue where the strikethrough price on product configurators wasn't updating correctly when the unit of measure (UOM) was changed. The fix ensures the system now accurately reflects the price based on the selected UOM, improving the accuracy of product pricing displayed to customers. This impacts the e-commerce shopping experience.
Original PR description
Steps to produce: --- - Install `website_sale` module. - Enable ` Units of Measure & Packagings `and `Comparison Price` features from settings. - Create product > set sales price as 5 and Compare to…
Steps to produce: --- - Install `website_sale` module. - Enable ` Units of Measure & Packagings `and `Comparison Price` features from settings. - Create product > set sales price as 5 and Compare to Price as 12. - From the sales tab, under Upsell & Cross-Sell > set Packagings as pack of 6. - Go to the shop page on eCommerce, and add your product via the shop page (this should open the product configurator). - Change the UOM from the radio. Issue: --- - Changing the UOM doesn't change the strikethrough price. Root cause: --- - At [1], The `_get_strikethrough_price` method was not receiving the selected uom parameter, causing it to compute the compare_list_price based on the product's base uom instead of the user-selected uom. Solution: --- - Pass `uom` parameter from `_get_basic_product_information` to `_get_strikethrough_price` - Apply uom conversion to compare_list_price when the selected uom differs from the product's base uom. - Also fix pricelist base price calculation to use the selected uom. - Update the JS logic to refresh the strikethrough price when the uom changes. [1]https://github.com/odoo/odoo/blob/bfcb22256226ae056e934e2f9e498e8cea4d2f63/addons/website_sale/controllers/product_configurator.py#L101-L154 Before: --- <img width="974" height="321" alt="image" src="https://github.com/user-attachments/assets/f360d730-bedf-4898-ba22-c47ea8fa1df7" /> After: --- <img width="977" height="321" alt="image" src="https://github.com/user-attachments/assets/79d66143-959c-4f39-9272-437cb768837e" /> opw-6201754 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263556
This update resolves an issue impacting the Mexican tax reporting module (l10n_mx_edi) by correctly managing dependencies on PINT and CEN. This change ensures accurate tax calculations and reporting for Mexican businesses using Odoo Enterprise, preventing potential errors and compliance issues.
Original PR description
X-original-commit: 3675550ec7a8ccc0b4646f8e24aa38a3b52cf36c Forward-Port-Of: odoo/enterprise#119982
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 inter-state 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 ensures that Quality Checks and Mass Produce options remain accessible on the Shop Floor, regardless of whether ‘Auto-close Production’ is enabled. Previously, disabling this setting hid these crucial features, preventing users from completing quality checks and generating serial numbers. Now, these options are consistently available, streamlining the production workflow.
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#117829 Forward-Port-Of: odoo/enterprise#103926
20 changes
New functionality added to Odoo
This update adds crucial product information – price, tax details, supplier codes, and units of measure – to the data sent to Pricer. This expansion enables more accurate pricing calculations for key sales scenarios. The update also ensures Pricer tags are automatically updated when related product information changes.
Original PR description
We are currently missing some fields which must be sent to Pricer for some basic use-case scenarios This PR adds - Price before taxes - Taxes name (ex: 21%) - Supplier product code - Supplier reference - Units of measure of the product The PR also triggers the update of the pricer tags when the models indirectly related to Pricer are modified (taxes name / supplier reference / supplier product code) + cleans up the code a bit task-4506260 Forward-Port-Of: odoo/enterprise#93330 Forward-Port-Of: odoo/enterprise#78009
Enhancements to existing features
This update clarifies how composition supplies – typically for intra-state transactions – are reported on GST returns. Previously, these transactions were incorrectly categorized as ‘out-of-scope.’ Now, a new GSTR section is created to accurately track and report these composition supplies, ensuring compliance with Indian GST regulations.
Original PR description
Previously, composition supplies in vendor bills were falling under the `out-of-scope` GSTR section because taxes are normally not applied on such transactions. With this commit, a new GSTR section `purchase_composition_supplies` is introduced for intra-state composition transactions. Now, when the GST treatment is set to composition and the transaction type is intra_state, those transactions will be reported under the new composition supplies section instead of out-of-scope. task-6239870 Forward-Port-Of: odoo/odoo#266325
Resolved issues and error corrections
This fix resolves an issue where generating the general ledger report with many batched invoices caused wkhtmltopdf to fail due to excessive file descriptor usage. By limiting the length of the invoice reference display name, we prevent the report from becoming overly large 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#118067
This update fixes an issue where the strikethrough price on the product configurator wasn't updating correctly when the unit of measure was changed. The fix ensures the system uses the selected UOM for price calculations, providing accurate pricing information for customers. This improves the user experience and prevents pricing discrepancies.
Original PR description
Steps to produce: --- - Install `website_sale` module. - Enable ` Units of Measure & Packagings `and `Comparison Price` features from settings. - Create product > set sales price as 5 and Compare to…
Steps to produce: --- - Install `website_sale` module. - Enable ` Units of Measure & Packagings `and `Comparison Price` features from settings. - Create product > set sales price as 5 and Compare to Price as 12. - From the sales tab, under Upsell & Cross-Sell > set Packagings as pack of 6. - Go to the shop page on eCommerce, and add your product via the shop page (this should open the product configurator). - Change the UOM from the radio. Issue: --- - Changing the UOM doesn't change the strikethrough price. Root cause: --- - At [1], The `_get_strikethrough_price` method was not receiving the selected uom parameter, causing it to compute the compare_list_price based on the product's base uom instead of the user-selected uom. Solution: --- - Pass `uom` parameter from `_get_basic_product_information` to `_get_strikethrough_price` - Apply uom conversion to compare_list_price when the selected uom differs from the product's base uom. - Also fix pricelist base price calculation to use the selected uom. - Update the JS logic to refresh the strikethrough price when the uom changes. [1]https://github.com/odoo/odoo/blob/bfcb22256226ae056e934e2f9e498e8cea4d2f63/addons/website_sale/controllers/product_configurator.py#L101-L154 Before: --- <img width="974" height="321" alt="image" src="https://github.com/user-attachments/assets/f360d730-bedf-4898-ba22-c47ea8fa1df7" /> After: --- <img width="977" height="321" alt="image" src="https://github.com/user-attachments/assets/79d66143-959c-4f39-9272-437cb768837e" /> opw-6201754 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263556
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 production hid these critical features, preventing users from completing quality checks and generating serial numbers. This change improves workflow efficiency and data accuracy.
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#117829 Forward-Port-Of: odoo/enterprise#103926
A recent update in Odoo 19.2 caused portal users to experience crashes when viewing Knowledge articles with item lists. This fix restricts access to internal user data for portal users, preventing AccessErrors. Adding a specific group allows portal users to correctly view the article content.
Original PR description
Problem: Since saas-19.2, portal users crash when opening a Knowledge article containing items with "Created by" or "Last edited by" columns. Cause: Portal users are restricted to their own res.users record. Reading create_uid and last_edition_uid of internal users raises an AccessError. This was not raised in 19.0. Solution: Add groups="base.group_user" to create_uid and last_edition_uid fields across list, kanban, form, and search views. This resolves the AccessError and the field values are still returned correctly for portal users. Steps to reproduce: 1. Create a Knowledge article. 2. Add an "Item list" element. 3. Add some items to the list. 4. Share the article with a portal user. 5. Open the article as the portal user. 6. Observe that only the list header is visible and the items are not displayed. opw-6199714
This update fixes an issue where planned dates were lost when converting projects to project templates. The change ensures that the original planned dates are retained when creating a template, improving project tracking accuracy. This resolves a previous bug impacting project planning workflows.
Original PR description
Steps to reproduce: -------- - Open a project with a planned date set. - Create Template of that project. - Observe the created project template. Issue: ---------- The planned dates of the project are lost when converting the project into a template. Cause: ----- When we create a project template from a project, the project gets archived.Because a new project template record is created, and the start and expiration fields have copy=False, those dates are not being copied. Fix: ------- Explicitly pass the planned date when copying the project, so the project template keeps the original planned date. task-5872500 Forward-Port-Of: odoo/enterprise#119997 Forward-Port-Of: odoo/enterprise#115035
This update resolves an issue where accrual reports (like 'Bill To Receive') incorrectly displayed zero totals for grouped data. The fix corrects a technical error in how the reports calculated group totals, ensuring accurate financial reporting for accountants during period-end closing processes. This ensures accurate reporting for key financial analysis.
Original PR description
### Issue before this commit: In accrual reports (e.g., "Bill To Receive", "Billed Not Received", "Invoices To Be Issued", and "Invoices Not Delivered"), when grouping the list view by fields such as…
### Issue before this commit: In accrual reports (e.g., "Bill To Receive", "Billed Not Received", "Invoices To Be Issued", and "Invoices Not Delivered"), when grouping the list view by fields such as Vendor, the group header totals for the "Received", "Billed", and "Amount" columns display 0.00 even if the interanl lines of the group are not 0.00. ### Steps to reproduce the issue: 1. Download Purchase Accounting and Sale Accounting 2. Go to one of this pages: Billed Not Received, Bill To Receive, Invoices To Be Issued, and Invoices Not Delivered 3. Ensure the view is in its default grouping (grouped by Vendor or Customer) 4. Observe the group header rows for the Received (or Delivered), Billed (or Invoiced), and Amount columns. They all display 0.00 5. Expand a group that contains records with values greater than zero 6. Observe that the individual records populate correctly, but the aggregated group header row continues to display 0.00. ### Cause of the issue: The commit ddc1b681656ea8c70f3231cda20b5a58b9ff7dd6 adapted the code to retrieve the new accrual reports but attempted to fetch grouped records using group[0].id as the dictionary key, while the grouped() method actually used the recordset object as the key. This mismatch caused the dictionary lookup to fail, resulting in 0.00 sums. https://github.com/odoo/enterprise/blob/c8535a7a0e2eae811048a34a0bae187a1fa45311/account_accountant/models/analytic_mixin.py#L40-L48 ### Reason to introduce the fix: This fix restores the core analytical utility of the accrual reports, which are crucial for accountants during period-end closings to evaluate totals at a glance. opw-6232273 Forward-Port-Of: odoo/enterprise#118399
This update resolves an issue where users could view financial budgets created in other companies. The fix adds a security rule to the budget model, ensuring that users only see budgets associated with companies they are actively connected to. This enhances data security and prevents unauthorized access to financial information.
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#120059 Forward-Port-Of: odoo/enterprise#114771
This update resolves an issue where the system incorrectly calculated non-deductible amounts on vendor bills, particularly when deductibility percentages were set to 99%. The fix ensures that tax calculations and journal entries accurately reflect the correct deductions, improving financial reporting accuracy.
Original PR description
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part…
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part Additionally, changing the deductibility percentage on a line with taxes does not trigger an update of the non-deductible tax journal items, leaving the private part taxes unchanged ### Cause In the tax recomputation mechanism, `float_compare` was wrongly configured with `precision_rounding=2` instead of `precision_digits=2` when checking the `deductible_amount` field This rounding error caused 99.00 to be evaluated as equal to 100.00, skipping the creation of the non-deductible line Furthermore, `_sync_tax_lines` relies on `get_base_line_tracked_fields` to detect modifications that require a tax recalculation This tracked field list only included price, quantity, and discount. Modifying the deductibility percentage did not trigger any sync, preventing the non-deductible tax lines from adjusting ### Fix To fix the synchronization, `deductible_amount` is added to the tracked fields for invoices This straightforward approach is preferred here for simplicity However, a more restrictive condition may be needed for example only check it on lines with taxes ### Steps to reproduce - Install `account` - Create a Vendor Bill (Price: 1000$, Taxes: 15%, Professional %: 50) - Check the Journal Items tab to see the Private Part line at 500$ debit and Private Part (taxes) line at 75$ debit - Change the Professional % field on the invoice line to 75 Before the fix, the Private Part (taxes) line remains at 75$ debit - Change the Professional % field on the invoice line to 99 Before the fix, the private part lines completely disappear instead of adapting to 1% opw-6245909 Forward-Port-Of: odoo/odoo#267427
This update fixes an issue where the bank account currency wasn't correctly reflected in the XML file generated for Polish e-invoices (Ksef). The change ensures the 'OpisRachunku' field in the XML accurately displays the invoice's bank account currency, improving compliance with Polish tax regulations. This resolves a previous error impacting invoice processing.
Original PR description
**STEP TO REPRODUCE** 1. Create a partner with a bank account and setup its currency. 2. Create an invoice using a different currency. 3. Send the invoice to Ksef. 4. Notice the generated xml contains the invoice currency in the field OpisRachunku, but it should be the bank account currency instead. opw-6150563 Forward-Port-Of: odoo/odoo#263842
This update fixes an issue where timesheet totals were not displayed on the portal's task view. The change involved separating the timesheet list and totals into distinct XML templates, correcting a naming conflict that prevented the totals from rendering. This ensures users see a complete overview of their timesheet data within tasks.
Original PR description
Issue: ---------------------------------------- The totals aren't displayed after the timesheet list on portal. Steps to reproduce: ---------------------------------------- - Have Timesheet and Project installed, with task having timesheet - Go on the Portal page, then "My Tasks" - Click on a task having several timesheets - The list of timesheet shows but not the totals. Cause: ---------------------------------------- This commit f84d46d8e99199c64f97b6a59247875bd32b0f91 separated the timesheet list and the timesheet totals into two different XML templates. The template with only the list of timesheet has the same name as the previous template containing both the list and the totals. So if the `t-call` aren't updated, the totals disappear from `saas-19.1` to `saas-19.2`. Solution: ---------------------------------------- Call `portal_timesheet_table_with_total` instead of `portal_timesheet_table`. opw-6247177
This update fixes an issue where created packages weren't displayed within the barcode picking app when putting items into packs. Previously, the system didn't show the nested packages, making it difficult for users to track the packaging process. This change ensures that all packages, including nested ones, are clearly visible, improving workflow and accuracy.
Original PR description
### Steps to reproduce: - Enable `Lots & Serial Numbers` and `Packages` in the settings - Create a product tracked by SN and add SN001 and SN002 to stock - Create and confirm a delivery for 2 units -…
### Steps to reproduce: - Enable `Lots & Serial Numbers` and `Packages` in the settings - Create a product tracked by SN and add SN001 and SN002 to stock - Create and confirm a delivery for 2 units - Open the Barcode app and open the delivery - Scan the product > Scan SN001 - Click `Put in Pack` ### Current behavior: The created package is not displayed anywhere. Clicking Put in Pack again nests the package into another package without any visible indication to the user. ### Cause of the Issue: The GroupedLineComponent cannot display neither the source or destination package: https://github.com/odoo/enterprise/blob/c5bbcaeed513817fdda1f3f42f4c9b2440264174/stock_barcode/static/src/components/grouped_line.xml#L4-L21 However, our case the grouped line contains only a single line and prevents the users from viewing the sublines since the `Show Reserved Lots` is disabled on the operation type and only one lot (with additional demand) was scanned: https://github.com/odoo/enterprise/blob/c5bbcaeed513817fdda1f3f42f4c9b2440264174/stock_barcode/static/src/components/grouped_line.js#L75-L77 https://github.com/odoo/enterprise/blob/c5bbcaeed513817fdda1f3f42f4c9b2440264174/stock_barcode/static/src/components/grouped_line.js#L44-L55 opw-6237834 Forward-Port-Of: odoo/enterprise#119114
This update fixes an issue where product descriptions weren't correctly appearing on manufacturing orders (MOs) created from Point of Sale (POS) orders. The change ensures that all product variants, including those with custom attributes, have accurate descriptions displayed on MOs, aligning with how descriptions are handled in the standard sale module. This improves order clarity and traceability.
Original PR description
**Steps to reproduce:** - Install pos_mrp - Make a BoM for a product - The product must have a custom attribute, of type always - Go to the PoS - Make a sale, with a customer, enable Ship Later - Go…
**Steps to reproduce:** - Install pos_mrp - Make a BoM for a product - The product must have a custom attribute, of type always - Go to the PoS - Make a sale, with a customer, enable Ship Later - Go to the created MO - The Custom Description field is not showing **Why the fix:** This fix was previously done by e53dae2 but it did not account for the other variants and only did the fix for the never attributes. This is because it seemed to work with other kinds of attributes until 19.0 We now also compute the move description if we have a custom attribute. We need the never variants to have a description as well, as it is done in the sale module. This commit basically aligns the behavior to the on done in the sale module. A test had to be changed, as we now write the description in a different way, to make it the same regardless of where the picking and moves were created from. We now won't see a difference on the MO between one created from the POS and one created through the sale module. opw-6169257 Forward-Port-Of: odoo/odoo#268713 Forward-Port-Of: odoo/odoo#263350
This update fixes an issue where the product image carousel wouldn't scroll correctly after changing a product's variant on the e-commerce site. The fix ensures that the carousel properly updates and responds to user interactions, improving the shopping experience. This was caused by a technical glitch in how the system handles carousel updates.
Original PR description
Steps to produce: --- - Install `website_sale` module. - Create a product with a variant and add the images from the sale tab. - Go to the product on the e-commerce and change the variant. - Attempt…
Steps to produce: --- - Install `website_sale` module. - Create a product with a variant and add the images from the sale tab. - Go to the product on the e-commerce and change the variant. - Attempt to scroll through the product images (using the mouse wheel). Issue: --- - After changing a product variant on the eCommerce product page, attempting to scroll through the product images (using mouse wheel) has no effect. Root cause: --- - When a product variant is changed, `_updateProductImage` dynamically replaces the product image carousel DOM element (`#o-carousel-product`) by injecting new HTML and removing the old one. - The old CarouselProduct interaction instance remains in memory, causing a resource and event listener leak on the detached old DOM element. - The newly inserted `#o-carousel-product` element is ignored by the interaction service, meaning that the CarouselProduct interaction is never initialized on the new carousel. This leaves the new carousel static and unresponsive to user interactions. Solution: --- - Before replacing the carousel DOM node, manually notify the public.interactions service to clean up any active interactions on the old element. After the new DOM node is queried, start the interactions on the new element. opw-6229291 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269170 Forward-Port-Of: odoo/odoo#265537
This update fixes a problem where receipt printing in Austria was incorrect, and prevented a deadlock during authentication with Fiskaly and FON. The changes ensure accurate receipt printing and a smoother authentication process for users in Austria, improving the overall POS experience.
Original PR description
In this task: -------------- - Fixed Austria closing receipt printing by calculating the offset from the last closed month instead of the current month. Closing records are returned in ascending order and exist only for completed months, so the latest month must use offset 0. - Prevent a deadlock during Fiskaly and FON authentication by checking for open sessions before starting any authentication flow, instead of after the first step of authentication. - The resp was used to show error which was not in the scope. task: 5420256 Forward-Port-Of: odoo/enterprise#119732 Forward-Port-Of: odoo/enterprise#102313
This update streamlines the ordering process in our Point of Sale system by ensuring order synchronization runs in the background without delaying the user interface. Previously, order submissions blocked the screen, but now the system handles syncing orders efficiently, improving speed and responsiveness. This change also enhances data accuracy and prevents users from selecting tables while orders are still being processed.
Original PR description
### Before this commit: - Clicking the Order button waited for preparation-related RPC calls, delaying the transition back to the floor screen. - Tables could still be selected while their orders were syncing. - syncingOrders used order.id, which caused inconsistent tracking. ### After this commit: - Order submission no longer blocks the UI; sync runs in the background. - syncingOrders now uses order.uuid for consistent tracking. - Tables being synced are marked and cannot be selected. - Fixed course deselection to use the correct order instance. - Updated tests to ignore syncing tables. Task:6030427 Forward-Port-Of: odoo/odoo#268291 Forward-Port-Of: odoo/odoo#256883
This update resolves an issue impacting the Mexican tax reporting module (l10n_mx_edi) by correctly managing dependencies on PINT and CEN. This change ensures accurate tax calculations and reporting for Mexican businesses using Odoo Enterprise. The fix was verified by multiple developers.
Original PR description
X-original-commit: 3675550ec7a8ccc0b4646f8e24aa38a3b52cf36c Forward-Port-Of: odoo/enterprise#119981
This update resolves an issue preventing authenticated users from submitting the donation page on databases with Cloudflare Turnstile enabled. The fix skips Turnstile attachment when a submit button isn't present, ensuring the donation process works correctly. This improves the user experience for donations.
Original PR description
Steps to reproduce: =================== 1. Configure a Cloudflare Turnstile site key on a 19.2 database. 2. Open `/donation/pay`. => Traceback. Cause: ====== On `/donation/pay` (and any page…
Steps to reproduce: =================== 1. Configure a Cloudflare Turnstile site key on a 19.2 database. 2. Open `/donation/pay`. => Traceback. Cause: ====== On `/donation/pay` (and any page embedding the donation snippet), the page crashes with `TypeError: Cannot read properties of null (reading 'classList')` in `TurnStile.disableSubmit`, breaking the form for authenticated visitors on databases with a Turnstile site key configured. The donation page wraps its editor-only custom-fields form in a `<section class="s_website_form">` (introduced by [1]) That inner form has no submit button of its own the actual donation submit happens in the surrounding `payment.form`. The `Form` interaction's selector (`.s_website_form form, form.s_website_form`) nevertheless matches it, so the cf_turnstile patch on `Form.start` runs, queries `.s_website_form_send` / `.o_website_form_send`, gets `null`, and crashes when reading `submitButton.classList`. Solution: ========== On master, we fixed this by adding `s_website_form_no_recaptcha`` to the donation section. For stable versions, since the view is noupdate, we used a JS workaround: if there is no submit button, simply skip attaching Turnstile. [1]: https://github.com/odoo/odoo/commit/dc0618014deace4757f35ee432629a2aa7ebe998 opw-6208466 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a bug where sequence names weren't correctly displaying the time portion of dates when using date ranges. The fix ensures that sequence names accurately reflect the quotation date's time, resolving a discrepancy in the generated order names. This improves data consistency and accuracy.
Original PR description
## Issue When using a prefix containing a time-based placeholder (`%(h24)s`, `%(h12)s`, `%(min)s`, `%(sec)s`) with *Subsequences per date\_range*, the time information are missing and consistently…
## Issue
When using a prefix containing a time-based placeholder (`%(h24)s`, `%(h12)s`, `%(min)s`, `%(sec)s`) with *Subsequences per date\_range*, the time information are missing and consistently set to 0 when interpolating the prefix.
## Steps to reproduce
1. Install *Sales* (`sale_management`)
2. In Settings > Technical > Sequences, update the `sale.order` sequence:
- Prefix: `S/%(y)s/%(month)s/`
- Suffix: `/%(h24)s/%(min)s/%(sec)s`
- Tick the *Use subsequences per date_range* checkbox and set a range for the current month
3. Create and confirm a SO
4. **The name of the SO correctly contains the Quotation date in the prefix, but the suffix is set to /00/00/00, even though the quotation date contains time information.**
## Cause
Commit https://github.com/odoo/odoo/commit/f7c330d83cc3 sets the `ir_sequence_date` to a `datetime.date` object in `IrSequence._next`. This leads to the time information missing from the interpolation dict:
https://github.com/odoo/odoo/blob/d58f4ed332af35f6de26a93f07adf05368731e20/odoo/addons/base/models/ir_sequence.py#L211-L214
## Fix
The context key `ir_sequence_date` should be set to a `datetime.datetime` object to correctly interpolate the time information in the prefix/suffix of a sequence. To do so, the `tzinfo` needs to be drop for the date to be interpretable by the `fields.Datetime.from_string` method:
https://github.com/odoo/odoo/blob/d58f4ed332af35f6de26a93f07adf05368731e20/odoo/orm/fields_temporal.py#L239-L244
The time is not cast to a specific timezone (e.g., UTC) before dropping the tzinfo, as doing so would lead to incoherent time information from the user's perspective. For example, creating a SO at 13:00 in Brussels (UTC+2) would result in `11` being used as the hour to interpolate the `%(h24)s` placeholder.
opw-6104485
Forward-Port-Of: odoo/odoo#26078217 changes
Enhancements to existing features
This update clarifies how composition supplies – typically for intra-state transactions – are reported on GST returns. Previously, these transactions were incorrectly categorized as ‘out-of-scope.’ Now, a new GSTR section is created to accurately track and report these composition supplies, ensuring compliance with Indian GST regulations.
Original PR description
Previously, composition supplies in vendor bills were falling under the `out-of-scope` GSTR section because taxes are normally not applied on such transactions. With this commit, a new GSTR section `purchase_composition_supplies` is introduced for intra-state composition transactions. Now, when the GST treatment is set to composition and the transaction type is intra_state, those transactions will be reported under the new composition supplies section instead of out-of-scope. task-6239870 Forward-Port-Of: odoo/odoo#266325
Resolved issues and error corrections
This update resolves an issue where users could view financial budgets created in other companies. The fix adds a security rule to the budget model, ensuring that users only see budgets associated with companies they are actively connected to. This improves data security and prevents unauthorized access to financial information.
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#120059 Forward-Port-Of: odoo/enterprise#114771
This update fixes an issue where the strikethrough price on product configurators wasn't updating correctly when the unit of measure (UOM) was changed. The fix ensures the system accurately reflects the price based on the selected UOM, improving the shopping experience and price accuracy for customers.
Original PR description
Steps to produce: --- - Install `website_sale` module. - Enable ` Units of Measure & Packagings `and `Comparison Price` features from settings. - Create product > set sales price as 5 and Compare to…
Steps to produce: --- - Install `website_sale` module. - Enable ` Units of Measure & Packagings `and `Comparison Price` features from settings. - Create product > set sales price as 5 and Compare to Price as 12. - From the sales tab, under Upsell & Cross-Sell > set Packagings as pack of 6. - Go to the shop page on eCommerce, and add your product via the shop page (this should open the product configurator). - Change the UOM from the radio. Issue: --- - Changing the UOM doesn't change the strikethrough price. Root cause: --- - At [1], The `_get_strikethrough_price` method was not receiving the selected uom parameter, causing it to compute the compare_list_price based on the product's base uom instead of the user-selected uom. Solution: --- - Pass `uom` parameter from `_get_basic_product_information` to `_get_strikethrough_price` - Apply uom conversion to compare_list_price when the selected uom differs from the product's base uom. - Also fix pricelist base price calculation to use the selected uom. - Update the JS logic to refresh the strikethrough price when the uom changes. [1]https://github.com/odoo/odoo/blob/bfcb22256226ae056e934e2f9e498e8cea4d2f63/addons/website_sale/controllers/product_configurator.py#L101-L154 Before: --- <img width="974" height="321" alt="image" src="https://github.com/user-attachments/assets/f360d730-bedf-4898-ba22-c47ea8fa1df7" /> After: --- <img width="977" height="321" alt="image" src="https://github.com/user-attachments/assets/79d66143-959c-4f39-9272-437cb768837e" /> opw-6201754 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263556
This update corrects a bug in the accrual reports (like 'Bill To Receive') that was causing group totals to incorrectly show as zero. The fix ensures that aggregated amounts are calculated accurately, which is essential for accountants to perform period-end financial analysis. This improves the reliability of these key reports.
Original PR description
### Issue before this commit: In accrual reports (e.g., "Bill To Receive", "Billed Not Received", "Invoices To Be Issued", and "Invoices Not Delivered"), when grouping the list view by fields such as…
### Issue before this commit: In accrual reports (e.g., "Bill To Receive", "Billed Not Received", "Invoices To Be Issued", and "Invoices Not Delivered"), when grouping the list view by fields such as Vendor, the group header totals for the "Received", "Billed", and "Amount" columns display 0.00 even if the interanl lines of the group are not 0.00. ### Steps to reproduce the issue: 1. Download Purchase Accounting and Sale Accounting 2. Go to one of this pages: Billed Not Received, Bill To Receive, Invoices To Be Issued, and Invoices Not Delivered 3. Ensure the view is in its default grouping (grouped by Vendor or Customer) 4. Observe the group header rows for the Received (or Delivered), Billed (or Invoiced), and Amount columns. They all display 0.00 5. Expand a group that contains records with values greater than zero 6. Observe that the individual records populate correctly, but the aggregated group header row continues to display 0.00. ### Cause of the issue: The commit ddc1b681656ea8c70f3231cda20b5a58b9ff7dd6 adapted the code to retrieve the new accrual reports but attempted to fetch grouped records using group[0].id as the dictionary key, while the grouped() method actually used the recordset object as the key. This mismatch caused the dictionary lookup to fail, resulting in 0.00 sums. https://github.com/odoo/enterprise/blob/c8535a7a0e2eae811048a34a0bae187a1fa45311/account_accountant/models/analytic_mixin.py#L40-L48 ### Reason to introduce the fix: This fix restores the core analytical utility of the accrual reports, which are crucial for accountants during period-end closings to evaluate totals at a glance. opw-6232273 Forward-Port-Of: odoo/enterprise#118399
This update corrects a bug that incorrectly calculated non-deductible amounts on vendor bills, particularly when using high deductibility percentages. The fix ensures that tax and non-deductible amounts are accurately reflected in journal entries, improving financial reporting accuracy.
Original PR description
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part…
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part Additionally, changing the deductibility percentage on a line with taxes does not trigger an update of the non-deductible tax journal items, leaving the private part taxes unchanged ### Cause In the tax recomputation mechanism, `float_compare` was wrongly configured with `precision_rounding=2` instead of `precision_digits=2` when checking the `deductible_amount` field This rounding error caused 99.00 to be evaluated as equal to 100.00, skipping the creation of the non-deductible line Furthermore, `_sync_tax_lines` relies on `get_base_line_tracked_fields` to detect modifications that require a tax recalculation This tracked field list only included price, quantity, and discount. Modifying the deductibility percentage did not trigger any sync, preventing the non-deductible tax lines from adjusting ### Fix To fix the synchronization, `deductible_amount` is added to the tracked fields for invoices This straightforward approach is preferred here for simplicity However, a more restrictive condition may be needed for example only check it on lines with taxes ### Steps to reproduce - Install `account` - Create a Vendor Bill (Price: 1000$, Taxes: 15%, Professional %: 50) - Check the Journal Items tab to see the Private Part line at 500$ debit and Private Part (taxes) line at 75$ debit - Change the Professional % field on the invoice line to 75 Before the fix, the Private Part (taxes) line remains at 75$ debit - Change the Professional % field on the invoice line to 99 Before the fix, the private part lines completely disappear instead of adapting to 1% opw-6245909 Forward-Port-Of: odoo/odoo#267427
This update fixes an issue where created packages weren't displayed within the barcode picking app when putting items into packs. The fix ensures users can clearly see the source and destination packages during the packing process, improving workflow and reducing potential errors. This enhancement directly addresses a user experience concern.
Original PR description
### Steps to reproduce: - Enable `Lots & Serial Numbers` and `Packages` in the settings - Create a product tracked by SN and add SN001 and SN002 to stock - Create and confirm a delivery for 2 units -…
### Steps to reproduce: - Enable `Lots & Serial Numbers` and `Packages` in the settings - Create a product tracked by SN and add SN001 and SN002 to stock - Create and confirm a delivery for 2 units - Open the Barcode app and open the delivery - Scan the product > Scan SN001 - Click `Put in Pack` ### Current behavior: The created package is not displayed anywhere. Clicking Put in Pack again nests the package into another package without any visible indication to the user. ### Cause of the Issue: The GroupedLineComponent cannot display neither the source or destination package: https://github.com/odoo/enterprise/blob/c5bbcaeed513817fdda1f3f42f4c9b2440264174/stock_barcode/static/src/components/grouped_line.xml#L4-L21 However, our case the grouped line contains only a single line and prevents the users from viewing the sublines since the `Show Reserved Lots` is disabled on the operation type and only one lot (with additional demand) was scanned: https://github.com/odoo/enterprise/blob/c5bbcaeed513817fdda1f3f42f4c9b2440264174/stock_barcode/static/src/components/grouped_line.js#L75-L77 https://github.com/odoo/enterprise/blob/c5bbcaeed513817fdda1f3f42f4c9b2440264174/stock_barcode/static/src/components/grouped_line.js#L44-L55 opw-6237834 Forward-Port-Of: odoo/enterprise#119114
This update ensures that tax information for order items is now correctly transmitted to UrbanPiper when test orders are generated. Previously, test orders lacked this crucial detail, leading to potential issues with order processing. This change resolves a technical issue and improves the reliability of our integration with UrbanPiper.
Original PR description
Commit 1: ======== Before this commit: =================== - Test orders sent to UrbanPiper did not include tax details for order items. After this commit: ================== - Tax details are now included in the order item payload of test orders. Task-6013007 --- Commit 2: ======== Cause: ====== In the `without demo` environment, the discount product does not have any `taxes_id`, causing the test assertion to fail. Fix: ==== Set a tax on the discount product in the test to ensure the same behavior in both `with demo` and `without demo` environments. Error-241138 Forward-Port-Of: odoo/enterprise#119764 Forward-Port-Of: odoo/enterprise#109958
This update enhances the accuracy of partner searches by using exact name matches instead of partial matches, reducing incorrect partner identification. Additionally, the system now utilizes bank account details during UBL imports to further refine partner identification, particularly for Peppol transactions. This ensures more reliable data and improved business processes.
Original PR description
Before this commit: * Partner was searched using contains on the name, which could match unrelated partners with similar names (e.g. 'Global Tech' matching 'Global Technologies Ltd'). After this commit: - Partner retrieval now uses an exact name match to avoid incorrect matches caused by partial name search. - The search limit is set to 1 to ensure a consistent result when multiple partners are found. Technical: - Replaced `ilike` with `=ilike` in the name search domain. task-5485563 Forward-Port-Of: odoo/odoo#268922 Forward-Port-Of: odoo/odoo#250309
This update prevents the deletion of Peppol invoices and bills, ensuring a complete audit trail for these transactions. Previously, deleting these documents caused traceability issues. Now, documents are marked as ‘cancelled’ to maintain a historical record, complying with regulatory requirements.
Original PR description
Before this commit, invoices and bills sent via Peppol could be deleted, making traceability difficult. Deletion is now forbidden. Documents are instead kept and marked as cancelled to preserve their history. Task-6107420 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#258897
This change reverts a recent update that caused guest contact archiving to break email confirmations for related pickings. When guest contacts are archived, the system no longer sends picking confirmation emails, disrupting the order fulfillment process. This reversion ensures that picking confirmation emails are consistently sent.
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 3a20ff382d164f05d3d6b66e94318ed80aaa41cc. This reverts commit 64d9ded9637286ef0cfd9e65ba7c60d4f48d6c16. This reverts commit ef10f93b77263836815034e15bae6cddbd38c4f9. opw-6232937
This change addresses an issue where archiving guest contacts during sales order validation prevented picking confirmation emails from being sent. The fix reverts a previous change that filtered archived partners, which would have broken other processes. This ensures that picking confirmations are reliably delivered.
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
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 inter-state 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 a calculation error in the Spanish VAT reports. Previously, withholding taxes were incorrectly included in the total VAT amount. The fix excludes these taxes, ensuring accurate VAT reporting for Spanish businesses and aligning with accounting regulations. This improves the reliability of financial reports.
Original PR description
Step to reproduce - install `l10n_es_reports` and switch to ES company - create a invoice, add a product, set price = 100 - add two taxes (one should be withholding tax) ex: 21%G and 19%whi - confirm it, total payable is now 100 + 21 - 19 = 102 - open vat Books report for ES, see line for this invoice Observation: - for this invoice, in total vat column, we get 102 value - it should be 100+ 21 i.e 121 as we do not include withholding taxes in total vat Cause: - the query for report used to sum up all the taxes for calculating vat Fix: - excluded tax of type "retencion" in tax summation opw-6082329 Forward-Port-Of: odoo/enterprise#114137
This update resolves an issue impacting Mexican tax reporting (l10n_mx_edi) by correctly inverting the dependencies on PINT and CEN. This ensures accurate tax calculations and reporting compliance for Odoo Enterprise users operating in Mexico, preventing potential reporting errors.
Original PR description
X-original-commit: 3675550ec7a8ccc0b4646f8e24aa38a3b52cf36c Forward-Port-Of: odoo/enterprise#119980
This update significantly speeds up the /my/tasks portal page, especially when dealing with large numbers of tasks. The changes optimize database queries and data retrieval, resulting in a much faster and more responsive experience for users. This enhancement improves overall portal usability and efficiency.
Original PR description
The /my/tasks portal page suffered from severe performance degradation with large task. Three key optimizations: 1. ORDER BY: Use project_id.id instead of project_id in sort orders to avoid resolving…
The /my/tasks portal page suffered from severe performance degradation with large task. Three key optimizations: 1. ORDER BY: Use project_id.id instead of project_id in sort orders to avoid resolving through project.project._order 2. Capped count: Replace the unconditional search_count with a capped version (limit=10k pages). Only fetch the full count when the user navigates beyond page 10,000. 3. Milestone check: Use search(limit=1, order='id') to leverage index-only scans. Benchmark (page 1 load): _prepare_tasks_values (milestone + count, excludes lazy main search): | # Tasks | # Projects | Before PR | After PR | |-----------|------------|-----------|----------| | 500,000 | 2,000 | 0.294s | 0.230s | | 1,500,000 | 2,000 | 0.511s | 0.222s | | 3,000,000 | 12,000 | 1.129s | 0.258s | | 6,000,000 | 24,000 | 2.388s | 0.261s | | *6,000,000| 24,000 | 2.015s | 1.976s | *6M measured while navigating last page (full count triggered). Main search query (ORDER BY fix): | # Tasks | # Projects | Before PR | After PR | |-----------|------------|-----------|----------| | 500,000 | 2,000 | 0.525s | 0.013s | | 1,500,000 | 2,000 | 0.685s | 0.017s | | 3,000,000 | 12,000 | 1.479s | 0.040s | | 6,000,000 | 24,000 | 3.121s | 0.043s | | *6,000,000| 24,000 | 7.562s | 3.781s | Planer before: https://explain.dalibo.com/plan/aa47635ecddadfh5 Planer after: https://explain.dalibo.com/plan/d89gg3f5e8ed529b *6M measured while navigating last page (high offset). - opw-5478903
This update resolves an issue where purchase order confirmations would fail when a delivery type didn't associate with a warehouse. The fix ensures that the system correctly identifies the default destination location when a warehouse isn't specified, preventing a type error and allowing purchase orders to be processed smoothly.
Original PR description
Bug introduced in: https://github.com/odoo/odoo/commit/e2efdf75f67e631ed7622bb01c127120e639f6c5 Steps to reproduce: Clear the Warehouse field (set it to False) Create a purchase order Set "Deliver…
Bug introduced in: https://github.com/odoo/odoo/commit/e2efdf75f67e631ed7622bb01c127120e639f6c5
Steps to reproduce: Clear the Warehouse field (set it to False) Create a
purchase order Set "Deliver To" to the operation type with no warehouse
Add any product Confirm the PO → TypeError is raised
Steps to reproduce the bug:
- Have at least 2 warehouses
- Go to Inventory > Configuration > Operation Types > Receipts
- Clear the Warehouse field (set it to False)
- Create a purchase order:
- Set "Deliver To" to the operation type with no warehouse
- Add any product
- Try to confirm the PO
Problem:
A traceback is triggered:
``` return self.parent_path.startswith(other_location.parent_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: startswith first arg must be str or a tuple of str, not bool
```
`_get_final_location_record` computes `wh_stock_loc` from
`picking_type_id.warehouse_id.lot_stock_id`. When `warehouse_id`
is False (a valid configuration, operation types can be detached from
any warehouse), `lot_stock_id` short-circuits to False
Solution:
guard the _child_of call with not wh_stock_loc. When the
picking type has no warehouse, wh_stock_loc is falsy and there is
nothing to compare against, so the method falls back to
default_location_dest_id (the only destination available).
opw-6253817
Forward-Port-Of: odoo/odoo#268317This update corrects an issue where sequence names generated with time placeholders (like hour and minute) were consistently displaying as '00:00:00'. The change ensures that the time component of the sequence date is correctly included, resolving a discrepancy in generated order names. This improves data accuracy and consistency.
Original PR description
## Issue When using a prefix containing a time-based placeholder (`%(h24)s`, `%(h12)s`, `%(min)s`, `%(sec)s`) with *Subsequences per date\_range*, the time information are missing and consistently…
## Issue
When using a prefix containing a time-based placeholder (`%(h24)s`, `%(h12)s`, `%(min)s`, `%(sec)s`) with *Subsequences per date\_range*, the time information are missing and consistently set to 0 when interpolating the prefix.
## Steps to reproduce
1. Install *Sales* (`sale_management`)
2. In Settings > Technical > Sequences, update the `sale.order` sequence:
- Prefix: `S/%(y)s/%(month)s/`
- Suffix: `/%(h24)s/%(min)s/%(sec)s`
- Tick the *Use subsequences per date_range* checkbox and set a range for the current month
3. Create and confirm a SO
4. **The name of the SO correctly contains the Quotation date in the prefix, but the suffix is set to /00/00/00, even though the quotation date contains time information.**
## Cause
Commit https://github.com/odoo/odoo/commit/f7c330d83cc3 sets the `ir_sequence_date` to a `datetime.date` object in `IrSequence._next`. This leads to the time information missing from the interpolation dict:
https://github.com/odoo/odoo/blob/d58f4ed332af35f6de26a93f07adf05368731e20/odoo/addons/base/models/ir_sequence.py#L211-L214
## Fix
The context key `ir_sequence_date` should be set to a `datetime.datetime` object to correctly interpolate the time information in the prefix/suffix of a sequence. To do so, the `tzinfo` needs to be drop for the date to be interpretable by the `fields.Datetime.from_string` method:
https://github.com/odoo/odoo/blob/d58f4ed332af35f6de26a93f07adf05368731e20/odoo/orm/fields_temporal.py#L239-L244
The time is not cast to a specific timezone (e.g., UTC) before dropping the tzinfo, as doing so would lead to incoherent time information from the user's perspective. For example, creating a SO at 13:00 in Brussels (UTC+2) would result in `11` being used as the hour to interpolate the `%(h24)s` placeholder.
opw-6104485
Forward-Port-Of: odoo/odoo#2607826 changes
Resolved issues and error corrections
This update fixes a security vulnerability where users could view financial budgets belonging to other companies. The change adds a security rule to restrict access to budgets based on the user's connected company, ensuring data privacy and compliance. This prevents unauthorized access to sensitive financial information.
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#120059 Forward-Port-Of: odoo/enterprise#114771
This update fixes an issue where both units of a quality check were incorrectly moved to the failure location after a partial failure. The fix ensures that the destination of the move line is only updated when there's remaining demand, preventing the second unit from inheriting the failure location. This ensures accurate tracking of inventory and quality control processes.
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#119917
Forward-Port-Of: odoo/enterprise#112859A recent update caused the Asset Depreciation Schedule report to crash when dealing with a large number of assets grouped together. This fix ensures the report remains stable and usable, even with period comparisons and prefix grouping enabled, preventing data errors and ensuring accurate reporting for our customers. The change aligns a key safeguard to handle missing data gracefully.
Original PR description
#### Description of the issue/feature this PR addresses: Opening the Asset Depreciation Schedule report with a period comparison enabled crashes with KeyError: 'no_format' when prefix grouping is…
#### Description of the issue/feature this PR addresses:
Opening the Asset Depreciation Schedule report with a period comparison enabled crashes with KeyError: 'no_format' when prefix grouping is active (large number of assets in one account group). The report becomes unusable for affected customers.
#### Current behavior before PR:
_regroup_lines_by_name_prefix sums each subline column by indexing prefix_subline['columns'][i]['no_format'] directly. Empty columns are built as {} by _build_column_dict (both col_value and col_data are None), so they have no 'no_format' key. With a comparison period enabled, an asset that has no value in the comparison period produces an empty column for that period; once prefix grouping fires (len(lines) >= prefix_groups_threshold, default 4000), the direct lookup hits that empty dict and raises KeyError: 'no_format'.
#### Desired behavior after PR is merged:
The prefix group total treats a missing 'no_format' as 0, matching the sibling caller in account_asset/models/account_assets_report.py that already guards with .get('no_format', 0). The report builds without crashing and the empty comparison column contributes 0 to the prefix group total.
opw-6225639
Forward-Port-Of: odoo/enterprise#119088This update resolves an issue impacting the Mexican tax reporting module (l10n_mx_edi) by correctly managing dependencies on PINT and CEN. This ensures accurate tax calculations and reporting for Mexican businesses using Odoo Enterprise, preventing potential reporting errors.
Original PR description
X-original-commit: 3675550ec7a8ccc0b4646f8e24aa38a3b52cf36c Forward-Port-Of: odoo/enterprise#119978
This update resolves an error that occurred when creating payment reports for Swiss companies. The issue was triggered when the required module ('hr_payroll_account_iso20022') wasn't installed. Now, the system correctly handles the report generation process, ensuring Swiss companies can generate their payment reports without errors.
Original PR description
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is…
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is not installed. Steps to reproduce the error: - Install ``l10n_ch_hr_payroll`` module - Switch to CH Company - Create an Employee and running contract for it - Go to Payroll > Payslip > All payslips > Create a new payslip > Set the employee > Confirm > Create payment report Traceback: ```py ValueError: Wrong value for hr.payroll.payment.report.wizard.export_format: 'iso20022_ch' ``` https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip.py#L383 https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip_run.py#L13 Here, ``iso20022_ch`` is passed as ``export_format``, However, ``iso20022_ch`` is added to the selection field in the ``hr_payroll_account_iso20022`` module at [1]. When that module is not installed, the selection value does not exist, leading to the above error. [1]: https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/hr_payroll_account_iso20022/wizard/hr_payroll_payment_report_wizard.py#L11 sentry-7391832811 Forward-Port-Of: odoo/enterprise#119666 Forward-Port-Of: odoo/enterprise#113277
This update resolves a requirement from Luxembourg auditors regarding the classification of partners in our SAFT reports. Specifically, it ensures that less than 30% of transactions with payable or receivable accounts have missing supplier or customer IDs. The change adds partners to the appropriate lists based on transaction types and maintains compatibility with older report formats.
Original PR description
This PR is one of many triggered by responses from Luxembourg auditors. See PR #113316 for a full list of these PRs. As described in PR #117799, the \CustomerID and \SupplierID elements on…
This PR is one of many triggered by responses from Luxembourg auditors. See PR #113316 for a full list of these PRs. As described in PR #117799, the \CustomerID and \SupplierID elements on \Transaction\Line elements is determined by a partner's `customer_rank` and `supplier_rank`. This is a binary designation, one or the other. The Luxembourg FAIA report requires that less than 30% of \Transaction\Line elements with payable accounts (class 6) can not have \SupplierID. The same applies for \Transaction\Line elements with receivable accounts (class 7) and the \CustomerID element. TSB clarified that any partner on an receivable or payable line should be added to the Customer list or Supplier list respectively https://github.com/odoo/enterprise/pull/100749#issuecomment-3655127511. In addition, I verified that Luxembourg's analysis of four separate FAIA files (from ticket 5427296) aligns with this expectation. <img width="1322" height="690" alt="image" src="https://github.com/user-attachments/assets/1a82f99e-5b32-4dbb-96e1-1b25bab2629b" /> This commit adds partners to the \Supplier and \Customer lists if they have any payable or receivable lines, respectively. It also picks between the \CustomerID and \SupplierID based on a line's `account_type`. This logic is applied to `account_saft` and updates the other, country-specific SAFT reports where appropriate. It also retains the previous `customer_rank` and `supplier_rank` logic as a fallback for older XML reports and for accounts other than `asset_receivable` or `liability_payable`. opw-6118024 Forward-Port-Of: odoo/enterprise#119098 Forward-Port-Of: odoo/enterprise#118714
11 changes
Enhancements to existing features
This update introduces a new 'PINT' layer within the account_edi_ubl_cii module, streamlining the processing of UBL invoices. This layer aligns with European regulations (CEN_EN16931 and PINT-EU) for enhanced compliance and data exchange, particularly for PEPPOL transactions. It improves the handling of invoice data formats.
Original PR description
Add the layer PINT between UBL and BIS3. task: 5890887 Forward-Port-Of: odoo/odoo#260058
Resolved issues and error corrections
This update fixes an issue where invoices for French public entities in DROM regions (like Martinique) were incorrectly formatted when sent through Chorus Pro. The system now correctly includes the SIRET number, ensuring proper invoice routing and compliance. This prevents invoices from being rejected by Chorus Pro.
Original PR description
When invoicing a French public entity through Chorus Pro, the SIRET of the recipient was written in the UBL PartyIdentification only when the partner country was France (country_code == 'FR'). Partners located in a DROM (overseas department/region) have a real French SIRET too, but their ISO country code failed the check, so the SIRET was dropped and replaced by the VAT number. This cause the invoice to not be routed correctly in Chorus Pro. Steps to reproduce: - Setup a french company and connect it to Peppol - Create a customer for a public entity located in Martinique, with its SIRET, Peppol address 0009:11000201100044 (Chorus Pro SIRET) and BIS Billing 3.0 format. - Issue and send an invoice to this customer via Peppol. - Open the generated *_ubl_bis3.xml: AccountingCustomerParty PartyIdentification/ID holds the VAT instead of the SIRET, and Chorus Pro never receives the invoice. opw-6153868 Forward-Port-Of: odoo/odoo#269068 Forward-Port-Of: odoo/odoo#268519
This update fixes an issue where both units flagged as failed during quality control were incorrectly moved to the failure location. The fix ensures that the destination of moved goods is accurately determined based on remaining demand, preventing unintended placement of items in the failure location. This improves the reliability of the quality control process.
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#119917
Forward-Port-Of: odoo/enterprise#112859This update corrects a bug that incorrectly handled deductibility percentages on vendor bills, particularly when set to 99%. Previously, changes to deductibility percentages didn't properly update related tax journal entries. This fix ensures accurate synchronization of non-deductible amounts, improving financial reporting accuracy.
Original PR description
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part…
### Issue When setting the partial deductibility percentage to 99% on a vendor bill line, the system incorrectly treats it as 100% deductible and completely ignores the non-deductible part Additionally, changing the deductibility percentage on a line with taxes does not trigger an update of the non-deductible tax journal items, leaving the private part taxes unchanged ### Cause In the tax recomputation mechanism, `float_compare` was wrongly configured with `precision_rounding=2` instead of `precision_digits=2` when checking the `deductible_amount` field This rounding error caused 99.00 to be evaluated as equal to 100.00, skipping the creation of the non-deductible line Furthermore, `_sync_tax_lines` relies on `get_base_line_tracked_fields` to detect modifications that require a tax recalculation This tracked field list only included price, quantity, and discount. Modifying the deductibility percentage did not trigger any sync, preventing the non-deductible tax lines from adjusting ### Fix To fix the synchronization, `deductible_amount` is added to the tracked fields for invoices This straightforward approach is preferred here for simplicity However, a more restrictive condition may be needed for example only check it on lines with taxes ### Steps to reproduce - Install `account` - Create a Vendor Bill (Price: 1000$, Taxes: 15%, Professional %: 50) - Check the Journal Items tab to see the Private Part line at 500$ debit and Private Part (taxes) line at 75$ debit - Change the Professional % field on the invoice line to 75 Before the fix, the Private Part (taxes) line remains at 75$ debit - Change the Professional % field on the invoice line to 99 Before the fix, the private part lines completely disappear instead of adapting to 1% opw-6245909 Forward-Port-Of: odoo/odoo#267427
This update fixes an issue where overtime hours weren't accurately deducted when an employee's leave allocation was initially approved but then refused. The fix ensures overtime is consistently tracked, preventing discrepancies in hour calculations after a leave request is adjusted. This improves the accuracy of employee time tracking.
Original PR description
**Issue** Employees extra hours were not deducted if an allocation was approved after being refused first. **Steps to reproduce** - Enable "Display Extra Hours" in settings for easier debugging - Have a Time Off type T: - Requires allocation: Yes - Deduct Extra Hours: True - Have an employee with some extra hours (e.g. by creating attendances) - Create an allocation using the time off type T - Expected: extra hours smart button on employee's page is reduced by allocation's duration - Refuse the allocation - Mark it as ready to approve - Expected: extra hours for employee should be the same as before the leave was refused - Actual: the allocation has not reduced the employee's extra hours **Cause** The overtime was unlinked when the allocation was refused. **Fix** Make sure an overtime always exists unless in `refused` state. opw-5959319 Forward-Port-Of: odoo/odoo#254473
This update resolves an error that occurred when creating payment reports for Swiss companies. The issue was triggered when the required module, ‘l10n_ch_hr_payroll’, wasn’t installed. The fix ensures the system handles missing modules gracefully, preventing the report generation process from failing.
Original PR description
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is…
*=l10n_ch_hr_payroll,hr_payroll_account_iso20022 When clicking the create payment report button on a payslip for a Swiss company, a traceback occurs if the ``hr_payroll_account_iso20022`` module is not installed. Steps to reproduce the error: - Install ``l10n_ch_hr_payroll`` module - Switch to CH Company - Create an Employee and running contract for it - Go to Payroll > Payslip > All payslips > Create a new payslip > Set the employee > Confirm > Create payment report Traceback: ```py ValueError: Wrong value for hr.payroll.payment.report.wizard.export_format: 'iso20022_ch' ``` https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip.py#L383 https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_ch_hr_payroll/models/hr_payslip_run.py#L13 Here, ``iso20022_ch`` is passed as ``export_format``, However, ``iso20022_ch`` is added to the selection field in the ``hr_payroll_account_iso20022`` module at [1]. When that module is not installed, the selection value does not exist, leading to the above error. [1]: https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/hr_payroll_account_iso20022/wizard/hr_payroll_payment_report_wizard.py#L11 sentry-7391832811 Forward-Port-Of: odoo/enterprise#119666 Forward-Port-Of: odoo/enterprise#113277
This update fixes an issue where adding a note to a combo orderline didn't correctly update the quantities of its child lines. The fix ensures that quantities are synchronized across all lines within a combo, regardless of whether a note was added. This improves order accuracy and prevents discrepancies between what's ordered and what's prepared.
Original PR description
**Steps to reproduce:** - Go to the restaurant - Select a table, click on a combo and order it - Add quantity to the ordered combo and add a note to it - Select the desired combo options in the popup - The combos' children lines' qty are not updated and are either too much or 1 **Why the fix:** When we add a note to an orderline that has qty that has not been sent to the kitchen, we split the line in 2 lines, one with everything that has been sent to the kitchen and one with everything that has not been sent and the note we just added. This implementation didn't account for the combos, so the combo_line_ids' qty were never updated and stayed as is in the original line, and were set as 1 in the new line. We now update the children lines' qty at the same time as the parent lines. opw-5164102 Forward-Port-Of: odoo/odoo#237968 Forward-Port-Of: odoo/odoo#232694
This update fixes an issue where the receipt quantity wasn't accurately reflecting changes to the purchase order quantity when using Multi-Step Routes. Specifically, modifying the POL quantity caused the receipt to incorrectly update, leading to discrepancies in inventory tracking. This ensures accurate stock levels are maintained during MTO purchase order processing.
Original PR description
### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with MTO buy and a set…
### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Inventory > Configuration > Warehouse Management > Routes - Unarchive MTO - Create a storable product P with MTO buy and a set vendor - Create and confirm a sale order for 1 unit of P - Confirm the assocaited PO and change the pol quantity from 1 to 10 > the associated receipt is updated from 1 to 10 - Change the pol quantity from 10 to 7 #### > The quantity on the receipt is updated from 10 to 16. ### Cause of the issue: Changing the quantity of the POL will adapt the picking related quantity via these lines: https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L115-L117 https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L342-L349 by creating new stock moves to be merged: https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L220-L251 Now, the issue is that this flows relies both on a negative `qty_to_attach` of `1 - 10 = -9` and a positive `qty_to_push` of `7 - 1 = 6`. However, the `qty_to_attach` is only used if is positive: https://github.com/odoo/odoo/blob/3bf89b4f467390807c20f7b007a875a77542e76f/addons/purchase_stock/models/purchase_order_line.py#L243-L251 The receipt is therefore updated by a `+6` move to push but not by the `-9` move to attach. Leading to a 10 -> 16 rather than 10 -> 7 result. opw-6218307 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269069 Forward-Port-Of: odoo/odoo#264994
This update resolves an issue where purchase order confirmations would fail when a delivery type didn't associate with a warehouse. The fix ensures that the system correctly identifies the final destination location even when a warehouse isn't specified, preventing a type error. This improves the reliability of purchase order processing.
Original PR description
Bug introduced in: https://github.com/odoo/odoo/commit/e2efdf75f67e631ed7622bb01c127120e639f6c5 Steps to reproduce: Clear the Warehouse field (set it to False) Create a purchase order Set "Deliver…
Bug introduced in: https://github.com/odoo/odoo/commit/e2efdf75f67e631ed7622bb01c127120e639f6c5
Steps to reproduce: Clear the Warehouse field (set it to False) Create a
purchase order Set "Deliver To" to the operation type with no warehouse
Add any product Confirm the PO → TypeError is raised
Steps to reproduce the bug:
- Have at least 2 warehouses
- Go to Inventory > Configuration > Operation Types > Receipts
- Clear the Warehouse field (set it to False)
- Create a purchase order:
- Set "Deliver To" to the operation type with no warehouse
- Add any product
- Try to confirm the PO
Problem:
A traceback is triggered:
``` return self.parent_path.startswith(other_location.parent_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: startswith first arg must be str or a tuple of str, not bool
```
`_get_final_location_record` computes `wh_stock_loc` from
`picking_type_id.warehouse_id.lot_stock_id`. When `warehouse_id`
is False (a valid configuration, operation types can be detached from
any warehouse), `lot_stock_id` short-circuits to False
Solution:
guard the _child_of call with not wh_stock_loc. When the
picking type has no warehouse, wh_stock_loc is falsy and there is
nothing to compare against, so the method falls back to
default_location_dest_id (the only destination available).
opw-6253817
Forward-Port-Of: odoo/odoo#268317This update resolves an issue where negative amounts in Mexican VAT reports weren't consistently including the 'global_discount' field. This fix ensures accurate VAT reporting and compliance with Mexican tax regulations, preventing potential discrepancies and financial errors. The change impacts the l10n_mx_edi module.
This update resolves a requirement from Luxembourg auditors regarding the classification of partners in our SAFT reports. Specifically, it ensures that less than 30% of transactions with payable or receivable accounts have missing supplier or customer IDs. The changes add partners to the relevant lists and prioritize the correct ID based on transaction type, maintaining compatibility with older reports.
Original PR description
This PR is one of many triggered by responses from Luxembourg auditors. See PR #113316 for a full list of these PRs. As described in PR #117799, the \CustomerID and \SupplierID elements on…
This PR is one of many triggered by responses from Luxembourg auditors. See PR #113316 for a full list of these PRs. As described in PR #117799, the \CustomerID and \SupplierID elements on \Transaction\Line elements is determined by a partner's `customer_rank` and `supplier_rank`. This is a binary designation, one or the other. The Luxembourg FAIA report requires that less than 30% of \Transaction\Line elements with payable accounts (class 6) can not have \SupplierID. The same applies for \Transaction\Line elements with receivable accounts (class 7) and the \CustomerID element. TSB clarified that any partner on an receivable or payable line should be added to the Customer list or Supplier list respectively https://github.com/odoo/enterprise/pull/100749#issuecomment-3655127511. In addition, I verified that Luxembourg's analysis of four separate FAIA files (from ticket 5427296) aligns with this expectation. <img width="1322" height="690" alt="image" src="https://github.com/user-attachments/assets/1a82f99e-5b32-4dbb-96e1-1b25bab2629b" /> This commit adds partners to the \Supplier and \Customer lists if they have any payable or receivable lines, respectively. It also picks between the \CustomerID and \SupplierID based on a line's `account_type`. This logic is applied to `account_saft` and updates the other, country-specific SAFT reports where appropriate. It also retains the previous `customer_rank` and `supplier_rank` logic as a fallback for older XML reports and for accounts other than `asset_receivable` or `liability_payable`. opw-6118024 Forward-Port-Of: odoo/enterprise#119098 Forward-Port-Of: odoo/enterprise#118714
1 change
Resolved issues and error corrections
This update resolves an issue where users couldn't create new Global Invoices after canceling a refund related to a Mexican POS order. The fix ensures that the refund's CFDI document is properly updated, allowing for the creation of new invoices. This prevents errors and improves the process of managing refunds and invoices in the Mexican CFDI environment.
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#117211
11 changes
Enhancements to existing features
This update expands tax calculation capabilities by incorporating detailed product information, such as screen size and battery status, directly from Avalara. This improves accuracy, particularly for regions with complex tax rules like California, and prepares for upcoming legislation.
Original PR description
The existing three inputs for tax calculation were: - ship from address, - ship to address, - avatax product category In some cases it's not enough to accurately determine taxes. For example, in…
The existing three inputs for tax calculation were: - ship from address, - ship to address, - avatax product category In some cases it's not enough to accurately determine taxes. For example, in California taxes may change depending on whether a device has an embedded battery or depending on the screen size. Because Avalara cannot create categories for every single combination of parameters they support product parameters for these cases. They've been around for a while but weren't commonly needed. In 2026 however, California has introduced some legislation that make these a more requested feature [1]. This amends our exemption syncing mechanism to pull in parameters and their values idempotently and non-destructively. The Avatax parameters are typed. Simple types are booleans, floats, and character fields. Slightly more complex are selection fields and quantity fields (i.e. with UOM). The data type is provided by Avalara during sync and selects which value_* field on avatax.parameter.value holds the input. In the API request they all are converted to a simple string, but splitting them in the model lets the form show the right widget per parameter. Quantity values auto-fill from the product's weight or volume when the picked UOM's measurement type matches and we know the corresponding Odoo UOM. So the common case (e.g. ScreenSize in inches, NetWeight in kg) doesn't require re-entering values that already exist on the product. task-5911386 [1] https://cdtfa.ca.gov/taxes-and-fees/covered-electronic-waste-recycling-fee/
This update allows users to share Odoo spreadsheets with external users, granting them edit permissions. Previously, this functionality was missing, limiting collaboration with those using other spreadsheet programs. This enhancement improves usability and expands the reach of Odoo's spreadsheet capabilities.
This update enhances the user experience for point-of-sale transactions by refining the layout of order buttons and adding new options. Specifically, it includes buttons for printing receipts and accessing detailed order information, streamlining the order process for staff.
Original PR description
In this commit: - Refined the order process button layout by improving placement and reducing button size for better usability. - Added two new buttons: one for printing the order receipt and another for opening the order information pop-up. Task-6123032
This update consolidates premium pay calculations for Belgium within the standard payroll process. Previously, premium pay was handled separately, and this change streamlines the payroll calculations and reporting for Belgian employees. This ensures consistency and simplifies payroll administration.
Original PR description
Task-6230447
This update enhances the Clickbot's ability to thoroughly test Odoo's user interface. It now simulates clicks on records within list and kanban views, allowing for a more complete assessment of application functionality and error detection. The Clickbot now continues running even if errors are encountered, providing a more comprehensive test report.
Original PR description
Before this commit, the Clickbot only verified that the multi-record views of a menu could load successfully. This commit expands the Clickbot's coverage by simulating a click on individual records within list and kanban views. Depending on the view configuration, this will either open the corresponding form view, trigger editable mode for inline-editable lists, or execute the action specified by an open_action attribute. task-id 6249944
This update allows companies to define different salary rules for various expense categories, providing greater control over payroll calculations. Previously, all expenses were mapped to a single rule, limiting customization. This change enhances flexibility and accuracy for diverse business needs.
Original PR description
Previously, all expenses would be mapped to one salary rule of the structure, namely the one with the code 'EXPENSES'. This would limit companies that wanted to have different salary rules for different types of expenses. This commit changes how the flow goes, where now the salary rule is chosen on the expense category, and when the payslip is generated, expenses are mapped to their corresponding salary rule, rather than combining them all in one salary rule. task-4283293
Resolved issues and error corrections
This change prevents the calculation of NSSF deductions for employees who are 60 years or older. It ensures accurate payroll processing and aligns with Kenyan regulations regarding retirement age and social security contributions. The system now correctly stops deductions when an employee reaches the specified age.
Original PR description
This commit refactors the document completion flow to enforce the SRP and resolve duplicate attachments on reference records. Changes include: - Moved PDF generation (`_generate_completed_documents`) from the send method directly into `_sign` to guarantee documents are built exactly when the state changes to 'signed'. - Extracted reference record updates into a dedicated `_update_reference_document` method for cleaner code structure. - Resolved duplicate attachment displays on the source record by explicitly creating the attachment once and removing the redundant `attachment_ids` from the chatter message. - Updated the completion chatter message to notify users that the files are in the attachment tray, and set the message author to the original request creator. - Overrode `_generate_done_message` to cleanly bypass generic activity messages. Task: 6127862
This update fixes an issue where the payroll system incorrectly processed employee data when the NISS (a Belgian employee identification number) was missing or formatted as '/'. The change ensures accurate date extraction for payroll calculations, particularly for employees without a standard NISS.
Original PR description
follow-up of https://github.com/odoo/enterprise/pull/116002 Steps to reproduce: - Belgian company - Have an employee with a NISS set to '/' (accepted value for no NISS) - go on the payroll dashboard `_extract_date` expects the niss that is given to be in the correct format, however the field could be empty or be '/'. This commit returns False in both those situations. no related task/ticket
This update ensures that Wijninckx contributions (code 867) are only processed for the final quarter of the year. The system now prevents incorrect declarations outside of Q4, triggering a user error and a payslip warning to avoid potential payroll issues. This improves accuracy and compliance with Belgian tax regulations.
Original PR description
The Wijninckx contribution (code 867) should only be declared on the last quarter of the year. This commit introduces a restriction to ensure this: - Triggers a UserError in the DMFA if the code 867 is used in a declaration outside of Q4. - Adds a python-based payslip warning if the `ONSSWIJNINCKX` salary rule is applied to a payslip from January to September. Task Id: 6267562
This update resolves an issue in the l10n_mx_edi module related to dependencies on PINT and CEN. The change ensures proper functionality for Mexican electronic invoicing, aligning with current tax regulations. This fix improves the reliability of the module for businesses operating in Mexico.
Original PR description
X-original-commit: 3675550ec7a8ccc0b4646f8e24aa38a3b52cf36c Forward-Port-Of: odoo/enterprise#119983
This update corrects inaccuracies in how Omani payslips are generated, specifically for employees using attendance tracking. The changes ensure that key figures like SPF and provision rules are calculated based on the employee's total paid amount, not just their hourly rate. This improves the accuracy of payroll reporting for Omani employees.
Original PR description
This commit fixes the following problems over Omani payslips: - before, when an employee had attendances as a tracking method, some of its slip lines values (such as SPF and provision rules) were computed over its hourly rate and not its total paid amount - adapted the way the overtime computation is made: if wage is hourly we just take the hourly rate and multiply it by number of overtime hours multiplied by the rate, while if wage is fixed it need to compute hourly wage, which is paid_amount / (Number of worked paid hours). task-6263732
9 changes
Enhancements to existing features
This update enhances the synchronization of sales transactions with Fiskaly, the payment processing system. It separates flows for retail and restaurant orders, ensuring more accurate and timely updates are sent, particularly during kitchen synchronization for restaurants. This improves the reliability of payment processing and reporting.
Original PR description
In this commit: ------------------ - Maintain separate Fiskaly transaction flows for retail (short tx) and restaurant (long tx) orders as discussed with the Fiskaly team. - `Initialize order…
In this commit: ------------------ - Maintain separate Fiskaly transaction flows for retail (short tx) and restaurant (long tx) orders as discussed with the Fiskaly team. - `Initialize order transactions` with an empty payload when the `first product` is added. - Start `receipt transactions` with an empty payload when the `first payment line` is added. - For retail flows, no intermediate order updates are sent to Fiskaly before finalization. - For restaurant flows, create additional transaction updates during kitchen synchronization. Ensure already synchronized products are not resent, and only newly added or updated quantities are included in the payload. - `Finalize order and receipt transactions` with complete order lines and payment details when we validate the order. task: 6208963 Reference: <img width="1863" height="1285" alt="de_tss_flow" src="https://github.com/user-attachments/assets/9140788e-7948-4a08-9f11-27197b22ca8b" /> Forward-Port-Of: odoo/enterprise#119765 Forward-Port-Of: odoo/enterprise#117526
Resolved issues and error corrections
This update corrects a bug in the POS system's price conversion for test products. Previously, products without a company assigned would incorrectly convert prices to PEN, causing errors in the refund process. Now, test products are correctly assigned the PE test company, ensuring accurate price display and functionality.
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)
This update resolves an issue where users could view financial budgets created in other companies. The fix adds a security rule to the budgeting module, ensuring that users only see budgets associated with the company they are actively working with. This improves data security and prevents unauthorized access to financial information.
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#120059 Forward-Port-Of: odoo/enterprise#114771
This update fixes an error in how Odoo validates invoice dates for Colombian DIAN reporting. Previously, the system incorrectly interpreted invoice dates due to timezone differences, causing validation failures. Now, the system accurately uses Bogota local time for date comparisons, ensuring correct DIAN document 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#119913 Forward-Port-Of: odoo/enterprise#115256
This update resolves an issue where users with limited accounting rights incorrectly marked invoices as 'Fully Paid' when reconciling bank statements. The fix ensures accurate payment matching and prevents the creation of unwanted Account Receivable lines, maintaining proper financial reporting. It achieves this by safely bypassing a user permission check during automated reconciliation.
Original PR description
### Issue When you have an invoice partially paid via a method using an Outstanding Account, the payment can be kept open, leaving the invoice considered as partially paid If a user with only…
### Issue When you have an invoice partially paid via a method using an Outstanding Account, the payment can be kept open, leaving the invoice considered as partially paid If a user with only "Invoicing & Banks" rights tries to reconcile a Bank Statement with the same partner, amount, and the invoice name as the memo, the automatic reconciliation fails to properly match the payment Instead, the invoice is incorrectly considered as Fully Paid with an unwanted extra Account Receivable line added ### Cause When a new Bank Statement is created, `_try_auto_reconcile_statement_lines()` is called and matches the outstanding credit, which invokes `set_line_bank_statement_line()` This function creates a balancing line and triggers `move._compute_checked()` to update dependencies However, `move.checked` requires `_is_user_able_to_review()` to be True A user with "Invoicing & Banks" rights lacks the `account.group_account_user` group, meaning the move is not marked as checked, preventing dependencies from computing correctly Consequently, the statement line's `amount_residual` is not cleared and the line is not removed from `remaining_st_line_ids` Later in the process, `_try_auto_reconcile_statement_lines()` is called again with `with_user(SUPERUSER_ID)` Because the payment matching was never finalized in the previous step, the engine fallback matches against the full invoice, adding an incorrect Account Receivable line to close it ### Steps to reproduce - Install `accountant` - Go to Accounting / Configuration / Accounting / Journals - Open the Bank, under Incoming Payments tab, set the Manual Payment method's Outstanding Receipts account to 101403 Outstanding Receipts - Update the Demo user's accounting rights to Invoicing & Banks - Log in with the Demo user - Create and confirm an invoice for Acme Corporation (Amount: $1100) - Register a payment on the invoice (Amount: $500, Keep open) - Copy the invoice name - Open the Bank Reconciliation widget from the Accounting Dashboard - Create and add a new Bank Statement Line (Label: Invoice name, Partner: Acme Corporation, Amount: $500) Before the fix, an unexpected Account Receivable line is created and the invoice is marked as Fully Paid ### Notes Instead of processing the entire block under SUPERUSER_ID, which would hide the creator identity in logs and chatter, the context key `skip_account_review_check=True` is injected during the automated statement line reconciliation This safely bypasses the group check inside `_is_user_able_to_review` for this specific automated flow A fallback using `.with_user(SUPERUSER_ID)` is already implemented twice within the same `_try_auto_reconcile_statement_lines` method for this specific use case, but avoiding it here preserves data auditability opw-6077137 Forward-Port-Of: odoo/enterprise#118023
This update fixes an issue where VAT reports in Spain incorrectly showed withholding taxes included in the VAT total. The fix ensures that the VAT column accurately displays only the VAT amount, resolving a discrepancy in reported financial data. This improves the accuracy of VAT reporting for Spanish businesses.
Original PR description
**Steps to reproduce:** * Install `l10n_es`. * Create an invoice/bill with both a VAT tax and a withholding (`retencion`) tax applied. * Confirm the invoice/bill. * Navigate to Accounting → Reports →…
**Steps to reproduce:** * Install `l10n_es`. * Create an invoice/bill with both a VAT tax and a withholding (`retencion`) tax applied. * Confirm the invoice/bill. * Navigate to Accounting → Reports → VAT Books. **Observed behavior:** * The VAT column shows `VAT amount − withholding amount` instead of the VAT amount alone. **Cause:** * `_query_invoices` aggregated **all** lines where `tax_line_id IS NOT NULL` into a single `tax_amount` sum. Withholding taxes (`l10n_es_type = 'retencion'`) produce negative-balance tax lines, so they incorrectly reduced the displayed VAT total. * The XLSX export (`_l10n_es_libros_merge_line_tax`) already handled this correctly by treating `retencion` lines separately and never adding them to `taxed_amount`. The on-screen report lacked the equivalent logic. **Fix:** * `LEFT JOIN account_tax` on `tax_line_id` in `_query_invoices` and exclude `retencion` lines from the `tax_amount` aggregation via `AND tax_line.l10n_es_type != 'retencion'`. opw-6246633
This update resolves an issue in the l10n_mx_edi module related to its dependencies on PINT and CEN. The change inverts the dependency, ensuring proper functionality for Mexican electronic invoicing processes. This fix improves the reliability of the module for our Mexican clients.
Original PR description
X-original-commit: 3675550ec7a8ccc0b4646f8e24aa38a3b52cf36c Forward-Port-Of: odoo/enterprise#119979
This update ensures that orders configured with 'pay after meal' are automatically sent to the preparation display as soon as they are placed, regardless of payment status. Previously, the display wasn't updated until payment was made, which wasn't aligned with the customer's expected workflow. This change improves the user experience and operational efficiency for self-order systems.
Original PR description
When using a self order configuration with "pay after meal" and a valid online payment method. The order would not be sent to the preparation display until the order was paid. This is not expected because the customer is expected to pay after the meal. Steps to reproduce: ------------------- * Setup a self order with pay after meal and a valid online payment method * setup a preparation display linked to the same PoS configuration * Open the PoS and the self order * Make an order with any product and validate it without paying > Observation: The order is not sent to the preparation display Why the fix: ------------ When the configuration is set to "pay after meal", we always send the order to the preparation display. opw-6238352
This update resolves an issue where report customizations made in Odoo's Studio were incorrectly applied to shared layouts, leading to unexpected behavior and potential rendering problems. The fix ensures that report edits are now saved within the report's specific document view, preventing these issues and improving Studio's reliability.
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 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
5 changes
Resolved issues and error corrections
This update corrects a previous error that prevented the delivery service from functioning correctly in certain Colombian cities, particularly Antioquia. The fix ensures that all Colombian postal codes, including 4-digit codes, are properly recognized and utilized, improving delivery accuracy and reliability.
Original PR description
Issue ----- Delivery does not always work from/to some cities in Colombia, like Antioquia. Cause ----- There was an oversight in fix 7654c55 where only 5 digit postal codes taken from the colombian localisation were padded in https://github.com/odoo/enterprise/blob/390acf532e8932fd9b9a708382a5e36cdbb35754/delivery_envia/models/envia_request.py#L726-L727 However, some of the colombian cities listed in `l10n_co_edi/data/res.city.csv` have 4 digit codes (like `SANTA FÉ DE ANTIOQUIA`, code `5042`). https://github.com/odoo/enterprise/blob/7cceddaf086d849b8e2121e1023ef3479397534f/l10n_co_edi/data/res.city.csv#L12 ----- Ticket: opw-6248252
This update resolves a problem where importing Peppol/UBL XML files with multiple embedded PDFs resulted in some PDFs being incorrectly separated into separate invoices. The fix adjusts a sorting mechanism to ensure all PDFs are correctly included within the primary invoice, improving data accuracy for imported documents.
Original PR description
When importing a Peppol/UBL XML file containing multiple embedded PDFs the first PDFs is extracted in the same invoice, all the other in separate documents. Steps to reproduce: - Set up a BE Company - Import a Peppol XML with multiple embedded PDF - Check the created Bills Issue: First embedded PDF is extracted in the bill along with the source XML. Other documents are expanded in separate Bills. This occurs because the sort weight of the additional embedded document is the same, causing the system to separate them from the main invoice. opw-6231265 Forward-Port-Of: odoo/odoo#266963
This update resolves an issue where marketing automation campaigns could fail when attempting to reschedule activity traces, specifically when a trace lacked a parent activity. The fix prevents modifications to trace hierarchies during campaign execution, improving campaign stability and preventing user errors. This ensures campaigns run reliably.
Original PR description
### Note: **THIS IS A BACKPORT OF** https://github.com/odoo/enterprise/pull/107556 Some edits were made to the tests so that they match Odoo v18.0 ### Steps to reproduce: - Create a new marketing…
### Note: **THIS IS A BACKPORT OF** https://github.com/odoo/enterprise/pull/107556 Some edits were made to the tests so that they match Odoo v18.0 ### Steps to reproduce: - Create a new marketing campaign with two activities - Set them to occur some number of days after the beginning - Save the campaign and start it - Modify one of the activities to occur some number of days after the other activity and save - Modify the child activity by changing the number of days after its parent that it should run and save > IndexError: tuple index out of range ### Issue: The trace related to the child activity has no parent when trying to reschedule it in `_update_schedule_date`. This causes an issue when trying to get the first mailing_trace_ids using index 0 in this line: https://github.com/odoo/enterprise/blob/3e788e28dc76c928935d874e4e5a18d467c65539/marketing_automation/models/marketing_trace.py#L149 ### Fix: Prevent the activity hierarchy to be modified on started campaigns. We also change the indexing to avoid further out of range issue and properly default on the participant create value. Trying to match existing traces to their parents has too many edge cases when trying to avoid duplicates, and might often need to reset the whole trace chain to work properly. This approach avoids user mistakes on running campaigns, but if a user tries to launch a test (even on draft campaign) he won't be able to modify the hierarchy further without deleting/recreating some activities/traces. So we should ignore this for test traces, but it could impact the behavior between test and actual executions. opw-6251614
This update corrects a technical issue preventing Polish companies from correctly reporting EU transactions to KSeF (the Polish tax authority). The fix ensures the required 'PrefiksPodatnika' field is included in KSeF invoices, aligning with official regulations and preventing non-compliance. This ensures accurate tax reporting for EU sales and services.
Original PR description
Steps to reproduce 1. Configure a Polish company with KSeF enabled. 2. Create a customer invoice using a tax tagged with K_21 (0% EU G, intra-Community supply of goods), K_12 (0% EU S, services taxed…
Steps to reproduce 1. Configure a Polish company with KSeF enabled. 2. Create a customer invoice using a tax tagged with K_21 (0% EU G, intra-Community supply of goods), K_12 (0% EU S, services taxed in the buyer's EU country) or Triangular Sale. 3. Send the invoice to KSeF and download the generated FA(3) XML. Issue The Podmiot1 (seller) block in the rendered FA(3) XML omits the PrefiksPodatnika element, see https://github.com/odoo/odoo/blob/89219a843545d8bb0cad6ea806a1167cee6289da/addons/l10n_pl_edi/data/fa3_template.xml#L34-L42. According to the official Ministry of Finance documentation (https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf, page 11), this conditional field must carry the value "PL" when the invoice documents: - the intra-Community supply of goods, - the provision of services referred to in Article 100 sec. 1 item 1 of the Act for EU VAT taxpayers, - the supply carried out under a simplified triangular transaction by the second taxpayer (Article 135 sec. 1 item 4 (b) and (c)). The XSD marks the element as optional (minOccurs="0", fixed="PL") so KSeF accepts the XML, but the seller's tax reporting is still legally non-compliant for the three cases above, and the field is missing from the KSeF PDF viewer rendering. opw-6213178
This update resolves a bug that occurred when reloading a chart of accounts, specifically when an account's XMLID still referenced its original company. The fix ensures the system correctly verifies the account belongs to the target company before reloading, preventing errors and ensuring accurate account data.
Original PR description
When reloading a chart of accounts, `_pre_reload_data` resolves an account via its xmlid and then evaluates: ```py re.match(f'^{values["code"]}0*$', account.code) ``` `account.code` is a non-stored…
When reloading a chart of accounts, `_pre_reload_data` resolves an account via its xmlid and then evaluates:
```py
re.match(f'^{values["code"]}0*$', account.code)
```
`account.code` is a non-stored computed field that reads from the company-dependent field `code_store`. If the resolved account has no `code_store` entry for the target company (e.g. the account was originally set up under a different company but its xmlid was prefixed with the current company id), `_compute_code` returns False instead of a string, causing a TypeError in re.match.
```py
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 442, in _pre_reload_data
if not account or not re.match(f'^{values["code"]}0*$', account.code):
File "/usr/lib/python3.10/re.py", line 190, in match
return _compile(pattern, flags).match(string)
TypeError: expected string or bytes-like object
```
```sql
apan_4342860=> SELECT
aa.id,
aa.code_store,
imd.module,
imd.name
FROM account_account aa
JOIN ir_model_data imd
ON imd.res_id = aa.id
AND imd.model = 'account.account'
WHERE aa.id = 1056;
id | code_store | module | name
------+-----------------+---------+-----------------
1056 | {"2": "510500"} | account | 1_co_puc_510500
(1 row)
```
This situation arises when a customer moves or reassigns an account between companies but the xmlid retains the original company prefix.
**Fix:**
After resolving the account via xmlid, check whether it actually belongs to the target company using filtered_domain with _check_company_domain. If it does not pass the check, unlink the stale ir.model.data entry and treat the account as not found, allowing the reload to re-establish the correct xmlid linkage via the code-based lookup that follows.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr