Friday, May 8, 2026
125 changes
23 changes
Resolved issues and error corrections
This update prevents errors that occurred when loading paid orders with loyalty cards whose programs had been archived. Previously, the system would fail to open the partner list, causing a disruption in processing transactions. This fix ensures smooth operation for paid orders using loyalty programs, improving the customer experience.
Original PR description
Before this commit, when loading a paid order with a loyalty card that its program had been archived, an error was raised when opening the partner list due to the missing program. opw-6166079 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262128 Forward-Port-Of: odoo/odoo#261501
This update resolves an issue where the system didn't properly validate overtime allocations when changing the time off type. Previously, changes to the time off type didn't trigger a necessary check to ensure sufficient overtime hours were available. Now, the system correctly validates these changes, preventing incorrect allocation adjustments.
Original PR description
Steps to reproduce: ------------------------------------- 1. Install `hr_holidays_attendance` module 2. Time off > configurations > Time off types 3. Create new time off type as follows: * Set…
Steps to reproduce: ------------------------------------- 1. Install `hr_holidays_attendance` module 2. Time off > configurations > Time off types 3. Create new time off type as follows: * Set Approval to Approved by time off officer * Change Take time off In to Hours 4. Save the record and enable Deduct Extra Hours 5. Go to Management > Allocations 6. Create new allocation with created time off type and select 'Audrey Peterson' in Employee 7. Try to save record > Validation Error > Discard changes 8. Change time off type to Paid Time Off > add 'Audrey Peterson' > save record 9. Now change Time Off type to Created Time Off type > Save Observation: ------------------------------------- No Validation Error raised, as the employee and time off type are still the same as they were during creating allocation. Issue: ------------------------------------- In `write` method, there was no any check for the employee if it has enough overtime hours when we change Time off type (`holiday_status_id`) to overtime-deductible leave type. Check was only present in the `create` method: https://github.com/odoo/odoo/blob/a95c639db68f98351c7162de58a041a1c0ee13c5/addons/hr_holidays_attendance/models/hr_leave_allocation.py#L39-L49 Solution: ------------------------------------- 1. Create new function for validate overtime and to create adjustment 2. Added that function to `create` as well as in `write` method 3. Prevents creating a duplicate overtime adjustment for an allocation that already has one opw-5937185 Forward-Port-Of: odoo/odoo#263064 Forward-Port-Of: odoo/odoo#249793
This update ensures that website appointment creations are consistently synchronized with Outlook calendars. Previously, a timing issue prevented new appointments from being added to Outlook, particularly when created during the 12-hour cron sync cycle. This change resolves the synchronization problem, guaranteeing that all website appointments are reflected in a user's Outlook calendar.
Original PR description
Before this change, the "Outlook: synchronization" cron would not create calendar events on Outlook's side in _sync_odoo2microsoft due to a filter for calendar.events written to within 5 minutes of…
Before this change, the "Outlook: synchronization" cron would not create calendar events on Outlook's side in _sync_odoo2microsoft due to a filter for calendar.events written to within 5 minutes of microsoft_last_sync_date, when _sync_data is not called when a calendar.event is created, such as through website.appointment. microsoft_last_sync_date was set to datetime.now() at the beginning of _sync_microsoft_calendar, which would skip a large period of time between the last sync and now, if the only syncs were triggered through cron, and not _sync_data (by opening the calendar app). To reproduce, Default "Outlook: synchronization" is ran every 12 hours. 1) Calendar event is synced through "Outlook: synchronization" cron at 00:00, setting microsoft_last_sync_date to 00:00 2) A website.appointment is created for a resource with Outlook calendar sync enabled any time between 00:01 - 11:54. 3) "Outlook: synchronization" runs again at 12:00, which sets microsoft_last_sync_date to 12:00, and filters out calendar.events based on their write_dates in _extend_microsoft_domain that need syncing outside of 11:55 to 12:00. This change removes setting of microsoft_last_sync_date at the beginning of _sync_microsoft_calendar, where we need to use the old value before setting it at the end of _sync_microsoft_calendar. opw-5212908 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262665 Forward-Port-Of: odoo/odoo#245964
This update resolves a problem where DIAN XML files (AttachedDocument type) weren't being correctly imported, leading to data loss. The fix ensures the system first identifies the core AttachedDocument structure, allowing it to properly process the embedded invoice data as required by DIAN regulations.
Original PR description
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN…
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN documentation, the `ProfileID` should contain the literal `Factura Electrónica de Venta` https://www.dian.gov.co/impuestos/factura-electronica/Documents/Anexo-Tecnico-Factura-Electronica-de-Venta-vr-1-9.pdf However, no strict validation is enforced, so variants should still be supported ### Cause: When importing a DIAN document of type `AttachedDocument`, `_get_import_file_type()` searches for a node starting with `DIAN 2.1:` This causes issues with documents structured like: ```xml <AttachedDocument> <CustomizationID>Documentos adjuntos</CustomizationID> <ProfileID>DIAN 2.1: Factura Electrónica de Venta</ProfileID> </AttachedDocument> ``` In this case, `DIAN 2.1:` is detected first, causing the file to be identified as `account.edi.xml.ubl_dian` As a result, the `<AttachedDocument>` wrapper is ignored and the importer tries to parse the file using the wrong structure, preventing any data extraction The import should first detect the `<AttachedDocument>` structure, then unwrap and process the embedded document ### Steps to reproduce: - Install `l10n_co_dian` - Go in Bills and import the test document: `import_attached_document_2` Before the fix, nothing it extracted from the xml opw-6083523 Forward-Port-Of: odoo/enterprise#115599
This update resolves a crash in the abandoned cart reminder system when Click & Collect is enabled. The fix ensures the system handles scheduled actions without a frontend cart, preventing failures and guaranteeing reminders are sent correctly. This improves the reliability of the Click & Collect process.
Original PR description
Problem: The abandoned cart reminder can crash when Click & Collect is enabled. The stock availability check reaches website_sale_collect._get_product_available_qty(), which assumes request.cart…
Problem: The abandoned cart reminder can crash when Click & Collect is enabled. The stock availability check reaches website_sale_collect._get_product_available_qty(), which assumes request.cart always exists. Solution: Safely access the cart with hasattr and fall back to the existing no-cart behavior when it is unavailable. Why: Scheduled actions may have a request object without a frontend cart. This fix prevents the cron from failing while sending abandoned cart reminders. Reproduction Steps: - Configure the website with a warehouse. - Create/publish a delivery method with delivery type “Pick up in store”. Confirm the website has both warehouse_id and in_store_dm_id - Create a cart from the website shop using a storable product that has does not have "Sell When Out of Stock" turned on. - Leave the cart without checking out. - On the generated quotation set the date to the past, but also the date must be after the website.send_abandoned_cart_email_activation_time - Run the abandoned cart reminder scheduled action for the eligible abandoned cart with a storable product. Related Ticket: opw-6133986 Related PR: https://github.com/odoo/odoo/pull/242864 Forward-Port-Of: odoo/odoo#261885
This update fixes an issue where down payment amounts weren't correctly calculated on invoices for companies using tax-inclusive pricing. The change ensures the down payment section's total accurately reflects the sum of all payments, improving invoice accuracy for our tax-included customers. It addresses a discrepancy in how subtotals and totals were handled in the invoice report.
Original PR description
Issue: --- In `tax included` companies, the down payment section is not correctly calculated. Steps to reproduce: - Configure selected company's field account_price_include to be "tax_included" -…
Issue: --- In `tax included` companies, the down payment section is not correctly calculated. Steps to reproduce: - Configure selected company's field account_price_include to be "tax_included" - Create a sales order - Create 1 or more down payment invoices for the SO and confirm - Create a final invoice that pays for the rest of it - On this final invoice where the down payment(s) are also listed, click on the preview button Current behavior: - The down payment section's total is the sum of the subtotal Expected behavior: - The down payment section's total should be the sum of the totals Justification: --- The amounts included in the invoice report are dependent on the `company_price_include` field in `res.partner`. If tax_excluded, subtotals are listed. If `tax_included`, totals are listed. There was a mismatch between the entries and the section total; the section entries could have the total as the amount while the section's sum would be in terms of subtotals. Fix: --- On stable we can still rely on `section_subtotal` but set its amount to total instead of subtotal in case of `tax_included`. However, this fix is not stable as there is a xpath on `t-set` expression in `l10n_ar`. To avoid breaking the views, we can re-set the `section_subtotal` in the next lines. This would still cause issues as it will replace the overridden logic in the `l10n_ar` implementation. To prevent that issue, we can re-set the `section_subtotal` only if the value is the same as `get_section_subtotal`, which means we are in the main implementation and it's safe to re-set the value. opw-6127615 Forward-Port-Of: odoo/odoo#262364 Forward-Port-Of: odoo/odoo#261372
This update fixes an issue where the Work Orders Planning Gantt view incorrectly included workcenter downtime in employee duration totals. The change ensures that workcenter unavailability is now accurately accounted for, providing more precise duration calculations for employee workloads.
Original PR description
In the Work Orders Planning Gantt view grouped by employee, the total duration did not consistently respect workcenter unavailabilities. This change ensures workcenter unavailabilities are included in the payload when grouping by employees, allowing the renderer to correctly calculate aggregated totals. Before: - Employee-grouped totals could count duration during workcenter downtime. After: - Employee-grouped totals correctly respect workcenter unavailability. This commit's changes: - In employee Gantt data preparation, added the workcenter unavailability payload by extracting workcenter IDs from the fetched work orders and calling `_gantt_unavailability` on those IDs to retrieve the intervals that should be excluded from the totals. task-6089572 Forward-Port-Of: odoo/enterprise#112805
This update resolves an issue where changing the request unit for existing validated time off leaves would trigger an error. Now, users can modify these settings without problems. Additionally, the system prevents overlapping time off requests for certain time types, ensuring accurate scheduling.
Original PR description
## Fix 1 Steps to reproduce: - create a time off type - create a leave for that type and validate it - go on the time off type record and try to change the request unit - an error related to the…
## Fix 1 Steps to reproduce: - create a time off type - create a leave for that type and validate it - go on the time off type record and try to change the request unit - an error related to the leave is raised Before this PR, it was not prevented to change the request unit for time off types once leaves of that time off type were already taken, leading to an error. After this PR, `request_unit` now can be changed in the settings with existing validated leaves without having an error raised. The leaves that were previously created will not have their value recomputed based on the new granularity for historical purposes. This PR also removes an unused depends on `_compute_dashboard_warning_message`. ## Fix 2 Before this PR, it was possible to have overlapping leaves: (For time types that do not allow requests on top) - Create a leave A and refuse it - Create another leave B - Validate B - Validate A This overlap should be caught and prevented by a constraint but currently isn't. This PR adds the state to the dependencies to exclude the check on refused/cancelled leaves but ensure that they cannot be validated if they overlap other non-refused/cancelled leaves. task-6153055 Forward-Port-Of: odoo/odoo#261036
This update fixes an issue where route planning for resources always started from the user's location. Now, routes begin from the resource's actual location when a location is available, improving the accuracy and usefulness of route visualizations. This ensures users see the most relevant routes for scheduling and logistics.
Original PR description
Currently, the routings per resource are always starting from the current user's location. With this commit: - If the view is not grouped by resource, no routing is shown - If the view is grouped by resource and the user is not located, no routing is shown for that resource - Else, the routing start from the located resource's geolocation task-6176479
This update ensures that failed Stripe terminal payments are now properly flagged in the POS system. Previously, a successful authorization could lead to a payment being incorrectly marked as 'done' even if the capture failed. Now, the system will correctly return the payment to a 'retry' state, ensuring accurate payment status visibility.
Original PR description
Before this commit, a Stripe terminal payment could still be marked as `done` even if the capture step failed. This happens when the card authorization succeeds, `processPayment` returns a payment…
Before this commit, a Stripe terminal payment could still be marked as `done` even if the capture step failed.
This happens when the card authorization succeeds, `processPayment` returns a payment intent, but the subsequent `stripe_capture_payment` RPC fails and `capturePaymentStripe()` returns `false`. The capture flow did not guard that return value and still fell through to `line.set_payment_status("done")`.
In practice, this can happen for example if the Odoo server cannot resolve `api.stripe.com` while capturing the payment intent. Stripe then keeps the payment in `requires_capture`, while the POS line is still synced as paid.
Guard the failed capture path and stop the flow before marking the line as done. In that case, the payment line is put back to `retry` so the failure is visible in the POS instead of silently creating a paid, uncaptured payment.
opw-6075384
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#263200
Forward-Port-Of: odoo/odoo#261521This update fixes an issue where sales tax reports for 7% and 5% Malta taxes were incorrectly displayed with negative amounts and grouped under the 18% line. The fix ensures accurate reporting of all tax rates (18%, 7%, and 5%) within the Tax Report, providing reliable financial data for users.
Original PR description
### Issue before this commit: Sales taxes at 7% and 5% were incorrectly mapped to the same tax report tags as the 18% sales taxes, causing them to be reported under the 'Taxable Goods/Services at…
### Issue before this commit: Sales taxes at 7% and 5% were incorrectly mapped to the same tax report tags as the 18% sales taxes, causing them to be reported under the 'Taxable Goods/Services at 18%' line. In addition, the 7% and 5% report lines displayed negative amounts instead of positive ones. ### Steps to reproduce the issue: 1. Install l10n_mt 2. Create invoices using 18%, 7%, 5% taxes 3. Go to Accounting > Reporting > Tax Report 4. See the amounts for Taxable Goods/Services at 18% is negative and all the invoices are reported into the Taxable Goods/Services at 18% even if the tax applied to the invoice is 5% or 7% ### Cause of the issue: An automatic script (https://github.com/odoo/odoo/pull/225252) missed to invert sign of formulas for the 7% and 5% lines, so their values were displayed with the wrong sign. Moreover it is assigned to the 7% and 5% Malta sales taxes the III.1_base and III.1_tax tags, which belong to the 18% tax report line. ### Reason to introduce the fix: The tag mapping must match the tax report structure so that 18%, 7%, and 5% sales taxes are reported in their respective lines. The report formulas for the 7% and 5% lines must also use the proper sign convention to display positive amounts consistently. opw-6015509 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263073 Forward-Port-Of: odoo/odoo#254894
This update fixes an issue where helpdesk notification emails incorrectly linked to the company's default website instead of the customer's original website. Previously, ticket notifications directed users to the wrong site. Now, the 'View Ticket' button will always point to the website where the customer initially submitted their helpdesk request, improving the user experience and ensuring accurate ticket navigation.
Original PR description
On a multi-website / single-company setup, helpdesk notification emails posted after the initial confirmation contained a "View Ticket" button pointing to the wrong website, always the company's…
On a multi-website / single-company setup, helpdesk notification emails posted after the initial confirmation contained a "View Ticket" button pointing to the wrong website, always the company's default website instead of the website the ticket was created from. Steps to reproduce: =================== 1. Create two websites W1 (seq 1) and W2 (seq 2) under the same company, with distinct domains. 2. Create two helpdesk teams with "Submit a Ticket" enabled, each bound to one website (Helpdesk1 -> W1, Helpdesk2 -> W2). 3. From W2, submit a ticket on /helpdesk/helpdesk2. 4. In the ticket, send email from the chatter. 5. Inspect the outgoing notification email. => "View Ticket" button points to W1's domain. Root cause: ============ `helpdesk.ticket` has no `website_id`, so `Base.get_base_url` falls through to `company_id.website_id.domain`, i.e. the first website of the company by sequence. The first confirmation message looked right only because it was posted inside a website request, where `website.get_current_website()` provided the correct context; subsequent agent replies are posted from the ticket with no such context, so the fallback kicked in. Override `get_base_url` on `helpdesk.ticket` to prefer `team_id.website_id.domain` when set, so every notification on the ticket links back to the website the customer submitted it from. => "View Ticket" button points to W2's domain (the site the customer is browsing). opw-6071999 Forward-Port-Of: odoo/enterprise#116034 Forward-Port-Of: odoo/enterprise#114693
A recent update introduced a new way of handling data, but it caused issues with sending TBai documents. To ensure continued functionality, the team has reverted to the previous version that reliably processed these documents. This rollback addresses a disruption in the TBai sending process.
Original PR description
After this [PR](https://github.com/odoo/odoo/issues/244421) a new wrapper for binary data was introduced. Is not working for the tbai sending, so we decided to go back to the version that worked
This update fixes a bug where abandoned cart emails were sometimes sent twice. A recent change in how the system determines the customer's email address led to a conflict with an older fix. The update now correctly handles this situation, ensuring abandoned cart emails are sent only once.
Original PR description
During a previous fix (https://github.com/odoo/odoo/pull/206158), fallback values were added for an explicit `email_to` if the default email template for the abandonned cart was missing them. But…
During a previous fix (https://github.com/odoo/odoo/pull/206158), fallback values were added for an explicit `email_to` if the default email template for the abandonned cart was missing them. But since (https://github.com/odoo/odoo/pull/172714), the template uses `use_default_to` == True, which will compute the default partner and add them to `partner_ids` of the `mail.mail` record. So the old bug of "abandoned cart email is sent twice" reappered: the if condition fails to account for `use_default_to` being set, so the partner email is set explicitly on `email_to` AND referenced in `partner_ids`, which de-facto sends the email twice to the customer on the sales order. ## FIX: We account for `use_default_to` in the if condition before adding the fallback. How to reproduce: 1) Setup a database with demo data and website_sale 2) Visit the shop as a visitor, add stuff to your cart 3) Sign up for portal access and add new stuff to cart (will attribute SO to new portal account) 4) Wait for the abandoned cart email to trigger (can be forced by playing with `cart_recovery_email_sent`: false,`is_abandoned_cart`: true and triggering the CRON) -> mail is sent twice to the customer Remarks: - changed the unit test to actually capture the generated `mail.mail` and apply some asserts on it OPW-6134731 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#261039
This update fixes a previous issue where international shipments using World Express Pro through the BPost module didn't automatically fill out the required custom declaration information. Now, the custom declaration section is correctly populated, ensuring accurate shipping documentation and compliance for international orders. This improves the reliability and efficiency of the BPost shipping process.
Original PR description
Before this commit, the bpost module was not filling the custom declaration in case of international shipping (World Express Pro) After this commit, the section is filled opw-4932970 Forward-Port-Of: odoo/enterprise#115368 Forward-Port-Of: odoo/enterprise#101476
This update fixes an issue where refund payments were incorrectly assigned to different accounts in the accounting system. The change ensures that inbound and outbound payments use the same accounts, resulting in accurate journal entries and proper financial reporting for point-of-sale transactions. This improves the reliability of financial data.
Original PR description
Step to reproduce: - we need a session, where in total, we gave out money (when we refund) - for this, start a pos session, do a order, pay using bank and close session - restart the pos, refund the order, and pay using bank, close it. - go to accounting > customer > payment - open payment for both session Observation: - in journal entries for both payment, amount is credit into `account_receivable` and debit from `outstanding account` Cause: - commit[1] swaps accounts when we have outbound payments, which is functionally incorrect and lead to this issue. [1] https://github.com/odoo/odoo/commit/844d2960af6b2cdd8620eb1681bda03dd48a97e4 Fix: - do not swap accounts between `outstanding` and `destination` accounts. Expected after fix: - Inbound and outbound payments use the same accounts - Journal entries are correct: - Inbound: debit outstanding, credit account_receivable - Outbound: reverse of inbound entries opw-6044883 Forward-Port-Of: odoo/odoo#256258
This update fixes an issue where Purchase Orders generated from Point of Sale orders weren't including the custom attribute information. The change ensures that the product description is correctly computed for POS orders, leading to accurate purchase order details. This improves the consistency of order information across the system.
Original PR description
Step to reproduce: - install "purchase_stock" and "point_of_sale" - Create a product attribute -> Display Type: Radio Button -> Variant Creation Mode: Never create variants -> Add two attribute…
Step to reproduce: - install "purchase_stock" and "point_of_sale" - Create a product attribute -> Display Type: Radio Button -> Variant Creation Mode: Never create variants -> Add two attribute values, ensuring that one includes a 'is_custom' field. - Create a product and assign this attribute to it. - Enable the MTO (Make To Order) route. - Add a vendor to the product. - Create and confirm a POS order for this product. (add text for custom attr) - Observe that a Purchase Order is generated automatically. Observation: - the PO does not have that text in description Cause: - After commit [1], `description_picking` became a computed field. - Previously, its value (`product_description_variants`) was set in `_prepare_procurement_values`. - That key is no longer used for this purpose, so the information is not propagated and the data is lost. https://github.com/odoo/odoo/blob/71b1267e54fd53fb283c41b579756c72e393cbfa/addons/stock/models/stock_rule.py#L341-L343 above code is removed following that commit Fix: - The description is computed for pos orders [1] https://github.com/odoo/odoo/commit/6b2d3af64a076654e04494972acc4c42d7c54bd8 opw-5969378 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262866 Forward-Port-Of: odoo/odoo#253231
This update fixes an issue where the POS dashboard incorrectly displayed all point-of-sale locations under a single warehouse, even when different warehouse operation types were configured. The change ensures that the POS location's warehouse is dynamically linked to the selected operation type, improving accuracy and usability for managing inventory.
Original PR description
When filtering pos by warehouse_id, all pos are under the same warehouse even if we had configure an Operation Type from a different warehouse for a specific pos. Steps to reproduce: ------------------- * Setup a second warehouse in the company * Add the new POS operation type picking for the second warehouse on the POS settings * Group by warehouse in the POS dashboard > Observation: It always shows the first warehouse Why the fix: ------------ The warehouse_id field on pos.config was a plain Many2one with a static default that always set it to the first warehouse of the company. Convert warehouse_id into a computed stored editable field that derives from picking_type_id.warehouse_id. This ensures the warehouse stays in sync when the operation type changes, while still allowing manual override for the Ship Later feature. opw-6104652 Forward-Port-Of: odoo/odoo#262821 Forward-Port-Of: odoo/odoo#258830
This update fixes an issue where quantities were incorrectly doubled when settling sales orders in POS using the 'Pick then Deliver' warehouse method. The fix ensures accurate lot quantities are loaded during the settlement process, preventing over-reporting of product stock. This improves the reliability of sales order fulfillment.
Original PR description
When settling a sale order in POS after validating the delivery, quantities and lots were wrong for lot-tracked products with warehouse "Pick then Deliver (2 steps)": quantity doubled when loading…
When settling a sale order in POS after validating the delivery, quantities and lots were wrong for lot-tracked products with warehouse "Pick then Deliver (2 steps)": quantity doubled when loading SN/Lots. Steps to reproduce: ------------------- * Create a product with Tracking by lots * In Inventory, set warehouse Outgoing Shipments to "Pick then Deliver (2 steps)" * Create a quotation with the product and confirm it * Validate the delivery * In POS, settle the sale order from Quotation/Order * When asked "Do you want to load the SN/Lots linked to the Sales Order?", click Yes > Observation: Quantity doubled. Why the fix: ------------ read_converted() used move_line_ids from all moves linked to the sale line. With 2-step, both pick and delivery moves have move_line_ids with the same lots, so quantities were counted twice. We now use move lines from exactly one picking and filter by sale_line_id. opw-6001585 Forward-Port-Of: odoo/odoo#262953 Forward-Port-Of: odoo/odoo#253539
This update resolves an issue where users without full project access were unable to view project details when linked through timesheets. The fix adds a temporary workaround using `sudo()` to grant access, ensuring all users can correctly see project information regardless of their initial permissions. This improves usability for employees using the timesheet functionality.
Original PR description
### Steps to reproduce: - Download 'Sales', 'Project', 'Employees', and 'Timesheets' apps - Create an employee and link them to a user that doesn't have any access rights except to 'Timesheets =…
### Steps to reproduce:
- Download 'Sales', 'Project', 'Employees', and 'Timesheets' apps
- Create an employee and link them to a user that doesn't have any access rights except to 'Timesheets = User:own timesheets'
- In Sales, create a service with the following specifications:
- 'Create on Order' is 'Project'
- 'Invoicing Policy' is 'Based on Timesheets'
- Create a new quotation that requests this service and click 'Confirm'
- In 'Project' > 'Configuration' > 'Projects', choose the newly created project and add a line that has the new employee in the 'Invoicing' tab
- Log in as that employee and go to 'Timesheets'
- Create a new entry for the newly created project
- Click the project's name
> Access Error: You are not allowed to access 'Collaborators in project shared'
(project.collaborator) records.
### Cause of Issue:
This happens because the user doesn't have access rights to the 'Project' app, hence they don't have access to `collaborator_ids` which are retrieved here. https://github.com/odoo/odoo/blob/c71db2444eab951cab7eb2e68f780f0e68a3edd0/addons/project/models/project_project.py#L1183-L1186
### Fix:
Since an access to the 'Projects' app isn't necessary to view a project assigned to you, `sudo()` is necessary for hr_timesheet users without project access rights.
opw-6074833
Forward-Port-Of: odoo/odoo#263152
Forward-Port-Of: odoo/odoo#258370This update allows employees to directly modify their work location within the system, previously restricted by permissions. The change addresses an issue caused by a recent code update that limited access to employee data. This enhancement improves employee self-service and data accuracy.
Original PR description
**Steps to reproduce** - Have a user without HR rights and linked to an employee - With this user, open Preferences and in the calendar tab and try to change the work location for one of the days - Error: You do not have enough rights to access the field "version_id" on Employee (hr.employee). **Cause** Issue after 72ac4b03657d617644ae75f2957aaec7acf6c1a8 which removed SELF_READABLE_FIELDS and SELF_WRITEABLE_FIELDS. **Change** Use the `field_employee` function introduced in 9605045313953b4c8c734c0d52e8032e3c36bf3a (commit message contains the explanation as to why it is necessary for fields coming from the employee model). opw-6127522 Forward-Port-Of: odoo/odoo#263031 Forward-Port-Of: odoo/odoo#260394
This update fixes an issue where the table menu options weren't updating when you switched to a different cell within the HTML editor. The change ensures that the menu always reflects the currently selected cell, providing a more accurate and functional editing experience. This improves usability and data accuracy.
Original PR description
After this commit [1], setup is executed only on the initial mount of the table menu and not on subsequent target cell changes. As a result, colItems, rowItems, and other values found in setup become stale, causing the menu to display options that do not reflect the current target cell. This commit moves the necessary values from setup into useEffect so they update correctly when the target cell changes. task-6111986 [1]: https://github.com/odoo/odoo/commit/7d523d6402c9bff3c2e4bcd0329f486a2d0f45ec Backport of Commit https://github.com/odoo/odoo/commit/729c45ddf3d1e377507d93997c5ca45984d64d75 Forward-Port-Of: odoo/odoo#262052 Forward-Port-Of: odoo/odoo#258590
This update resolves an issue where, after scanning a different serial number from a reserved one, both serial numbers incorrectly appeared on the picking view. The fix ensures the system waits for a necessary process to complete, correctly displaying only the intended serial number.
Original PR description
Problem: When entering the barcode interface from a picking and scanning a different serial number than one already reserved, a new line gets created in certain situations. When exiting the barcode…
Problem: When entering the barcode interface from a picking and scanning a different serial number than one already reserved, a new line gets created in certain situations. When exiting the barcode interface without validating the picking, both serial numbers show up on the picking view. However, the first serial number’s `stock.move.line` was deleted, so only one serial number should be there. When exiting the barcode interface a call to `post_barcode_process` is made, where the extra `stock.move.line` is deleted, but it doesn’t wait for the call to finish. https://github.com/odoo/enterprise/blob/d5a52cb79c9c41d792685d2858cfeb6aee147642/stock_barcode/static/src/models/barcode_picking_model.js#L1896 Purpose: By overriding `beforeQuit` to add the `_onExit` call, the component now waits for the `post_barcode_process` call to finish before navigating back to the picking view. This helps ensure the UI displays the updated data. Steps to reproduce on Runbot: Create a product tracked by serial numbers. Have 2 units on hand: serial 001 with a package, and serial 002 without a package. (This is needed so the barcode app will create a new line). Create a delivery for 1 unit of our test product and mark it as todo. Ensure that serial 001 is reserved. Click the Barcode smart button and scan the barcode for serial 002. Click the back button. Observe that both serial numbers are shown on the picking. Refresh the page and observe only serial 002 is now shown. opw-6105740 Forward-Port-Of: odoo/enterprise#115491
17 changes
Resolved issues and error corrections
This update fixes an issue where users could add multiple companies to a single 'Bank and Cash' account, leading to validation errors. The fix clears outdated data to ensure accurate company counts during account management, improving data integrity.
Original PR description
Steps to reproduce: - Install `l10n_dk` module - Create the test branches under the `DK Company` - Add both companies(parent and branch) in `Bank and Cash` account - Go to Chart of Accounts and try…
18 changes
Resolved issues and error corrections
This update resolves an issue where users could incorrectly add multiple companies to 'Bank and Cash' accounts, leading to validation errors. The fix ensures accurate company tracking by clearing outdated data and forcing a fresh database check.
Original PR description
Steps to reproduce: - Install `l10n_dk` module - Create the test branches under the `DK Company` - Add both companies(parent and branch) in `Bank and Cash` account - Go to Chart of Accounts and try…
3 changes
Resolved issues and error corrections
This update resolves two issues impacting the export of sales data for DIAN (Colombian tax authority) from point-of-sale systems. Previously, order validation and report downloads would fail due to data inconsistencies. The fix ensures correct data handling during export generation, improving the reliability of the DIAN compliance process.
Original PR description
Steps to reproduce: --- - Install `l10n_co_edi_pos` and configure it. - Set the POS Serial Number in the POS configuration. - Open a POS session, create an order, and validate it. Issues: --- 1. A traceback occurs while validating the order. 2. After fixing the above issue, another traceback occurs when downloading the Sales Details report from the backend. Causes: --- 1. During UBL DIAN data generation, the `name` field is overwritten with `pos_order.l10n_co_edi_pos_name`, which can be empty. 2. `l10n_co_edi_pos_serial_number` is accessed on an invalid type (ID/list instead of a recordset). Fixes: --- - Preserve the original `name` if `l10n_co_edi_pos_name` is not set. - Ensure `config_ids` is always a recordset and safely compute serial numbers using `mapped`, joining unique values. task-6051285 Forward-Port-Of: odoo/enterprise#111306
9 changes
Resolved issues and error corrections
This update resolves a problem where invoices weren't correctly processing extra components within kit products. Specifically, the system incorrectly handled unit of measure discrepancies during invoicing, leading to errors. This change ensures accurate invoicing for kit products with multiple components.
Original PR description
4 changes
Resolved issues and error corrections
This update improves the speed of stock reconciliation by optimizing how the system filters account move lines. Previously, a slow process was used to exclude valuation accounts, but a new index has been added to dramatically reduce the time it takes to process these records, leading to faster reporting.
Original PR description
11 changes
Resolved issues and error corrections
This update fixes a crash that occurred when preparing orders for future online food deliveries. The issue stemmed from an incorrect date format, which has now been corrected to ensure the preparation display functions reliably. This improves the stability of the online ordering process.
Original PR description
### In this commit: Fixes a crash in the preparation display when handling future online food delivery orders. The issue was caused by an invalid delivery time format. This is resolved by properly passing the delivery time as a Number in the utils. Task-[5960176](https://www.odoo.com/odoo/project/1737/tasks/5960176) Forward-Port-Of: odoo/enterprise#116558 Forward-Port-Of: odoo/enterprise#108298
4 changes
Resolved issues and error corrections
This update resolves an issue where account reports with large datasets would crash when attempting to unfold prefix groups. The fix ensures the prefix filter correctly uses account codes instead of names, and skips invalid prefix characters to prevent incorrect grouping. This improves the stability and performance of account reporting for larger databases.
Original PR description
8 changes
Resolved issues and error corrections
This update fixes an issue where tax calculations were incorrect when editing invoices with changed delivery dates and currency rates. The problem stemmed from a recomputation process triggered by currency changes, which was incorrectly applied to edited invoices due to a conflict with the l10n_hu_edi module. This ensures accurate tax calculations across invoices.
Original PR description
3 changes
Resolved issues and error corrections
This update resolves an issue where payment validation with IoT printers in Point of Sale (POS) was failing to correctly redirect to the receipt screen. By including the necessary JavaScript file in the POS bundle, the system now properly handles printer selection and ensures a smooth payment process for users.
Original PR description
The select_printer_wizard.js was only declared in `web.assets_backend`, making it unavailable in the Point of Sale context. When validating a payment in POS with an invoice and an IoT printer configured on the invoice report, it was opening the printer selection wizard using the generic `FormController` instead of `selectPrinterFormController`. This caused the "printer-selected" bus event to never be emitted, leaving the post-validation Promise unresolved and blocking the redirect to the receipt screen. Fix by adding select_printer_wizard.js to point_of_sale._assets_pos. opw-5798014
Steps to reproduce:
- Install `l10n_dk` module
- Create the test branches under the `DK Company`
- Add both companies(parent and branch) in `Bank and Cash` account
- Go to Chart of Accounts and try to delete any account
Cause:
This error occurs because users can add multiple companies to a `Bank and Cash` account, although it should be prevented by the `_check_company_consistency` [constrain]. However, the code still allows it because, in this [commit], `depends_context=('uid',)` was set on the `company_ids` field to keep separate sudo/non-sudo caches for the field. As a result, during the validation [check], the user may still have stale cached values, causing the system to detect only a single company.
Solution:
Here, we first clear all cached values for the old record and force the ORM to re-fetch the values from the database, ensuring an updated recordset. So, the validation error is raised when saving multiple companies.
[constrain]: https://github.com/odoo/odoo/blob/177fc59b7df7c8522234aaa4dbaeb4fba3bb2131/addons/account/models/account_account.py#L309-L310
[check]: https://github.com/odoo/odoo/blob/177fc59b7df7c8522234aaa4dbaeb4fba3bb2131/addons/account/models/account_account.py#L309-L310
[commit]: https://github.com/odoo/odoo/pull/220294/changes/5096d083a38968425920aa5bf466b156eebb3dc7
Ticket [link](https://www.odoo.com/odoo/project.task/6125840)
opw-6125840
Forward-Port-Of: odoo/odoo#263246
Forward-Port-Of: odoo/odoo#260261This update ensures that website appointment creations are consistently synchronized with Outlook calendars. Previously, a timing issue prevented new appointments from being reflected in Outlook, even when the Outlook sync feature was enabled. This change corrects the synchronization process, guaranteeing that all website appointments are correctly reflected in a user's Outlook calendar.
Original PR description
Before this change, the "Outlook: synchronization" cron would not create calendar events on Outlook's side in _sync_odoo2microsoft due to a filter for calendar.events written to within 5 minutes of…
Before this change, the "Outlook: synchronization" cron would not create calendar events on Outlook's side in _sync_odoo2microsoft due to a filter for calendar.events written to within 5 minutes of microsoft_last_sync_date, when _sync_data is not called when a calendar.event is created, such as through website.appointment. microsoft_last_sync_date was set to datetime.now() at the beginning of _sync_microsoft_calendar, which would skip a large period of time between the last sync and now, if the only syncs were triggered through cron, and not _sync_data (by opening the calendar app). To reproduce, Default "Outlook: synchronization" is ran every 12 hours. 1) Calendar event is synced through "Outlook: synchronization" cron at 00:00, setting microsoft_last_sync_date to 00:00 2) A website.appointment is created for a resource with Outlook calendar sync enabled any time between 00:01 - 11:54. 3) "Outlook: synchronization" runs again at 12:00, which sets microsoft_last_sync_date to 12:00, and filters out calendar.events based on their write_dates in _extend_microsoft_domain that need syncing outside of 11:55 to 12:00. This change removes setting of microsoft_last_sync_date at the beginning of _sync_microsoft_calendar, where we need to use the old value before setting it at the end of _sync_microsoft_calendar. opw-5212908 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262665 Forward-Port-Of: odoo/odoo#245964
This update resolves an issue where DIAN XML files (AttachedDocument type) were not being correctly imported, leading to data loss. The fix adjusts the import process to properly identify and handle these files, ensuring accurate data extraction as required by DIAN regulations.
Original PR description
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN…
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN documentation, the `ProfileID` should contain the literal `Factura Electrónica de Venta` https://www.dian.gov.co/impuestos/factura-electronica/Documents/Anexo-Tecnico-Factura-Electronica-de-Venta-vr-1-9.pdf However, no strict validation is enforced, so variants should still be supported ### Cause: When importing a DIAN document of type `AttachedDocument`, `_get_import_file_type()` searches for a node starting with `DIAN 2.1:` This causes issues with documents structured like: ```xml <AttachedDocument> <CustomizationID>Documentos adjuntos</CustomizationID> <ProfileID>DIAN 2.1: Factura Electrónica de Venta</ProfileID> </AttachedDocument> ``` In this case, `DIAN 2.1:` is detected first, causing the file to be identified as `account.edi.xml.ubl_dian` As a result, the `<AttachedDocument>` wrapper is ignored and the importer tries to parse the file using the wrong structure, preventing any data extraction The import should first detect the `<AttachedDocument>` structure, then unwrap and process the embedded document ### Steps to reproduce: - Install `l10n_co_dian` - Go in Bills and import the test document: `import_attached_document_2` Before the fix, nothing it extracted from the xml opw-6083523 Forward-Port-Of: odoo/enterprise#115599
This update ensures that POS terminal payments using Stripe are accurately tracked. Previously, a successful authorization could lead to a payment being incorrectly marked as 'done' if the capture process failed. Now, the system correctly identifies capture failures and returns the payment to 'retry' status, ensuring accurate payment visibility within the POS.
Original PR description
Before this commit, a Stripe terminal payment could still be marked as `done` even if the capture step failed. This happens when the card authorization succeeds, `processPayment` returns a payment…
Before this commit, a Stripe terminal payment could still be marked as `done` even if the capture step failed.
This happens when the card authorization succeeds, `processPayment` returns a payment intent, but the subsequent `stripe_capture_payment` RPC fails and `capturePaymentStripe()` returns `false`. The capture flow did not guard that return value and still fell through to `line.set_payment_status("done")`.
In practice, this can happen for example if the Odoo server cannot resolve `api.stripe.com` while capturing the payment intent. Stripe then keeps the payment in `requires_capture`, while the POS line is still synced as paid.
Guard the failed capture path and stop the flow before marking the line as done. In that case, the payment line is put back to `retry` so the failure is visible in the POS instead of silently creating a paid, uncaptured payment.
opw-6075384
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#263200
Forward-Port-Of: odoo/odoo#261521This update fixes an issue where the Point of Sale dashboard incorrectly displayed all POS locations under only the first warehouse, even when a different warehouse and operation type were configured. The change ensures that the POS warehouse aligns with the selected operation type, improving accuracy and usability for warehouse management.
Original PR description
When filtering pos by warehouse_id, all pos are under the same warehouse even if we had configure an Operation Type from a different warehouse for a specific pos. Steps to reproduce: ------------------- * Setup a second warehouse in the company * Add the new POS operation type picking for the second warehouse on the POS settings * Group by warehouse in the POS dashboard > Observation: It always shows the first warehouse Why the fix: ------------ The warehouse_id field on pos.config was a plain Many2one with a static default that always set it to the first warehouse of the company. Convert warehouse_id into a computed stored editable field that derives from picking_type_id.warehouse_id. This ensures the warehouse stays in sync when the operation type changes, while still allowing manual override for the Ship Later feature. opw-6104652 Forward-Port-Of: odoo/odoo#262821 Forward-Port-Of: odoo/odoo#258830
This update fixes an issue where sales tax reports for 7% and 5% Maltese taxes were incorrectly displayed with negative values and grouped under the 18% tax line. The fix ensures accurate reporting of all tax rates (18%, 7%, and 5%) within the Tax Report, improving the reliability of financial data.
Original PR description
### Issue before this commit: Sales taxes at 7% and 5% were incorrectly mapped to the same tax report tags as the 18% sales taxes, causing them to be reported under the 'Taxable Goods/Services at…
### Issue before this commit: Sales taxes at 7% and 5% were incorrectly mapped to the same tax report tags as the 18% sales taxes, causing them to be reported under the 'Taxable Goods/Services at 18%' line. In addition, the 7% and 5% report lines displayed negative amounts instead of positive ones. ### Steps to reproduce the issue: 1. Install l10n_mt 2. Create invoices using 18%, 7%, 5% taxes 3. Go to Accounting > Reporting > Tax Report 4. See the amounts for Taxable Goods/Services at 18% is negative and all the invoices are reported into the Taxable Goods/Services at 18% even if the tax applied to the invoice is 5% or 7% ### Cause of the issue: An automatic script (https://github.com/odoo/odoo/pull/225252) missed to invert sign of formulas for the 7% and 5% lines, so their values were displayed with the wrong sign. Moreover it is assigned to the 7% and 5% Malta sales taxes the III.1_base and III.1_tax tags, which belong to the 18% tax report line. ### Reason to introduce the fix: The tag mapping must match the tax report structure so that 18%, 7%, and 5% sales taxes are reported in their respective lines. The report formulas for the 7% and 5% lines must also use the proper sign convention to display positive amounts consistently. opw-6015509 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263073 Forward-Port-Of: odoo/odoo#254894
This update resolves two issues preventing proper validation of POS orders and successful download of Sales Details reports for the l10n_co_edi_pos module. The fix addresses a data overwrite problem and an incorrect data type access, ensuring reliable order validation and report generation.
Original PR description
Steps to reproduce: --- - Install `l10n_co_edi_pos` and configure it. - Set the POS Serial Number in the POS configuration. - Open a POS session, create an order, and validate it. Issues: --- 1. A traceback occurs while validating the order. 2. After fixing the above issue, another traceback occurs when downloading the Sales Details report from the backend. Causes: --- 1. During UBL DIAN data generation, the `name` field is overwritten with `pos_order.l10n_co_edi_pos_name`, which can be empty. 2. `l10n_co_edi_pos_serial_number` is accessed on an invalid type (ID/list instead of a recordset). Fixes: --- - Preserve the original `name` if `l10n_co_edi_pos_name` is not set. - Ensure `config_ids` is always a recordset and safely compute serial numbers using `mapped`, joining unique values. task-6051285 Forward-Port-Of: odoo/enterprise#111306
This update corrects a discrepancy in the purchase order dashboard's On-Time Delivery (OTD) calculation. Previously, even minor timing differences between the order date and delivery date resulted in a 0% OTD. Now, the dashboard aligns with the partner's OTD calculation, which rounds dates to the date value, ensuring accurate reporting of vendor performance.
Original PR description
# Setup For easiness of testing : have no purchase order in your dashboard # How to reproduce - Create a Purchase Order for Vendor X and with Product Y - Click on Confirm Order -> Receive -> Validate…
# Setup For easiness of testing : have no purchase order in your dashboard # How to reproduce - Create a Purchase Order for Vendor X and with Product Y - Click on Confirm Order -> Receive -> Validate - Go back to the dashboard # The problem The displayed OTD is 0%, but when you go to the Vendor X form view and check his On-time Rate, it is 100% # Cause The computation for the On-time rate in the dashboard uses the whole datetime value, so if there is even a second of difference between `effective_date` and `date_planned`, the PO is not counted as on-time : https://github.com/odoo/odoo/blob/942cbbbf243ff28f84fdaa40ed73b6572e0032a6/addons/purchase_stock/models/purchase_order.py#L253 That is not the case for the partner On-time rate computation, where we round the datetime value to the date value : https://github.com/odoo/odoo/blob/942cbbbf243ff28f84fdaa40ed73b6572e0032a6/addons/purchase_stock/models/res_partner.py#L57 opw-6128510 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263015 Forward-Port-Of: odoo/odoo#260384
This update fixes an issue where refund payments were incorrectly routing funds to the wrong accounts. The change ensures that inbound and outbound payments use the same accounts, resulting in accurate journal entries and proper accounting record-keeping for point-of-sale transactions. This improves the reliability of financial reporting.
Original PR description
Step to reproduce: - we need a session, where in total, we gave out money (when we refund) - for this, start a pos session, do a order, pay using bank and close session - restart the pos, refund the order, and pay using bank, close it. - go to accounting > customer > payment - open payment for both session Observation: - in journal entries for both payment, amount is credit into `account_receivable` and debit from `outstanding account` Cause: - commit[1] swaps accounts when we have outbound payments, which is functionally incorrect and lead to this issue. [1] https://github.com/odoo/odoo/commit/844d2960af6b2cdd8620eb1681bda03dd48a97e4 Fix: - do not swap accounts between `outstanding` and `destination` accounts. Expected after fix: - Inbound and outbound payments use the same accounts - Journal entries are correct: - Inbound: debit outstanding, credit account_receivable - Outbound: reverse of inbound entries opw-6044883 Forward-Port-Of: odoo/odoo#256258
This update resolves an issue where the custom declaration field wasn't automatically filled for international World Express Pro shipments within the BPost module. Now, the necessary custom declaration information is correctly populated, ensuring accurate shipping documentation and compliance for international orders. This improves the reliability and accuracy of the BPost shipping process.
Original PR description
Before this commit, the bpost module was not filling the custom declaration in case of international shipping (World Express Pro) After this commit, the section is filled opw-4932970 Forward-Port-Of: odoo/enterprise#115368 Forward-Port-Of: odoo/enterprise#101476
This update resolves an issue where long text fields in sign documents were not wrapping correctly, resulting in text overflowing and being displayed as a single line. The fix ensures that text, including long names and multiline content, is properly formatted within the sign document's PDF output. This improves the user experience and prevents data truncation.
Original PR description
### Steps to reproduce: - Download 'Sign' and 'Contacts' apps - Create a contact with a really long name - Create a sign document template with a multiline text field (Read-only) that has contact…
### Steps to reproduce: - Download 'Sign' and 'Contacts' apps - Create a contact with a really long name - Create a sign document template with a multiline text field (Read-only) that has contact name value - Click 'Sign Now' and put the new contact as the signer - Sign and download > The text appears as a single extended line exceeding field/page boundaries ### Cause of Issue: The textarea and stamp field rendering only handled explicit newline characters (`\n`) and did not account for text that exceeded the field width. https://github.com/odoo/enterprise/blob/017743cbe97b629e9d9f1895b655014d4c3abbcb/sign/models/sign_document.py#L330-L345 When the HTML preview showed wrapped text, the PDF output rendered it as a single line. For continuous text without spaces, the text would overflow the field boundaries entirely. ### Fix: Accounted for long texts that have spaces and long words to show all the information in the PDF opw-6045062 Forward-Port-Of: odoo/enterprise#114813
This update resolves an issue where the barcode scanning interface incorrectly displayed duplicate serial numbers after a user navigated back to the picking view. The fix ensures that only the correct serial number is shown, preventing data inconsistencies and improving the user experience. This was achieved by delaying the navigation back to the picking view until the barcode processing was complete.
Original PR description
Problem: When entering the barcode interface from a picking and scanning a different serial number than one already reserved, a new line gets created in certain situations. When exiting the barcode…
Problem: When entering the barcode interface from a picking and scanning a different serial number than one already reserved, a new line gets created in certain situations. When exiting the barcode interface without validating the picking, both serial numbers show up on the picking view. However, the first serial number’s `stock.move.line` was deleted, so only one serial number should be there. When exiting the barcode interface a call to `post_barcode_process` is made, where the extra `stock.move.line` is deleted, but it doesn’t wait for the call to finish. https://github.com/odoo/enterprise/blob/d5a52cb79c9c41d792685d2858cfeb6aee147642/stock_barcode/static/src/models/barcode_picking_model.js#L1896 Purpose: By overriding `beforeQuit` to add the `_onExit` call, the component now waits for the `post_barcode_process` call to finish before navigating back to the picking view. This helps ensure the UI displays the updated data. Steps to reproduce on Runbot: Create a product tracked by serial numbers. Have 2 units on hand: serial 001 with a package, and serial 002 without a package. (This is needed so the barcode app will create a new line). Create a delivery for 1 unit of our test product and mark it as todo. Ensure that serial 001 is reserved. Click the Barcode smart button and scan the barcode for serial 002. Click the back button. Observe that both serial numbers are shown on the picking. Refresh the page and observe only serial 002 is now shown. opw-6105740 Forward-Port-Of: odoo/enterprise#115491
This update fixes an issue where users couldn't reliably edit text within website builder buttons, specifically the 'Add to Cart' button. The fix prevents duplicated branding from being copied when copying and pasting content, ensuring consistent website appearance. This improves the user experience and data integrity within the website builder.
Original PR description
Commit 072a8e4fd061ff23902e6e448a577624cb27e188 fixes edition of buttons by wrapping the editable button in an editable span. But it allows user to write outside the savable node, and allows user to…
Commit 072a8e4fd061ff23902e6e448a577624cb27e188 fixes edition of buttons by wrapping the editable button in an editable span. But it allows user to write outside the savable node, and allows user to copy website builder's branding attributes (which causes issues when pasted). This commit adds a span inside the button instead of outside, and removes it before saving the content. Steps to reproduce: - Open website buider on `/product/item-1` - Place the cursor in the "Add to cart" button - Press left arrow, repeat until out of the button - Bug: You can write text there, but it won't be saved ##### - Open website buider on `/product/item-1` - Select some text in the "Add to cart" button - Copy (`ctrl+c`) - Paste (`ctrl+v`) - Bug: Some content seems duplicated: the branding of the savable button has been duplicated inside it and the automatic replication between identical fields is based on this branding, thus replicates the button's content inside it Similar issue about copy+pasted branding: ec93d48ab17b4a72f61fa358e5a81d2abcb18897 Forward-Port-Of: odoo/odoo#257849
This update resolves an error that occurred when marking payslips as paid, specifically when the 'Include Unpaid' option was enabled. The change ensures that the system correctly handles unpaid payslips during this process, preventing a technical error and improving the reliability of payslip management.
Original PR description
Currently, an error occurs when a user attempts to mark a payslip as paid. **Steps to Reproduce:** - Install the `hr_payroll` module without demo data. - Go to `Payslips` and click on `New…
Currently, an error occurs when a user attempts to mark a payslip as paid. **Steps to Reproduce:** - Install the `hr_payroll` module without demo data. - Go to `Payslips` and click on `New Off-cycle`. - Create a record > `Compute` > `Validate`, and Pay. - In the wizard, enable `Include Unpaid` and select `CSV` mode. - Click `Mark as Paid`. **Error:** `UnboundLocalError: cannot access local variable 'rows' where it is not associated with a value` The error occurs when a user tries to mark a payslip as paid with Include Unpaid enabled. When the wizard is created from here [1], the default unpaid payslips are empty. In this case, the system assigns an empty set of payslips to process [2].and the rows variable is not defined because there are no payslips to work on, which raises the error [3]. This commit ensures that when the wizard is created, the matched unpaid payslips are passed to the wizard. If the Include Unpaid option is enabled, the unpaid payslips are assigned for processing, similar to [4]. The unpaid payslips cannot be empty, as they always include the currently processed payslip. Also, the rows are redefined for each payslip case and updated accordingly. Therefore, this commit ensures that the rows are created at the end from grouped payments. [1] https://github.com/odoo/enterprise/blob/a784d118e076724b02e5c59d9ce5d1815c42b0bf/hr_payroll/models/hr_payslip.py#L792-L809 [2] https://github.com/odoo/enterprise/blob/e971fca0d09e564ae9029f3d7e166e078c44dcbb/hr_payroll/wizard/hr_payroll_payment_report_wizard.py#L56 [3] https://github.com/odoo/enterprise/blob/e971fca0d09e564ae9029f3d7e166e078c44dcbb/hr_payroll/wizard/hr_payroll_payment_report_wizard.py#L97 [4]: https://github.com/odoo/enterprise/blob/a784d118e076724b02e5c59d9ce5d1815c42b0bf/hr_payroll/models/hr_payslip_run.py#L274-L288 sentry-7436885639
This update fixes an issue where ePOS preparation print failures weren't being properly addressed. Now, users can retry printing, preventing duplicate receipts in the kitchen and ensuring accurate order fulfillment. The change ensures print requests are actually triggered when a failure occurs.
Original PR description
When ePOS preparation print fails, user can click on the "Retry" button to resend the request. Due to the logic of preparation receipts reprints, made to avoid duplicate prints in the kitchen, the changes were considered as already printed and the request was never made. We now provide only the printers with failures to the retry callback and a flag to mark them as failing in order to force reprint.
This update resolves an issue where invoices weren't correctly generated for kit products with extra components. The fix ensures that the system accurately handles inventory valuation and unit of measure discrepancies during the invoicing process, preventing errors and improving order fulfillment. It addresses a user error related to unit of measure settings.
Original PR description
### Steps to reproduce: - In the settings Enable: "Automatic accounting" - Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time')…
### Steps to reproduce:
- In the settings Enable: "Automatic accounting"
- Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time') inventory valuation.
- Create a kit product with a component invoiced on delivered qty
- Create and confirm a sale order for 1 units of your kit
- On the delivery add a new move for 1 unit of your kit and save
#### > The new line should be exploded into the component
- Set the quantity on both moves and validate
- On the sale order > Create draft invoice > confirm
#### > User Error: The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure False defined on the product. Please correct the unit of measure defined on the order line or on the product. They should belong to the same category.
### Cause of the issue:
The issue occurs when the `_stock_account_get_anglo_saxon_price_unit` is launched on the account move line created for the extra component because the moves where generated from a kit and hence are associated with a `bom_line_id` but the the product it self is not a kit so that no bom will be found here:
https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L12-L23 In particular, the rest of the call that tries to treat it as a kit will fail because no bom is and should be provided to this line: https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L34
opw-6041375
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#261878
Forward-Port-Of: odoo/odoo#258141This update fixes a calculation error that occurred when using FIFO stock valuation with lot-based tracking, particularly in complex branch setups. The issue stemmed from incorrect cost calculations when product prices were updated, leading to inaccurate inventory values. This change ensures accurate stock valuation and reporting.
Original PR description
Databases that are configured to have products be evaluated by lot and FIFO can experience weird behavior when the product's cost or `standard_price` is updated. The current code doesn't account for the fact that we allow users to dip into negative quantities and there aren't enough safeguards against this. This leads to the following bug that I found: The FIFO algorithm can't be calculated when there is no quantity. Odoo uses a fallback cost whenever quantity is less than zero, but this is incorrect when the product is evaluated by lots. Current behavior would calculate the fallback based on the product's standard price instead of the lot's standard price, leading to self-propagating calculation errors (e.g. cost going up to the trillions) Videos of the bug: Bug: ( Lot value defaults back to the product's standard price ) https://drive.google.com/file/d/1gUtjzdLpjeJts8HcxbTZ9MG4bSjRYmeT/view?usp=drive_link Related tickets: opw-6011189 Forward-Port-Of: odoo/odoo#256113
Steps to reproduce:
- Install `l10n_dk` module
- Create the test branches under the `DK Company`
- Add both companies(parent and branch) in `Bank and Cash` account
- Go to Chart of Accounts and try to delete any account
Cause:
This error occurs because users can add multiple companies to a `Bank and Cash` account, although it should be prevented by the `_check_company_consistency` [constrain]. However, the code still allows it because, in this [commit], `depends_context=('uid',)` was set on the `company_ids` field to keep separate sudo/non-sudo caches for the field. As a result, during the validation [check], the user may still have stale cached values, causing the system to detect only a single company.
Solution:
Here, we first clear all cached values for the old record and force the ORM to re-fetch the values from the database, ensuring an updated recordset. So, the validation error is raised when saving multiple companies.
[constrain]: https://github.com/odoo/odoo/blob/177fc59b7df7c8522234aaa4dbaeb4fba3bb2131/addons/account/models/account_account.py#L309-L310
[check]: https://github.com/odoo/odoo/blob/177fc59b7df7c8522234aaa4dbaeb4fba3bb2131/addons/account/models/account_account.py#L309-L310
[commit]: https://github.com/odoo/odoo/pull/220294/changes/5096d083a38968425920aa5bf466b156eebb3dc7
Ticket [link](https://www.odoo.com/odoo/project.task/6125840)
opw-6125840
Forward-Port-Of: odoo/odoo#263246
Forward-Port-Of: odoo/odoo#260261This update fixes an issue where enabling Employee Login in POS and leaving the ‘Basic rights’ field empty prevented other employees from logging in. Now, all company employees can access the POS login screen, aligning with the intended functionality of allowing basic cashiers to log in regardless of configured advanced rights.
Original PR description
With Employee Login enabled in POS, leaving the “Basic rights” field empty is meant to allow all employees to log in as basic cashiers. In v19, configuring at least one Advanced/Minimal employee…
With Employee Login enabled in POS, leaving the “Basic rights” field empty is meant to allow all employees to log in as basic cashiers. In v19, configuring at least one Advanced/Minimal employee while keeping “Basic rights” empty incorrectly restricted the login list to only the explicitly configured employees (and the linked backend user), so other employees could no longer sign in. Steps to reproduce: ------------------- * Go to POS settings and enable Employee Login. * Add at least one employee in Advanced rights. * Leave Basic rights empty. * Open POS login. > Observation: Only Advanced can sign in. Other employees are missing. Why the fix: ------------ The employee loading domain must only become restrictive when Basic rights is explicitly set. If Basic rights is empty, all company employees should remain selectable, and Advanced/Minimal should only affect roles, not visibility. Align with 19.1 behavior/state of code. opw-6170066 Forward-Port-Of: odoo/odoo#263100 Forward-Port-Of: odoo/odoo#261939
This update resolves an issue where DIAN XML files of type 'AttachedDocument' were not being imported correctly, resulting in lost data. The fix ensures the system correctly identifies and processes these files, aligning with DIAN documentation requirements for invoice structure.
Original PR description
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN…
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN documentation, the `ProfileID` should contain the literal `Factura Electrónica de Venta` https://www.dian.gov.co/impuestos/factura-electronica/Documents/Anexo-Tecnico-Factura-Electronica-de-Venta-vr-1-9.pdf However, no strict validation is enforced, so variants should still be supported ### Cause: When importing a DIAN document of type `AttachedDocument`, `_get_import_file_type()` searches for a node starting with `DIAN 2.1:` This causes issues with documents structured like: ```xml <AttachedDocument> <CustomizationID>Documentos adjuntos</CustomizationID> <ProfileID>DIAN 2.1: Factura Electrónica de Venta</ProfileID> </AttachedDocument> ``` In this case, `DIAN 2.1:` is detected first, causing the file to be identified as `account.edi.xml.ubl_dian` As a result, the `<AttachedDocument>` wrapper is ignored and the importer tries to parse the file using the wrong structure, preventing any data extraction The import should first detect the `<AttachedDocument>` structure, then unwrap and process the embedded document ### Steps to reproduce: - Install `l10n_co_dian` - Go in Bills and import the test document: `import_attached_document_2` Before the fix, nothing it extracted from the xml opw-6083523 Forward-Port-Of: odoo/enterprise#115599
This update resolves a problem where invoices weren't correctly processing extra components within kit products when using automatic accounting. Specifically, the system was misinterpreting the unit of measure, leading to invoicing errors. This change ensures accurate invoicing for kit products with multiple components.
Original PR description
### Steps to reproduce: - In the settings Enable: "Automatic accounting" - Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time')…
### Steps to reproduce:
- In the settings Enable: "Automatic accounting"
- Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time') inventory valuation.
- Create a kit product with a component invoiced on delivered qty
- Create and confirm a sale order for 1 units of your kit
- On the delivery add a new move for 1 unit of your kit and save
#### > The new line should be exploded into the component
- Set the quantity on both moves and validate
- On the sale order > Create draft invoice > confirm
#### > User Error: The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure False defined on the product. Please correct the unit of measure defined on the order line or on the product. They should belong to the same category.
### Cause of the issue:
The issue occurs when the `_stock_account_get_anglo_saxon_price_unit` is launched on the account move line created for the extra component because the moves where generated from a kit and hence are associated with a `bom_line_id` but the the product it self is not a kit so that no bom will be found here:
https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L12-L23 In particular, the rest of the call that tries to treat it as a kit will fail because no bom is and should be provided to this line: https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L34
opw-6041375
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#261878
Forward-Port-Of: odoo/odoo#258141This update resolves a crash issue that occurred when creating Point of Sale (POS) orders with the pos_avatax module installed. The fix restores a previous method to correctly identify the customer's shipping information, ensuring POS order creation remains stable. This improves the reliability of our POS functionality.
Original PR description
Before this commit, when pos_avatax was installed, creating a pos order could crash because the pos order does not have the partner_shipping_id field. This commit re-adds the _get_avatax_ship_to_partner method as it was before the refactor https://github.com/odoo/enterprise/commit/0404086db567ee0595414263d36a3b7dceaa0dbe, which returns the partner_id for the pos order. The `_get_avatax_ship_to_partner` is overridden in `pos_avatax`. Since a `pos.order` does not have a `partner_shipping_id`, the overridden function only reads the partner_id. opw-6122280 Forward-Port-Of: odoo/enterprise#115840
This update resolves an issue where users couldn't reliably edit text within editable buttons in the website builder. The fix involves a change in how the button's content is handled, preventing duplication of branding when copying and pasting. This ensures a smoother and more predictable editing experience for website customization.
Original PR description
Commit 072a8e4fd061ff23902e6e448a577624cb27e188 fixes edition of buttons by wrapping the editable button in an editable span. But it allows user to write outside the savable node, and allows user to…
Commit 072a8e4fd061ff23902e6e448a577624cb27e188 fixes edition of buttons by wrapping the editable button in an editable span. But it allows user to write outside the savable node, and allows user to copy website builder's branding attributes (which causes issues when pasted). This commit adds a span inside the button instead of outside, and removes it before saving the content. Steps to reproduce: - Open website buider on `/product/item-1` - Place the cursor in the "Add to cart" button - Press left arrow, repeat until out of the button - Bug: You can write text there, but it won't be saved ##### - Open website buider on `/product/item-1` - Select some text in the "Add to cart" button - Copy (`ctrl+c`) - Paste (`ctrl+v`) - Bug: Some content seems duplicated: the branding of the savable button has been duplicated inside it and the automatic replication between identical fields is based on this branding, thus replicates the button's content inside it Similar issue about copy+pasted branding: ec93d48ab17b4a72f61fa358e5a81d2abcb18897
This update corrects a bug where the Point of Sale dashboard incorrectly displayed the default warehouse, even when a specific POS location was configured with a different warehouse and operation type. The fix ensures that POS locations accurately reflect their assigned warehouse, improving inventory management and reporting.
Original PR description
When filtering pos by warehouse_id, all pos are under the same warehouse even if we had configure an Operation Type from a different warehouse for a specific pos. Steps to reproduce: ------------------- * Setup a second warehouse in the company * Add the new POS operation type picking for the second warehouse on the POS settings * Group by warehouse in the POS dashboard > Observation: It always shows the first warehouse Why the fix: ------------ The warehouse_id field on pos.config was a plain Many2one with a static default that always set it to the first warehouse of the company. Convert warehouse_id into a computed stored editable field that derives from picking_type_id.warehouse_id. This ensures the warehouse stays in sync when the operation type changes, while still allowing manual override for the Ship Later feature. opw-6104652 Forward-Port-Of: odoo/odoo#262821 Forward-Port-Of: odoo/odoo#258830
This update fixes issues with the WPS report generated for payroll in Saudi Arabia. Specifically, it now requires the Saudi National ID, simplifies bank field handling, and ensures correct mapping of bank details for employees outside of KSA. These changes improve the accuracy and reliability of the WPS file submission.
Original PR description
this commit includes the following fixes for the WPS report in SA: - Make the Saudi National / IQAMA ID required for generating the WPS file. - Remove the condition on the field [57 - BANK] and have it always filled if the SARIE code is set. - If the employee bank account is from a different country (other than KSA or null), map the field [57 - BANK] to the swift code. task-6144299 Forward-Port-Of: odoo/enterprise#116419
This update addresses a bug where the mobile app would unexpectedly log users out due to session rotation occurring during certain requests, like attachments downloads via a webview. A new header allows the mobile app to temporarily bypass session rotation for specific requests, ensuring a smoother user experience. This fix doesn't introduce any security risks.
Original PR description
The session id rotates softly every 3 hours For some features, the mobile app sometimes does requests "outside" of the mobile app, through a webview for instance, and if the session rotation interval…
The session id rotates softly every 3 hours For some features, the mobile app sometimes does requests "outside" of the mobile app, through a webview for instance, and if the session rotation interval is reached at that moment, it rotates the session and the `set-cookie` instruction setting the new session cookie is received by the webview only, it's not propagated back to the mobile app. Then, this could lead for the user to be logged out of the mobile app if the soft automatic session rotation happens at the very unfortunate moment the request through that webview happens. For instance, the mobile app uses a webview to download attachments. If the session rotation happened during that request, the mobile app doesn't receive the `set-cookie` header and doesn't receive the new session id, leading for the user to be logged out of the mobile app. This revision aims to provide an option for the mobile app to temporary skip the session rotation for a specific request, such as the requests done through the webview during downloads. This option to be able to disable the rotation is not a security threat: If an attacker passes that header to disable the interval session rotation, he would avoid the session to be changed every 3 hours, but if he wouldn't he would still receive the new session id every 3 hours. The session rotation is for legitimate user / computer to rotate their session every 3 hours so that in case of data leak of their browser cookies, there is a chance the session cookie is already no longer valid when published on the public web. Legitimate users have no benefit using this option header to disable the rotation. Forward-Port-Of: odoo/odoo#263325
This update resolves a problem where long text fields in the 'Sign' document template would render incorrectly, causing text to overflow and appear as a single line in the final PDF. The fix ensures that text, including long names and continuous text, is properly wrapped within the designated fields, improving the appearance and readability of signed documents.
Original PR description
### Steps to reproduce: - Download 'Sign' and 'Contacts' apps - Create a contact with a really long name - Create a sign document template with a multiline text field (Read-only) that has contact…
### Steps to reproduce: - Download 'Sign' and 'Contacts' apps - Create a contact with a really long name - Create a sign document template with a multiline text field (Read-only) that has contact name value - Click 'Sign Now' and put the new contact as the signer - Sign and download > The text appears as a single extended line exceeding field/page boundaries ### Cause of Issue: The textarea and stamp field rendering only handled explicit newline characters (`\n`) and did not account for text that exceeded the field width. https://github.com/odoo/enterprise/blob/017743cbe97b629e9d9f1895b655014d4c3abbcb/sign/models/sign_document.py#L330-L345 When the HTML preview showed wrapped text, the PDF output rendered it as a single line. For continuous text without spaces, the text would overflow the field boundaries entirely. ### Fix: Accounted for long texts that have spaces and long words to show all the information in the PDF opw-6045062 Forward-Port-Of: odoo/enterprise#114813
This update fixes an issue where automatically selected courses for multi-category restaurant items always chose the lowest sequence, regardless of the currently selected category. Now, the system correctly picks the course linked to the active category filter, ensuring accurate order processing. Additionally, a new setting allows for more efficient course allocation when adding items to existing orders.
Original PR description
When a product belongs to multiple categories, each linked to a different course, the automatic course selection was always picking the one with the lowest sequence, regardless of context. The expected behavior is to pick the course tied to the currently active category filter, not an arbitrary one. This commit implements that logic. In addition, when `use_course_allocation` is enabled, adding a first course to an order that already contains products no longer creates an extra course. --- Task: https://www.odoo.com/odoo/project/1737/tasks/6187108
This update fixes an issue where refund payments were incorrectly routing funds to the wrong accounts. The change ensures that inbound and outbound payments use the same accounts, resulting in accurate journal entries for both refunds and regular transactions. This improves financial reporting accuracy.
Original PR description
Step to reproduce: - we need a session, where in total, we gave out money (when we refund) - for this, start a pos session, do a order, pay using bank and close session - restart the pos, refund the order, and pay using bank, close it. - go to accounting > customer > payment - open payment for both session Observation: - in journal entries for both payment, amount is credit into `account_receivable` and debit from `outstanding account` Cause: - commit[1] swaps accounts when we have outbound payments, which is functionally incorrect and lead to this issue. [1] https://github.com/odoo/odoo/commit/844d2960af6b2cdd8620eb1681bda03dd48a97e4 Fix: - do not swap accounts between `outstanding` and `destination` accounts. Expected after fix: - Inbound and outbound payments use the same accounts - Journal entries are correct: - Inbound: debit outstanding, credit account_receivable - Outbound: reverse of inbound entries opw-6044883 Forward-Port-Of: odoo/odoo#256258
This update resolves an issue where the barcode scanning interface incorrectly displayed duplicate serial numbers after a user navigated back to the picking view. The fix ensures that only the correct serial number is shown, preventing data inconsistencies and improving the user experience. This was achieved by delaying a process to ensure data is properly updated.
Original PR description
Problem: When entering the barcode interface from a picking and scanning a different serial number than one already reserved, a new line gets created in certain situations. When exiting the barcode…
Problem: When entering the barcode interface from a picking and scanning a different serial number than one already reserved, a new line gets created in certain situations. When exiting the barcode interface without validating the picking, both serial numbers show up on the picking view. However, the first serial number’s `stock.move.line` was deleted, so only one serial number should be there. When exiting the barcode interface a call to `post_barcode_process` is made, where the extra `stock.move.line` is deleted, but it doesn’t wait for the call to finish. https://github.com/odoo/enterprise/blob/d5a52cb79c9c41d792685d2858cfeb6aee147642/stock_barcode/static/src/models/barcode_picking_model.js#L1896 Purpose: By overriding `beforeQuit` to add the `_onExit` call, the component now waits for the `post_barcode_process` call to finish before navigating back to the picking view. This helps ensure the UI displays the updated data. Steps to reproduce on Runbot: Create a product tracked by serial numbers. Have 2 units on hand: serial 001 with a package, and serial 002 without a package. (This is needed so the barcode app will create a new line). Create a delivery for 1 unit of our test product and mark it as todo. Ensure that serial 001 is reserved. Click the Barcode smart button and scan the barcode for serial 002. Click the back button. Observe that both serial numbers are shown on the picking. Refresh the page and observe only serial 002 is now shown. opw-6105740 Forward-Port-Of: odoo/enterprise#115491
This update ensures that livechat conversations are automatically marked as read when they end, resolving a previous issue where agents saw persistent unread indicators. The change adjusts how the system focuses the chat window to trigger the read state, improving the agent experience and ensuring conversations are properly tracked.
Original PR description
**Description of the issue this PR addresses:** Previously, when a livechat conversation ended, it was never automatically marked as read. The existing `mark_as_read` mechanism depends on the composer being focused, but ended livechat conversations hides the composer, and the chat window does not focus the thread automatically (focus only happens on explicit click). This made it impossible for the read state to be triggered through the normal path, leaving agents with persistent unread indicators on closed livechat conversations. **Desired behavior after PR is merged:** - Focus the composer when present. - Focus the conversation otherwise. This ensures the read state is correctly triggered when the conversation is effectively in focus. task-[5900038](https://www.odoo.com/odoo/project/1519/tasks/5900038) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253609
This update fixes inaccuracies in how the Mexican employment subsidy was calculated, specifically addressing issues with threshold prorating and monthly cap enforcement. The changes ensure employees receive the correct subsidy amounts based on their salary, aligning with government regulations and preventing overpayments.
Original PR description
The employment subsidy calculation was incorrect in two main scenarios: ### 1. Incorrect threshold prorating: The system was comparing the salary against the full monthly limit even for partial…
The employment subsidy calculation was incorrect in two main scenarios:
### 1. Incorrect threshold prorating:
The system was comparing the salary against the full monthly limit even for partial periods (weekly or bi-weekly). This resulted in employees wrongly receiving the subsidy when their proportional salary actually exceeded the limit.
Example: In 2026, the 14-day threshold should be 5,292.67 (11,492.66 / 30.4 * 14). Currently, an employee earning 10,000.00 in those 14 days still gets the subsidy because it's being compared against the full 11,492.66.
### 2. Cumulative monthly cap:
When multiple payslips occur in the same month, the total subsidy sometimes exceeds the statutory monthly maximum (536.22 for 2026) because the cap wasn't enforced across all slips.
Example: The 2026 maximum monthly subsidy is 536.22. In a month with three partial payslips:
- Mar 1st - Mar 14th: The system grants 246.68.
- Mar 15th - Mar 28th: The system grants 246.68.
- Mar 29th - Apr 11th: For the 3 days belonging to March, the system grants an additional 52.86.
Total subsidy for March reaches 546.22, exceeding the legal cap.
### Changes included in this PR:
- Updated `l10n_mx_rule_parameter_uma` to include monthly and annual values. This prevents rounding discrepancies.
Example: the 2026 annual UMA published is 42,794.64. In a rule the calculation is: l10n_mx_uma * 30.4 * 12 = 117.31 * 30.4 * 12 = 42,794.68 resulting in a ~0.04 difference.
- Create a new rule parameter `l10n_mx_rule_parameter_subsidy_salary_limit` to have the subsidy eligible threshold. Starting in 2026, the government's rounding changed from zero decimals(e.g., 9,081.00 in 2024, 10,171.00 in 2025) to two decimals (11,492.66). Storing these as explicit parameters avoids the precision errors.
- Added comprehensive unit tests covering:
- Complete periods: validates standard payslips aligned with the month calendar (bi-monthly, monthly, bi-weekly).
- Overlapping periods: validates split-month scenarios (14-day, 10-day, weekly) where periods cross month boundaries:
Example of self._overlapping_period("weekly", 7, 2646.33, (35.24, 88.10), (3, 123.34), (77.53, 35.24))
This test covers 5 weekly payslips with the following subsidy
distribution:
- Tuple `first_payslip` => (35.24, 88.10) means that:
First payslip (Apr 29 - May 5), the subsidy is 35.24 for April and 88.10 for May.
- Tuple `mid_payslips` => (3, 123.34) means that:
For the next 3 payslips fully in May, the subsidy is 123.34 each.
Payslip 2 (May 6 - May 12): Subsidy for May = 123.34
Payslip 3 (May 13 - May 19): Subsidy for May = 123.34
Payslip 4 (May 20 - May 26): Subsidy for May = 123.34
- Tuple `last_payslip` => (77.53, 35.24) means that:
Last payslip (May 27 - June 2), the subsidy is 77.53 for May and 35.24 for June.
- Across years: subsidy amounts and limits are updated annually.
Therefore, if a period overlaps two years, a salary amount might be eligible for a subsidy in January but not in the previous December, and the paid subsidy is increased in January due to the new limits.
- Cleaned up redundant tests (test_regular_payslip_subsidy) and adjusted decimal precision.
- For split-month `schedule_pay` periods, the first payslip might generate a subsidy. However, in subsequent payslips, due to commissions or a wage increase, the employee may exceed the monthly subsidy salary limit.
In those payslips, a warning is shown to notify the user that a manual adjustment is required.
Created tests to validate these cases.
target: 19.0
task-5419659
Forward-Port-Of: odoo/enterprise#107601This update fixes an issue where subscription delivery dates were incorrectly displayed as the previous day due to timezone differences. The fix ensures delivery dates are accurately calculated based on the company's timezone, resolving a potential scheduling problem for subscription orders. This improves the reliability of delivery planning.
Original PR description
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm…
Steps to reproduce 1. Set the company's partner timezone to a negative UTC offset (e.g. America/Argentina/Buenos_Aires, UTC-3). 2. Create a sale order for a storable subscription product and confirm it. 3. Open the generated delivery order and check its Scheduled Date. Issue The scheduled date on the first delivery renders as the previous day. `_prepare_procurement_values` writes `date_planned` as `current_period_start`, which is a plain `fields.Date` value (https://github.com/odoo/enterprise/blob/ba41d7de3c0474286e3e9319710fdacfb95d3e2c/sale_subscription_stock/models/sale_order_line.py#L156). When a `date` is stored in the `Datetime` column `stock.move.date`, Odoo anchors it at midnight UTC; in any negative-offset timezone this renders as the previous day (e.g. `2022-03-02 00:00 UTC` shows as `2022-03-01 21:00` in UTC-3). The non-subscription path does not hit this because it resolves `date_planned` through `_expected_date()`, which returns `order_id.date_order` — a full `Datetime` set to `fields.Datetime.now()` at confirmation (https://github.com/odoo/odoo/blob/996702b0d5c518db2ac6f0b144e7835b27c29736/addons/sale/models/sale_order_line.py#L1398). The same midnight-UTC drift also affects later recurrences, where `current_period_start` falls back to `last_invoice_date` — another `Date`. Solution Split the two cases explicitly: - First delivery (`last_invoice_date` unset): set `date_planned` to `order_id.date_order`, matching the non-subscription flow. - Subsequent deliveries: localize `last_invoice_date` at `00:00` in the company timezone before converting back to UTC, reusing the pattern already applied to reordering rules (https://github.com/odoo/odoo/blob/20a0eee2d03293564320c268252a0353781d99ea/addons/stock/models/stock_orderpoint.py#L722). opw-6133831 Forward-Port-Of: odoo/enterprise#116362 Forward-Port-Of: odoo/enterprise#115100
This update fixes an issue where Peppol invoices were incorrectly sending data from branch companies instead of the parent company. The change ensures invoices accurately reflect the parent company's information in the UBL/CII XML file, improving compliance with Peppol standards and avoiding potential errors in data exchange.
Original PR description
### Issue before this commit: The XML export for branch companies incorrectly identified the branch as the sender, even when a Peppol parent company was configured. ### Steps to reproduce the issue:…
### Issue before this commit: The XML export for branch companies incorrectly identified the branch as the sender, even when a Peppol parent company was configured. ### Steps to reproduce the issue: 1. Download Accounting, Contacts and l10n_be 2. Create a branch for a Belgium company 3. Enable Peppol sending on the parent company 4. Enable Peppol sending on the branch company using the parent company endpoint 5. Switch to branch company 6. Create a customer invoice in the branch company using a customer who is on the Peppol network (meaning insert a valid VAT number and then verify button in the Accounting tab) 7. Confirm and send the invoice via Peppol 8. Download the resulting xml file and check the "AccountingSupplierParty" nodes. It contains the data of the branch and not the ones of the parent company ### Cause of the issue: The EDI export logic was fetching the supplier data directly from the invoice's company record without checking for a delegated Peppol parent company, ignoring the hierarchical relationship defined in the settings. ### Reason to introduce the fix: This fix ensures that the AccountingSupplierParty in the UBL/CII file correctly reflects the parent company's data when applicable. opw-6030526 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#260389
This update ensures that imported records open with the same context as the original import action. Previously, the imported list view didn't inherit the correct settings like default move types, leading to incorrect column visibility and data defaults. This fix maintains consistency and improves the user experience when working with imported data.
Original PR description
**Problem:** After importing records through the Import action, the list view that opens with the imported records does not inherit the context of the originating action. Column visibility and…
**Problem:**
After importing records through the Import action, the list view that opens with the imported records does not inherit the context of the originating action. Column visibility and default values that depend on that context (e.g. `default_move_type` on the shared invoice list) end up wrong.
**Steps to reproduce:**
1. Go to Accounting → Customers → Invoices
2. Click "Favorites → Import records"
3. Upload a CSV containing at least one valid customer invoice row
4. Run the import and look at the "Imported records" list that opens
**Current behavior:**
The imported records list opens with an empty context. Columns rendered conditionally on `default_move_type` (invoice-type-specific columns on `account.view_invoice_tree`) are not shown as they are when opening the list from the menu, and records created from that list have no default move type.
**Expected behavior:**
The imported records list should open with the same context as the action the user started the import from (e.g.
`{ default_move_type: 'out_invoice' }` for customer invoices), so columns and defaults match the previous view.
**Cause of the issue:**
`openRecords()` in `import_action.js` builds the follow-up `ir.actions.act_window` but never forwards `this.model.context`. The model already holds the context passed through the import action's `params.context`, but it is dropped when the redirect action is dispatched, so the window action opens with an empty context.
**Fix:**
Forwarding the context the import was launched with keeps the user inside the same functional scope (invoice type, default partner, company, etc.) when they land on the imported records list. Column visibility logic and default values that rely on that context behave identically to opening the list through the normal menu flow.
opw-6120758
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#261309This update fixes a bug where Colorado state income tax calculations resulted in a positive value on payslips, which incorrectly indicated a refund instead of a withholding. The fix aligns with established payroll tax guidelines, ensuring accurate withholding of state income taxes. This ensures correct payroll processing for Colorado-based employees.
Original PR description
## Issue When generating a payslip for an employee of a company located in Colorado, the *CO State Income Tax* could end up positive. ## Steps to reproduce 1. Install *United States - Payroll*…
## Issue
When generating a payslip for an employee of a company located in Colorado, the *CO State Income Tax* could end up positive.
## Steps to reproduce
1. Install *United States - Payroll* (`l10n_us_hr_payroll`)
2. Set the current company's State to Colorado
3. Create an employee and a contract
- Wage: $0
- (Set the contract's status to *Running*)
- (In the payroll tab) State Withholding Allowance: $1000
4. Create a Payslip for the employee
- Structure: *"United States: Regular Pay"*
5. Compute Sheet
6. **In the _Salary Computation_ tab, the _CO State Income Tax_ line has a positive value**
## Justification
This fix is similar to the one applied for the AL(abama) state income tax by https://github.com/odoo/enterprise/commit/f0eeb55f1e3cf965c6a409675813d4a699e5fca6. That modification was justified by CAS (PO of US localizations for Payroll) in opw-5137280:
> *"Payroll taxes are always funds withheld from employee's paychecks, if there is a positive value it means the tax is a refund, not a withholding. Refunds happen when individuals file their income."*
## Note to reviewer
The test [`test_069_al_state_tax_0_income`](https://github.com/odoo/enterprise/blob/219d2a797ee2099c9d77c2defc9c9c5e1d504ffe/test_l10n_us_hr_payroll_account/tests/test_salary_rules.py#L957-L989) (added by the aforementioned commit https://github.com/odoo/enterprise/commit/f0eeb55f1e3cf965c6a409675813d4a699e5fca6) is wrongly indented and thus never executed. The test passes with the dedicated fix, and fails without it, as expected. Let me know if you want me to indent it correctly (in this commit or in an additional one).
opw-5999856
Forward-Port-Of: odoo/enterprise#116305
Forward-Port-Of: odoo/enterprise#112724This update fixes a bug in the Belgium Payroll DMFA report that incorrectly displayed 'Days Per Week' as 5 when employees worked fewer than 5 days a week. The fix ensures the report accurately reflects the employee's actual working schedule, improving data accuracy for tax reporting.
Original PR description
## Issue When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5. ## Steps to reproduce 1. Install…
## Issue
When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5.
## Steps to reproduce
1. Install *Belgium - Payroll* (`l10n_be_hr_payroll`)
2. In Payroll's Settings:
- set *ONSS Registration Number* to `0830123456`
- set *DMFA Employer Class* to `083`
- create a *Work Address DMFA code* (any name, any numeral code, but set the *Working Address* to the Belgian company used for the rest of the steps)
3. In Employees' Settings, set the *Company Working Hours* to a new Working Schedule, with 9 hours/day, 4 days/week. E.g from Monday to Thursday included:
- Work from 8:00 to 12:00
- Lunch from 12:00 to 13:00
- Work from 13:00 to 18:00
4. Create an Employee E for the Belgian company:
- In the *Payroll* tab, set the start date of the contract to 01/01/2026.
- In the *Personal* tab, set the *NISS Number* to `85073003328`
5. Create the payslip for January 2026 for the Employee E.
6. In Payroll > Reporting > Belgium > DMFA, create a new DMFA for the first quarter of 2026 and generate the PDF report
7. **In the generated PDF report, the _Days per Week_ line is set to 5.**
## Cause
The number of days was calculated by multiplying `5` with the `work_time_rate` of the related calendar. This is inaccurate in the case of a company where employees are only expected to work 4 days a week.
opw-6103934
Forward-Port-Of: odoo/enterprise#116465
Forward-Port-Of: odoo/enterprise#113804### Steps to reproduce: - In the settings Enable: "Automatic accounting" - Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time')…
### Steps to reproduce:
- In the settings Enable: "Automatic accounting"
- Create a storable kit product with a storable component both invoiced on delivered qty and in an "automated" ('real_time') inventory valuation.
- Create a kit product with a component invoiced on delivered qty
- Create and confirm a sale order for 1 units of your kit
- On the delivery add a new move for 1 unit of your kit and save
#### > The new line should be exploded into the component
- Set the quantity on both moves and validate
- On the sale order > Create draft invoice > confirm
#### > User Error: The unit of measure Units defined on the order line doesn't belong to the same category as the unit of measure False defined on the product. Please correct the unit of measure defined on the order line or on the product. They should belong to the same category.
### Cause of the issue:
The issue occurs when the `_stock_account_get_anglo_saxon_price_unit` is launched on the account move line created for the extra component because the moves where generated from a kit and hence are associated with a `bom_line_id` but the the product it self is not a kit so that no bom will be found here:
https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L12-L23 In particular, the rest of the call that tries to treat it as a kit will fail because no bom is and should be provided to this line: https://github.com/odoo/odoo/blob/521111d50e9119a6286e4b0e236161b1b898f072/addons/sale_mrp/models/account_move.py#L34
opw-6041375
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#261878
Forward-Port-Of: odoo/odoo#258141This update resolves an issue where deleting menus in the Odoo 18.3 system caused a critical error. The fix ensures the system gracefully handles the absence of menus, preventing data loss or system instability. This improves overall system reliability and data integrity.
Original PR description
to reproduce issue: 1) make a database in 18.3 . 2) delete the menu/menus. 3) it will fail on _load_menus_blacklist. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where refund payments were incorrectly routed to the wrong accounts, leading to inaccurate journal entries. The change ensures that inbound and outbound payments use the correct accounts, resulting in accurate financial reporting for point-of-sale transactions. This improves the reliability of our accounting data.
Original PR description
Step to reproduce: - we need a session, where in total, we gave out money (when we refund) - for this, start a pos session, do a order, pay using bank and close session - restart the pos, refund the order, and pay using bank, close it. - go to accounting > customer > payment - open payment for both session Observation: - in journal entries for both payment, amount is credit into `account_receivable` and debit from `outstanding account` Cause: - commit[1] swaps accounts when we have outbound payments, which is functionally incorrect and lead to this issue. [1] https://github.com/odoo/odoo/commit/844d2960af6b2cdd8620eb1681bda03dd48a97e4 Fix: - do not swap accounts between `outstanding` and `destination` accounts. Expected after fix: - Inbound and outbound payments use the same accounts - Journal entries are correct: - Inbound: debit outstanding, credit account_receivable - Outbound: reverse of inbound entries opw-6044883 Forward-Port-Of: odoo/odoo#256258
This update fixes a bug where Colorado state income tax calculations resulted in a positive value on payslips, which incorrectly indicated a refund instead of a withholding. The fix aligns with established payroll tax rules, ensuring accurate withholding of state income taxes. This ensures correct payroll processing for Colorado-based employees.
Original PR description
## Issue When generating a payslip for an employee of a company located in Colorado, the *CO State Income Tax* could end up positive. ## Steps to reproduce 1. Install *United States - Payroll*…
## Issue
When generating a payslip for an employee of a company located in Colorado, the *CO State Income Tax* could end up positive.
## Steps to reproduce
1. Install *United States - Payroll* (`l10n_us_hr_payroll`)
2. Set the current company's State to Colorado
3. Create an employee and a contract
- Wage: $0
- (Set the contract's status to *Running*)
- (In the payroll tab) State Withholding Allowance: $1000
4. Create a Payslip for the employee
- Structure: *"United States: Regular Pay"*
5. Compute Sheet
6. **In the _Salary Computation_ tab, the _CO State Income Tax_ line has a positive value**
## Justification
This fix is similar to the one applied for the AL(abama) state income tax by https://github.com/odoo/enterprise/commit/f0eeb55f1e3cf965c6a409675813d4a699e5fca6. That modification was justified by CAS (PO of US localizations for Payroll) in opw-5137280:
> *"Payroll taxes are always funds withheld from employee's paychecks, if there is a positive value it means the tax is a refund, not a withholding. Refunds happen when individuals file their income."*
## Note to reviewer
The test [`test_069_al_state_tax_0_income`](https://github.com/odoo/enterprise/blob/219d2a797ee2099c9d77c2defc9c9c5e1d504ffe/test_l10n_us_hr_payroll_account/tests/test_salary_rules.py#L957-L989) (added by the aforementioned commit https://github.com/odoo/enterprise/commit/f0eeb55f1e3cf965c6a409675813d4a699e5fca6) is wrongly indented and thus never executed. The test passes with the dedicated fix, and fails without it, as expected. Let me know if you want me to indent it correctly (in this commit or in an additional one).
opw-5999856
Forward-Port-Of: odoo/enterprise#116305
Forward-Port-Of: odoo/enterprise#112724This update fixes a bug in the Belgium Payroll DMFA report that incorrectly displayed 'Days Per Week' as 5 when employees worked fewer than 5 days. The fix ensures the report accurately reflects the employee's actual working schedule, improving the accuracy of tax reporting.
Original PR description
## Issue When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5. ## Steps to reproduce 1. Install…
## Issue
When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5.
## Steps to reproduce
1. Install *Belgium - Payroll* (`l10n_be_hr_payroll`)
2. In Payroll's Settings:
- set *ONSS Registration Number* to `0830123456`
- set *DMFA Employer Class* to `083`
- create a *Work Address DMFA code* (any name, any numeral code, but set the *Working Address* to the Belgian company used for the rest of the steps)
3. In Employees' Settings, set the *Company Working Hours* to a new Working Schedule, with 9 hours/day, 4 days/week. E.g from Monday to Thursday included:
- Work from 8:00 to 12:00
- Lunch from 12:00 to 13:00
- Work from 13:00 to 18:00
4. Create an Employee E for the Belgian company:
- In the *Payroll* tab, set the start date of the contract to 01/01/2026.
- In the *Personal* tab, set the *NISS Number* to `85073003328`
5. Create the payslip for January 2026 for the Employee E.
6. In Payroll > Reporting > Belgium > DMFA, create a new DMFA for the first quarter of 2026 and generate the PDF report
7. **In the generated PDF report, the _Days per Week_ line is set to 5.**
## Cause
The number of days was calculated by multiplying `5` with the `work_time_rate` of the related calendar. This is inaccurate in the case of a company where employees are only expected to work 4 days a week.
opw-6103934
Forward-Port-Of: odoo/enterprise#116465
Forward-Port-Of: odoo/enterprise#113804This update fixes an issue where changing the delivery date for Hungarian invoices caused incorrect journal entries due to outdated exchange rates. The fix ensures that the correct exchange rate is applied when the delivery date is modified, preventing financial discrepancies and maintaining accurate accounting records.
Original PR description
### Issue: When changing the delivery date (used as the Hungarian exchange rate date), some journal lines could be recomputed incorrectly, leading to unbalanced entries ### Cause:…
### Issue: When changing the delivery date (used as the Hungarian exchange rate date), some journal lines could be recomputed incorrectly, leading to unbalanced entries ### Cause: `expected_currency_rate` was recomputed when `delivery_date` changed, but the new value was never automatically applied In addition, after https://github.com/odoo/odoo/pull/225407, `_sync_tax_lines` partially updated the lines: https://github.com/odoo/odoo/blob/f5501e5c8dcf60444077912db4c87e7a3f2654a6/addons/account/models/account_move.py#L3029-L3031 https://github.com/odoo/odoo/blob/f5501e5c8dcf60444077912db4c87e7a3f2654a6/addons/account/models/account_move.py#L1633-L1637 These methods reapply the previous tax rate, causing base and tax lines to be updated inconsistently As a result, when the base amount increases, the tax amount decreases, and vice versa ### Steps to reproduce: - Install `l10n_hu_edi` and `accountant` with demo data, then switch to the `HU company` - Go to Currencies → USD and add two rates: April 5: HUF per Unit = 100 April 6: HUF per Unit = 150 - Create an Invoice: (Any customer, Currency: USD, Line: Price = 1000, Tax = 27%) - Open the Journal Items and duplicate the browser tab for comparison - In the duplicated tab, change the Delivery Date to April 5 and save - Change the Delivery Date back to today and compare both tabs ### Before the fix: The values differ between both tabs because the tax lines keeps the old exchange rate opw-5801126 Forward-Port-Of: odoo/odoo#258310
This update fixes an issue where the navbar menu items and app icon would disappear when users zoomed out or increased the screen width in mobile view. The change ensures the navbar dynamically adjusts to display the full menu and icon when sufficient screen space is available, improving the user experience.
Original PR description
**Issue:** In the navbar view, when a user starts in mobile view (narrow width) and then increases the screen width (e.g., by zooming out or resizing), the menu items and app icon do not reappear.…
**Issue:** In the navbar view, when a user starts in mobile view (narrow width) and then increases the screen width (e.g., by zooming out or resizing), the menu items and app icon do not reappear. The navbar remains stuck in mobile mode even when there is enough space to display the full layout. **Fix:** The navbar was relying on `env.isSmall`, which is only set during initialization and does not react to window resizing. This has been updated to use `this.ui.isSmall`, which is reactive and updates dynamically when the viewport size changes. **Before:** After resizing from mobile to a larger width, the navbar continued to behave as if it were still in mobile view, keeping menu items and the app icon hidden. **After:** When the screen width increases, the navbar correctly detects the change and re-renders, restoring the menu items and app icon as expected. opw-6107660 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263296 Forward-Port-Of: odoo/odoo#263039
This update fixes an issue where tax returns were incorrectly including all tax amounts, regardless of the specific region (e.g., British Columbia). Now, tax return entries accurately reflect taxes related to the correct tax jurisdiction, ensuring accurate reporting for businesses using Odoo's tax return functionality. This improves the reliability of tax reporting across Canada, Ecuador, Egypt, Pakistan, and South Africa.
Original PR description
Issue: Validating a tax return creates an entry with all the tax aml from the company instead of filtering them according to the tax return type. Steps to reproduce: - In a company in Canada - Invoice a Customer from British Columbia in the previous month (A) - Confirm - Go to tax report -> Return - Review and Validate tax return for "Manitoba PST Return (CA)" for month A - Click on the 3 dots -> View Entry Current Behavior: - Entry has lines for PST in British-Columbia and GST taxes Expected behavior: - Entry has lines for PST in Manitoba only Cause: https://github.com/odoo/enterprise/pull/98158 introduces method `_get_vat_closing_entry_additional_domain` in the wrong class. opw-6065838
This update resolves a crash in the website editor that occurred when an event was set as the homepage. The issue stemmed from a missing match in the event ID retrieval process. By adding a default return value, the editor now correctly identifies event objects, ensuring a stable experience for users managing their website events.
Original PR description
**Description of the issue/feature this PR addresses:** The `WebsiteEvent._getEventObjectId` method lacks a specific match case for the root directory, causing event ID retrieval to fail on the…
**Description of the issue/feature this PR addresses:** The `WebsiteEvent._getEventObjectId` method lacks a specific match case for the root directory, causing event ID retrieval to fail on the homepage. In order to resolve this, I've implemented a default return of 0 when the URL pattern matching fails [following the pattern established by later revisions of this code](https://github.com/odoo/odoo/blob/2199f71070ce3e9a4717eb6b750c14485406f7aa/addons/website_event/static/src/website_builder/event_page_option_plugin.js#L67). **Steps to reproduce bug:** 1. Create an event website 2. Create an event and visit it 3. On the page click Site > Properties 4. Enable `Is Homepage` 5. Return to the homepage of the application and open the editor https://drive.google.com/file/d/1OpCUAp4LJKqkoStciWeJEGVVlR3qpw1R/view?usp=drive_link **Current behavior before PR:** https://drive.google.com/file/d/1c7ACqaQx03mePzJSV_RoPn8mlLWSMa1I/view?usp=drive_link **Desired behavior after PR is merged:** https://drive.google.com/file/d/1L3Ne9h6-yB3v7VbXipjly9OrDSkZvDOu/view?usp=drive_link opw-6101680 Forward-Port-Of: odoo/odoo#258502
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts…
Currently to exclude valuation accounts from the reconciliation we modify the domain by adding a second condition on the field account_id of the account_move_line table to exclude these accounts while including them in a first condition in the method we override.
This is not very efficient as it prevents the use of indexes on that second NOT IN condition.
Indeed PostgreSQL prioritizes the use of the index on the IN condition and then applies the NOT IN condition in a filtering step, which is very costly when there are many account_move_line records belonging to the inventory valuation accounts.
Here is an example of the before after on a database with 87 million account_move_line records total and 9.5 million account_move_line records matching the first IN condition via an index while only 1 million remain after applying the filtering of the NOT IN condition.
All measures are performed with a warmed up cache
[Explain Before](https://explain.dalibo.com/plan/d0d14efbe51ch359)
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~9s</td>
<td>~1.5s</td>
</tr>
</tbody>
</table>
[Explain After](https://explain.dalibo.com/plan/e882cf62d1ga6955)
## Potential further improvement:
Add a partial index:
```SQL
CREATE INDEX CONCURRENTLY idx_aml_company_id_account_id_unreconciled_posted
ON account_move_line (company_id, account_id)
WHERE parent_state = 'posted'
AND (reconciled IS NULL OR reconciled = FALSE)
AND (display_type IS NULL OR display_type NOT IN ('line_section', 'line_note'));
```
### Benchmark:
<table>
<thead>
<tr>
<th># of aml</th>
<th>Before</th>
<th>After</th>
</tr>
</thead>
<tbody>
<tr>
<td>87713812</td>
<td>~1.5s</td>
<td>~900ms</td>
</tr>
</tbody>
</table>
[Explain After + Index](https://explain.dalibo.com/plan/56dfdh554668ed43)
Part of https://github.com/odoo/odoo/pull/261931
Forward-Port-Of: odoo/enterprise#115581This update corrects inaccuracies in the data used for payroll calculations in the Odoo Enterprise application for Belgium. Specifically, it addresses missing details related to leave types (LEAVE280 and LEAVE115) ensuring accurate reporting and compliance with Belgian regulations. This resolves a previous issue impacting payroll accuracy.
Original PR description
Issue: ---------------------------------------- Some prisma codes are wrong. Solution: ---------------------------------------- Change the data files. There are some subtilities that were not implemented: - LEAVE280: 0304 (if less than a year) and 0345 (if more) - LEAVE115: 0820 (Work accident) and 0830 (Occupational Disease) opw-6090081 Forward-Port-Of: odoo/enterprise#112949
This update resolves two issues preventing successful validation of POS orders and the download of Sales Details reports for the l10n_co_edi_pos module. The fix ensures correct data generation during UBL DIAN export and proper handling of serial numbers, improving the reliability of this critical POS functionality.
Original PR description
Steps to reproduce: --- - Install `l10n_co_edi_pos` and configure it. - Set the POS Serial Number in the POS configuration. - Open a POS session, create an order, and validate it. Issues: --- 1. A traceback occurs while validating the order. 2. After fixing the above issue, another traceback occurs when downloading the Sales Details report from the backend. Causes: --- 1. During UBL DIAN data generation, the `name` field is overwritten with `pos_order.l10n_co_edi_pos_name`, which can be empty. 2. `l10n_co_edi_pos_serial_number` is accessed on an invalid type (ID/list instead of a recordset). Fixes: --- - Preserve the original `name` if `l10n_co_edi_pos_name` is not set. - Ensure `config_ids` is always a recordset and safely compute serial numbers using `mapped`, joining unique values. task-6051285 Forward-Port-Of: odoo/enterprise#111306
This update fixes a bug in the Belgium Payroll DMFA report that incorrectly displayed 'Days Per Week' as 5 when employees worked fewer than 5 days a week. The fix ensures the report accurately reflects the employee's actual working schedule, improving data accuracy for tax reporting.
Original PR description
## Issue When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5. ## Steps to reproduce 1. Install…
## Issue
When generating a DMFA report with a working schedule with more or less than 5 days a week, the *Days Per Week* value in the report is still appearing as 5.
## Steps to reproduce
1. Install *Belgium - Payroll* (`l10n_be_hr_payroll`)
2. In Payroll's Settings:
- set *ONSS Registration Number* to `0830123456`
- set *DMFA Employer Class* to `083`
- create a *Work Address DMFA code* (any name, any numeral code, but set the *Working Address* to the Belgian company used for the rest of the steps)
3. In Employees' Settings, set the *Company Working Hours* to a new Working Schedule, with 9 hours/day, 4 days/week. E.g from Monday to Thursday included:
- Work from 8:00 to 12:00
- Lunch from 12:00 to 13:00
- Work from 13:00 to 18:00
4. Create an Employee E for the Belgian company:
- In the *Payroll* tab, set the start date of the contract to 01/01/2026.
- In the *Personal* tab, set the *NISS Number* to `85073003328`
5. Create the payslip for January 2026 for the Employee E.
6. In Payroll > Reporting > Belgium > DMFA, create a new DMFA for the first quarter of 2026 and generate the PDF report
7. **In the generated PDF report, the _Days per Week_ line is set to 5.**
## Cause
The number of days was calculated by multiplying `5` with the `work_time_rate` of the related calendar. This is inaccurate in the case of a company where employees are only expected to work 4 days a week.
opw-6103934
Forward-Port-Of: odoo/enterprise#116465
Forward-Port-Of: odoo/enterprise#113804This update resolves a problem where DIAN XML files (AttachedDocument type) weren't being correctly imported, leading to data loss. The fix ensures the system first identifies the AttachedDocument structure, allowing it to properly process the embedded invoice data as required by DIAN regulations.
Original PR description
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN…
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN documentation, the `ProfileID` should contain the literal `Factura Electrónica de Venta` https://www.dian.gov.co/impuestos/factura-electronica/Documents/Anexo-Tecnico-Factura-Electronica-de-Venta-vr-1-9.pdf However, no strict validation is enforced, so variants should still be supported ### Cause: When importing a DIAN document of type `AttachedDocument`, `_get_import_file_type()` searches for a node starting with `DIAN 2.1:` This causes issues with documents structured like: ```xml <AttachedDocument> <CustomizationID>Documentos adjuntos</CustomizationID> <ProfileID>DIAN 2.1: Factura Electrónica de Venta</ProfileID> </AttachedDocument> ``` In this case, `DIAN 2.1:` is detected first, causing the file to be identified as `account.edi.xml.ubl_dian` As a result, the `<AttachedDocument>` wrapper is ignored and the importer tries to parse the file using the wrong structure, preventing any data extraction The import should first detect the `<AttachedDocument>` structure, then unwrap and process the embedded document ### Steps to reproduce: - Install `l10n_co_dian` - Go in Bills and import the test document: `import_attached_document_2` Before the fix, nothing it extracted from the xml opw-6083523 Forward-Port-Of: odoo/enterprise#115599
This update fixes an issue where the Work Orders Planning Gantt view incorrectly included workcenter downtime in employee duration totals. The change now accurately accounts for workcenter unavailability, ensuring more precise and reliable duration calculations for employee workloads. This improves the accuracy of resource planning.
Original PR description
In the Work Orders Planning Gantt view grouped by employee, the total duration did not consistently respect workcenter unavailabilities. This change ensures workcenter unavailabilities are included in the payload when grouping by employees, allowing the renderer to correctly calculate aggregated totals. Before: - Employee-grouped totals could count duration during workcenter downtime. After: - Employee-grouped totals correctly respect workcenter unavailability. This commit's changes: - In employee Gantt data preparation, added the workcenter unavailability payload by extracting workcenter IDs from the fetched work orders and calling `_gantt_unavailability` on those IDs to retrieve the intervals that should be excluded from the totals. task-6089572 Forward-Port-Of: odoo/enterprise#112805
This update resolves an error that was preventing the generation of the Swiss Master Data report. The issue stemmed from a formatting error in the report template, which has now been corrected. This ensures accurate reporting for Swiss payroll data.
Original PR description
Currently, generating the Swiss Master Data report raises an error ### **Steps to reproduce:** 1) Install `l10n_ch_hr_payroll` with demo data. 2) Switch to a Swiss company. 3) Navigate to `Payroll >…
Currently, generating the Swiss Master Data report raises an error ### **Steps to reproduce:** 1) Install `l10n_ch_hr_payroll` with demo data. 2) Switch to a Swiss company. 3) Navigate to `Payroll > Reporting > Master Data`. 4) Create a new report and click Generate Data. ### **Error:** IndentationError: expected an indented block after 'else' statement on line 116 ### **Root Cause:** The QWeb template had a conditional block using `t-elif` followed by an empty `t-else` at [1]. During template compilation, this generated a Python `else` statement without a body, leading to an IndentationError. [1]- https://github.com/odoo/enterprise/blob/b77984b3a9fb1b35c07e152a0f86aaf4d430e2c0/l10n_ch_hr_payroll/report/l10n_ch_wage_type_report.xml#L44 ### **Fix:** This commit prevents the error by removing the empty `t-else` block and ensuring `category_ids` are properly evaluated by computing their codes and checking if they include `BASIC`, `ALW`, or `DED`. **opw-6107565** Forward-Port-Of: odoo/enterprise#113808
This update fixes a potential issue where multiple sign actions within a single transaction could silently override role permissions. The change adds a check during the transaction to ensure no conflicting roles are being assigned, preventing incorrect automation setups. This improves data integrity and security within the Sign app.
Original PR description
Before this commit, creating multiple server actions for the Sign app in a single transaction (e.g., when saving an Automation Rule with multiple nested actions) bypassed the `_check_sign_template_conflicts` constraint. Because the constraint only queried the database for existing links, it failed to detect conflicts within the in-memory batch, allowing the save to succeed and causing silent role overrides. This commit introduces an intra-batch check to the constraint. By tracking requested roles in memory during the loop, the constraint now correctly raises a ValidationError if multiple actions in the same transaction attempt to automate the exact same template roles. A test has been added to ensure batch creations are properly validated. Task: 6128909 Forward-Port-Of: odoo/enterprise#115527 Forward-Port-Of: odoo/enterprise#115062
This update fixes a visual issue where flexible employees (without resource calendars) had blank cells on the Gantt chart. It now correctly displays these employees' time off as greyed-out intervals and accurately calculates progress bar durations based on validated leave hours, rather than defaulting to full periods.
Original PR description
Flexible employees (no resource calendar) had no unavailability intervals computed, leaving all cells white in the Pay Run Time Off gantt. Their progress bar also showed the full period duration (e.g. 744h for a 31-day month) because _get_work_days_data_batch returns 24h/day for calendar-less resources. - Mark the entire gantt interval as unavailable for contract versions with no resource_calendar_id so cells appear grey by default - For flexible employees, compute the progress bar value from their actual validated leave hours instead of scheduled working hours (defaulting to 0h) task-6194344
This update prevents unauthorized users from viewing or modifying assets linked to invoices. Previously, users without the correct access groups could trigger errors, creating a potential security vulnerability. Now, access to assets is restricted to users within specific accounting groups, ensuring data integrity and security.
Original PR description
Only groups `account.group_account_readonly`, `account.group_account_invoice` or higher have access to model `account.asset`, therefore if an user goes to see an invoice with assets and they are not on either group, they will receive an error and won't be able to access said invoice. How to reproduce: - Create a vendor bill - Create an account.asset and link it to said account.move - Go to the form view with an user that it's on group "Purchase: User" for example --> They get a traceback --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#116133 Forward-Port-Of: odoo/enterprise#112890
This update resolves issues with inconsistent tour behavior by refining the triggers used to initiate tours. The changes make tours more reliable and predictable, leading to a smoother user experience. This primarily affects the stability of various Odoo modules during tour execution.
Original PR description
Fix undeterministic tours by making some triggers more precise in a few steps.
This update fixes an issue where helpdesk notification emails incorrectly linked to the company's default website instead of the customer's original website. The change ensures that 'View Ticket' buttons now always direct users to the website where their support request was initially created, improving the user experience and routing accuracy.
Original PR description
On a multi-website / single-company setup, helpdesk notification emails posted after the initial confirmation contained a "View Ticket" button pointing to the wrong website, always the company's…
On a multi-website / single-company setup, helpdesk notification emails posted after the initial confirmation contained a "View Ticket" button pointing to the wrong website, always the company's default website instead of the website the ticket was created from. Steps to reproduce: =================== 1. Create two websites W1 (seq 1) and W2 (seq 2) under the same company, with distinct domains. 2. Create two helpdesk teams with "Submit a Ticket" enabled, each bound to one website (Helpdesk1 -> W1, Helpdesk2 -> W2). 3. From W2, submit a ticket on /helpdesk/helpdesk2. 4. In the ticket, send email from the chatter. 5. Inspect the outgoing notification email. => "View Ticket" button points to W1's domain. Root cause: ============ `helpdesk.ticket` has no `website_id`, so `Base.get_base_url` falls through to `company_id.website_id.domain`, i.e. the first website of the company by sequence. The first confirmation message looked right only because it was posted inside a website request, where `website.get_current_website()` provided the correct context; subsequent agent replies are posted from the ticket with no such context, so the fallback kicked in. Override `get_base_url` on `helpdesk.ticket` to prefer `team_id.website_id.domain` when set, so every notification on the ticket links back to the website the customer submitted it from. => "View Ticket" button points to W2's domain (the site the customer is browsing). opw-6071999 Forward-Port-Of: odoo/enterprise#116034 Forward-Port-Of: odoo/enterprise#114693
This update resolves two issues preventing order validation and report downloads for the l10n_co_edi_pos module. The fix addresses a problem where data was incorrectly formatted during export, causing errors. This ensures reliable POS data generation and reporting for DIAN compliance.
Original PR description
Steps to reproduce: --- - Install `l10n_co_edi_pos` and configure it. - Set the POS Serial Number in the POS configuration. - Open a POS session, create an order, and validate it. Issues: --- 1. A traceback occurs while validating the order. 2. After fixing the above issue, another traceback occurs when downloading the Sales Details report from the backend. Causes: --- 1. During UBL DIAN data generation, the `name` field is overwritten with `pos_order.l10n_co_edi_pos_name`, which can be empty. 2. `l10n_co_edi_pos_serial_number` is accessed on an invalid type (ID/list instead of a recordset). Fixes: --- - Preserve the original `name` if `l10n_co_edi_pos_name` is not set. - Ensure `config_ids` is always a recordset and safely compute serial numbers using `mapped`, joining unique values. task-6051285 Forward-Port-Of: odoo/enterprise#111306
This update automatically refreshes the payment screen when the PIS (Payment Initiation System) status changes. Previously, users had to manually refresh the page to see the updated status, which is now resolved for a smoother payment process. This improves the user experience and ensures accurate payment information.
Original PR description
There were some buttons like sign payment that were visible even when the PIS status was signed which needed a manual page refresh for the update to reflect, now it's reflected automatically on the PIS status change. task-5417365 Forward-Port-Of: odoo/enterprise#116427 Forward-Port-Of: odoo/enterprise#114299
…roup Steps to reproduce: - Set a low value for `prefix_groups_threshold` in account reports so that lines are grouped by prefix (e.g. in databases with large volumes, such as 6k+ lines). - Open a…
…roup
Steps to reproduce:
- Set a low value for `prefix_groups_threshold` in account reports so that lines are grouped by prefix (e.g. in databases with large volumes, such as 6k+ lines).
- Open a report (e.g. Trial Balance or General Ledger).
- Unfold a prefix group.
Issue:
```python
File "/home/odoo/src/enterprise/account_reports/models/account_report.py",
line 5718, in get_expanded_lines_readonly
return self.get_expanded_lines(options, line_dict_id, groupby,
expand_function_name, progress, offset, horizontal_split_side)
File "/home/odoo/src/enterprise/account_reports/models/account_report.py",
line 5707, in get_expanded_lines
lines = self.env[self.custom_handler_model_name]._custom_line_postprocessor
(self, options, lines)
File "/home/odoo/src/enterprise/account_reports/models/account_general_ledger.py
", line 354, in _custom_line_postprocessor
if report._parse_line_id(lines[0]['id'])[-1] ==
('', 'account.report.line', report.line_ids[0].id):
IndexError: list index out of range
```
Cause:
Prefix groups are built based on the displayed line name, which includes
the account code (e.g. "401000 Sales"). However, during unfold, the
filter was applied on `account_id.name`.
As a result, applying a prefix like '4%' on `account_id.name` (e.g. "Sales")
returned no records, leading to empty results and the above crash.
Additionally, prefix grouping could create invalid or meaningless groups
when the extracted prefix character was non-alphanumeric (e.g. spaces or
special characters).
Fix:
- This patch updates the unfold filtering logic to use `account_id.code` when grouping by `account_id`, ensuring that the prefix filter is applied on the correct field.
- Skip non-alphanumeric prefix keys during grouping to avoid generating irrelevant or invalid groups.
opw - 6106726
upg - 3985833This update resolves a problem where DIAN XML files (specifically `AttachedDocument` type) weren't being imported correctly, resulting in lost data. The fix ensures the system correctly identifies the file structure, allowing for accurate parsing and data extraction from these important electronic invoices.
Original PR description
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN…
### Issue: Some DIAN XML files of type `AttachedDocument` are incorrectly imported, resulting in no extracted data This issue only occurs for `AttachedDocument` files According to the DIAN documentation, the `ProfileID` should contain the literal `Factura Electrónica de Venta` https://www.dian.gov.co/impuestos/factura-electronica/Documents/Anexo-Tecnico-Factura-Electronica-de-Venta-vr-1-9.pdf However, no strict validation is enforced, so variants should still be supported ### Cause: When importing a DIAN document of type `AttachedDocument`, `_get_import_file_type()` searches for a node starting with `DIAN 2.1:` This causes issues with documents structured like: ```xml <AttachedDocument> <CustomizationID>Documentos adjuntos</CustomizationID> <ProfileID>DIAN 2.1: Factura Electrónica de Venta</ProfileID> </AttachedDocument> ``` In this case, `DIAN 2.1:` is detected first, causing the file to be identified as `account.edi.xml.ubl_dian` As a result, the `<AttachedDocument>` wrapper is ignored and the importer tries to parse the file using the wrong structure, preventing any data extraction The import should first detect the `<AttachedDocument>` structure, then unwrap and process the embedded document ### Steps to reproduce: - Install `l10n_co_dian` - Go in Bills and import the test document: `import_attached_document_2` Before the fix, nothing it extracted from the xml opw-6083523 Forward-Port-Of: odoo/enterprise#115599
This update resolves a crash issue that occurred when creating Point of Sale (POS) orders with the Avatax module installed. The fix re-introduced a method to correctly identify the customer's shipping information, ensuring order creation stability. This improves the reliability of the POS system for our users.
Original PR description
Before this commit, when pos_avatax was installed, creating a pos order could crash because the pos order does not have the partner_shipping_id field. This commit re-adds the _get_avatax_ship_to_partner method as it was before the refactor https://github.com/odoo/enterprise/commit/0404086db567ee0595414263d36a3b7dceaa0dbe, which returns the partner_id for the pos order. The `_get_avatax_ship_to_partner` is overridden in `pos_avatax`. Since a `pos.order` does not have a `partner_shipping_id`, the overridden function only reads the partner_id. opw-6122280 Forward-Port-Of: odoo/enterprise#115840
This update resolves two issues preventing proper validation of POS orders and successful download of Sales Details reports for the l10n_co_edi_pos module. The fix ensures correct data generation during UBL DIAN export and prevents errors related to data type mismatches, improving the reliability of the POS reporting process.
Original PR description
Steps to reproduce: --- - Install `l10n_co_edi_pos` and configure it. - Set the POS Serial Number in the POS configuration. - Open a POS session, create an order, and validate it. Issues: --- 1. A traceback occurs while validating the order. 2. After fixing the above issue, another traceback occurs when downloading the Sales Details report from the backend. Causes: --- 1. During UBL DIAN data generation, the `name` field is overwritten with `pos_order.l10n_co_edi_pos_name`, which can be empty. 2. `l10n_co_edi_pos_serial_number` is accessed on an invalid type (ID/list instead of a recordset). Fixes: --- - Preserve the original `name` if `l10n_co_edi_pos_name` is not set. - Ensure `config_ids` is always a recordset and safely compute serial numbers using `mapped`, joining unique values. task-6051285 Forward-Port-Of: odoo/enterprise#111306
# How to reproduce - Install the l10n_hu_edi module - Switch to a Hungarian company - Enable a currency (e.g., EUR) and configure two different exchange rates on two different dates - Create a new…
# How to reproduce - Install the l10n_hu_edi module - Switch to a Hungarian company - Enable a currency (e.g., EUR) and configure two different exchange rates on two different dates - Create a new invoice with : - Delivery Date: One of the configured date - A line with a price unit and a tax - Save the invoice - Edit the invoice : - Delivery Date : The other configured date - Change the price unit of the line - Save the invoice # The problem The taxed amount total is using the old price unit # Cause ## TLDR This commit (https://github.com/odoo/odoo/pull/225407) made it so we recompute the tax when the currency is changed with round globally. This recomputation is based on the old tax values, so it should not be done when editing the base lines in the form view. To prevent this, a condition checks that the invoice date was not changed (which should be the only way to change the currency rate from that view if I understand correctly). Sadly, the l10n_hu_edi module changes this behavior and makes it so the currency rate is also recomputed when the delivery date changes ## Detailed analysis In the write() method of an account_move, we try to determine `round_from_tax_lines`. Before, in the situation where a base line is modified, it was computed here : https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L3032-L3049 In our use case, `round_from_tax_lines` would then equal to `False` But, this commit (https://github.com/odoo/odoo/pull/225407) added the following condition that made it so in our use case, `round_from_tax_line` is trucy : https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L3029-L3031 That value is then used right after in the computation of the tax line values : https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L3061 Since `round_from_tax_line` is trucy, we pass the tax_lines to the `_round_base_lines_tax_details()` function https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L1638 Which calls the `_round_tax_details_tax_amounts_from_tax_lines()` function. That function changes `base_lines["tax_details"]["tax_data"]` `tax_amount` and `tax_currency` based on the tax_lines `balance` and `amount_currency` https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_tax.py#L2143-L2144 Except, those tax_lines values are the values of the current tax_lines, not the updated one. So they use the `balance` and `amount_currency` values of before the write https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L1631-L1632 `base_lines["tax_details"]["tax_data"]` is later used to define `tax_rep_data` https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_tax.py#L2437-L2452 Which is then used to determine `base_lines_to_update` https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_tax.py#L3074-L3080 Nevertheless, this issue is quite niche because the condition to assign `round_from_tax_lines` checks that the invoice date has not changed, which would be the only way to edit the currency rate and the base lines at the same time https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/account/models/account_move.py#L3029 Except that the l10n_hu_edi module defines an override to recompute the currency rate when the delivery date changes https://github.com/odoo/odoo/blob/262088c98673a342aa0ccdd70465e3be6bcb2439/addons/l10n_hu_edi/models/account_move.py#L128-L130 # Proposed solution Since the tax recomputation is done using the values before the write, we never want to do it if the base lines have changed. Editing the condition of the commit that introduced the issue would not be enough because any module can ask for a currency rate recomputation for any reason. Because of this, we should do the tax recomputation only if the base_lines have not changed. opw-5800521 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update corrects a flaw in how Odoo retrieves online transactions. Previously, it only fetched transactions from the last sync date, potentially missing transactions before that date. Now, the system prioritizes the specified start date first, ensuring a more complete and accurate retrieval of online transaction data.
Original PR description
When you want to find missing transactions, you have to put a starting date. But we don't use this starting date to find the last statement line, we only use the last sync date, which is wrong, because if the last sync date is after the starting date, the online transaction identifier will have the wrong date. It means we will only fetch the transactions from last sync date to today. This commit makes sure we take the start date first if it exists, then the last sync date. task-6197277
This update automatically creates new bank accounts when importing data through the Italian EDI system. Previously, only contact and IBAN information was logged, requiring manual creation by the accountant. Now, the system will create the bank account, assign it to the correct customer, and mark it as untrusted.
Original PR description
The Italian EDI import didn't create new bank account by itself. IBAN info was just logged in the chatter, leaving it up for the accountant to create the bank account record. The bank account should be created and assigned to the corresponding commercial partner and set to not trusted yet. Enterprise PR: odoo/enterprise#112794 Task [link](https://www.odoo.com/odoo/project.task/6046189) task-6046189
This update corrects a technical issue preventing proper access controls within the appraisal system. The previous rule was incorrectly configured, leading to potential security vulnerabilities. This fix ensures that appraisal access is managed correctly, aligning with security best practices.
Original PR description
Before this commit, the rule `hr_appraisal_emp_rule_delete_new` was wrongly addressing the target permissions, not setting "False" where it should have though the default value is True. task-6201148
This update significantly speeds up the process of finding BOMs for product records. The change optimizes how the system searches for related BOMs, reducing search times by orders of magnitude. This improvement enhances overall system performance and responsiveness, particularly when dealing with large product catalogs.
Original PR description
Before this commit, finding a bom for a recordset of `products` involved looping over all the boms and it will loop over all the `product_variant_ids` of `bom.product_tmpl_id` if the bom's…
Before this commit, finding a bom for a recordset of `products` involved looping over all the boms and it will loop over all the `product_variant_ids` of `bom.product_tmpl_id` if the bom's `product_id` is NULL. This approach might loop over variants which we are not trying to find a bom for. In additon to that, due to the fact that multiple boms might have the same `product_tmpl_id`, this approach might consider the same variants in the inner loop redundantly even though we matched the variant with a bom in a previous itration.
Worst case, this might result in a time complexity of $O(N * M)$ where N is the number of boms and M is the number of variants.
To improve the performance, I only considered the variants given in the paramater `products` and in addition to that, I created a new dictionary mapping a `product_tmpl_id` to its bom if the bom doesn't have a variant set. By doing this, I can loop over the `products` given and if it doesn't have a bom set then it will be set to the one its template had taken from the previos loop.
In a method call with the following constraints
- **2** products the method was finding a bom for
- The 2 products had the same template and the template contained **550** active variants
- The boms were only related to the template rather than the variants themselves.
| Input Size | Before | After |
| :--- | :--- | :--- |
| 100 | 0.78s | 0.03s |
| 1000 | 8.53s | 0.11s |
| 10000 | 80.99s | 0.73s |
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where taxes were incorrectly assigned to the wrong company due to a change in how the system cached tax information. The fix ensures that taxes are now correctly linked to the specific company they belong to, improving data accuracy and financial reporting. This was identified and resolved as part of a broader effort to maintain data integrity.
Original PR description
Details and steps to reproduce are in Issue #262709 Cause: In #248680 the cache was changed to be global (per cr), meaning it is shared across companies. We need to partition the cache by company_id to prevent the assignment of taxes from the wrong company. OPW-6189579
This update fixes an issue where imported invoices were incorrectly using Swiss tax rates even when the invoice was for a Belgian customer. The change ensures that the correct tax rate is applied based on the invoice's fiscal location, resolving a data accuracy problem and preventing incorrect tax calculations. This improves the reliability of vendor bill imports.
Original PR description
**Steps to reproduce:** - Create a company in Belgium and set the fiscal localisation accordingly. - In the same company, create a fiscal position in Switzerland, set the foreign tax ID and then generate the taxes for it. - Install the module account_edi_ubl_cii. - Create and invoice for a belgian customer, with one product line having a 0% tax. - Export the invoice as XML. - Go to taxes, filter by purchase, and make sure that the 0% switzerland tax has a higher sequence than the belgian 0% tax. - Import the previous invoice XML as a vendor bill. **Issue:** After importing the bill, the switzerland tax is used even though the fiscal localisation is belgian, which is wrong as it violates the constraint _validate_taxes_country **Solution:** Added a more selective domain to _import_fill_invoice_line_taxes opw-5467936 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255848
This update fixes an issue where the sale average price calculation was incorrect due to handling tax-inclusive and tax-exclusive prices on invoices. Now, the sale average price always uses the net amount (price_subtotal) after discounts, ensuring accurate reporting and pricing. This improves the reliability of sales data.
Original PR description
The price_unit of a account.move.line can be with or without tax. The sale_avg_price should be either incl. or excl. tax. To ensure the avg price is always excl. tax the price_subtotal can be used. Forward-Port-Of: odoo/odoo#225869 Forward-Port-Of: odoo/odoo#199209
This update resolves a checkout issue that prevented portal users with AvaTax tax exemptions from completing purchases with discounts. The problem stemmed from a tax recalculation error during the payment process. This fix ensures accurate tax calculations and allows users to successfully complete transactions with discounts and AvaTax integration.
Original PR description
Steps to reproduce: - Activate AvaTax in db - Configure a discount for a product in Discount & Loyalty - Log in as a portal user that has a tax exemption set in the AvaTax portal (Avalara) - Add the product with the discount to your cart - Try to check out Current Behavior: - You can't check out due to validation error Expected Behavior: - You can check out Clarification: You are currently unable to checkout under these conditions because when you hit pay, the final check does not recompute taxes which will lead to a mismatch and thus an error opw-5285825
This update improves the speed of exporting the general ledger to an Excel file in version 17. The change eliminates unnecessary calculations within the export process, significantly reducing the export time from over 900 seconds to just 22.4 seconds. This results in a faster and more efficient reporting experience.
Original PR description
**Description:** In version 17, when we export the general ledger to an xls file, we now iterates over accounts fetched with `_get_accounts_with_move_lines` and perform a sum of the related amls balance, credit and debit. Source of this change: [103329](https://github.com/odoo/enterprise/pull/103329) Those sums are calculated through an SQL query built in `_get_query_sum`. However, it's currently inefficient because the query also computes the unaffected earnings of the company on each iteration, even though that information in only meant to be used if the account_type = 'equity_unaffected' in `_query_values`. **Benchmark:** | accounts | amls | before | after | |:---|:---|:---|:---| | 696 | 2819556 | >900s | 22.4s | **Reference:** opw-5904527