Daily updates from Odoo
Monday, March 30, 2026
73 changes
15 changes
Resolved issues and error corrections
This update fixes an issue where quality control failures weren't correctly splitting stock moves, leading to inaccurate demand calculations. The fix ensures that failed quantities are properly reflected in new stock moves, maintaining accurate inventory tracking. This improves the reliability of quality control processes and prevents overestimation of available stock.
Original PR description
**Steps to reproduce:** * Install the `quality_control` module. * Create a storable product. * Configure a Quality Control Point: * Set Control per : Quantity. * Set Operation Type to Receipts. * Set…
**Steps to reproduce:** * Install the `quality_control` module. * Create a storable product. * Configure a Quality Control Point: * Set Control per : Quantity. * Set Operation Type to Receipts. * Set Product to the created product. * Create a Receipt for the product with a demand of 5 units. * Confirm the receipt and mark it as To Do. * Click on the Quality Check button. * Click on Fail and set the failed quantity to 3. * Click on Confirm. **Observed behavior:** * A new stock move is created for the failed quantity. * The original move is split incorrectly: * First move: 2 `product_uom_qty` and 2 `quantity`. * Second move: 2 `product_uom_qty` and 3 `quantity`. * The failed move has a demand of **2** instead of **3**. **Cause:** * Clicking on *Quality Check* triggers `check_quality`, which opens the wizard `action_open_quality_check_wizard`: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/models/stock_picking.py#L79-L82 * Clicking on *Fail* triggers `do_fail`, opening the confirmation wizard: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/wizard/quality_check_wizard.py#L85-L88 * Clicking on *Confirm* triggers `confirm_fail`, which calls `_move_line_to_failure_location`: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/wizard/quality_check_wizard.py#L97 * In `_move_line_to_failure_location`, a new stock move is created for the failed quantity: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/models/quality.py#L480 * The demand quantity is computed using the minimum of the failed quantity and the move line quantity. * This leads to an incorrect demand of *2* instead of *3*. * However, the move line quantity was already reduced by the failed quantity: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/models/quality.py#L472 **Fix:** * Ensure that partial failures properly split stock moves with correct `product_uom_qty` and `quantity` values. --- opw-5492095 Forward-Port-Of: odoo/enterprise#112298 Forward-Port-Of: odoo/enterprise#107493
This update fixes an issue where selected failure locations weren't being applied during product repairs. Now, when a quality check fails, the product is automatically moved to the user-specified failure location, ensuring accurate inventory and repair tracking. This improves the reliability of the repair process.
Original PR description
Before this commit: ------------------------- - In the Repair module, when a quality check for a product was marked as failed, Even after selecting a failure location, the failure location is not…
Before this commit: ------------------------- - In the Repair module, when a quality check for a product was marked as failed, Even after selecting a failure location, the failure location is not being set at the final product move. - Instead of showing the selected failure location, the system displayed another location as the move destination after completing the repair process. Steps to reproduce: ------------------------- 1. Install the quality_repair module. 2. In Quality, create a Control Point with: - Type = Pass-Fail - Control Per = Product or Operation - Set at least 1 Failure Location 3. Create a Repair Order for any product and start the repair process. 4. Perform a quality check, set it to Fail, and select a failure location. 5. Open the product moves, the destination location does not match the selected failure location. Cause of the issue: ------------------------- The failure location was not correctly assigned when a quality check failed during the repair process because _move_to_failure_location determines the destination location based on a stock picking (for receipts) or a production_id (for manufacturing). In the Repair module, however, quality checks are linked to a repair order, so the selected failure location was not set correctly. After this commit: ----------------------- - When a quality check fails in a repair order, the product’s destination location is correctly set to the failure location selected by the user. - This ensures that, upon completion of the repair, the product is moved to the selected failure location, maintaining accurate inventory tracking and management. Task ID:5254334 Forward-Port-Of: odoo/enterprise#99235
This update fixes an issue where quarterly VAT returns in the Italian module didn't automatically generate the required XML export files. The fix correctly uses the 'date_to' field for quarter detection, ensuring accurate XML generation. It also improves data accuracy for quarterly reports by simplifying calculations.
Original PR description
## Issue: When the tax return periodicity is set to quarterly and the return is validated, the XML file is not generated and downloaded ## Cause: The quarter detection logic was based on the `date_from` field of the return However, for quarterly returns, the correct reference should be `date_to` Using `date_to` also works correctly for monthly returns ## Steps to reproduce: - Install `l10n_it_xml_export` - Switch to the IT Company - Go in the Tax Report (Monthly VAT Report (IT)) to do a Tax Return (Opening Date: 01/01/2025, Periodicity: Quarterly) - If needed change the Tax Return Periodicity in Settings to Quaterly - Select the first report and ignore the error in Review Before the fix, it is only possible to close the return without generating the XML export opw-5707544 Forward-Port-Of: odoo/enterprise#111370 Forward-Port-Of: odoo/enterprise#108548
This update resolves an issue where searching for deliveries solely by zip code resulted in inaccurate location data being sent to Sendcloud. The system now correctly handles zip codes and includes the city information, ensuring accurate delivery point selection. This improves the reliability of our Sendcloud integration.
Original PR description
Issue ----- Searching for locations by only providing a zip code has unexpected results. Steps to reproduce ----- - Set up Sendcloud with Mondial Relay - Create a sale through the website - Get to the delivery part - Select sendcloud delivery - Search for a zip code only (11000) > Points are all in the 12200 area Cause ----- When searching through the wizard, a temporary address is created in https://github.com/odoo/odoo/blob/89e5038c224d58a2f6be8f3001fd0a2932733cbc/addons/delivery/models/sale_order.py#L108-L112 which always has its' city field set to `False`, as all of the wizard's info is interpreted as the zip code. This leads to the address field sent to Sendcloud being '11000 False' instead of the expected '11000', which Sendcloud fails to interpret correctly. ----- Ticket: opw-5999194 Forward-Port-Of: odoo/enterprise#110459
This update resolves an issue where night shift slots (e.g., 20PM - 4AM) weren't visible in the weekly planning view. The fix adjusts how the system displays multi-day slots, ensuring all scheduled hours are accurately shown. This improves the planning experience for employees with flexible schedules.
Original PR description
**Steps to reproduce** 1. Have an employee using a flexible schedule 2. Create a slot from e.g. 20PM to 4AM for this employee. Make sure this is the only slot that week for the employee. 3. Publish…
**Steps to reproduce** 1. Have an employee using a flexible schedule 2. Create a slot from e.g. 20PM to 4AM for this employee. Make sure this is the only slot that week for the employee. 3. Publish the Schedule and send it to the employee. Open the outgoing mail to access the link to the planning view. Issue: the slot is not visible in the week view. **Cause** https://github.com/odoo/enterprise/blob/04a885dbb6eed96297cb5ce9a155ebf8e169427c/planning/controllers/main.py#L193-L194 The `event_hour_min` and `event_hour_max` returned by `planning_get` and used to control the min/max hours displayed in the week view, didn't account for slots over multiple days. For a slot between 20pm and 4am, the `event_hour_max` should be the end of the day, and the `event_hour_min` should be the start of the day. **Solution** - we change the `event_hour_min` and `event_hour_max` for multi-day slots to display the full days in the week view - the previous point has the drawback of displaying the full days for non-flexible employees even when not necessary. This is because `slots_start_datetime` and `slots_end_datetime` contained the `planning.slot` start and end. Instead, we can look at the actual slot values displayed (by `_get_slots_vals`). For example, a 5 day slot for a non-flexible employee may contain actual slot values corresponding to a typical 8-17 working day. opw-5245985 Forward-Port-Of: odoo/enterprise#111658 Forward-Port-Of: odoo/enterprise#99784
This update fixes an issue where payslips for UAE employees with attendance-based work entries were incorrectly calculating hourly wages. The change ensures accurate wage calculations by using the correct record object within the computation process, preventing data from other payslips from being incorrectly included.
Original PR description
### Steps to reproduce: - Install the l10n_ae_hr_payroll module. - Configure at least two employees, who'll use the UAE Monthly pay structure. - On at least one of the employees, set the work entry…
### Steps to reproduce: - Install the l10n_ae_hr_payroll module. - Configure at least two employees, who'll use the UAE Monthly pay structure. - On at least one of the employees, set the work entry source to attendance. - Register a paid leave time off entry, for the employee whose work entry source is set to attendance. - Compute a payslip batch using the UAE Monthly pay structure. - Go to the payslip of the employee with the work entry source set to attendance and compute the sheet again. - The 'Paid Leave' salary rule results, will change given that the computation of the field l10n_ae_hourly_wage is different when the computation is done for batches and individually. ### Cause: In 'Paid Leave' rule we use l10n_ae_hourly_wage to compute its result and while computing this field we use self.worked_days_line_ids instead of record inside the loop. This leads to an issue when self has more than one payslip it will take into account all the worked days for each payslip for different employees ### Fix: We use record instead of self to avoid taking other payslips into consideration while computing the hourly wage. opw-5979631 Forward-Port-Of: odoo/enterprise#112229 Forward-Port-Of: odoo/enterprise#111280
This update fixes an issue where tax returns were incorrectly including Italian pension fund taxes, leading to discrepancies between reports and the backend view. The change excludes these taxes from the tax return domain, ensuring accurate calculations and consistent reporting for Italian customers. This resolves a prior inconsistency.
Original PR description
The "amount to pay" incorrectly included the Pension Fund taxes, causing inconsistencies between the report and what the customer was able to see in the backend. Now we exclude them from the tax return domain. Steps to reproduce: - Create an Italian company with the Italian CoA - Install `l10n_it_edi_withholding` (not necessary in v19) - Create an invoice - Set the 4% INPS or 4% F.Pens taxes on a line, along with with a normal 22% VAT - Create a tax return Ticket [link](https://www.odoo.com/odoo/project.task/5909407) opw-5909407 Forward-Port-Of: odoo/enterprise#111311
This update resolves an issue where project profitability calculations were inaccurate, leading to double-counting of costs. The fix ensures that the 'To Bill' and 'Billed' amounts correctly reflect the actual cost of a purchase order linked to a project, maintaining accurate accounting records. This improves the reliability of project cost tracking.
Original PR description
Steps to reproduce: ----------------------------------------- 1. Install `sale_purchase_project` and Accounting modules 2. From settings, enable Budget Management 3. Create a new product with type…
Steps to reproduce: ----------------------------------------- 1. Install `sale_purchase_project` and Accounting modules 2. From settings, enable Budget Management 3. Create a new product with type Service and enable Create a project on order. 4. Create and confirm the sale order with that product (note the name of created project) 5. Create and confirm purchase order as follows: > In other information page, select the created project in the Project field > Add the same product in POL, Set price unit price to 100 and remove any tax 6. Create and post a Vendor Bill for the same vendor as the PO as follows: > Add Bill line with label downpayment > Set the Analytic Distribution to the created project > Set amount to 30 7. Go to the created purchase order > Click on bill matching 8. Select the downpayment bill > Add to PO > Select created PO > Add Down Payment 9. Go to the created project and open dashboard Observation: ----------------------------------------- In the Costs section: Expected Cost: 130 To Bill: 100 Billed: 30 Expected values: ----------------------------------------- Expected Cost: 100 To Bill: 70 Billed: 30 Issue: ---------------------------------------- In the following code: https://github.com/odoo/odoo/blob/7e81c528ae350aab4432207f5655dcfadf6ec627/addons/project_purchase/models/project_project.py#L186-L190 When an invoice line was posted (billed), the code correctly subtracted the cost from `amount_invoiced` (making it negative, representing actual cost). But the billed amount was NOT removed from `amount_to_invoice`. This caused double counting the same cost appeared in both 'To Bill' and 'Billed' Solution: ----------------------------------------- Replaced the quantity-based calculation with a proper amount-based approach: - Introduced `total_invoiced_amount` to track the sum of all non-refund invoice line amounts (both posted and draft). - Modified the unbilled calculation to: `PO_amount - total_invoiced_amount`, ensuring that the unbilled portion accurately reflects what remains to be invoiced from the purchase order. - Excluded refunds from `total_invoiced_amount` calculation because credit notes represent reversals of previous invoices, not consumption of the purchase order. Refunds still correctly affect the "billed" and "to_bill" buckets through the normal invoice line processing. This ensures the accounting principle is maintained: Total Expected Cost = Billed + To Bill = Purchase Order Amount opw-5167734 Forward-Port-Of: odoo/odoo#245649
This update resolves a bug where custom snippets using the 'Category' dynamic snippet didn't display correctly in the website preview. The fix ensures that the dynamic content from this snippet is now accurately reflected when viewing custom snippets within the website builder. This improves the functionality of the website builder for users creating custom content.
Original PR description
Commit 00cf9375b356b2316e24d97234474685e3fb7f94 added the new dynamic snippet for category of product, with a specific interaction. Commit 534a42029d757935788220549aabb8914302a4f3 shows dynamic content of dynamic snippet in snippets preview dialog, but `DynamicSnippetCategory` was missed (in forward port). This commit includes the interaction to load the dynamic content of "Category" dynamic snippet in the snippets preview dialog. Steps to reproduce: - Open website builder - Add a dynamic snippet `s_dynamic_snippet_category_list` - Save the snippet as a custom snippet - Click on "Custom" snippet category - Bug: The preview for the custom snippet does not have the dynamic part task-5427353 Forward-Port-Of: odoo/odoo#255850
This update fixes an issue where the shipping weight for deliveries wasn't correctly updated when changing the pack type after using the 'put in pack' action. Previously, updating the pack type didn't trigger the necessary calculation. Now, the system accurately reflects the base weight of the chosen pack type, ensuring accurate shipping cost calculations.
Original PR description
Issue ----- Doing `action_put_in_pack` then changing the pack type to one with a base weight doesn't correctly update the picking's `shipping_weight`. Steps to reproduce ----- - Enable packages - Create package types: - Big box with base weight of 5kg - Huge box with base weight of 15kg - Create a product AAA with weight of 10kg - Create a delivery for 1 unit of AAA - Confirm delivery - Put in pack - Update the pack type to "Big box" > shipping_weight is still 10kg instead of 15kg - Put in pack again - Update the pack type to "Huge box" > shipping_weight is still 10kg instead of 30kg Cause ----- Changing the package type doesn't change its' `shipping_weight`, so we don't trigger the picking's `_compute_shipping_weight`. ----- Ticket: opw-5975689 Forward-Port-Of: odoo/odoo#255764
This update corrects a bug where modifying a recurring event's start time caused duplicate meeting invitations to be sent to attendees via Outlook. The fix ensures Microsoft IDs are preserved, preventing these issues and improving the reliability of meeting synchronization.
Original PR description
When an attendee syncs a recurring event where the first occurrence (base event) was modified by the organizer, `_write_from_microsoft` falsely triggers the destructive recreation path. This happens because `_has_base_event_time_fields_changed` compares the exception's modified time against the seriesMaster's pattern time, detecting a "change" even though the master hasn't changed. This causes: - All non-base events lose their microsoft_id and ms_universal_event_id - The base event gets recreated without Microsoft IDs - A duplicate event is pushed to Outlook on the next odoo2microsoft sync - Spurious "join the meeting now" notifications are sent to attendees Add a `follow_recurrence` guard so that when the base event is an exception (follow_recurrence=False), the non-destructive else branch is taken instead, preserving all Microsoft IDs. Forward-Port-Of: odoo/odoo#256263 Forward-Port-Of: odoo/odoo#254414
This update fixes an issue where the system was incorrectly inflating monthly demand calculations for products using the 3-step warehouse delivery flow. The fix ensures that only the final shipment is considered when determining demand, leading to more accurate forecasting and inventory management. This improves the reliability of sales and purchasing projections.
Original PR description
**Steps to reproduce:** * Install *purchase_stock* and *sale_management* module. * Go to *Inventory > Configuration > Settings*. Enable *Multi-Step Routes*. * Go to *Inventory > Configuration >…
**Steps to reproduce:**
* Install *purchase_stock* and *sale_management* module.
* Go to *Inventory > Configuration > Settings*. Enable *Multi-Step Routes*.
* Go to *Inventory > Configuration > Warehouses*.
* Set the warehouse delivery flow to *Pick + Pack + Ship (3 steps)*.
* Create a new product. Under the *Purchase* tab, add a vendor.
* Create a sales order for this product with some quantity.
* Confirm the sales order. Validate all three generated transfers (*Pick*, *Pack*, *Ship*).
* Create a purchase order for the same vendor.
* In the purchase order line, click *Catalog* and search for the product.
**Observed behavior:**
* In the catalog view, the *Monthly Demand* is shown as *3x*
the original sales order quantity instead of the actual demand.
**Cause:**
* *Monthly Demand* is a computed field using `_compute_monthly_demand`,
which relies on `_get_monthly_demand_moves_location_domain()`.
* In a 3-step delivery flow, all related moves have a final location with usage set to *customer*.
* The domain condition: `('location_final_id.usage', 'in', ['customer', 'production'])`
counts all intermediate pickings.
* Additionally, the fallback condition: `[('location_final_id.warehouse_id', '!=', warehouse_id)]`
is always true because *customer* locations are not linked to a warehouse.
* As a result, all three pickings are counted, inflating the demand. See: https://github.com/odoo/odoo/blob/6bbaea728dbcba49776e813c70dff649d041bdc9/addons/purchase_stock/models/product.py#L144-L157
**Fix:**
* Prevent counting intermediate pickings in 3-step delivery by
restricting the domain to moves with `move_dest_ids = False`,
ensuring only the final move is considered for monthly demand computation.
---
opw-5453991
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#256228
Forward-Port-Of: odoo/odoo#244180This update fixes an issue where invoices generated from timesheets incorrectly displayed the total hours as the quantity instead of the correct number of days. The change ensures that timesheet hours are converted to the Sale Order Line's UoM (Days) before being applied to the invoice, resulting in accurate invoice quantities. This improves the reliability of invoicing based on timesheets.
Original PR description
Steps to reproduce: -------------------------- 1. Install sale_timesheet 2. Create a quotation with a timesheet-based product - Set quantity = 3 - Set UoM to Days (timesheet UoM is Hours) 3. Confirm…
Steps to reproduce: -------------------------- 1. Install sale_timesheet 2. Create a quotation with a timesheet-based product - Set quantity = 3 - Set UoM to Days (timesheet UoM is Hours) 3. Confirm the quotation and click on the smart button Recorded. 4. Record 16 hours of timesheets. 5. Create an invoice using a timesheet period (starting from SO date) 6. Check the invoice quantity Issue: ----------- The invoice quantity is incorrect. It assigns the hour value (e.g., 16) to the invoice line even though the SOL is configured in "Days" (expected 2 days for 16 hours). Cause: ----------- After this commit c3b6053, The `_recompute_qty_to_invoice` method sums timesheet `unit_amount` (in hours) and assigns it directly to `qty_to_invoice` without converting it to the sale order line UoM when a timesheet period is applied. Solution: --------------- Convert the aggregated timesheet hours into the SOL UoM before assigning it to qty_to_invoice. opw-6024804 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255790 Forward-Port-Of: odoo/odoo#254273
This update fixes an issue where stock lot costs were incorrectly calculated across multiple companies. Previously, the system stored a single cost value, leading to inaccurate valuations when using FIFO lot valuation. Now, the cost calculation dynamically adjusts based on the specific company, ensuring accurate inventory accounting in multi-company setups.
Original PR description
Field avg_cost was set to store=True in 42d3e34, but the compute method _compute_avg_cost() is company-context-dependent (calls _run_fifo which filters by env.company). Storing a single value causes incorrect valuations in multi-company databases with FIFO + lot valuation. In multi-company setups with shared products (company_id=False), the lot's avg_cost would compute in one company's context and store that value globally, causing all other companies to see the wrong cost. Fix: Remove store=True to compute dynamically per company context. Cannot use company_dependent=True as it requires JSONB migration. opw-5446941 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#253937 Forward-Port-Of: odoo/odoo#247278
This update fixes an issue where mixed POS orders (with both regular sales and settlement lines) weren't being properly validated. The change ensures that settlement lines are correctly identified, preventing incorrect validation and maintaining accurate financial reporting for Saudi POS transactions. This update aligns with newer Odoo versions and improves the reliability of the integration.
Original PR description
# Description of the issue/feature this PR addresses: From saas-18.3 onward, the pos_settle_due module introduced a new method to identify settlement lines. While the old method **isSettleDueLine()**…
# Description of the issue/feature this PR addresses: From saas-18.3 onward, the pos_settle_due module introduced a new method to identify settlement lines. While the old method **isSettleDueLine()** is still there, the new **isAnySettleLine()** covers both order settlement and invoice settlement. This change was not reflected in the Saudi POS EDI integration during forward-porting, which caused incorrect validation when processing POS orders containing both regular sale lines and settlement lines. # Current behavior before PR: - Orders containing a mix of new sale lines and settlement lines could bypass the intended validation. - The validation logic relied on the old isSettleDueLine() method # Desired behavior after PR is merged: - Update the validation flow to use isAnySettleLine() (when available) to correctly detect settlement lines. - Prevent validation of POS orders that contain both settlement lines and new sale lines. - Ensure compatibility with newer versions of the pos_settle_due module and restore the intended settlement validation behavior. - Test case to ensure no regression on this feature I confirm I have signed the CLA and read the PR guidelines at [www.odoo.com/submit-pr](http://www.odoo.com/submit-pr) Forward-Port-Of: odoo/odoo#256177 Forward-Port-Of: odoo/odoo#254275
18 changes
Resolved issues and error corrections
This update fixes an issue where failed quality checks weren't correctly splitting stock moves, leading to inaccurate demand calculations. The fix ensures that when a partial failure occurs, the stock move is divided accurately, maintaining correct inventory levels. This improves the reliability of quality control processes and prevents stock discrepancies.
Original PR description
**Steps to reproduce:** * Install the `quality_control` module. * Create a storable product. * Configure a Quality Control Point: * Set Control per : Quantity. * Set Operation Type to Receipts. * Set…
**Steps to reproduce:** * Install the `quality_control` module. * Create a storable product. * Configure a Quality Control Point: * Set Control per : Quantity. * Set Operation Type to Receipts. * Set Product to the created product. * Create a Receipt for the product with a demand of 5 units. * Confirm the receipt and mark it as To Do. * Click on the Quality Check button. * Click on Fail and set the failed quantity to 3. * Click on Confirm. **Observed behavior:** * A new stock move is created for the failed quantity. * The original move is split incorrectly: * First move: 2 `product_uom_qty` and 2 `quantity`. * Second move: 2 `product_uom_qty` and 3 `quantity`. * The failed move has a demand of **2** instead of **3**. **Cause:** * Clicking on *Quality Check* triggers `check_quality`, which opens the wizard `action_open_quality_check_wizard`: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/models/stock_picking.py#L79-L82 * Clicking on *Fail* triggers `do_fail`, opening the confirmation wizard: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/wizard/quality_check_wizard.py#L85-L88 * Clicking on *Confirm* triggers `confirm_fail`, which calls `_move_line_to_failure_location`: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/wizard/quality_check_wizard.py#L97 * In `_move_line_to_failure_location`, a new stock move is created for the failed quantity: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/models/quality.py#L480 * The demand quantity is computed using the minimum of the failed quantity and the move line quantity. * This leads to an incorrect demand of *2* instead of *3*. * However, the move line quantity was already reduced by the failed quantity: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/models/quality.py#L472 **Fix:** * Ensure that partial failures properly split stock moves with correct `product_uom_qty` and `quantity` values. --- opw-5492095 Forward-Port-Of: odoo/enterprise#112298 Forward-Port-Of: odoo/enterprise#107493
This fix addresses a technical issue where AI response errors triggered 500 Internal Server Errors, impacting user experience. Now, errors are presented as messages from the AI agent, providing a smoother and more user-friendly experience for business users.
Original PR description
Currently, when an error occurs during `/ai/generate_response` calls from the frontend, a `UserError` is logged with its exception stack instead of being emitted as a logger warning. Additionally, an…
Currently, when an error occurs during `/ai/generate_response` calls from the
frontend, a `UserError` is logged with its exception stack instead of being
emitted as a logger warning. Additionally, an `UncaughtPromiseError` is
surfaced on the UI.
Error:
```
Error on request:
Traceback (most recent call last):
File "/home/odoo/src/enterprise/saas-19.1/ai/utils/llm_api_service.py", line 302, in _request
response.raise_for_status()
File "/usr/lib/python3/dist-packages/requests/models.py", line 1021, in raise_for_status
```
The issue originates from the `/ai/generate_response` route, which is
defined as a controller `type="http"` to handling POST requests. When
line [1] raises an exception inside this controller, it automatically converts
the unhandled exception into an HTTP response. As a result, the request
returns a `500 Internal Server Error`, which then propagates to the frontend
and appears as an `UncaughtPromiseError`.
This commit fixes the issue by returning internal errors as chat
messages instead of raising exceptions. As a result, the error is
displayed as a message received from the AI agent, rather than
propagating as a server error to internal users.
[1]: https://github.com/odoo/enterprise/blob/423dee8f565a6ca7cd88ec0625a5059920725f50/ai/controllers/thread.py#L83
Sentry-5691330773This update fixes an issue where tax returns were incorrectly including Italian pension fund taxes, leading to discrepancies between reports and the backend view. The change excludes these taxes from the tax return domain, ensuring accurate calculations and consistent reporting for Italian customers. This resolves a reported inconsistency.
Original PR description
The "amount to pay" incorrectly included the Pension Fund taxes, causing inconsistencies between the report and what the customer was able to see in the backend. Now we exclude them from the tax return domain. Steps to reproduce: - Create an Italian company with the Italian CoA - Install `l10n_it_edi_withholding` (not necessary in v19) - Create an invoice - Set the 4% INPS or 4% F.Pens taxes on a line, along with with a normal 22% VAT - Create a tax return Ticket [link](https://www.odoo.com/odoo/project.task/5909407) opw-5909407 Forward-Port-Of: odoo/enterprise#111311
This update corrects an issue where work orders weren't properly tracking consumed components. The previous changes had unintended consequences, so this revert ensures accurate tracking of materials used in work orders. A new test has also been added to prevent similar problems in the future.
Original PR description
Commit [1] has been merged with another commit OC side. However, the latter has impacted some other use cases. This is the reason why we need to revert both. The current commit also improves a test in `test_consume_component.py` to cover the case that has been broken [1] 75febe5a72f091a9940b27c7a59a31f3fe3c407a opw-5939156 Forward-Port-Of: odoo/enterprise#110675
This update fixes a previous error that caused tracebacks when users interacted with the AI using documents opened in the file viewer. The fix ensures the correct file ID is passed to the AI, resolving a 404 error and improving the AI's ability to process documents. Additionally, the AI's behavior when handling images was stabilized.
Original PR description
Before this commit, whenever a user tried to interact with the ai regarding a document opened in the file viewer, they would get a traceback with a 404 error. This was caused by the file id that we passed in the `openAIChat` method of the `AIChatLauncher` service. The id is negative on purpose by the documents team - there is a comment stating that it "prevents a reload from resolving to a real record". Also, the id doesn't reflect the attachment_id, but rather another id dedicated to the file_viewer. On the AI side, when using the id to search for the attachment to send to the AI, we get an error because the id is negative. This bubbles up to the user. We fix this by replacing the `this.file.id` with the `this.file.documentData.attachment_id.id` which is the correct value of the id associated with this document's attachment. Task-6030598
This update fixes an issue where selected failure locations weren't being applied during product repairs. Now, when a quality check fails, the product is automatically moved to the user-specified failure location, ensuring accurate inventory and repair tracking. This improves the reliability of the repair process.
Original PR description
Before this commit: ------------------------- - In the Repair module, when a quality check for a product was marked as failed, Even after selecting a failure location, the failure location is not…
Before this commit: ------------------------- - In the Repair module, when a quality check for a product was marked as failed, Even after selecting a failure location, the failure location is not being set at the final product move. - Instead of showing the selected failure location, the system displayed another location as the move destination after completing the repair process. Steps to reproduce: ------------------------- 1. Install the quality_repair module. 2. In Quality, create a Control Point with: - Type = Pass-Fail - Control Per = Product or Operation - Set at least 1 Failure Location 3. Create a Repair Order for any product and start the repair process. 4. Perform a quality check, set it to Fail, and select a failure location. 5. Open the product moves, the destination location does not match the selected failure location. Cause of the issue: ------------------------- The failure location was not correctly assigned when a quality check failed during the repair process because _move_to_failure_location determines the destination location based on a stock picking (for receipts) or a production_id (for manufacturing). In the Repair module, however, quality checks are linked to a repair order, so the selected failure location was not set correctly. After this commit: ----------------------- - When a quality check fails in a repair order, the product’s destination location is correctly set to the failure location selected by the user. - This ensures that, upon completion of the repair, the product is moved to the selected failure location, maintaining accurate inventory tracking and management. Task ID:5254334 Forward-Port-Of: odoo/enterprise#99235
This update fixes an issue where users were incorrectly grouping POS orders in the l10n_pe_edi_pos module. The system now validates order groupings, preventing errors and providing clear messages to users attempting to combine invoices that don't meet the required criteria. This ensures accurate reporting and compliance for Peruvian businesses.
Original PR description
Joining the values in the selection field with a coma, and then putting everything in another selection field was plain wrong. We now check a bit better what we're generating, and refrain the user with error messages when they try grouping on the same invoices orders that do not share the necessary key values. Forward-Port-Of: odoo/enterprise#111616
This update resolves an issue where the XML generated for Swiss payments (iso20022_ch) was using an outdated payment schema. The fix ensures the XML adheres to current Swiss banking standards, improving payment processing accuracy and compliance. It also includes enhancements for validator schema and QR-IBAN handling.
Original PR description
**PROBLEM** According to documentation (https://www.six-group.com/dam/download/banking-services/standardization/sps/ig-credit-transfer-sps-2025-en.pdf) PstlAdr must be structured. This isn't the case when generating a xml for the payment method iso20022_ch. **STEP TO REPRODUCE** 1. install l10n_ch and account_iso20022. 2. Create a swiss contact with a full address. And activate payment on the bank account of this contact. 3. Select the Company CH, and set a bank account in the bank journal configuration. 4. Create a vendor payment to the swiss contact. 5. Create a batch payment with it, and validate to get the xml. 6. Open the xml, and notice the PstlAdr isn't structured. Ticket [link](https://www.odoo.com/odoo/project.task/5880247) opw-5880247 Forward-Port-Of: odoo/enterprise#111716 Forward-Port-Of: odoo/enterprise#107025
This update fixes an issue where the canteen cost was incorrectly calculated for Belgian employees, even when they had no attendance recorded. The fix ensures that the canteen cost is only applied if the employee has earned money through attendance or work during the payslip period, preventing incorrect charges.
Original PR description
[FIX] l10n_be_payroll: fix canteen cost computation
Bug reproduction: belgium company -> create a new employee -> new contract (payroll wage > 0) -> canteen_cost = 50 -> create payslip -> allocate time off for full month (such that there will be no attendance) -> recompute payslip -> still canteen cost is calculated
Bug cause:
1 - If l10n_be_canteen_cost is > 0 it was computing the canteen cost line for sure
2 - If result_rules['BASIC']['total'] is > 0 then the canteen cost was 50.
Bug solution:
1 - I add worked_days['WORK100'].amount != 0 to the computation condition.
2 - If there is any earned money from attendance or working in that payslip duration, the canteen cost should be deducted completely
3 - If the employee is absent during the payslip, the employee should not pay the canteen cost.
task - 6045406
Forward-Port-Of: odoo/enterprise#111995
Forward-Port-Of: odoo/enterprise#110991This update fixes an error in how project profitability costs were calculated, ensuring accurate tracking of expenses related to purchase orders. The change adjusts the accounting to correctly reflect the cost of goods, preventing double-counting and improving financial reporting. This ensures the 'To Bill' and 'Billed' amounts align with the actual purchase order cost.
Original PR description
Steps to reproduce: ----------------------------------------- 1. Install `sale_purchase_project` and Accounting modules 2. From settings, enable Budget Management 3. Create a new product with type…
Steps to reproduce: ----------------------------------------- 1. Install `sale_purchase_project` and Accounting modules 2. From settings, enable Budget Management 3. Create a new product with type Service and enable Create a project on order. 4. Create and confirm the sale order with that product (note the name of created project) 5. Create and confirm purchase order as follows: > In other information page, select the created project in the Project field > Add the same product in POL, Set price unit price to 100 and remove any tax 6. Create and post a Vendor Bill for the same vendor as the PO as follows: > Add Bill line with label downpayment > Set the Analytic Distribution to the created project > Set amount to 30 7. Go to the created purchase order > Click on bill matching 8. Select the downpayment bill > Add to PO > Select created PO > Add Down Payment 9. Go to the created project and open dashboard Observation: ----------------------------------------- In the Costs section: Expected Cost: 130 To Bill: 100 Billed: 30 Expected values: ----------------------------------------- Expected Cost: 100 To Bill: 70 Billed: 30 Issue: ---------------------------------------- In the following code: https://github.com/odoo/odoo/blob/7e81c528ae350aab4432207f5655dcfadf6ec627/addons/project_purchase/models/project_project.py#L186-L190 When an invoice line was posted (billed), the code correctly subtracted the cost from `amount_invoiced` (making it negative, representing actual cost). But the billed amount was NOT removed from `amount_to_invoice`. This caused double counting the same cost appeared in both 'To Bill' and 'Billed' Solution: ----------------------------------------- Replaced the quantity-based calculation with a proper amount-based approach: - Introduced `total_invoiced_amount` to track the sum of all non-refund invoice line amounts (both posted and draft). - Modified the unbilled calculation to: `PO_amount - total_invoiced_amount`, ensuring that the unbilled portion accurately reflects what remains to be invoiced from the purchase order. - Excluded refunds from `total_invoiced_amount` calculation because credit notes represent reversals of previous invoices, not consumption of the purchase order. Refunds still correctly affect the "billed" and "to_bill" buckets through the normal invoice line processing. This ensures the accounting principle is maintained: Total Expected Cost = Billed + To Bill = Purchase Order Amount opw-5167734 Forward-Port-Of: odoo/odoo#245649
This update resolves a bug where custom snippets using the 'Category' dynamic snippet didn't display correctly in the website preview. The fix ensures that dynamic content from this snippet is now accurately reflected in the preview, improving the user experience when creating custom website content.
Original PR description
Commit 00cf9375b356b2316e24d97234474685e3fb7f94 added the new dynamic snippet for category of product, with a specific interaction. Commit 534a42029d757935788220549aabb8914302a4f3 shows dynamic content of dynamic snippet in snippets preview dialog, but `DynamicSnippetCategory` was missed (in forward port). This commit includes the interaction to load the dynamic content of "Category" dynamic snippet in the snippets preview dialog. Steps to reproduce: - Open website builder - Add a dynamic snippet `s_dynamic_snippet_category_list` - Save the snippet as a custom snippet - Click on "Custom" snippet category - Bug: The preview for the custom snippet does not have the dynamic part task-5427353 Forward-Port-Of: odoo/odoo#255850
This update resolves an issue where prices were still visible in Sale Order subsections even when 'Hide Prices' was enabled on the parent section. The fix ensures that price information is consistently hidden across all sections, including subsections, providing a cleaner and more accurate view of sale order totals. This improves the user experience and data clarity.
Original PR description
Steps to reproduce: --- - Install `Sales` module. - Create a Sale Order. - Add a section with products. - Add a subsection under it with products. - Enable `Hide Prices` on the section. - Enable…
Steps to reproduce: --- - Install `Sales` module. - Create a Sale Order. - Add a section with products. - Add a subsection under it with products. - Enable `Hide Prices` on the section. - Enable `Hide Composition` on the subsection. - Preview the Sale Order. Issue: --- - Prices are still visible in the subsection (grouped view) even though `Hide Prices` is enabled on the parent section. Root cause: --- - The variable `show_section_total` was defined only within the main rendering block and not reused in the grouped (`t-else`) block. - The grouped section summary (used when `collapse_composition=True`) did not respect the parent section's `collapse_prices` setting, causing prices to be displayed. Solution: --- - Moved `show_section_total` definition outside the main conditional block so it can be reused in both rendering paths. - Applied `t-if="show_section_total"` to price fields in the grouped section summary to ensure consistency with the parent section's price visibility. Before: --- <img width="1030" height="232" alt="image" src="https://github.com/user-attachments/assets/1ac05e5e-6841-420f-909f-994690656cc0" /> After: --- <img width="1023" height="232" alt="image" src="https://github.com/user-attachments/assets/921ae337-4d53-433a-a42b-bdc437181889" /> opw-5979807 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#255464
This update fixes an issue where the shipping weight for deliveries wasn't correctly updated when changing the pack type after using the 'put in pack' action. Previously, the system didn't account for the base weight of the new pack type, leading to inaccurate shipping calculations. This ensures accurate shipping costs are reflected in deliveries.
Original PR description
Issue ----- Doing `action_put_in_pack` then changing the pack type to one with a base weight doesn't correctly update the picking's `shipping_weight`. Steps to reproduce ----- - Enable packages - Create package types: - Big box with base weight of 5kg - Huge box with base weight of 15kg - Create a product AAA with weight of 10kg - Create a delivery for 1 unit of AAA - Confirm delivery - Put in pack - Update the pack type to "Big box" > shipping_weight is still 10kg instead of 15kg - Put in pack again - Update the pack type to "Huge box" > shipping_weight is still 10kg instead of 30kg Cause ----- Changing the package type doesn't change its' `shipping_weight`, so we don't trigger the picking's `_compute_shipping_weight`. ----- Ticket: opw-5975689 Forward-Port-Of: odoo/odoo#255764
This update corrects a bug where modifying a recurring event's start time caused duplicate events to be created in Outlook. The fix ensures Microsoft IDs are preserved, preventing notification issues and maintaining accurate event synchronization.
Original PR description
When an attendee syncs a recurring event where the first occurrence (base event) was modified by the organizer, `_write_from_microsoft` falsely triggers the destructive recreation path. This happens because `_has_base_event_time_fields_changed` compares the exception's modified time against the seriesMaster's pattern time, detecting a "change" even though the master hasn't changed. This causes: - All non-base events lose their microsoft_id and ms_universal_event_id - The base event gets recreated without Microsoft IDs - A duplicate event is pushed to Outlook on the next odoo2microsoft sync - Spurious "join the meeting now" notifications are sent to attendees Add a `follow_recurrence` guard so that when the base event is an exception (follow_recurrence=False), the non-destructive else branch is taken instead, preserving all Microsoft IDs. Forward-Port-Of: odoo/odoo#256263 Forward-Port-Of: odoo/odoo#254414
This update fixes an error in the AVCO audit report that was miscalculating added value, leading to inaccurate financial reporting. The change ensures the AVCO value is correctly updated based on the last incoming movement, resolving discrepancies in reported values and improving the accuracy of inventory valuation.
Original PR description
The AVCO audit report currently recalculates the AVCO value on outgoing moves. Based on the logic in `run_average_batch()`, it should instead use the AVCO value computed on the last ingoing move to…
The AVCO audit report currently recalculates the AVCO value on outgoing moves. Based on the logic in `run_average_batch()`, it should instead use the AVCO value computed on the last ingoing move to recalculate the
`added_value`.
On the other hand, the `added_value` should not be recomputed from the AVCO value on ingoing moves.
Source of those changes: [245141](https://github.com/odoo/odoo/pull/245141)
Steps to reproduce the issue:
1. Create a new product. Do not assign it to a category yet.
2. Set the cost (standard_price) to 10$ on the product form.
3. Add 10 units to inventory.
4. Sell and deliver 5 units to a customer.
5. Purchase 10 units at 25$/ea and validate the receipt.
6. Sell and deliver 5 units to a customer.
7. Assign the product to category with AVCO cost method.
8. Go to the AVCO justification report:
- The added value on the purchase is incorrect: 200$ instead of 250$.
- On the last delivery: the added value is -125$ and the AVCO increases from 20$ to 25$.
Ticket: opw-5921104
Forward-Port-Of: odoo/odoo#252239This update ensures the 'Looking for Help' timer is always displayed for live chat channels, regardless of whether an agent is currently involved. This is crucial for accurately tracking service level agreements and ensuring timely escalation of customer inquiries. The fix also corrects inconsistencies in the mock server's timer calculations.
Original PR description
**Description of the issue this PR addresses:** Ensure the `Looking for Help` timer is shown even when the current user is already a member of the livechat channel. **Steps to Reproduce:** 1. Log in…
**Description of the issue this PR addresses:** Ensure the `Looking for Help` timer is shown even when the current user is already a member of the livechat channel. **Steps to Reproduce:** 1. Log in as a visitor and as Mitchell Admin (Live Chat operator). 2. From the visitor side, select I have a pricing question. 3. From the admin side, mark the conversation as Looking for Help. 4. The channel appears in the Looking for Help category. 5. Observe that the timer should be visible there (e.g., 1m). **Current behavior before PR:** - The timer was hidden when an agent was already a member of the conversation, assuming that once an agent joined, the `waiting for help` phase was over. - However, in escalation workflows an analyst may escalate a chat and remain a member while the channel returns to the `Looking for Help` state for another expert. In this case, the escalating analyst could not see the timer needed to track SLA requirements (e.g., creating a ticket after 10 minutes). - Also, the mock server did not recompute `livechat_looking_for_help_since_dt` when `livechat_status` changes, leading to incorrect timer values (e.g., showing 2d instead of < 1m after switching back to Looking for Help). **Desired behavior after PR is merged:** - The timer is displayed whenever the channel is in `need_help` and `livechat_looking_for_help_since_dt` is set, regardless of whether the current user is a member of the channel. - The mock server now mirrors server-side behavior by updating `livechat_looking_for_help_since_dt` when livechat_status changes, prevents missing recomputations and ensuring consistent test behavior. task-[6009851](https://www.odoo.com/odoo/project/1519/tasks/6009851) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where sale order prices weren't accurately reflecting the original, undiscounted amount, especially when discounts were applied. The change ensures that the base price is calculated correctly, excluding any discount lines, leading to more reliable pricing and reporting. This improves the accuracy of sales data.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245246
This update fixes an issue where kit products were incorrectly reporting the full sales price of each component within delivery DDTs. Previously, the report showed individual component values instead of the total kit value. This change ensures accurate reporting of kit component values, improving financial accuracy for IT companies using the system.
Original PR description
Steps to reproduce: - Have an IT company setup - Create a product with a Sales Price and define a kit BOM with 2 components - Create SO with product - Confirm, go to delivery, validate - Print Issue: In the delivery DDT, there is a summary of the delivery where each item has its own entry (product, quantity, value). However, in case of kit BOM, each component is reported with the full value of the sale operation. Analysis: This occurs because in the report code we don't consider the possibility of kit products, where multiple components are associated to the same sale line. Ticket [link](https://www.odoo.com/odoo/project.task/5013606) opw-5013606 Forward-Port-Of: odoo/odoo#255676 Forward-Port-Of: odoo/odoo#224103
5 changes
Resolved issues and error corrections
This update corrects an issue preventing the export of Profit & Loss reports with footnotes enabled in the l10n_lu_reports module. The fix addresses a dependency on an outdated model, ensuring proper XML generation and report functionality. This resolves a technical problem impacting report generation for Luxembourg accounting.
Original PR description
**Steps to reproduce:** * Install the **l10n_lu_reports** module. * Go to **Accounting → Reporting → Profit & Loss**. * Add a footnote on a report line (**⋮ → Annotate**). * Click **Export (XML)** to open the export wizard. * Enable **Import notes as references** and export. **Observed behavior:** * Export fails with `KeyError: 'account.report.manager'`. * XML file cannot be generated when references are enabled. **Cause:** * The export logic relied on the deprecated `account.report.manager` model. * This model was removed in v17([commit](https://github.com/odoo/enterprise/pull/33604/changes#diff-5fc5051f5c0211c0eec96b892e7d29e01b68d804417443502d17bccd8333d7ecL41)) and replaced by `account.report.footnote`. * The footnote retrieval code was not migrated accordingly. **Fix:** * Migrate reference retrieval to use `account.report.footnote`. opw-5890630 Forward-Port-Of: odoo/enterprise#111845 Forward-Port-Of: odoo/enterprise#107765
This update fixes an issue where tax returns for Italian companies incorrectly included pension fund taxes, leading to discrepancies between reports and the backend view. The change excludes these taxes from the tax return calculation, ensuring accurate reporting and alignment with customer data. This resolves a prior inconsistency.
Original PR description
The "amount to pay" incorrectly included the Pension Fund taxes, causing inconsistencies between the report and what the customer was able to see in the backend. Now we exclude them from the tax return domain. Steps to reproduce: - Create an Italian company with the Italian CoA - Install `l10n_it_edi_withholding` (not necessary in v19) - Create an invoice - Set the 4% INPS or 4% F.Pens taxes on a line, along with with a normal 22% VAT - Create a tax return Ticket [link](https://www.odoo.com/odoo/project.task/5909407) opw-5909407 Forward-Port-Of: odoo/enterprise#111311
This update fixes an issue where scanning a different serial number than the reserved one during batch processing didn't create a new lot. The fix ensures that the correct lot is always used when scanning a batch, preventing incorrect inventory tracking. This improves data accuracy and reliability.
Original PR description
Issue ----- When processing batches in barcode, scanning a BC with a different SN than the reserved one does not lead to creating a new lot in stock. The reserved one is still the one getting taken…
Issue
-----
When processing batches in barcode, scanning a BC with a different SN than the reserved one does not lead to creating a new lot in stock. The reserved one is still the one getting taken regardless of setting.
Steps to reproduce
-----
- Enable GS1 nomenclature, lots & batches
- Go to Inventory > Configuration > Operation Types > Delivery Orders
- Enable Lots/Serial Numbers > Create New
- Create a product
- Barcode 23456789012344
- Tracked by SN
- 1 in stock (SN 1234)
- Create a delivery for the product and add it to a batch
- Open the batch in barcode
- Scan 012345678901234410BATCHSN1
- Confirm the delviery
- Go back to the picking and see the lines' details
> The line used the reserved SN
Cause
-----
The existing line gets matched in `_findLine`
https://github.com/odoo/enterprise/blob/45d3a537c3b2eaccee425d959e89d26229e376cd/stock_barcode/static/src/models/barcode_model.js#L1085
because none of the conditions before
https://github.com/odoo/enterprise/blob/45d3a537c3b2eaccee425d959e89d26229e376cd/stock_barcode/static/src/models/barcode_model.js#L1402
get matched. This is unexpected but necessary for batches, as it ensures barcode correctly swaps to the correct picking in the batch. If the line was not matched we would be creating a new line in the same picking than the last scanned line, regardless of which picking the reservation is made in.
Because a line is matched, we have to force its' `lot_id` to `false` so that the new one gets created (`lot_name` is used for display but `lot_id` takes precedence).
-----
Ticket:
opw-5216921
Forward-Port-Of: odoo/enterprise#111956
Forward-Port-Of: odoo/enterprise#109671This update fixes an issue where users were incorrectly grouping POS orders in the l10n_pe_edi_pos module. The system now validates order groupings, preventing errors and providing clear messages to users attempting to combine invoices without the necessary shared identifiers. This ensures accurate reporting and compliance for Peruvian businesses.
Original PR description
Joining the values in the selection field with a coma, and then putting everything in another selection field was plain wrong. We now check a bit better what we're generating, and refrain the user with error messages when they try grouping on the same invoices orders that do not share the necessary key values. Forward-Port-Of: odoo/enterprise#111616
This update resolves an issue where the VAT partner listing report was not displaying all customers. The fix involves adjusting a setting to load all partners, ensuring accurate reporting for VAT compliance in Belgium. This ensures all relevant financial data is available for analysis.
Original PR description
With l10n_be company: - Create at least two invoices for two different customers (companies) for whom you will add a fake VAT number. Make sure the total on both your invoices is more than 250€ and…
With l10n_be company: - Create at least two invoices for two different customers (companies) for whom you will add a fake VAT number. Make sure the total on both your invoices is more than 250€ and set their Accounting date to last year. - Go check the VAT partner Listing report (Accounting > Reporting); make sure you see both partners in the listing. - Click on returns > Check that report return then Submit and download the XML file: both partners & amounts will appear. - Now with dev mode, go to Accounting reports, open the Partner VAT listing form > Options > set the "load more limit" to 1. Download the XML again: only the first partner appears (the only that was loaded with the load more limit. This commit is a backport of bugfix: PR odoo/enterprise#106134 commit e532750fe3dc1f2d10d995d01446b04a3a227a72 Original problem introduced in `saas-18.3`: PR odoo/enterprise#111783 commit 4c927b389252b595bcbb44d020899ae5abf0aa89 Ticket [link](https://www.odoo.com/odoo/project.task/6051120) opw-6051120 Forward-Port-Of: odoo/enterprise#111783
10 changes
Resolved issues and error corrections
This update corrects an issue where modifying a recurring event's start time caused duplicate events to be created in Outlook, leading to incorrect meeting notifications. The fix ensures Microsoft IDs are preserved when the base event is an exception, resolving this duplication problem and improving Outlook synchronization.
Original PR description
When an attendee syncs a recurring event where the first occurrence (base event) was modified by the organizer, `_write_from_microsoft` falsely triggers the destructive recreation path. This happens because `_has_base_event_time_fields_changed` compares the exception's modified time against the seriesMaster's pattern time, detecting a "change" even though the master hasn't changed. This causes: - All non-base events lose their microsoft_id and ms_universal_event_id - The base event gets recreated without Microsoft IDs - A duplicate event is pushed to Outlook on the next odoo2microsoft sync - Spurious "join the meeting now" notifications are sent to attendees Add a `follow_recurrence` guard so that when the base event is an exception (follow_recurrence=False), the non-destructive else branch is taken instead, preserving all Microsoft IDs. Forward-Port-Of: odoo/odoo#256263 Forward-Port-Of: odoo/odoo#254414
This update fixes a problem where PoS orders with additional products prevented successful settlement from the Point of Sale. The system now correctly calculates the total amount based on the PoS order, ensuring sales can be settled properly after down payments and extra items are added. This resolves a scenario where the sale order total was incorrectly calculated.
Original PR description
The following commit introduced a change in compute_unpaid_amount. https://github.com/odoo/odoo/commit/b8b50a797cdc0053643f959eb2d04800163fe005 The unpaid_amount is now computed from the PoS order total instead of the settle payment order line. This causes an issue when the PoS order contains additional product lines besides the settle payment line. In such cases, the total amount may exceed the sale order amount, preventing the sale order from being settled again from the PoS. How to reproduce: - Create a sale order. - Apply a down payment in the PoS. - Add other products before validating the payment. - Ensure the total exceeds the sale order amount. - Pay the order. - Try to settle the same sale order from PoS, cannot find it. opw-5821232
This update fixes an issue where users were incorrectly grouping POS orders in the l10n_pe_edi_pos module. The system now validates order groupings, preventing errors and providing clear messages to users attempting to combine invoices without the necessary shared identifiers. This ensures accurate reporting and compliance for Peruvian businesses.
Original PR description
Joining the values in the selection field with a coma, and then putting everything in another selection field was plain wrong. We now check a bit better what we're generating, and refrain the user with error messages when they try grouping on the same invoices orders that do not share the necessary key values.
This update resolves an issue where credit notes created via 'Reverse and create invoice' didn't correctly show the original invoice's source information. The fix ensures that the source document is accurately reflected in the generated invoice PDF, improving reporting and traceability. This maintains consistent data across invoices and sales orders.
Original PR description
### Issue before this commit: When creating a credit note using “Reverse and create invoice”, the generated invoice loses the Source field. While the original invoice correctly displays the source,…
### Issue before this commit: When creating a credit note using “Reverse and create invoice”, the generated invoice loses the Source field. While the original invoice correctly displays the source, the new invoice created after reversal does not, leading to missing information in the report. ### Steps to reproduce the issue: 1. Create a sales order for product A 2. Deliver product A 3. Create invoice 4. Create credit note by clicking on "Reverse and create invoice" 5. The new invoice correctly remains linked to the Sales order 6. However, the source document disapear on the PDF ### Cause of the issue: In the reversal flow, the new invoice is created using copy_data() without explicitly preserving the invoice_origin field. As a result, the newly created invoice does not inherit the source information from the original invoice, even though it is still logically linked. ### Reason to introduce the fix: To ensure consistency between invoices and preserve important traceability information, the invoice_origin field must be propagated to the new invoice created during the reversal process. This guarantees that the Source is correctly displayed in the PDF. opw-6034574 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254290
We've been experiencing an increase in failed payments due to an issue with the Flutterwave payment processor. This change updates how the phone number is sent to Flutterwave, aligning with a recent API update that requires an unformatted phone number. This resolves the 'invalid billToPhone' error and ensures smoother payment processing.
Original PR description
With are recently seeing an increasing number of payments that fail with an `invalid billToPhone` error. It's unclear if it's a recent change of flutterwave API or of any intermediary payment processor, but the flutterwave v4.0.0-beta API now state to send the phone number "unformatted" - even if there is no such statement for the v3.0.0 API (that we are using), based on testing, sending the phone number "unformatted" do so seems do solve the issue. So this commit, sanitize the phone number to send it unformatted. opw-6074825 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256315
This update fixes an issue where the barcode scanner was incorrectly using the user's company instead of the current business context. This resulted in incorrect barcode lookups. The fix ensures the scanner uses the correct company information, resolving the problem of incorrect product identification.
Original PR description
### Issue: The company used in the main barcode menu is the `company_id` of the user rather than the current contextual company of the session. This is problematic as we might endup using the wrong…
### Issue: The company used in the main barcode menu is the `company_id` of the user rather than the current contextual company of the session. This is problematic as we might endup using the wrong barcode nomenclature. ### Steps to reproduce: - Have 2 companies: company 1 and company 2 - Set the barcode nomenclature of company 1: default, company 2: GS1 - Incarnate a user allowed in both companies but with default company 1 - With company 2, create a product and set its barcode to 36939282410106 - From the main menu open the barcode app and scan 0136939282410106 #### > No product was found (even thought it is correct in GS1) ### Cause of the issue: Scanning from the main barcode menu will trigger a call of the `main_menu` method relying on the nomenclature of the contextual company of the request: https://github.com/odoo/enterprise/blob/804ea21c225a7a1e0763bac188f027adeb3ab78f/stock_barcode/static/src/main_menu/main_menu.js#L98-L99 https://github.com/odoo/enterprise/blob/804ea21c225a7a1e0763bac188f027adeb3ab78f/stock_barcode/controllers/stock_barcode.py#L15-L21 However, when opening the main barcode menu from the app menu, no contextual warehouse was set to the view: https://github.com/odoo/enterprise/blob/804ea21c225a7a1e0763bac188f027adeb3ab78f/stock_barcode/views/stock_barcode_views.xml#L6-L11 As such, the environment of the request will be set here: https://github.com/odoo/odoo/blob/9393b0db6791fe5a7f576cff55705e315fb3dd11/odoo/http.py#L2083 based on the company of the user rather than the one of the context: https://github.com/odoo/odoo/blob/9393b0db6791fe5a7f576cff55705e315fb3dd11/odoo/api.py#L694-L722 ### Fix: Setting the company slices the `current_company` in first position of the `allowed_company_ids`: https://github.com/odoo/odoo/blob/260c69ed64f8663b6935b9863c86aac6dbecd961/addons/web/static/src/webclient/switch_company_menu/switch_company_menu.js#L33-L39 https://github.com/odoo/odoo/blob/260c69ed64f8663b6935b9863c86aac6dbecd961/addons/web/static/src/webclient/switch_company_menu/switch_company_menu.js#L68-L81 which can be recovered from the cookies via the `_get_allowed_company_ids`: https://github.com/odoo/enterprise/blob/43f65ff2f3c6177cc69647bbb85bb40a84409457/stock_barcode/controllers/stock_barcode.py#L432-L442 precisely used by the `_get_barcode_nomenclature`: https://github.com/odoo/enterprise/blob/43f65ff2f3c6177cc69647bbb85bb40a84409457/stock_barcode/controllers/stock_barcode.py#L485-L491 Note that passing the context in the arguments of the `main_menu` JSON route will not really solve the issue by it self since the context is no longer shared with the request: c8cd1d4a83de7a5798cbb910a788fbb6fe208d2f ### Additional Issue: The type `dest_location` does not exist on barcode types: https://github.com/odoo/odoo/blob/485a64b6a1e91feb4310f282c6dd1cd021f1780b/addons/barcodes_gs1_nomenclature/models/barcode_rule.py#L16-L20 so that the type used by these lines can not work: https://github.com/odoo/enterprise/blob/1dedc5bbcee43bfd13e55206e3d7364f715ca9be/stock_barcode/controllers/stock_barcode.py#L29-L30 https://github.com/odoo/enterprise/blob/1dedc5bbcee43bfd13e55206e3d7364f715ca9be/stock_barcode/controllers/stock_barcode.py#L52-L56 ### Steps to reproduce: - In the settings enable: Multi-Steps Routes - Set the barcode nomenclature to GS1 - Set your warehouse in receipt in two steps and add a barcode to the WH/Input: 3033710074365 - From the main menu open the barcode app and scan 4133033710074365 #### > No product or picking was found (even thought it is correct in GS1 that should create an internal transfer with WH/INPUT as destination) opw-5847529 Forward-Port-Of: odoo/enterprise#112006 Forward-Port-Of: odoo/enterprise#111662
This update fixes an error in the Point of Sale session reports where discount amounts were calculated incorrectly. The fix ensures that discounts are applied accurately after the fiscal position is applied, leading to more reliable financial reporting. This improves the accuracy of sales data and reduces potential discrepancies.
Original PR description
Steps: ---- - Create a fiscal position with 2 different taxes - Add a line in POS - Apply fiscal position and add line discount - Finish the order cycle - Download the session report Issue: ---- - The discount amount was calculated incorrectly in the session report Cause: ---- - The discount amount calculation used taxes before applying the fiscal position Fix: ---- - Used `tax_ids_after_fiscal_position` for tax calculation while computing the discount amount task-5421215 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#247072 Forward-Port-Of: odoo/odoo#244650
This update resolves an issue where confirming quantities of archived products through the barcode app would trigger an error. The fix ensures that archived products are included in product searches, allowing users to accurately manage and confirm quantities, maintaining consistent functionality.
Original PR description
Currently, when a user confirms the quantity of an archived product using the product selector in the barcode app, a traceback error occurs. ## Steps to replicate: - Install Inventory - Go to…
Currently, when a user confirms the quantity of an archived product using the product selector in the barcode app, a traceback error occurs. ## Steps to replicate: - Install Inventory - Go to Settings and enable Multi-Step Routes > Set Warehouse Routes. - Configure 2 steps for outgoing shipments. - Go to Inventory and create a new delivery with - **Source Location:** WH/Stock - **Product:** [E-COM10] Pedal Bin with demand 1 - Mark as Todo then Archive the Pedal Bin product. - Open that delivery in barcode app - Pencil icon > +1 > Confirm ## Observed behavior: TypeError: Cannot read properties of undefined (reading 'qty_available') ## Root cause: After this [commit], an override was added to the product selector. As a result, when [2] calls the `search_read` method, it only retrieves non-archived products Consequently, if the result is an empty array, attempting to access `qty_available` causes the type error mentioned above. ## Solution: Adding` active_test = false `to the context ensures that archived products are included in search results. This prevents empty results and avoids the error. It also allows quantities to be added and confirmed,maintaining the same behavior as when using the increment button followed by validation, ensuring consistency. [commit]: https://github.com/odoo/enterprise/commit/6aa814f59f8641d7b57af160e38b50d5bdfc8a97 [2]- https://github.com/odoo/enterprise/blob/e13b44b353e734a6533f7d627ed69b6e7b033ee2/stock_barcode/static/src/js/stock_barcode_sml_form.js#L40-L45 opw-5980428 Forward-Port-Of: odoo/enterprise#109204
This update fixes an issue where the Field Service onboarding tour would stop after redirects to the portal. The change ensures the tour state is preserved in the user's session, allowing the tour to resume seamlessly when returning to the Field Service app. This enhances the user experience for new Field Service users.
Original PR description
**Steps to reproduce:**
1. Go to Field Service app.
2. Check the worksheet template in settings and start the onboarding tour
of Field Service.
**Issue:**
The backend tour is not resuming on the frontend side.
**Fix:**
This commit ensures the tour is enabled and the current tour is added to the frontend session. When the tour resumes, it will fetch the tour enabled and current tour details from the session.
**Technical:**
In the tour service, the tour resumes only if the mode is set to "auto" or toursEnabled is present in the session. To handle this, we added the tour details to the session.
tour_service.js
``` js
if (tourState.getCurrentConfig().mode === "auto" || toursEnabled) {
resumeTour();
}
````
task-4489657
Forward-Port-Of: odoo/odoo#202484This update resolves a problem preventing invoices from being correctly linked to purchase orders. The fix ensures that price comparisons account for the 'Product Price' precision, which was previously causing mismatches. This resolves a critical issue impacting invoice processing for a major customer.
Original PR description
Fixes Task 5213234 Issue: In AccountMove method _find_matching_po_and_inv_lines (called when looking for a subset match of EDI invoice lines with PO lines), the price_unit of a purchase.order.line is…
Fixes Task 5213234 Issue: In AccountMove method _find_matching_po_and_inv_lines (called when looking for a subset match of EDI invoice lines with PO lines), the price_unit of a purchase.order.line is compared to the price_unit of an invoice line. However, currently the comparisons do not take into account the precision to be applied to product prices. In some cases, the invoice line price_unit differs from the price_unit in a PO line, but by less than the "Product Price" precision. With the current comparisons this leads to not matching the lines. This has prevented matching some invoices received via Peppol for at least one big customer (see Task-5213234) Steps to reproduce: - Create an XML document for an EDI UBL invoice with 2 lines; the first line has a price_unit 113.57 euros (for example) - Create a PO with a reference matching the invoice, and one PO line with a price_unit matching the price_unit of the first invoice line (113.57 euros) - Upload the XML invoice and create a bill from it; during the creation of the account.move.line, the price_unit gets a value which is slightly different from 113.57 (113.57000000000001) (due to python rounding ?) - Result: no link is established between the PO and the invoice. This fix makes sure that the "Product Price" precision is used when comparing the invoice line price_unit with a PO line price_unit. opw-5213234 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#235477 Forward-Port-Of: odoo/odoo#232527
3 changes
Resolved issues and error corrections
This update corrects an issue preventing the export of Profit & Loss reports with footnotes enabled in the l10n_lu_reports module. The fix addresses a dependency on an outdated model, ensuring the export process now functions correctly and generates the necessary XML files. This resolves a technical problem impacting report generation for Luxembourg accounting.
Original PR description
**Steps to reproduce:** * Install the **l10n_lu_reports** module. * Go to **Accounting → Reporting → Profit & Loss**. * Add a footnote on a report line (**⋮ → Annotate**). * Click **Export (XML)** to open the export wizard. * Enable **Import notes as references** and export. **Observed behavior:** * Export fails with `KeyError: 'account.report.manager'`. * XML file cannot be generated when references are enabled. **Cause:** * The export logic relied on the deprecated `account.report.manager` model. * This model was removed in v17([commit](https://github.com/odoo/enterprise/pull/33604/changes#diff-5fc5051f5c0211c0eec96b892e7d29e01b68d804417443502d17bccd8333d7ecL41)) and replaced by `account.report.footnote`. * The footnote retrieval code was not migrated accordingly. **Fix:** * Migrate reference retrieval to use `account.report.footnote`. opw-5890630 Forward-Port-Of: odoo/enterprise#111845 Forward-Port-Of: odoo/enterprise#107765
This update fixes an issue where splitting shifts within a single day (using the 'day' view scale) incorrectly duplicated shifts and added unwanted working hours. The change ensures shifts are split accurately at the requested time, preventing time duplication and maintaining correct shift durations.
Original PR description
Since odoo/enterprise#69963, splitting a shift in Gantt view snaps the resulting shifts to the standard working hours (e.g., 08:00 to 17:00). This behavior makes sense when splitting a multi-day shift across a day off, where we want to generate a full working day for the day off as well. However, when splitting a shift within a single day (day scale), this behavior is not wanted, otherwise creating two shifts as follows: 1. A shift from [Original Start] to 5pm 2. A shift from 8am to [Original End] Clearly, the shift is duplicated with the wrong timeframes and adding time outside the original shift's hours. This commits ensures that, when splitting a shift in hours (i.e., when using `day` view scale), the shift is appropriately split at the time requested. For instance: 1. A shift from [Original Start] to [Split Time] 2. A shift from [Split Time] to [Original End] task-5387243
This update resolves an issue where the 'Validate' button in the shopfloor wizard becomes unresponsive after an error occurs when attempting to add a picture to a work order instruction. Previously, users had to restart the wizard to proceed, causing frustration. The fix re-enables the button after an error, streamlining the workflow and improving usability for manufacturing teams.
Original PR description
Current behavior: When trying to validate a picture instruction in shopfloor, Odoo legitimately raises a UserError if the picture is missing. However, even after adding a picture afterward, the…
Current behavior:
When trying to validate a picture instruction in shopfloor, Odoo legitimately raises a UserError if the picture is missing. However, even after adding a picture afterward, the Validate button remains unclickable, forcing the user to close the wizard and start again.
Expected behavior:
Even if an error occurs during validation, the Validate button should remain clickable (especially once the cause is addressed).
Steps to reproduce:
- Create a BoM with one operation - Save.
- Add a "take a picture" instruction on this operation.
- Create a MO with this BoM, confirm it.
- Go to the shopfloor, find the WO of the created MO. Open "instructions".
- Click on the small camera to open the check wizard.
- Confirm without taking a picture or uploading an image.
- Error pops up ("Please upload a picture"), close the popup.
- Then add a picture. => The Validate button remains unclickable. We need to close and re-open the wizard to continue, which can be frustrating and time-consuming for manufacturing users, especially with many instructions.
Issue Explanation:
In MrpQualityCheckConfirmationDialog/doActionAndClose, this.props.record.model.orm.call can legitimately raise a UserError, but the button is disabled at the beginning of the method and remains in this state regardless of what happens afterward.
Fix:
Add a try-catch clause to re-enable the button if an error occurs.
Alternative fix:
The button should remain disabled until a picture is taken, but that sounds like a more disruptive change that might impact other flows.
### Open questions
Do we need to add a test for it? Only a JS tour is suitable which it seems a bit much for this kind of bug. What do you think?
https://github.com/odoo/odoo/pull/246481
Forward-Port-Of: odoo/enterprise#1059906 changes
Resolved issues and error corrections
This update fixes an issue where failed quality checks weren't correctly splitting stock moves when partial failures occurred. Specifically, the demand quantity was miscalculated, leading to incorrect move splitting. The fix ensures that failed quantities are properly handled, maintaining accurate stock movements and demand calculations. This improves the reliability of quality control processes.
Original PR description
**Steps to reproduce:** * Install the `quality_control` module. * Create a storable product. * Configure a Quality Control Point: * Set Control per : Quantity. * Set Operation Type to Receipts. * Set…
**Steps to reproduce:** * Install the `quality_control` module. * Create a storable product. * Configure a Quality Control Point: * Set Control per : Quantity. * Set Operation Type to Receipts. * Set Product to the created product. * Create a Receipt for the product with a demand of 5 units. * Confirm the receipt and mark it as To Do. * Click on the Quality Check button. * Click on Fail and set the failed quantity to 3. * Click on Confirm. **Observed behavior:** * A new stock move is created for the failed quantity. * The original move is split incorrectly: * First move: 2 `product_uom_qty` and 2 `quantity`. * Second move: 2 `product_uom_qty` and 3 `quantity`. * The failed move has a demand of **2** instead of **3**. **Cause:** * Clicking on *Quality Check* triggers `check_quality`, which opens the wizard `action_open_quality_check_wizard`: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/models/stock_picking.py#L79-L82 * Clicking on *Fail* triggers `do_fail`, opening the confirmation wizard: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/wizard/quality_check_wizard.py#L85-L88 * Clicking on *Confirm* triggers `confirm_fail`, which calls `_move_line_to_failure_location`: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/wizard/quality_check_wizard.py#L97 * In `_move_line_to_failure_location`, a new stock move is created for the failed quantity: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/models/quality.py#L480 * The demand quantity is computed using the minimum of the failed quantity and the move line quantity. * This leads to an incorrect demand of *2* instead of *3*. * However, the move line quantity was already reduced by the failed quantity: https://github.com/odoo/enterprise/blob/90567af2703a3928c35814a0c4862b4cd98b8432/quality_control/models/quality.py#L472 **Fix:** * Ensure that partial failures properly split stock moves with correct `product_uom_qty` and `quantity` values. --- opw-5492095 Forward-Port-Of: odoo/enterprise#112298 Forward-Port-Of: odoo/enterprise#107493
This update fixes an issue where users were incorrectly grouping POS orders. The system now validates order groupings, preventing errors and providing helpful messages to users attempting to combine invoices that don't meet the required criteria. This ensures accurate reporting and data integrity for Peru-specific tax processing.
Original PR description
Joining the values in the selection field with a coma, and then putting everything in another selection field was plain wrong. We now check a bit better what we're generating, and refrain the user with error messages when they try grouping on the same invoices orders that do not share the necessary key values. Forward-Port-Of: odoo/enterprise#111616
This update fixes an error that prevented users from completing the offer signing process due to a database issue. The problem occurred when an empty field for UAN/PAN/ESIC was stored as a string instead of a null value, triggering a duplicate key error. The fix ensures empty fields are correctly stored as NULL, resolving the error and allowing offer signing to proceed smoothly.
Original PR description
**Version:** master **Issue:** An error occurs during the offer signing process stating that the UAN/PAN/ESIC already exists. **Cause:** When a unique Char field is submitted empty in the salary configurator form, it is stored as an empty string in the database instead of NULL. Since PostgreSQL's unique constraint treats empty strings as real values, any subsequent configurator form opened for a new applicant triggers a duplicate key violation error. **Fix:** Explicitly convert empty unique Char field values to NULL before storing them in the database. **Task-5924388** Forward-Port-Of: odoo/enterprise#111296
This update fixes an issue where product locations weren't correctly set after a quality check failed during the repair process. Now, when a quality check fails, the product is automatically moved to the selected failure location, ensuring accurate inventory management and preventing misrouted products. This improves repair efficiency and data integrity.
Original PR description
Before this commit: ------------------------- - In the Repair module, when a quality check for a product was marked as failed, Even after selecting a failure location, the failure location is not…
Before this commit: ------------------------- - In the Repair module, when a quality check for a product was marked as failed, Even after selecting a failure location, the failure location is not being set at the final product move. - Instead of showing the selected failure location, the system displayed another location as the move destination after completing the repair process. Steps to reproduce: ------------------------- 1. Install the quality_repair module. 2. In Quality, create a Control Point with: - Type = Pass-Fail - Control Per = Product or Operation - Set at least 1 Failure Location 3. Create a Repair Order for any product and start the repair process. 4. Perform a quality check, set it to Fail, and select a failure location. 5. Open the product moves, the destination location does not match the selected failure location. Cause of the issue: ------------------------- The failure location was not correctly assigned when a quality check failed during the repair process because _move_to_failure_location determines the destination location based on a stock picking (for receipts) or a production_id (for manufacturing). In the Repair module, however, quality checks are linked to a repair order, so the selected failure location was not set correctly. After this commit: ----------------------- - When a quality check fails in a repair order, the product’s destination location is correctly set to the failure location selected by the user. - This ensures that, upon completion of the repair, the product is moved to the selected failure location, maintaining accurate inventory tracking and management. Task ID:5254334 Forward-Port-Of: odoo/enterprise#99235
This update fixes a calculation error related to paid leave time off, specifically for employees using the UAE Monthly pay structure. The change ensures that hourly wage calculations are accurate, preventing incorrect salary adjustments when computing payslips, particularly when multiple payslips are involved.
Original PR description
### Steps to reproduce: - Install the l10n_ae_hr_payroll module. - Configure at least two employees, who'll use the UAE Monthly pay structure. - On at least one of the employees, set the work entry…
### Steps to reproduce: - Install the l10n_ae_hr_payroll module. - Configure at least two employees, who'll use the UAE Monthly pay structure. - On at least one of the employees, set the work entry source to attendance. - Register a paid leave time off entry, for the employee whose work entry source is set to attendance. - Compute a payslip batch using the UAE Monthly pay structure. - Go to the payslip of the employee with the work entry source set to attendance and compute the sheet again. - The 'Paid Leave' salary rule results, will change given that the computation of the field l10n_ae_hourly_wage is different when the computation is done for batches and individually. ### Cause: In 'Paid Leave' rule we use l10n_ae_hourly_wage to compute its result and while computing this field we use self.worked_days_line_ids instead of record inside the loop. This leads to an issue when self has more than one payslip it will take into account all the worked days for each payslip for different employees ### Fix: We use record instead of self to avoid taking other payslips into consideration while computing the hourly wage. opw-5979631 Forward-Port-Of: odoo/enterprise#112229 Forward-Port-Of: odoo/enterprise#111280
This update resolves an issue where night shift slots (e.g., 20PM - 4AM) were not visible in the weekly planning view. The fix adjusts how the system displays multi-day slots, ensuring all scheduled hours are accurately shown. This improves the planning experience for employees with flexible work arrangements.
Original PR description
**Steps to reproduce** 1. Have an employee using a flexible schedule 2. Create a slot from e.g. 20PM to 4AM for this employee. Make sure this is the only slot that week for the employee. 3. Publish…
**Steps to reproduce** 1. Have an employee using a flexible schedule 2. Create a slot from e.g. 20PM to 4AM for this employee. Make sure this is the only slot that week for the employee. 3. Publish the Schedule and send it to the employee. Open the outgoing mail to access the link to the planning view. Issue: the slot is not visible in the week view. **Cause** https://github.com/odoo/enterprise/blob/04a885dbb6eed96297cb5ce9a155ebf8e169427c/planning/controllers/main.py#L193-L194 The `event_hour_min` and `event_hour_max` returned by `planning_get` and used to control the min/max hours displayed in the week view, didn't account for slots over multiple days. For a slot between 20pm and 4am, the `event_hour_max` should be the end of the day, and the `event_hour_min` should be the start of the day. **Solution** - we change the `event_hour_min` and `event_hour_max` for multi-day slots to display the full days in the week view - the previous point has the drawback of displaying the full days for non-flexible employees even when not necessary. This is because `slots_start_datetime` and `slots_end_datetime` contained the `planning.slot` start and end. Instead, we can look at the actual slot values displayed (by `_get_slots_vals`). For example, a 5 day slot for a non-flexible employee may contain actual slot values corresponding to a typical 8-17 working day. opw-5245985 Forward-Port-Of: odoo/enterprise#111876 Forward-Port-Of: odoo/enterprise#99784
6 changes
Resolved issues and error corrections
This pull request fixes inaccuracies in the PEPOL XML files generated for Peru (l10n_pe_edi). Specifically, it adjusts the number of digits used for unit prices and multiplier factors to ensure accurate calculations, resolving discrepancies in tax amounts. This improves the reliability of financial reporting.
Original PR description
PR https://github.com/odoo/odoo/pull/255358 introduce a fix that increase the unit price number of digits in the peppol xml if they are significants. It also increases the precision for MultiplierFactorNumeric, which fixes some xml in l10n_pe_edi. For example, previously: MultiplierFactorNumeric = 0.00965 BaseAmount = 10097.46 Amount = 97.46 But `0.00965 * 10097.46 = 97.440489 ≃ 97.44 != 97.46` Now we have multiplierFactorNumeric = 0.00965193227 `0.00965193227 * 10097.46 = 97.4600000190342 ≃ 97.46` Overall, we are more precise, which means the computation are correct now. opw-6009771
This update resolves an issue where kitchen tickets were being printed multiple times when orders were rejected. The fix prevents duplicate printing by ensuring the print token is properly managed during order rejection, improving the reliability of order processing. Preparation messages are now correctly sent after order acceptance.
Original PR description
Bug fix: - Prevent duplicate kitchen ticket printing on order rejection. When a user rejects an order, the reject RPC triggers a webhook that calls _fetchPlatformOrder on all devices. This led to deleteOrders being called twice (once by the reject flow, once by the webhook). Fix: claim the print token via mark_platform_prep_order_as_printed in _rejectOrder before sending the reject RPC, so no device gets isReadyToPrint=true from the webhook. - Preparation needs to be sent after PoS accepts the order. ticket-6071740
This update strengthens security by adding validation when bank statements are automatically synchronized with a journal. Previously, any bank account linked to a journal using online synchronization was automatically trusted. Now, the system will validate the bank account to improve data integrity and reduce potential risks.
Original PR description
When a journal is configured to register bank statements using online synchronization, the bank account linked to the bank journal is automatically trusted. task-6017819
This update fixes an issue where tax returns for Italian companies incorrectly included pension fund taxes, leading to discrepancies between reports and the backend view. The change excludes these taxes from the tax return calculation, ensuring accurate reporting and alignment with customer data. This resolves a previous inconsistency impacting financial reporting.
Original PR description
The "amount to pay" incorrectly included the Pension Fund taxes, causing inconsistencies between the report and what the customer was able to see in the backend. Now we exclude them from the tax return domain. Steps to reproduce: - Create an Italian company with the Italian CoA - Install `l10n_it_edi_withholding` (not necessary in v19) - Create an invoice - Set the 4% INPS or 4% F.Pens taxes on a line, along with with a normal 22% VAT - Create a tax return Ticket [link](https://www.odoo.com/odoo/project.task/5909407) opw-5909407 Forward-Port-Of: odoo/enterprise#111311
This update fixes an issue where global invoices generated from customer invoices weren't correctly including the issued address's zip code in the XML export. The change ensures that the 'LugarExpedicion' field accurately reflects the shipping address, which is crucial for compliance with Mexican tax regulations. This improves the accuracy of invoice data for reporting and auditing.
Original PR description
**STEP TO REPRODUCE** 1. install l10n_mx_edi_extended. 2. Add an issued address on the customer invoice journal, with a zip code. 3. Create invoices, and create a global invoice with them. 4. download the xml, and notice the field LugarExpedicion is not using the zip from the issued address while it should. opw-5956837 Forward-Port-Of: odoo/enterprise#112107 Forward-Port-Of: odoo/enterprise#108732
This update fixes an issue where users were incorrectly grouping POS orders in the l10n_pe_edi_pos module. The system now validates order groupings, preventing errors and providing clear messages to users attempting to combine invoices that don't meet the required criteria. This ensures accurate reporting and compliance for Peruvian tax requirements.
Original PR description
Joining the values in the selection field with a coma, and then putting everything in another selection field was plain wrong. We now check a bit better what we're generating, and refrain the user with error messages when they try grouping on the same invoices orders that do not share the necessary key values. Forward-Port-Of: odoo/enterprise#111616
6 changes
Resolved issues and error corrections
This update optimizes the process of validating purchase orders with related stock movements, significantly reducing database load and improving speed. Previously, each stock movement triggered multiple database operations, now a single batch process handles all movements, resulting in faster order validation, especially for large orders.
Original PR description
Before this PR, `button_validate` was using a `write()` call per matched stock move. On every `write()` there is a Command.create and Command.delete which is resulting in N database round-trips for the unlinks and N for the creates, followed by N separate `_apply_putaway_strategy()` calls. This is problematic for pickings with many move_ids. This PR attempts to accumulates all move lines to delete and to create. Then performs a single `unlink()` and `create()`, followed by a single `_apply_putaway_strategy()` for all pickings. Unlink is done using `.sudo()` to preserve the superuser context that was previously inherited implicitly through the `purchase_order.sudo().search` that produced the recordset used to obtain the `receipt_move`(s). Benchmarks: | No. move lines in delivery | Before | After | | -------------------------- | ------- | ----- | | 7579 | Timeout | < 200 s | opw-5826905 Forward-Port-Of: odoo/enterprise#110153
This update resolves an issue where credit notes created via 'Reverse and create invoice' would lose the link to the original invoice, preventing accurate reporting. The fix ensures the original invoice's source information is correctly propagated to the new credit note, maintaining traceability and data consistency.
Original PR description
### Issue before this commit: When creating a credit note using “Reverse and create invoice”, the generated invoice loses the Source field. While the original invoice correctly displays the source,…
### Issue before this commit: When creating a credit note using “Reverse and create invoice”, the generated invoice loses the Source field. While the original invoice correctly displays the source, the new invoice created after reversal does not, leading to missing information in the report. ### Steps to reproduce the issue: 1. Create a sales order for product A 2. Deliver product A 3. Create invoice 4. Create credit note by clicking on "Reverse and create invoice" 5. The new invoice correctly remains linked to the Sales order 6. However, the source document disapear on the PDF ### Cause of the issue: In the reversal flow, the new invoice is created using copy_data() without explicitly preserving the invoice_origin field. As a result, the newly created invoice does not inherit the source information from the original invoice, even though it is still logically linked. ### Reason to introduce the fix: To ensure consistency between invoices and preserve important traceability information, the invoice_origin field must be propagated to the new invoice created during the reversal process. This guarantees that the Source is correctly displayed in the PDF. opw-6034574 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254290
Recent payments were failing due to an 'invalid billToPhone' error. This update corrects the way phone numbers are sent to Flutterwave, aligning with a recent change in the Flutterwave API that requires unformatted phone numbers. This resolves the payment failures and ensures smoother transactions.
Original PR description
With are recently seeing an increasing number of payments that fail with an `invalid billToPhone` error. It's unclear if it's a recent change of flutterwave API or of any intermediary payment processor, but the flutterwave v4.0.0-beta API now state to send the phone number "unformatted" - even if there is no such statement for the v3.0.0 API (that we are using), based on testing, sending the phone number "unformatted" do so seems do solve the issue. So this commit, sanitize the phone number to send it unformatted. opw-6074825 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256315
This update fixes a bug that caused users to get stuck when duplicating leave requests. The issue stemmed from incorrect handling of employee IDs during duplication, leading to validation errors. The fix ensures that employee IDs are properly copied during duplication, allowing users to successfully return to the draft mode.
Original PR description
# How to reproduce - Create a time off request for a single employee - Refuse it - Duplicate it - Refuse the duplicate - Try to go back to draft # The problem The user is deadlocked and cannot go…
# How to reproduce
- Create a time off request for a single employee
- Refuse it
- Duplicate it
- Refuse the duplicate
- Try to go back to draft
# The problem
The user is deadlocked and cannot go back to draft because of a client validation on the field employee_ids. The user cannot change that field because it is readonly, so he is stuck.
# Why
When duplicating a hr.leave, employee_id is copied but not employee_ids. Going back to the issue steps, if you look at the Employees field of the duplicate, it is empty. This later cause the issue with the client side validation.
Copying employee_ids when there are multiple employees did not seem like the best idea because a lot of flows relies on employee_id. employee_id is computed as follows :
```py
def _compute_from_employee_ids(self):
for holiday in self:
if len(holiday.employee_ids) == 1:
holiday.employee_id = holiday.employee_ids[0]._origin
else:
holiday.employee_id = False
```
So if we copy multiple employees in employee_ids, employee_id will be null, which might break these flows.
opw-5995398
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#253075This update resolves a previous issue where users were permanently blocked with demo transactions in the Point of Sale system. Now, users can more easily delete or sync demo transactions, providing greater control and flexibility. This change ensures a smoother workflow for testing and demonstration purposes.
Original PR description
Before this commit:
- The fields `l10n_jo_edi_pos_{state, return_reason}` were readonly when
`l10n_jo_edi_pos_qr` was set. However, we did not take into account the fact
that `pos.order` cannot be reset once `done/paid/invoiced`; thereby blocking
the user with a demo transaction forever without any alternative.
After this commit:
- The fields `l10n_jo_edi_pos_{state, return_reason}` are readonly when
`l10n_jo_edi_pos_qr and l10n_jo_edi_state == 'sent'`. Additionally, an
onchange is introduced on `l10n_jo_edi_pos_state` to clear
`l10n_jo_edi_pos_qr`. This gives back flexibility to the user to either delete
the demo mode transaction or sync them to the production endpoint.
task-5958427This update corrects a discrepancy in how Odoo handles purchase order confirmations. Previously, sub-locations weren't correctly reflected as the final destination for stock moves, leading to inaccurate forecasted quantities. This fix prioritizes the intended sub-location, ensuring accurate quantity tracking and reporting.
Original PR description
### **Description of the issue/feature this PR addresses:** **Issue:** In Odoo 18/19, purchase move lines default to the WH's main stock location (`lot_stock_id`) as the `location_final_id`. However,…
### **Description of the issue/feature this PR addresses:** **Issue:** In Odoo 18/19, purchase move lines default to the WH's main stock location (`lot_stock_id`) as the `location_final_id`. However, when a user configures a sub-location on the Receipt Operation Type, the picking destination is correct, but the move lines are defaulted to the main warehouse. This mismatch causes the Forecasted Quantity to not increment for the intended sub-location **Solution:** Prioritize the `default_location_dest_id` before falling back to the default stock location opw-6032018 ### **Current behavior before PR:** When confirming a PO, the `location_final_id` on stock moves defaults to the `lot_stock_id`, regardless of the specific destination set on the Operation Type. This causes a mismatch in 1-step receiving flows where a sub-location (e.g., WH/Stock/Test) is intended, since the move lines revert to the root warehouse location (WH/Stock). Thus, the forecasted quantity for the specific sub-location doesn't increment as expected. ### **Desired behavior after PR is merged:** The `_get_final_location_record` method will now evaluate if the Operation Type's `default_location_dest_id` is a child of the warehouse's main stock. If it is, the sub-location is used as the `location_final_id` for the moves and move lines. This ensures that the forecasted quantity reflects the intended destination upon PO confirmation while still maintaining the fallback to the warehouse root for standard multi-step routes. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
4 changes
Resolved issues and error corrections
This update fixes a bug that prevented users from reverting time off requests to draft mode. The issue stemmed from how employee IDs were copied during duplication, leading to validation errors. The fix ensures correct employee ID handling during duplication, restoring functionality.
Original PR description
# How to reproduce - Create a time off request for a single employee - Refuse it - Duplicate it - Refuse the duplicate - Try to go back to draft # The problem The user is deadlocked and cannot go…
# How to reproduce
- Create a time off request for a single employee
- Refuse it
- Duplicate it
- Refuse the duplicate
- Try to go back to draft
# The problem
The user is deadlocked and cannot go back to draft because of a client validation on the field employee_ids. The user cannot change that field because it is readonly, so he is stuck.
# Why
When duplicating a hr.leave, employee_id is copied but not employee_ids. Going back to the issue steps, if you look at the Employees field of the duplicate, it is empty. This later cause the issue with the client side validation.
Copying employee_ids when there are multiple employees did not seem like the best idea because a lot of flows relies on employee_id. employee_id is computed as follows :
```py
def _compute_from_employee_ids(self):
for holiday in self:
if len(holiday.employee_ids) == 1:
holiday.employee_id = holiday.employee_ids[0]._origin
else:
holiday.employee_id = False
```
So if we copy multiple employees in employee_ids, employee_id will be null, which might break these flows.
opw-5995398
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prWe've been experiencing an increase in failed payments due to an 'invalid billToPhone' error. This update corrects the way phone numbers are sent to Flutterwave, aligning with a recent change in the Flutterwave API. This resolves the issue and ensures smoother payment processing.
Original PR description
With are recently seeing an increasing number of payments that fail with an `invalid billToPhone` error. It's unclear if it's a recent change of flutterwave API or of any intermediary payment processor, but the flutterwave v4.0.0-beta API now state to send the phone number "unformatted" - even if there is no such statement for the v3.0.0 API (that we are using), based on testing, sending the phone number "unformatted" do so seems do solve the issue. So this commit, sanitize the phone number to send it unformatted. opw-6074825 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#256315
This update fixes a performance issue where calculating cumulated balances consumed excessive memory, leading to server crashes. The change refines the query to process only relevant account move lines, significantly reducing memory usage and processing time. This improves overall system stability and responsiveness.
Original PR description
The _compute_cumulated_balance() method performs a query over every existing move lines to get a dict associating the record id with the cumulated sum at this point. When there is a lot of move…
The _compute_cumulated_balance() method performs a query over every existing move lines to get a dict associating the record id with the cumulated sum at this point. When there is a lot of move lines, the result returned by fetchall() hits the memory limit and the server crashes. We propose to encapsulate the original query to only return the result for the account move lines present in self. Benchmarks --------------- The following benchmarks were generated with a customization of the account.move.line list view to display the cumulated_balance field. Memory usage during the self.env.cr.execute and the dictionary population: | Operation | Before the fix | After the fix | |---------------|----------------|---------------| | populate dict | 1.5 GB | 17.1 MB | | execute query | 430 MB | 8.3 MB | 100 000 lines were displayed at the same time to get a significant size. So the number of records in self is more than 7 000 000 without the fix and 100 000 with the fix. Time spent in the _compute_cumulated_balance method: | No of AML | Before the fix | After the fix | |-----------|----------------|---------------| | 7 000 000 | 10.4 s | 6.8 s | opw-6053720 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where QR codes generated for Swiss bank payments were being rejected. The fix filters out unauthorized Unicode characters from the QR-Bill, ensuring compliance with Swiss banking regulations which limit the QR code characters to a specific, approved set. This prevents payment failures and improves the reliability of our Swiss accounting integration.
Original PR description
**Description of the issue/feature this PR addresses:** QR code is rejected by the bank, when it contains an invalid character `U+202F`. **Current behavior before PR:** Unauthorized Unicode characters are encoded in the QR-Bill, and it is rejected on the receiving part. **Desired behavior after PR is merged:** Any Unicode codepoint which is not in the subset of 324 allowed codepoints has to be filtered out. > spec of QR-bill allows only a subset of characters, a precise list of 324 Unicode codepoints (section 4.1.1, page 30 of the Swiss Implementation Guidelines for the QR-bill) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#254980