Daily updates from Odoo
Friday, June 12, 2026
65 changes · saas-19.2
Resolved issues and error corrections
This update corrects a technical oversight during a recent port of code. Unnecessary code was inadvertently left in the l10n_pe_reports module, which has now been removed. This ensures the reporting functionality continues to operate correctly within the Odoo Enterprise system.
Original PR description
During the FW port of https://github.com/odoo/enterprise/pull/117891 We forgot to remove the unnecessary code opw-5978673 Forward-Port-Of: odoo/enterprise#120183
A technical issue preventing the 'See employee progress bar' tour from running correctly has been resolved. The fix addresses a dependency on a specific module installation and ensures the necessary steps are completed before checking progress bars, improving tour reliability.
Original PR description
The tour relied on the chatter loading to know when the page was done loading. Unfortunately, the chatter on that model is only added if planning_field_service is installed, so the test fails in single module installs. The "See employee progress bar" then failed because some employees do not have an email adress but we do not close the employee_no_email_list_wizard modal before checking the progress bars. We now click on action_send before the failing step. runbot-938958
This change reverts a recent update that caused picking confirmation emails to fail when guest contacts were archived. Archiving guest contacts automatically filters them from order systems, preventing related email notifications. This reversion ensures that picking confirmation emails are sent correctly, maintaining accurate order tracking.
Original PR description
Archiving guest contacts upon SO validation breaks mail confirmations for related pickings. When a guest contact is archived, the ORM automatically filters it out from any search…
Archiving guest contacts upon SO validation breaks mail confirmations for related pickings. When a guest contact is archived, the ORM automatically filters it out from any search https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/odoo/orm/fields_relational.py#L673-L677 As a result, the partner is silently dropped from the `partner_ids` Many2Many on the mail composer even though we do write it https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/addons/mail/wizard/mail_compose_message.py#L538-L539 and the picking confirmation email is never sent. A potential fix would have been to disable this filtering at the ORM level but that would have impacted any flow that relies on archived partners being excluded. This reverts commit 3a20ff382d164f05d3d6b66e94318ed80aaa41cc. This reverts commit 64d9ded9637286ef0cfd9e65ba7c60d4f48d6c16. This reverts commit ef10f93b77263836815034e15bae6cddbd38c4f9. opw-6232937 Forward-Port-Of: odoo/odoo#268568
This change prevents email confirmations for related pickings when guest contacts are archived during sales order validation. The system silently removes archived guest contacts, disrupting the email notification process. We've reverted a previous change to ensure pickings are correctly notified, maintaining reliable order fulfillment communication.
Original PR description
Archiving guest contacts upon SO validation breaks mail confirmations for related pickings. When a guest contact is archived, the ORM automatically filters it out from any search https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/odoo/orm/fields_relational.py#L673-L677 As a result, the partner is silently dropped from the `partner_ids` Many2Many on the mail composer even though we do write it https://github.com/odoo/odoo/blob/e8a372b71dc91a3e3649e572380f59ee648c5bdc/addons/mail/wizard/mail_compose_message.py#L538-L539 and the picking confirmation email is never sent. A potential fix would have been to disable this filtering at the ORM level but that would have impacted any flow that relies on archived partners being excluded. This reverts commit 5616a5bbf78c4a50b412a57609c5ff50b80b854d. opw-6232937 Forward-Port-Of: odoo/enterprise#119563
This update optimizes how the standard price of products is calculated in stock moves. Previously, a complex and slow process was used, but now a faster, more accurate method is implemented. This improves overall system performance and ensures more reliable product valuation.
Original PR description
When validating a stock move, we recompute the product's `standard_price` using a strategy that depends on the costing method: - Standard: no update - AVCO: replay the full history of `stock.move` since the last `product.value` - FIFO: fetch remaining `stock.move` records to find the stack and recompute the average from their remaining value and quantity For both FIFO and especially AVCO, this is costly and in most cases unnecessary. Instead, we can compute the new `standard_price` incrementally by adding the incoming value and quantity to the current ones. This is fast because `standard_price` is stored and `qty_available` is based on `stock.quant`. The new price is computed as: new_price = (previous_qty * std_price + added_value) / new_qty_available Forward-Port-Of: odoo/odoo#267598 Forward-Port-Of: odoo/odoo#264165
This update resolves an issue where delivery orders for serial-tracked products could be completed without recording the necessary serial numbers. The change ensures that when a user removes all serial numbers from a move line, the delivery order must still include a quantity, preventing incomplete deliveries. This improves data accuracy and compliance.
Original PR description
Writing both `quantity` and `lot_ids` on a tracked move in the same form save leaves `move.quantity` stored at the user value while `_set_lot_ids` unlinks the remaining move line; the picking can then be validated to 'done' with no serial recorded. Force `_compute_quantity` at the end of `_set_lot_ids` so the stored value stays in sync with the move lines. Steps to reproduce: - Serial-tracked product, 6 in stock - Create a delivery order for 6 units of that product - In the delivery form, on the move row: type "1" in Quantity and remove all 6 lots from the Serial Numbers widget. - Save, Validate Before: picking goes to Done with quantity=1 and no serial. After: clear UserError, quantity stays in sync with mls. opw-6192841 Forward-Port-Of: odoo/odoo#266632 Forward-Port-Of: odoo/odoo#266394
This update streamlines the process of loading contract templates by simplifying a key component. Previously, the loading button triggered unnecessary database queries due to its complex extension of a selection field. This change improves performance and stability.
Original PR description
It was found that the Load Contract Template button was doing database calls with no domain. This was due to it extending Selection Field, seeing that it doesn't use anything from SelectionField except the props, we've decided to make it a simple Component. task-6259618 Forward-Port-Of: odoo/odoo#268825
This update optimizes how the system checks access rights when opening the reconciliation widget, particularly when processing multiple lines at once. Previously, the system was slow due to inefficient batch processing, leading to delays. This change improves the overall speed and responsiveness of the reconciliation process.
Original PR description
When assigning a value in batch, the ORM doesn't manage to batch the call to `check_access` done in `write_batch`/`write_real` because each write is done individually when setting a value in the compute function. This field is especially annoying because it is read when opening the reconciliation widget on several lines. Forward-Port-Of: odoo/odoo#269187 Forward-Port-Of: odoo/odoo#269063
This update fixes an issue where a second stock valuation entry was created when a repair order was finished and then a quotation or invoice was generated. The fix ensures that only one valuation entry is created for a product linked to a repair order, streamlining accounting processes and preventing potential discrepancies.
Original PR description
When finishing a repair order a stock valuation entry is created for the product used. If you then make a quotation and invoice it another stock valuation entry would be created for the same product.…
When finishing a repair order a stock valuation entry is created for the product used. If you then make a quotation and invoice it another stock valuation entry would be created for the same product. Steps to reproduce: ------------------- * Create a category using FIFO and real time valuation * Create a product using this category and set it's cost to 5€ * Set some on hand quantity for the product * Create a repair order and add the product with the "Add" option * Finish the repair order > Observation: At this point you should have a valuation entry in the accouting app * From the repair order create a quotation and invoice it > Obesrvation: If you check the accounting entries again you will see a second valuation entry Why the fix: ------------ When checking if the line is eligible for valuation we make sure that if it is linked to a repair order, this repair order should not have any accounting entries linked to it. opw-5429996 Forward-Port-Of: odoo/odoo#254468
This update resolves an issue where PDF links within the Odoo viewer were not functioning correctly. The fix adjusts the layering of elements to ensure clicks are properly directed to the PDF links, improving the user experience when viewing documents with internal and external links. This ensures documents are fully navigable.
Original PR description
Version - 18.0 Steps to reproduce: 1. Upload a PDF document containing bookmarks and internal/external links 2. Open the document 3. Click on the links, some work and some do not Issue: `canvas_layer_0` is positioned over the PDF viewer with `z-index: 1`, intercepting clicks intended for PDF link annotations and making internal/external links unresponsive. The `.textLayer` already has `z-index: 2 !important` in iframe.css to prevent the same problem for text selection Fix: Added `z-index: 2 !important` to `.annotationLayer section` in `iframe.css` raising it above `canvas_layer_0`. Taskid = 6237688 Forward-Port-Of: odoo/enterprise#118040
This update fixes an issue where currency rates from the Bank of Mexico were incorrectly displayed. The change shifts the rate date by one day to align with the bank's daily reporting, ensuring accurate financial data within the Odoo Enterprise system. This prevents discrepancies in currency conversions.
Original PR description
banxico fetches the rates applied on the previous day, when we introduced using previous day's currency rate (here: https://github.com/odoo/odoo/pull/231948), we broke their logic. shift the rates date by one day to account for the change. task-6264708 Forward-Port-Of: odoo/enterprise#118999
This update ensures that tax details are now correctly included in the test orders sent to UrbanPiper. Previously, these details were missing, leading to issues with testing. This change resolves a technical problem that ensures accurate order data is transmitted for integration with the UrbanPiper system.
Original PR description
Commit 1: ======== Before this commit: =================== - Test orders sent to UrbanPiper did not include tax details for order items. After this commit: ================== - Tax details are now included in the order item payload of test orders. Task-6013007 --- Commit 2: ======== Cause: ====== In the `without demo` environment, the discount product does not have any `taxes_id`, causing the test assertion to fail. Fix: ==== Set a tax on the discount product in the test to ensure the same behavior in both `with demo` and `without demo` environments. Error-241138 Forward-Port-Of: odoo/enterprise#120126 Forward-Port-Of: odoo/enterprise#109958
A recent update removed the duplicate and delete buttons from the page properties dialog in the website settings. This fix corrects a technical issue caused by a renaming of a configuration property, ensuring these essential buttons are now available again. This restores a previously functioning feature.
Original PR description
Steps to reproduce: 1. Go to Website. 3. Open the page properties dialog of any static page. Issue: The duplicate and delete page buttons are missing from the page properties dialog, although they were available until version 19.0. Cause: After the changes introduced in [1](https://github.com/odoo/odoo/pull/220325/changes), the `buttonTemplate` prop was renamed to `buttonDialogTemplate`. However, this new prop was not handled in the page properties dialog, causing the buttons to disappear. task-6171493 Forward-Port-Of: odoo/odoo#262951
This update fixes an issue where invoices for French public entities in overseas departments (DROM) like Martinique were incorrectly formatted for Chorus Pro. The system was defaulting to VAT numbers instead of the correct SIRET, preventing proper invoice routing. This ensures accurate data transmission and compliance with Chorus Pro requirements.
Original PR description
When invoicing a French public entity through Chorus Pro, the SIRET of the recipient was written in the UBL PartyIdentification only when the partner country was France (country_code == 'FR'). Partners located in a DROM (overseas department/region) have a real French SIRET too, but their ISO country code failed the check, so the SIRET was dropped and replaced by the VAT number. This cause the invoice to not be routed correctly in Chorus Pro. Steps to reproduce: - Setup a french company and connect it to Peppol - Create a customer for a public entity located in Martinique, with its SIRET, Peppol address 0009:11000201100044 (Chorus Pro SIRET) and BIS Billing 3.0 format. - Issue and send an invoice to this customer via Peppol. - Open the generated *_ubl_bis3.xml: AccountingCustomerParty PartyIdentification/ID holds the VAT instead of the SIRET, and Chorus Pro never receives the invoice. opw-6153868 Forward-Port-Of: odoo/odoo#269364 Forward-Port-Of: odoo/odoo#268519
This update modifies error codes within the l10n_fr_reports module, specifically removing error messages related to subscription checks. As a result, all errors from this area will now display as internal errors, without providing detailed information. This change simplifies error handling internally.
Original PR description
This commit: https://github.com/odoo/enterprise/commit/23afa6f2520a676dcb4cd94867065f1be03708bc change a bit the error codes but removed the ones from the check subscription. By doing so, all the error from that wrapper will give an internal error, and no other info on the error. no task id
This update corrects a misleading warning message displayed in the Expense settings related to Stripe issuing. The system now accurately checks if a company's country supports Stripe issuing based on its fiscal country ID, ensuring users receive the correct information. This improves the user experience and prevents unnecessary confusion.
Original PR description
In the Expense settings, under 'Expense Card', the warning 'Stripe issuing is not yet supported for your localization' was displayed when the checkbox 'Expense Card' was unchecked, even if the stripe issuing is supported by the current localization. We now use the fiscal country id of the company to check if the company's country supports stripe issuing. task-6253582 Forward-Port-Of: odoo/enterprise#118654
This update resolves an issue causing tracebacks in Firefox (Gecko-based browsers) when loading assets within iframes used in mass mailing operations. The fix prevents errors from propagating when iframes are unexpectedly removed from the page, ensuring a smoother user experience for Odoo users on Firefox.
Original PR description
Loading assets bundles into an iframe requires the iframe to be connected (present in the DOM) at time of insertion. However, it can happen that iframes are removed from the DOM before all their…
Loading assets bundles into an iframe requires the iframe to be connected (present in the DOM) at time of insertion. However, it can happen that iframes are removed from the DOM before all their assets have loaded in. In these instances, errors from failed bundle loads will turn into tracebacks. This is generally not an issue in Chromium-based browsers as iframes do not fire a load event if they are disconnected; however, in Gecko-based browsers, this can happen. As such, mass_mailing users using Firefox currently receive a systematic traceback, as the CSS file "mass_mailing.assets_inside_builder_iframe.css" will not load. Steps to reproduce: - Use Firefox (or a Gecko-based browser) - Open a new mailing - Select the Events theme and make an edit (add a space...) - Save the mailing - Wait for 23 seconds The bug may be non-deterministic. Fix: Errors during the iframe load process will no longer bubble up if their iframe is disconnected when the error occurs. task-6293998 Co-authored-by: Damien Abeloos <abd@odoo.com> Forward-Port-Of: odoo/odoo#269324
This update ensures that all users, even those without HR access, see their employee avatar in the timesheet grid view. Previously, a placeholder image was shown. The fix addresses a restriction in accessing the employee data model, now retrieving images from a public version for broader visibility.
Original PR description
Steps to reproduce: ------------------- - Install the hr_timesheet module - Create a user without HR access rights - Create a timesheet - Log in with the above user - Open the kanban view Issue: ------- Instead of showing the employee's avatar, a placeholder image is displayed. Reason: ---------- The user does not have access to the hr.employee model. Fix: ----- In this commit, if the user does not have access to hr.employee,we fetch the image from the hr.employee.public model. task: 4461272 Forward-Port-Of: odoo/enterprise#120165 Forward-Port-Of: odoo/enterprise#83574
This update fixes an issue where both failed and passed units were incorrectly moved to the same quality control location. The fix ensures that only the units with unmet demand are moved to the failure location, preventing unintended consequences and improving the accuracy of quality control processes. This resolves a discrepancy in how the system handled partial QC failures.
Original PR description
Version: ---------- - 18.0+ Steps to reproduce: ------------------- 1. Install *quality_control* module. 2. Go to *Settings* and enable *Storage Locations*. 3. Open Quality module go to the Quality…
Version:
----------
- 18.0+
Steps to reproduce:
-------------------
1. Install *quality_control* module.
2. Go to *Settings* and enable *Storage Locations*.
3. Open Quality module go to the Quality control -> Quality points
4. Create a *Quality Point* with:
* *Product* set.
* *Control per* set to *Quantity*.
* *Operation* set to *Receipts*.
* *Failure Location* set to *WH/Stock/Shelf1*.
5. Create a *Receipt* with demand of *2 units* for the product used in QP.
6. Mark the quality check as *To Do*.
7. Update the *Done Quantity* to *1*.
8. Open the quality check and click *Fail*.
9. Update the *Done Quantity* back to *2* and save.
10. Open the quality check again, click *Pass*, and validate the receipt.
11. Open the *Detailed Operations* to inspect move lines.
Issue:
------
* Both units (failed and passed) are moved to the *failure location*.
Cause:
------
When a user fails a move line via the QC wizard, the flow is:
do_fail() → show_failure_message() → confirm_fail()
→ check._move_to_failure_location(failure_location_id, failed_qty)
Inside `_move_to_failure_location`, when `failed_qty == move_line.quantity`,
the condition:
https://github.com/odoo/enterprise/blob/a33f580455a54a81d89a848f7b493d9dcc9ba2b2/quality_control/models/quality.py#L458
e.g. 1 == 1
was True even when `move.product_uom_qty = 2` (demand still 2). It only
compared the done quantities, ignoring that unfulfilled demand remained.
As a result, `move.location_dest_id` was set to the failure location.
Later, when the user increases the quantity from 1 to 2 on the move form,
the flow is:
_set_quantity → process_increase → _set_quantity_done → _prepare_move_line_vals
In `_prepare_move_line_vals` :
'location_dest_id': self.location_dest_id.id,
https://github.com/odoo/odoo/blob/47bf284e1e9d8be0d4255418e0a3f67c74fa5114/addons/stock/models/stock_move.py#L1688
The new move line inherits `move.location_dest_id` directly, which at this
point is already the failure location.
When the user then calls `do_pass()` on the second unit, `do_pass()` only
writes `quality_state = 'pass'` and never touches `location_dest_id`. So
the second (passed) move line silently retains the failure location.
Solution:
---------
Add the guard `move.product_uom_qty <= move_line.quantity` to the condition
so the entire move's destination is only redirected when there is genuinely
no remaining unfulfilled demand:
When demand > done qty, the else-branch runs instead: it reduces the
original move's demand and creates a new separate move pointing to the
failure location, leaving the original move's `location_dest_id` pointing
to stock. Any subsequent move lines created on the original move therefore
correctly inherit the stock destination.
---
opw-6080871
Forward-Port-Of: odoo/enterprise#120175
Forward-Port-Of: odoo/enterprise#112859This update fixes an issue where the shop floor displayed component quantities with excessive decimal places, leading to inaccurate readings. The fix addresses a floating-point calculation error that occurred when processing multiple lot numbers, ensuring more precise and reliable quantity displays.
Original PR description
**Issue** In the shop floor, floating-point values may display excessive decimals. **Steps to reproduce** - Create a BoM for a product, with a component tracked by lots - Set the component to be…
**Issue** In the shop floor, floating-point values may display excessive decimals. **Steps to reproduce** - Create a BoM for a product, with a component tracked by lots - Set the component to be consumed in a work order operation - Create several lots for the component, per ex 2: - LOT01 with 16.528 units - LOT02 with 10,000.00 units - Create an MO for 220.800 units of the finished product - Click on the shopfloor icon - Click to register the component consumption for the component. - Choose the first lot - Then choose the remaining units from the second lot -> This will display the quantity consumed as 220.79999999999998, even if the decimal accuracy is set to only 2 digits. **Cause** Since, there are 2 `moveLines`, one for each lot, the getter `quantityDone` add 2 floating point together: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L63-L69 inducing a floating-point precision error. The result is rendered directly in the XML template: https://github.com/odoo/enterprise/blob/d7ab7ee1287342638006e290ede20b955aae8370/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.xml#L8-L14 without rounding. opw-6243804 Forward-Port-Of: odoo/enterprise#118976
This update ensures that prices displayed in the self-order mobile interface match the prices shown on product pages, resolving a previous issue where prices varied based on the order's fiscal position. The fix aligns self-order pricing with standard order calculations, guaranteeing accurate pricing and tax calculations for takeout orders. This improves the customer experience and data consistency.
Original PR description
Self-order showed one price on product cards / product page and another after adding to the order, when a preset fiscal position (e.g. take-out) changed taxes. The UI used template-only pricing and…
Self-order showed one price on product cards / product page and another after adding to the order, when a preset fiscal position (e.g. take-out) changed taxes. The UI used template-only pricing and sometimes skipped fiscal position on tax computation. Steps to reproduce: ------------------- * Create a fiscal Position (e.g. takeout) * Create a Taxe for that Fiscal Positions replacing the default Taxe (e.g. 0%) * Create a pricelist with a formula increasing the price by the same % as default Taxe (e.g. 15%) * Enable Self-Ordering for a Restaurant * In the takeout Presets, set our Pricelist and Fiscal Positions * Open the Mobile Menu of the Restaurant and add a product that has variants (e.g Pizza VG) > Observation: Price on product selection is different from price in cart Why the fix: ------------ We now make self-order use the same rules as an actual order: default variant for template-only display, pricelist from pos.order first (what setPreset and the session already maintain), fiscal position from the order or the preset everywhere taxes are derived, and correct tax inputs on the product page (price, pricelist, fiscalPosition, variant). Order line tax preparation now uses that same order-or-preset fiscal position, so remapped taxes apply to lines the same way they apply to the prices shown while browsing. opw-6120097 Forward-Port-Of: odoo/odoo#261535
This update resolves an assertion error related to product names in inter-company sales orders. The issue stemmed from a recent addition of product attributes within the purchase module, which caused name discrepancies across different Odoo apps. This fix ensures consistent product naming during sales and purchase processes.
Original PR description
**Step to reproduce** Reproducible in single app The "name" field make this assertion fails: ``` self.assertRecordValues(sale_order.order_line[0], [{ "product_id":…
**Step to reproduce**
Reproducible in single app
The "name" field make this assertion fails:
```
self.assertRecordValues(sale_order.order_line[0], [{
"product_id": no_variant_product_tmpl.product_variant_id.id,
"name": 'No Variant\nAttribute: Value 1',
```
**Observation**
The name will not be the same depending which app are installed, purchase_product_matrix, changes the name of the product if there is a attribute value of a never variant: https://github.com/odoo/odoo/blob/f399f99d4e0e562d25e1de32336e8d6a55199b9b/addons/purchase_product_matrix/models/purchase.py#L168-L174 Which will be passed to the purchase_order_line:
https://github.com/odoo/odoo/blob/f399f99d4e0e562d25e1de32336e8d6a55199b9b/addons/purchase/models/purchase_order_line.py#L630-L634 that will pass the information to the sale order:
https://github.com/odoo/enterprise/blob/bce04ce24b66fb1a2481274eb3aebdc30a62766e/sale_purchase_inter_company_rules/models/purchase_order.py#L114 https://github.com/odoo/enterprise/blob/bce04ce24b66fb1a2481274eb3aebdc30a62766e/sale_purchase_inter_company_rules/models/purchase_order.py#L125-L126
**Additional information**
Since this [commit](https://github.com/odoo/odoo/commit/b8ebb26553f8170061debc7532606fd4777f0fcd#diff-5684edced9bdfc98021a85de4c6cdf691ea7add74e56ab50334a1d7db9ef4224R90) product_no_variant_attribute_value_ids was directly added in the purchase module.
breaking commit : https://github.com/odoo/enterprise/commit/bf286a0005b8e22ffa717419cd2dfacff861a265
runbot-242362
Forward-Port-Of: odoo/odoo#268016This update resolves an issue where payments with tips after payment were incorrectly marked as 'cancelled' in Stripe. The fix ensures that payment capture happens correctly after the tips are processed, preventing disruptions in the payment flow. This improves the reliability of tip processing during terminal payments.
Original PR description
Currently when using a stripe terminal and the tips after payment feature the transaction is marked as cancelled while the transaction is marked as uncapured on stripe. Steps to reproduce:…
Currently when using a stripe terminal and the tips after payment feature the transaction is marked as cancelled while the transaction is marked as uncapured on stripe. Steps to reproduce: ------------------- * Set up terminal payment (using SIMULATOR works) * Enable tips after payment feature * Open restaurant * Make an order * Go to payment screen, select stripe * Scan card (with simulator everything is automatic) > Payment line is marked as cancelled Why the fix: ------------ After this commit https://github.com/odoo/odoo/commit/c27deda808660dde89305d574b6d662157d99d16 if `captureAfterPayment` does not return true the status of the payment line will be set to `retry`. However when pos_restaurant_stripe is also installed `captureAfterPayment` can return `undefined` when tips after payment is enabled. https://github.com/odoo/odoo/blob/324df67c099ab18c6fe7c8f77212cf809debf383/addons/pos_restaurant_stripe/static/src/overrides/models/payment_stripe.js#L5-L11 In this case we want to capture later and we expect the pethod to not return anything. In this case we don't want to change the status of the payment line. opw-6223838 Forward-Port-Of: odoo/odoo#268802
This update fixes a display issue where employee holiday availability dates in the internal chat (Discuss) were incorrectly showing the previous day when users were in negative timezones. The fix ensures accurate date display by consistently using UTC time, preventing timezone-related date conversions.
Original PR description
Issue: ---------------------------------------- When in a negative timezone, the "Out of Office until..." text in discuss shows the day before. Steps to reproduce:…
Issue: ---------------------------------------- When in a negative timezone, the "Out of Office until..." text in discuss shows the day before. Steps to reproduce: ---------------------------------------- - Change the timezone of the user to "America/Toronto" for example - Have an employee currently on leave until tomorrow - Open discuss to chat with this employee - The "Out of Office until..." shows today's date Cause: ---------------------------------------- When calling `toLocaleString()` without a timezone specified in the options, the date is converted to local time (in the browser's timezone). Here `persona.out_of_office_date_end` is just a date, `deserializeDateTime()` converts it to a timestamp, so the same day at 0am. Then if the timezone is negative, the timestamp becomes an hour the previous day when calling `toLocaleString()`. The format we give `DateTime.DATE_MED` doesn't include hours, so we just display the previous date. Solution: ---------------------------------------- Add `timeZone:"UTC"` in the options to avoid the timezone conversion. opw-6252040 Forward-Port-Of: odoo/odoo#268886 Forward-Port-Of: odoo/odoo#267479
This update prevents the deletion of Peppol invoices and bills, which previously caused traceability issues. Now, documents are marked as cancelled to maintain a complete history of transactions. This ensures compliance and accurate reporting for Peppol-related activities.
Original PR description
Before this commit, invoices and bills sent via Peppol could be deleted, making traceability difficult. Deletion is now forbidden. Documents are instead kept and marked as cancelled to preserve their history. Task-6107420 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#269352 Forward-Port-Of: odoo/odoo#258897
This update corrects a bug in the POS system's price conversion for test products in Peru. Previously, test products lacked a company assignment, leading to incorrect currency conversions and failing refund checks. Now, the system correctly uses the Peru test company, ensuring accurate prices and proper refund tour functionality.
Original PR description
Description of the issue this commit addresses: The POS frontend converts prices using the product's currency_id. Test products created without a company_id had their currency_id fall back to the main company, causing the 5.10 PEN price to be converted unexpectedly and the l10n_pe_edi_pos refund tour to fail its orderline check. --- Desired behavior after this commit is merged: This commit sets the test product's company_id to the PE test company so its currency_id resolves to PEN. This prevents unintended currency conversion in the POS UI and restores the expected displayed price (5.10) in the refund tour. --- runbot-[242597](https://runbot.odoo.com/odoo/error/242597) Forward-Port-Of: odoo/enterprise#119834
This update resolves an issue preventing users from sending PEPPOL invoices through a branch company without direct access. The fix removes a check that was incorrectly blocking this functionality, allowing for streamlined invoice processing via the parent company. This change ensures branch companies can utilize PEPPOL invoicing as intended.
Original PR description
# How to reproduce - Activate Accounting & l10n_be modules with demo data - Use "BE Company CoA" - Go to Settings > Users & Companies > Companies > "BE Company CoA" > Branches - Create new branch…
# How to reproduce - Activate Accounting & l10n_be modules with demo data - Use "BE Company CoA" - Go to Settings > Users & Companies > Companies > "BE Company CoA" > Branches - Create new branch company - Go to Settings and Enable PEPPOL, then save - Still in Settings, click on "Activate Electronic Invoicing" > Activate Peppol (demo) - Now use the branch company - In Settings, click on "Activate Electronic Invoicing", select "Send from parent company" > Activate Peppol (demo) - Go to Settings > Users & Companies > Users > any user (can be the current one) - Remove the user's access to "BE Company CoA" - Log in as that user if it is not the current one - Create a partner that can receive PEPPOL invoices : - Country : Belgium - Invoice sending : by Peppol - eInvoice format : EU Standard (Peppol Bis 3.0) - VAT : BE0477472701 - Peppol id : Belgian Company Registry - Create an invoice for that partner - Click on Confirm, then Send # The problem You cannot select the "by Peppol" sending method. It has the "(no access)" error attached to it. # Cause The sending method's enable state is computed by : https://github.com/odoo/odoo/blob/c7f05ae216de64d1f8e76e332bc6dd9cf11ce657/addons/account_peppol/wizard/account_move_send_wizard.py#L13 This method runs multiple check to see if the invoice can be send via peppol and one of them calls `_have_unauthorized_peppol_parent_company()` : https://github.com/odoo/odoo/blame/686a0cf67bb1e818baf43309fc94f3f0462097ed/addons/account_peppol/models/res_company.py#L136-L143 This checks that the current user has access to the parent company, which is our exact use case. This specific flow was indeed blocked by the task that introduced branch company PEPPOL invoicing : https://github.com/odoo/odoo/commit/6dd8bc34ba79c14408dc271c19ca7afb0f85fa44 The reason behind this block is in part explained by this comment : https://github.com/odoo/odoo/pull/216864#discussion_r2205047170 But after talking with the Peppol PO, this flow should be allowed # Proposed solution Entirely remove the `_have_unauthorized_peppol_parent_company()` check. After testing, it does not seem we have any access issues to worry about. opw-6080867 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#262523
This update corrects a labeling inconsistency within the purchase module. The 'incoming' button has been updated to 'purchase orders' for improved clarity and user understanding. This change ensures users can easily identify and utilize the correct functionality.
Original PR description
Fix label on incoming purchases smart button. "sales order" -> "purchase orders" Forward-Port-Of: odoo/odoo#261254
This update clarifies the reporting of employee hours by renaming a confusing column from 'Expected Hours' and 'Theoretical Hours' to 'regular hours'. This change ensures that users accurately understand the data being presented, reflecting the actual hours worked and avoiding potential misinterpretations regarding overtime calculations.
Original PR description
The column name "Expected Hours" and "Theoretical Hours" is confusing since it doesn't show the hours that the employee is supposed to work according to their contract, just the number of hours that are not considered overtime. This commit renames the column to better reflect the measure that is shown. task-6123642 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#262230
This update resolves an issue where the account reports audit tour was failing due to a timing problem. The change ensures the tour correctly opens the 'Balances' view by waiting for the Kanban view to be active, preventing premature actions. This improves the overall reliability of the audit tour for users.
Original PR description
The account_reports_audit tour was failing at the "Balances" button step due to a race condition in the preceding steps. In environments with many modules, the "Open the working file" step was triggered prematurely while still on the return checks view, because its selector was too broad. This commit narrows the selector for "Open the working file" to ensure it only triggers once the Kanban view is actually active. [runbot-938920](https://runbot.odoo.com/odoo/runbot.build.error/938920) Forward-Port-Of: odoo/enterprise#118346
This update corrects a previous setting that automatically generated CFDI invoices for all website orders. Now, invoices are only CFDI to public when a customer provides their information through the e-commerce platform, aligning with standard business practices. This change ensures compliance and avoids unnecessary invoice generation.
Original PR description
There is no reason why we would always cfdi to public when creating orders from the e-commerce. When the customer give all their info, the invoice should not be cfdi to public. opw-6180766 Forward-Port-Of: odoo/enterprise#119442 Forward-Port-Of: odoo/enterprise#116061
This update fixes an issue where barcode scanning incorrectly displayed and managed sale order quantities. The fix ensures that quantities are accurately reflected when using lots, preventing backorders and ensuring correct order fulfillment. This improves the reliability of the barcode inventory process.
Original PR description
Currently when user adds adds quantity in barcode using lots it leads to incorrect sale order quantities. ## Steps to replicate: - Install Sales and Barcode (no demo data). - Enable Lots & Serial…
Currently when user adds adds quantity in barcode using lots it leads to incorrect sale order quantities.
## Steps to replicate:
- Install Sales and Barcode (no demo data).
- Enable Lots & Serial Numbers in settings.
- Create Test Product with Tracking by Lots.
- Go to Inventory > Products>Lots & Serial Numbers and create 3 lots for the product.
- Update each lot’s on-hand quantity to 10 from the product page.
- Create and confirm a Sales Order for the product (lines: qty 3 and 2 units).
- Open the delivery in the Barcode app:
- Scan lot 2 > increase qty to 3 using +1 button
- Scan lot 3 > increase qty to 2 using +1 button
- Validate and go to the sale order.
## Observed Behavior:
The sale order delivered quantities are flipped and a backorder is created even though the quantity for the product is satisfied.
## Root cause:
The issue occurs because when a sales order is confirmed, the system defaults to
using lot 1 on the delivery receipt. When a user scans lot 2, the `_processBarcode` function is triggered, which calls `_findLine` at [1] to select the appropriate line on the receipt.
As the loop in `_findLine` iterates through `pageLines` with values like:
```
[{display_name: "Test product", quantity: 3, lot_id: { name: 'lot1' }},
{display_name: "Test product", quantity: 2, lot_id: { name: 'lot1' }}]
```
During the first iteration, `foundLine` is set at [2] for the line with quantity 3 . Since the subsequent if condition is not satisfied, the loop hits the continue block at [3].
On the next iteration, the line with quantity 2 causes `foundLine` to be overwritten at [2], and the continue block is executed again at [3].
This results in the line with quantity 2 being selected as the line to update at the end of the function.
When the user manually increases the quantity to 3, the line that originally required quantity 2 is updated and fulfilled.
Later, when lot 3 is scanned, the line that required quantity 3 is selected for update, and manually increasing the quantity to 2 before validating the order leads to a backorder and causes the delivered quantities to be flipped.
[1]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1335-L1337 [2]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1690-L1699 [3]:
https://github.com/odoo/enterprise/blob/81eaeb4b18d849c644160234def6c69013591abe/stock_barcode/static/src/models/barcode_model.js#L1727-L1729
## Solution:
Avoid grouping lines from different moves unless using batch transfers. This ensures that backorders are not created when the barcode lines are fulfilled.
opw-5423943
Forward-Port-Of: odoo/enterprise#119164
Forward-Port-Of: odoo/enterprise#109032This update fixes an error in the VAT reports for Spanish companies (l10n_es_reports). Previously, withholding tax was incorrectly included in the total VAT calculation. The fix excludes 'retencion' taxes from the VAT total, ensuring accurate reporting and compliance.
Original PR description
Step to reproduce - install `l10n_es_reports` and switch to ES company - create a invoice, add a product, set price = 100 - add two taxes (one should be withholding tax) ex: 21%G and 19%whi - confirm it, total payable is now 100 + 21 - 19 = 102 - open vat Books report for ES, see line for this invoice Observation: - for this invoice, in total vat column, we get 102 value - it should be 100+ 21 i.e 121 as we do not include withholding taxes in total vat Cause: - the query for report used to sum up all the taxes for calculating vat Fix: - excluded tax of type "retencion" in tax summation opw-6082329 Forward-Port-Of: odoo/enterprise#120022 Forward-Port-Of: odoo/enterprise#114137
This update resolves a bug where the AI's search adjustments were incorrectly applied to multiple Odoo tabs. The fix ensures that AI-driven changes are scoped to the originating user session, preventing unintended behavior across different views. This improves the stability and reliability of the AI-powered features.
Original PR description
[FIX] ai: scope AI_ADJUST_SEARCH bus event to originating session The AI_ADJUST_SEARCH handler did not check aiSessionIdentifier, so any browser tab subscribed to the bus would apply the AI's…
[FIX] ai: scope AI_ADJUST_SEARCH bus event to originating session
The AI_ADJUST_SEARCH handler did not check aiSessionIdentifier, so any
browser tab subscribed to the bus would apply the AI's resulting search
to its current view. When the view's model lacked a field referenced in
the response (e.g. an "Active or Queue" filter on stage_id leaking from
a project.task chat into a timesheet view), the view raised a KeyError.
Align it with the four AI_OPEN_MENU_* handlers, which already drop events
from other sessions since https://github.com/odoo/enterprise/commit/d85e17d9ccf70f9cfd51c7d6b2a5b52510807484.
Steps to reproduce:
- Run Odoo with the crm and contacts modules installed
- Open two tabs:
- Tab 1: navigate to CRM and ensure you are in List view
- Tab 2: navigate to Contacts and ensure you are also in List view
- In Tab 1 (CRM), open the Ask AI chat and type "Switch to Kanban view"
- CRM switches to Kanban view as expected
- Bug: Tab 2 (Contacts) also switches to Kanban view along with Tab 1,
even though you did not interact with it
Forward-Port-Of: odoo/enterprise#119325
Forward-Port-Of: odoo/enterprise#118237This update resolves a bug preventing the daily sales report from displaying its title correctly when the Colombian EDI module is enabled. The change ensures compatibility with another report template, and also corrects a previous issue where the report would render without a title when the Colombian module wasn't installed.
Original PR description
The daily report template was replacing `//h2[@id='daily_report_title']` entirely, removing the node from the XML source. This caused `pos_hr.single_employee_sales_report` (a primary template that applies its own xpaths against the same patched base) to crash at compile time since its xpaths could no longer find that node. Switch from `position="replace"` to `position="attributes"` + `position="after"`: the h2 stays in the XML source at all times so pos_hr's xpaths always resolve, while the original title is hidden at render time via t-if when CO EDI is enabled and the Colombian content is inserted as a sibling after it. As a side effect, this also fixes a pre-existing bug where installing the module with DIAN disabled would render the daily report with no title at all. opw-6265637 Forward-Port-Of: odoo/enterprise#119668 Forward-Port-Of: odoo/enterprise#119003
This update fixes an issue where new timesheet entries created from the systray menu were always added to the end of the list, requiring users to scroll to see the most recent entry. The fix reorders entries to display the newest timesheet entry first, improving usability and efficiency.
Original PR description
## Issues When creating a new timesheet entry from the systray menu, that entry is added at the end of the list, which is inconvenient when the list gets long, as it requires to scroll through the entirety of it to see the most recent entry. ## Steps to reproduce 1. Install Timesheets (`timesheet_grid`) 2. Open the systray menu 3. Create two timesheet entries 4. The second (= most recent) entry appears below the first (= oldest) entry ## Cause Since https://github.com/odoo/enterprise/commit/5901619141c81085111f2ee65b54492abf1e324f the entries are sorted based on the create date in ascending orer. This means that the oldest entries appear at the top, and the most recent at the bottom. On top of that, new entries were added at the end of the list instead of the start. ## Test The existing test `Creating a new timesheet places it at the top of the list` was only adding one entry to the list, thus was not properly testing **where** the new entries were added. opw-6284059
This update fixes an issue where Unicode slugs were incorrectly combining characters instead of using separators like hyphens. Previously, `/` characters were silently removed, resulting in shortened URLs. Now, slugs will correctly generate URLs with hyphens, ensuring consistent and accurate URL structure.
Original PR description
After Unicode slug support was introduced in https://github.com/odoo/odoo/commit/926e45aa93ffc3f74fe9bf4ae8f06642976c2ae5, `/`
characters started being silently removed instead of treated as
slug boundaries.
As a result:
"foo/bar" -> "foobar"
while it should instead generate:
"foo/bar" -> "foo-bar"
This restores the previous behavior by treating each non word character
as separators normalized to `-`.
task-6219984
Forward-Port-Of: odoo/odoo#269371
Forward-Port-Of: odoo/odoo#264557This update resolves an issue where thumbnails weren't generated when attaching documents to messages within the composer. The fix ensures that thumbnails are correctly created, improving the user experience when sharing documents. This enhancement provides a more complete and functional composer interface.
Original PR description
When attaching a documents to a message in the composer, the thumbnail was not generated. This commit fix this issue. Task-5096039 Forward-Port-Of: odoo/enterprise#116188
This update fixes an error in the Colombian DIAN invoice processing flow. Previously, the system incorrectly flagged invoices due to a timezone mismatch, causing validation failures. The fix ensures invoices are validated using Bogota local time, resolving the issue and allowing proper DIAN document submission.
Original PR description
**Steps to reproduce:** * Install `l10n_co_edi` module with DEMO DIAN mode enabled. * Go to Accounting > Vendor > Bills and create a new bill. * Select any Colombian partner different from…
**Steps to reproduce:** * Install `l10n_co_edi` module with DEMO DIAN mode enabled. * Go to Accounting > Vendor > Bills and create a new bill. * Select any Colombian partner different from `Consumidor Final`. * Set the invoice date to 6 days in the past. * Select the DIAN Support Documents journal and a product with UNSPSC category. * Confirm the bill and click `Send Support Document to DIAN` after 5 PM Colombia time. **Observed behavior:** * An error is raised stating the issue date cannot be older than 6 days or more than 6 days in the future, even though the invoice date is within the allowed window in Colombia local time. **Cause:** * The date window validation in `_check_move_configuration` used `fields.Datetime.now()` which returns UTC time. Since Colombia is UTC-5, after 5 PM local time the UTC clock has already rolled over to the next calendar day, making a 6-day-old invoice appear 7 days old and failing the validation incorrectly. **Fix:** * Convert the current UTC datetime to the `America/Bogota` timezone and extract its local date before computing the allowed date window. * Compare directly against `move.invoice_date` (a `date` field) instead of using `fields.Datetime.to_datetime()`, keeping the comparison consistent as `date` vs `date`. opw-6011502 Forward-Port-Of: odoo/enterprise#120216 Forward-Port-Of: odoo/enterprise#115256
This update resolves an issue preventing valid vendor bills from being created in the GT accounting system. The system previously restricted document types based on company affiliation, which was incorrect for purchases. This change now allows all legally valid document types for purchase bills, ensuring accurate record-keeping.
Original PR description
Currently, the system restricts fiscal document types for both sales and purchases based on the company’s VAT affiliation, which prevents valid vendor bills from being recorded. **Steps to…
Currently, the system restricts fiscal document types for both sales and purchases based on the company’s VAT affiliation, which prevents valid vendor bills from being recorded. **Steps to reproduce:** - Install the `l10n_gt_edi` module and switch to a `GT company`. - Navigate to Accounting > Vendors > Bills. - Create a vendor bill. - Try to select a document type such as `FPEQ` or `FCAP`. **Observation:** The system hides valid vendor document types (e.g., `FPEQ`, `FCAP`) if they do not match the company’s VAT affiliation. **Root Cause:** At [1], the method `_compute_l10n_gt_edi_available_doc_types` filters document types using the company’s VAT affiliation (`l10n_gt_edi_vat_affiliation`) for all move types. This logic is correct for sales (where the company is the issuer), but incorrect for purchases (where the vendor determines the document type). As a result, valid purchase document types are wrongly excluded. **Fix:** This commit updates the computation logic to: - Apply affiliation-based filtering only for sales (`out_*`). - Bypass the restriction for purchases (`in_*`), allowing all valid document types. This ensures that vendor bills can include any legally valid document type regardless of the company’s affiliation, while preserving the existing restrictions for sales workflows. [1]: https://github.com/odoo/enterprise/blob/7792926504a823590fbbe574a96994002a92fc17/l10n_gt_edi/models/account_move.py#L162-L166 opw-6099863 Forward-Port-Of: odoo/enterprise#120363 Forward-Port-Of: odoo/enterprise#113133
This update fixes an issue where employee out-of-contract payments weren't being correctly deducted when multiple contract versions (amendments) existed for the same employee. The fix ensures that the system accurately calculates worked days across all contract versions, leading to correct payroll deductions.
Original PR description
…rsions on same contract **Steps to reproduce**: - Create a contract version from May 1 to May 14. - Create another contract version starting on May 15, then create an amendment version from May 20. - Generate a payslip for May using the May 20 version. - The employee receives the full monthly wage. The out of contract period (May 1 to May 14) is not deducted. **Reason**: - OUT worked days are linked to the first version of the contract starting on May 15. - When computing the OUT ratio, the system only considers worked days linked to the exact version being processed. - As a result, the May 20 amendment version does not see the OUT worked days and no deduction is applied. **Fix**: - Compute the OUT ratio using the contract start date instead of the current version, ensuring OUT worked days are correctly taken into account across all versions of the same contract. Task: 6259341
This update resolves a crash issue that occurred when users autofilled formulas in the spreadsheet edition. The fix ensures simple `=PIVOT(...)` formulas remain unchanged during autofill, preventing unexpected crashes and maintaining consistent behavior. This improves stability and reliability for users working with pivot tables.
Original PR description
Current behavior before PR: - Autofill on formulas like `=PIVOT(1)` could crash after the refactor in e34c0a3, the new logic tried to process all pivot formulas. - However, simple `=PIVOT(...)` cases do not require any change in formula during autofill. Desired behavior after PR is merged: - Add an early return for pivot formulas that are not `PIVOT.VALUE` or `PIVOT.HEADER`, avoiding unnecessary processing. - Ensure `=PIVOT(...)` formulas remain unchanged during autofill, preventing crashes and keeping behavior consistent. Task: [6158888](https://www.odoo.com/odoo/project/2328/tasks/6158888)
This update resolves an issue where errors occurred during the download of ETA invoices due to incorrect JSON decoding. A previous change introduced a new error type that wasn't being caught, and this fix adds a necessary catch block to ensure smooth invoice processing. This ensures invoices are correctly downloaded and processed.
Original PR description
When we download the ETA invoice PDF, a JSONDecoderError can happen when calling the json() method on the request. This error is properly caught by Odoo : https://github.com/odoo/odoo/blob/7a9a340e0dbac470c4bea3f8ce8a32e55f3e82e6/addons/l10n_eg_edi_eta/models/account_edi_format.py#L58-L60 However, the following commit introduced a monkeypatch to handle errors when the simplejson library is installed : 2435fe76eec1fc4320ef71726fc7f16ece653a32 If we meet the conditions, the original error is replaced by a json.JSONDecodeError which is not caught during the previous process. We propose to add this error to the catch block. This modification was inspired by the commit d483dac144a9caf84c44b9d8d394ea327ca87cfe. opw-6266862 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#268309
This update resolves an issue where the builder sidebar incorrectly displayed "Block" for website snippets. The fix re-injects a key attribute ('data-name') during builder setup, ensuring snippets are correctly identified and displayed with their actual names. This improves the user experience when creating and editing website pages.
Original PR description
\* = website ### Issue: When a page is created either through the configurator or from an existing page template, block-level snippets do not display the correct title in the builder sidebar.…
\* = website
### Issue:
When a page is created either through the configurator or from an
existing page template, block-level snippets do not display the correct
title in the builder sidebar. Instead, "Block" is shown for all
snippets.
### Steps to Reproduce:
- **Configurator:**
1. Install the website module or create a new website from Settings.
2. Complete all configurator steps. Do not use "Skip and start from
scratch".
- **Page template:**
1. Open the website and click the "New" button in the systray.
2. Click on "Page" and choose any template other than a blank page.
### Observed behavior:
The builder sidebar shows "Block" in the option container for all
snippets instead of their actual names.
### Reason:
Previously, just before the builder was opened, the `data-name`
attribute was injected through `_computeSnippetTemplates()` for any
snippet that did not already have it. This behavior was lost after the
plugin refactoring.
### Fix:
As before, we now inject the `data-name` attribute during builder setup
for snippets that do not already have it.
task-[6087348](https://www.odoo.com/odoo/all-tasks/6087348)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#269287
Forward-Port-Of: odoo/odoo#259893This update resolves an error that occurred when users removed the date field in the Accrued Expense Entry wizard. The fix adds a check to ensure the date field has a valid value before performing comparisons, preventing a type error. This ensures the Accrued Expense Entry feature functions correctly.
Original PR description
Currently, error occurs when user removes date on Accrued Expense Entry wizard. Steps to replicate: - Install `purchase` and `accountant` with demo. - Open any Purchase Order > Click on cog menu >…
Currently, error occurs when user removes date on Accrued Expense Entry wizard.
Steps to replicate:
- Install `purchase` and `accountant` with demo.
- Open any Purchase Order > Click on cog menu > Accrued Expense Entry.
- Remove value from `date` and click else where.
Error:
```
File '/home/odoo/odoo19/community/addons/account/wizard/accrued_orders.py', line 67, in _compute_reversal_date
if not record.reversal_date or record.reversal_date <= record.date:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<=' not supported between instances of 'datetime.date' and 'bool'
```
Cause:
- As the user removed value from `date`, [here] `record.date` is received as False.
- As a result the comparison `record.reversal_date <= record.date` causes this error to occur.
Solution:
- Added a conditional check for `date` before the date comparison.
[here]: https://github.com/odoo/odoo/blob/8791cdcd89ea3cb56b1fac63b3e2ffbd2956a912/addons/account/wizard/accrued_orders.py#L67
No ID
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#269418
Forward-Port-Of: odoo/odoo#262568This update fixes a previous issue where sales employees transitioning to non-commission roles incorrectly accrued commission losses for public holidays and sick time. The change ensures that these employees are no longer penalized for time off when their compensation structure has changed, improving payroll accuracy.
Original PR description
If a salesman moves to another job that doesn't pay commission, he shouldn't have loss on commissions for public holidays and sick time off. Forward-Port-Of: odoo/enterprise#120386
This update ensures that holiday pay is accurately calculated when employees take double holidays, aligning with legal requirements. Previously, the system didn't properly prorate holiday pay based on the employee's previous work rate. This change improves payroll accuracy and compliance.
Original PR description
If you have a double holiday attest, we need to prorate the amount based on legal leave rights. The proration with regards to the previous work time rate wasn't done.
This update corrects a bug that prevented new online account connections for Canadian banks (which don't use IBANs). Previously, a misleading error would appear if a journal was incorrectly linked. Now, the system skips the journal check when an account number is missing, ensuring proper connection creation and avoiding this frustrating error.
Original PR description
…unt number When a provider returns an account without `account_number` (typical for Canadian banks, which do not use IBANs), the existing-journal search ran with `bank_account_number = False`.…
…unt number When a provider returns an account without `account_number` (typical for Canadian banks, which do not use IBANs), the existing-journal search ran with `bank_account_number = False`. Because `bank_account_number` is a related field on `bank_account_id.account_number`, that search matched every bank journal in the user's allowed companies whose `bank_account_id` was unset. If any of those journals was tied to a connected online link, the new sync was blocked with the misleading error "There's already a synchronized journal linked to this IBAN", even though no IBAN was involved. Skip the search entirely when `account_number` is falsy: without an identifier there is nothing meaningful to dedup against, and the downstream code already handles `existing_journals` being empty by creating a fresh journal. Note: when the provider omits `account_number`, a delete-and-recreate of the connection will now create a fresh journal rather than coincidentally reusing an unlinked empty-`bank_account_number` journal. That reuse path already failed (with a spurious "IBAN already connected" error) as soon as the user had more than one such journal, so the prior behavior was not reliable. The supported recovery path remains the reconnect button on the existing journal, which uses the `active_id` branch and is unchanged. opw-6253563
This update resolves an issue where duplicating a Time Off type with a Payroll Code resulted in an error due to a uniqueness constraint. The fix automatically appends a suffix to the code field during duplication, allowing users to create multiple time off types with the same code.
Original PR description
Steps to reproduce: ------------------------------------------ 1. Install Time Off module 2. Create a new Time Off type with Payroll Code (e.g, TEST) 3. Duplicate the Time Off type Observation:…
Steps to reproduce: ------------------------------------------ 1. Install Time Off module 2. Create a new Time Off type with Payroll Code (e.g, TEST) 3. Duplicate the Time Off type Observation: ------------------------------------------ User Error raised: ``` Cannot insert 'Test (copy)': Work entry type 'Test' of code 'TEST', with no country assigned, already exists. ``` Issue: ------------------------------------------ When you duplicate a Time off type, Odoo's default `copy()` method doesn't modify the code field. The `_check_code_unicity` constraint enforces that each combination of `code` and `country_id` must be unique. Since your duplicated record has the same `code`, the same `country_id` and a different `name`. The constraint correctly raises an error. Solution: ------------------------------------------ Override the `copy()` method to automatically append a suffix to the code field when duplicating, similar to how the name field gets '(copy)' appended. opw-6225931
This update corrects a bug where timesheets were incorrectly added to invoices after a partial refund on a sales order. The fix ensures that timesheets associated with fully invoiced orders are no longer considered when generating new invoices, preventing duplicate invoicing and maintaining accurate financial records. This improves the reliability of our invoicing process.
Original PR description
### Steps to reproduce: - Download 'Sales' and 'Timesheets' apps - Create 2 lines for the services product in the SO, invoicing policy = based on timesheets - Create 2 timesheets for both SO items - Invoice the SO - Create a credit note for line 1 => only line 2 is invoiced and line 1 is now released - Back to the SO > create invoice again > Line 2 is added to the invoice again. ### Cause of Issue: When generating the new invoice, `_recompute_qty_to_invoice` identifies timesheets linked to refunded invoices. Because the original invoice was partially refunded, all timesheets attached to that invoice match the domain used to locate timesheets—even the timesheets for line 2, which wasn't refunded. ### Fix: Ensures that lines that have already been completely invoiced are safely ignored and not inadvertently re-added to subsequent invoices. opw-6217684 Forward-Port-Of: odoo/odoo#268972 Forward-Port-Of: odoo/odoo#265840
This update fixes an issue where users couldn't save a 'Company Name' entered in their account settings. The fix ensures that when a new company name is added, a new company record is automatically created, aligning with the latest portal updates. This improves the user experience and data accuracy.
Original PR description
### Steps to reproduce: - Download "Website" app - In the portal's "/my/account" address form, enter a "Company Name" - Click "Save" to submit the form - Reload the page and check if the company name…
### Steps to reproduce: - Download "Website" app - In the portal's "/my/account" address form, enter a "Company Name" - Click "Save" to submit the form - Reload the page and check if the company name was saved > Company name isn't updated ### Cause of Issue: `_create_or_update_address()` method was passing the 'parent_name' field directly through the main `partner_sudo.write(address_values)` call. https://github.com/odoo/odoo/blob/391cec39b6048ad4f49015fd67888895dc176ee5/addons/portal/controllers/portal.py#L564-L571 Since `parent_name` is a readonly related field (related to `parent_id.name`), the write operation would fail silently to update it, creating orphaned changelog entries instead of properly updating the parent company entity. ### Fix: Since the update of contact forms in v19.1, we can't just edit the "Company Employer" field without assigning an actual partner (existing or create new). The solution here was to add a case to account for when the portal user is an individual adding a "Company Name" for the first time. opw-6115158 Forward-Port-Of: odoo/odoo#264356
This update prevents the 'Project: Task Rating Request' email template from disappearing when project stages are set to inactive. Previously, disabling ratings on the last stage caused the template to be archived, leading to a broken user experience. This fix ensures the template remains available in the dropdown for selection.
Original PR description
Currently, when the `rating_active` feature is disabled on the last project stage using it, the default 'Project: Task Rating Request' email template is automatically archived. This creates a UX issue where the template disappears from the "Rating Email Template" dropdown on the stage form, preventing users from selecting it. This commit resolves the issue by: - Setting `active="True"` by default on the XML template record. - Removing the background archiving logic from the `write` method of `project.task.type`. - Appending a check to `test_send_rating_review` to ensure the template remains active even when all stages in the database have ratings disabled. Task-6102227 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#264394
This update resolves an issue where canceling a Global Invoice on a Mexican POS order prevented the creation of a new Global Invoice for the same order after a partial refund. The fix ensures that the refund process correctly updates CFDI documents, allowing for seamless invoice management and avoiding errors.
Original PR description
Steps to reproduce 1. With a Mexican POS configured, create a POS order and sign a Global Invoice for it. 2. Open a new session and partially return the order; close the session. 3. On the original…
Steps to reproduce 1. With a Mexican POS configured, create a POS order and sign a Global Invoice for it. 2. Open a new session and partially return the order; close the session. 3. On the original order, cancel the Global Invoice through the CFDI page. 4. Try to create a new Global Invoice for the original order. Issue The wizard raises "Orders <REFUND-NAME> are already sent or not eligible for CFDI." Validating the refund auto-signs an `invoice_sent` CFDI on the refund pos.order because its parent is `global_sent`, see `_l10n_mx_edi_check_autogenerate_cfdi_refund` at https://github.com/odoo/enterprise/blob/5af8048f0b0956a024d7eaeb10600eec74bdf3ee/l10n_mx_edi_pos/models/pos_order.py#L98. Cancelling the GI only flips its own document to `ginvoice_cancel`; the refund's `invoice_sent` doc stays untouched, so the refund's computed `l10n_mx_edi_cfdi_state` stays `'sent'`. The chain check in `_l10n_mx_edi_check_orders_for_global_invoice` at https://github.com/odoo/enterprise/blob/5af8048f0b0956a024d7eaeb10600eec74bdf3ee/l10n_mx_edi_pos/models/pos_order.py#L184 then rejects the refund as already sent and the new GI cannot be created. opw-6181136 Forward-Port-Of: odoo/enterprise#120349 Forward-Port-Of: odoo/enterprise#117211
This update ensures Polish company invoices sent to KSeF (a Polish tax system) include a required field ('PrefiksPodatnika') as mandated by the Ministry of Finance. This corrects a previous omission that resulted in non-compliant tax reporting for common EU transactions like intra-Community sales. The fix ensures accurate data transmission to KSeF, maintaining legal compliance.
Original PR description
Steps to reproduce 1. Configure a Polish company with KSeF enabled. 2. Create a customer invoice using a tax tagged with K_21 (0% EU G, intra-Community supply of goods), K_12 (0% EU S, services taxed…
Steps to reproduce 1. Configure a Polish company with KSeF enabled. 2. Create a customer invoice using a tax tagged with K_21 (0% EU G, intra-Community supply of goods), K_12 (0% EU S, services taxed in the buyer's EU country) or Triangular Sale. 3. Send the invoice to KSeF and download the generated FA(3) XML. Issue The Podmiot1 (seller) block in the rendered FA(3) XML omits the PrefiksPodatnika element, see https://github.com/odoo/odoo/blob/89219a843545d8bb0cad6ea806a1167cee6289da/addons/l10n_pl_edi/data/fa3_template.xml#L34-L42. According to the official Ministry of Finance documentation (https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf, page 11), this conditional field must carry the value "PL" when the invoice documents: - the intra-Community supply of goods, - the provision of services referred to in Article 100 sec. 1 item 1 of the Act for EU VAT taxpayers, - the supply carried out under a simplified triangular transaction by the second taxpayer (Article 135 sec. 1 item 4 (b) and (c)). The XSD marks the element as optional (minOccurs="0", fixed="PL") so KSeF accepts the XML, but the seller's tax reporting is still legally non-compliant for the three cases above, and the field is missing from the KSeF PDF viewer rendering. opw-6213178 Forward-Port-Of: odoo/odoo#264659
This change resolves an issue preventing users from selecting contacts with VATs as feedback recipients within appraisals. The previous system incorrectly classified VAT-enabled contacts as 'companies,' limiting recipient options. Removing a restrictive domain allows for full contact selection, streamlining the feedback process.
Original PR description
Issue: ---------------------------------------- We cannot add a contact with a VAT as a feedback recipient. Steps to reproduce: ---------------------------------------- - Have a contact with a VAT - Go to a confirmed appraisal and select 'Ask Feedback' - We cannot add the contact as recipient. Cause: ---------------------------------------- There is a domain on the field to only accept non company contacts. The idea of the domain was to restrict the field to persons only. But since f2965048f60fe6c815b3e50fa714c97a93dfb5d3 the field `is_company` is computed based on the VAT presence. So a contact with a VAT specified is considered a company. Solution: ---------------------------------------- Remove the domain. We allow to select all contacts, the users will have to do the sort. opw-6280689
This update resolves an error that occurred when generating payslips for employees with contracts exceeding 35 years. The fix adjusts a key calculation parameter to accommodate seniority beyond the previous limit, ensuring accurate payroll processing for all employees according to Mexican labor law. This change improves payroll accuracy and compliance.
Original PR description
**Steps to reproduce:** 1. Install l10n_mx_hr_payroll. 2. Create an employee with a contract date over 35 years ago (e.g., 1985). 3. Create a payslip for this employee. 4. Click on "Compute Sheet".…
**Steps to reproduce:**
1. Install l10n_mx_hr_payroll.
2. Create an employee with a contract date over 35 years ago (e.g., 1985).
3. Create a payslip for this employee.
4. Click on "Compute Sheet".
```Error: KeyError(36) while evaluating```
**Cause:**
The rule parameter [rule_parameter_holiday_table](https://github.com/odoo/enterprise/blob/c02c4571bb7db7197b07539ba390d4d20fdce9fe/l10n_mx_hr_payroll/data/hr_rule_parameters_data.xml#L722-L758) defines values
only up to 35 years. Seniority exceeding this range causes a KeyError.
**Solution:**
Extended the `rule_parameter_holiday_2024` table from 35 to 60 years,
following the Mexican Federal Labor Law (LFT) reform formula
(+2 days every 5-year milestone from year 6 onwards).
**NOTE:**(Alternative approach)
```python
@staticmethod
def _get_mx_holiday_days(years_worked):
if years_worked <= 0:
return 0
if years_worked <= 5:
return 12 + (years_worked - 1) * 2
five_year_periods = (years_worked - 6) // 5
return 22 + five_year_periods * 2
```
This approach removes the need for XML data maintenance and handles
all future seniority values mathematically without any cap issues.
opw-6090590
Forward-Port-Of: odoo/enterprise#113536This update fixes an issue where images in email marketing templates were stretched and distorted when paired with long text. By removing specific styling, images now maintain their natural aspect ratio and fit appropriately alongside the text, ensuring a cleaner and more professional email design. This improves the overall visual quality of marketing communications.
Original PR description
The media list snippet forces the image to fill the height of its row. The image column carries align-self-stretch and the image carries h-100, so when the text next to the image is longer than the…
The media list snippet forces the image to fill the height of its row. The image column carries align-self-stretch and the image carries h-100, so when the text next to the image is longer than the image is tall, the row grows to fit the text and the image is stretched to that height (and cropped through object-fit: cover). The longer the text, the more the image is distorted. Drop h-100 from the image and align-self-stretch from its column in the s_media_list snippet and in the mass_mailing_themes templates that reuse it. With no forced height the image keeps its natural aspect ratio and the row height follows its content, so the image is laid out next to the text instead of being stretched to match it. Steps to reproduce: 1. Open Email Marketing and create a new mailing. 2. Select the Blogging template for the mail body. 3. In a media item, replace the text next to an image with a very long paragraph. => The image is stretched and cropped to match the height of the text. Ticket [link](https://www.odoo.com/odoo/project.task/5117571) opw-5117571 Forward-Port-Of: odoo/odoo#268675 Forward-Port-Of: odoo/odoo#238138
This update enhances the accuracy of partner searches within Odoo by using exact name matches instead of partial matches. This prevents incorrect partner identification and ensures more reliable data retrieval, particularly important for UBL import processes that now utilize bank account details for partner identification.
Original PR description
Before this commit: * Partner was searched using contains on the name, which could match unrelated partners with similar names (e.g. 'Global Tech' matching 'Global Technologies Ltd'). After this commit: - Partner retrieval now uses an exact name match to avoid incorrect matches caused by partial name search. - The search limit is set to 1 to ensure a consistent result when multiple partners are found. Technical: - Replaced `ilike` with `=ilike` in the name search domain. task-5485563 Forward-Port-Of: odoo/odoo#269355 Forward-Port-Of: odoo/odoo#250309
This update prevents the Timesheet Assistant from incorrectly matching events to projects or tasks with disabled timesheets. The change improves data accuracy and ensures the assistant only considers active projects and tasks for time tracking, streamlining the timesheet process.
Original PR description
Currently, the Timesheet Assistant (ActivityWatch) can match events to projects or tasks that have timesheets disabled, either via Custom Rules or Historical Memory.
This commit resolves the issue across the entire pipeline:
- Backend: Updated `resolve_assistant_models_targets` to efficiently filter out records where `allow_timesheets` is False using a search domain.
- Frontend: Updated the `loadData` JS pipeline to intercept and wipe any project/task IDs rejected by the backend, ensuring they cleanly fall back into a single "Unmatched" group.
- Views: Added the `[('allow_timesheets', '=', True)]` domain to `project_id` and `task_id` fields in `aw.rule` views to prevent users from creating invalid rules.
Task: 6267401
Forward-Port-Of: odoo/enterprise#119403This fix ensures that multi-line text in PoS receipt headers and footers is properly formatted, preserving line breaks as intended. A recent change inadvertently removed formatting, causing text to be displayed on a single line. This update restores the correct display, improving the appearance of printed receipts.
Original PR description
Steps to reproduce ------------------ 1. Open PoS settings, set a multi-line receipt header and footer. 2. Open PoS, pay an order and print the receipt. -> The lines of the header and footer end up on the same line, instead of keeping the line breaks. Example when setting footer to ``` ------ Footer ------ ``` It will show up on the receipt as ``` ------Footer------ ``` Why it's happening ------------------ The refactor commit aeaca097ae39 mistakenly dropped the `style="white-space:pre-line"` for the header and footer templates. The fix ------- Add back `style="white-space:pre-line"` back for both the header and the footer divs. opw-6222055
This update resolves an issue where account reloading failed when an account's XMLID still referenced its original company. The fix ensures the system correctly verifies the account belongs to the current company before reloading, preventing errors and ensuring accurate chart of accounts data. This improves stability and data integrity during company transitions.
Original PR description
When reloading a chart of accounts, `_pre_reload_data` resolves an account via its xmlid and then evaluates: ```py re.match(f'^{values["code"]}0*$', account.code) ``` `account.code` is a non-stored…
When reloading a chart of accounts, `_pre_reload_data` resolves an account via its xmlid and then evaluates:
```py
re.match(f'^{values["code"]}0*$', account.code)
```
`account.code` is a non-stored computed field that reads from the company-dependent field `code_store`. If the resolved account has no `code_store` entry for the target company (e.g. the account was originally set up under a different company but its xmlid was prefixed with the current company id), `_compute_code` returns False instead of a string, causing a TypeError in re.match.
```py
File "/home/odoo/src/odoo/19.0/addons/account/models/chart_template.py", line 442, in _pre_reload_data
if not account or not re.match(f'^{values["code"]}0*$', account.code):
File "/usr/lib/python3.10/re.py", line 190, in match
return _compile(pattern, flags).match(string)
TypeError: expected string or bytes-like object
```
```sql
apan_4342860=> SELECT
aa.id,
aa.code_store,
imd.module,
imd.name
FROM account_account aa
JOIN ir_model_data imd
ON imd.res_id = aa.id
AND imd.model = 'account.account'
WHERE aa.id = 1056;
id | code_store | module | name
------+-----------------+---------+-----------------
1056 | {"2": "510500"} | account | 1_co_puc_510500
(1 row)
```
This situation arises when a customer moves or reassigns an account between companies but the xmlid retains the original company prefix.
**Fix:**
After resolving the account via xmlid, check whether it actually belongs to the target company using filtered_domain with _check_company_domain. If it does not pass the check, unlink the stale ir.model.data entry and treat the account as not found, allowing the reload to re-establish the correct xmlid linkage via the code-based lookup that follows.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#269696
Forward-Port-Of: odoo/odoo#269291This update resolves an issue where Odoo's UBL bill import process would fail if a vendor's invoice contained an empty 'EndpointID' field. The fix ensures the import process is more robust and reliable when dealing with diverse UBL file formats, preventing import failures.
Original PR description
**Description:** Importing a UBL file (vendor bill) fails if it contains an empty "EndpointID" node. It assumes the node always contains text content to sanitize, but if it is empty, it crashes with: AttributeError: 'NoneType' object has no attribute 'strip'. **Steps to reproduce:** 1. Import a UBL as a bill, with an empty EndpointID node of the other party. 2. The import fails with the AttributeError. opw-6246515 Forward-Port-Of: odoo/odoo#269028
This update fixes an issue where new contacts created without a parent record didn't automatically have a default language assigned. The change ensures that all contacts, regardless of their parent relationship, receive a properly set language, improving data consistency and reporting accuracy. This prevents potential errors when using contact information.
Original PR description
Before this commit, when creating a new crm_lead in the form view, using the res_partner_many2one widget to "Create" or "Create and Edit" a new contact would generate a contact without a set language. This happens because _compute_lang in res_partner currently only runs when the res_partner has a parent_id. This fix allows _compute_lang to be run for res_partner records without a parent_id. This ensures that we properly assign a default language for new contacts, using the proper context or the database default. opw-6126637 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#263440
This update fixes a bug preventing the 'Due' button from appearing on customer forms when balances exist at the line level of journal entries. The fix ensures all customers, regardless of how they're linked to accounting records, can see outstanding balance notifications. This improves the user experience for managing accounts.
Original PR description
Steps to Reproduce: 1. Install Accounting module (without Point of Sale). 2. Create a customer. 3. Create a journal entry with that customer set only at line level. 4. Post the journal entry. 5. Open…
Steps to Reproduce: 1. Install Accounting module (without Point of Sale). 2. Create a customer. 3. Create a journal entry with that customer set only at line level. 4. Post the journal entry. 5. Open the customer form. Issue: The Due smart button is not visible on the partner form even though an outstanding balance exists for the customer. Note: This issue does not reproduce when Point of Sale is installed, as the POS module overrides `_compute_has_moves` with its own implementation that checks the outstanding balance directly. Root Cause: The `_compute_has_moves` method queries only `account.move `for partner matching. When a partner is referenced only at the account.move.line level, the partner is never picked up by this query, resulting in `has_moves = False` and the Due button remaining hidden. Fix: Replaced the EXISTS-based implementation with a UNION-based approach as the EXISTS implementation evaluated the query per partner row, whereas UNION processes all partners in a single batch query. Additionally extended the UNION to also include account.move.line partner matching, ensuring partners referenced only at the line level, are correctly detected and has_moves is set to True. Result: The Due smart button is now correctly visible for all partners with an outstanding balance, regardless of whether the partner is set at the journal entry level or only at the line level. owp = 6243562 Forward-Port-Of: odoo/enterprise#120294 Forward-Port-Of: odoo/enterprise#119084
This update resolves an issue where report customizations made in Odoo's Studio were incorrectly applied to other reports, leading to unexpected behavior and potential rendering problems. The fix ensures that report edits are now saved within the specific report document, preventing these issues and improving Studio's reliability.
Original PR description
Report edits could be applied on shared layouts such as web.basic_layout instead of the report-specific document view. This caused Studio customization diffs to affect unrelated reports and could…
Report edits could be applied on shared layouts such as web.basic_layout instead of the report-specific document view. This caused Studio customization diffs to affect unrelated reports and could also lead to rendering errors when report-specific fields were evaluated in a different report context. The issue occurred because content was inserted directly into the shared layout article section instead of the nested report document view. Steps to reproduce: 1. Open Studio on any module and create or edit a report. 2. Select any of the External, Minimal, or Blank report types. 3. Add content to the report body and save the report. 4. Open another module and create a report using the same report type. 5. Observe that the previous customization is already present. Before this fix, the generated diff could inherit from web.basic_layout. After this fix, body edits are kept inside the report-specific document view. Related Ticket: opw-6245485 Forward-Port-Of: odoo/enterprise#120299 Forward-Port-Of: odoo/enterprise#118880