Daily updates from Odoo
Friday, November 28, 2025
89 changes
17 changes
Resolved issues and error corrections
This update fixes a technical error that occurred when users attempted to adjust partial payments made through SEPA QR payments in the Point of Sale module. The fix ensures a smoother payment process by preventing a traceback error and restricting the 'Adjust Amount' button to compatible payment methods. This improves the reliability of SEPA QR payments for business customers.
Original PR description
Steps to reproduce: ==================== - Create a SEPA QR payment method (for a BE company). - Create an order and select this payment method. - Manually change the payment amount (partial amount). - Confirm the partial payment. - Click on the "Adjust Amount" button a traceback occurs. Issue: ======= In the XML template, the JS method `sendPaymentAdjust()` was being called, but this method was not defined on the JS side, leading to a traceback when the button was clicked. Fix: ===== - Restricted visibility of the "Adjust Amount" button to payment terminal methods that support adjustment. - Added the missing JS method to handle the call and prevent traceback. Task-5241346 Forward-Port-Of: odoo/odoo#237608 Forward-Port-Of: odoo/odoo#235281
This update fixes a critical issue where purchase taxes for the Brazilian localization (l10n_br) were missing or incorrectly configured in Odoo. This ensures accurate tax calculations and compliance with Brazilian tax regulations, improving financial reporting.
Original PR description
**Issue:** Many purchase taxes for Brazilian localization were missing. Also some taxes have an incorrect tax tag. **PR (Enterprise)**: https://github.com/odoo/enterprise/pull/100340 opw-5044423 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes an issue where Brazilian vendor bills incorrectly applied sales taxes instead of purchase taxes. The change ensures that the correct tax type (e.g., COFINS) is used when calculating taxes through AvaTax, improving financial accuracy for Brazilian businesses using the Enterprise edition.
Original PR description
**Steps to reproduce:** - Install accountant, l10n_br and l10n_br_avatax - Switch to a Brazilian company - In Accounting settings, configure AvaTax (require credentials) - Create a bill - Compute taxes with AvaTax **Issue:** If a tax like "COFINS Incl." should be added, the Sales tax is added instead of the Purchases one, resulting in an incorrect account for the tax line. **Cause:** Brazilian localization allows to use AvaTax for vendor bills, but the external tax feature doesn't take into account the type of the tax when searching for one. It just returns the first one based on the name, the amount and some other domains. **Solution:** Add the tax type in the domain when searching a Brazilian tax. **PR (Community):** https://github.com/odoo/odoo/pull/236930 opw-5044423
This update corrects a bug where the 'Use Documents' option wasn't correctly enabled for LATAM invoices during setup. The change ensures that when LATAM fiscal localization is selected, this crucial setting is automatically applied to the relevant journals, streamlining invoice processing for Latin American clients. This resolves an issue impacting invoice accuracy and compliance.
Original PR description
### Issue: During the loading of fiscal position data for LATAMs the option "Use Documents" on Journals is not set-up. ### Steps to reproduce: - Install 'l10n_ar' - Settings > Accounting - Make sure…
### Issue: During the loading of fiscal position data for LATAMs the option "Use Documents" on Journals is not set-up. ### Steps to reproduce: - Install 'l10n_ar' - Settings > Accounting - Make sure the "Fiscal Localization" have a value (not Argentina) - Change the "Fiscal Localization" to "Argentine - Generic Chart of Accounts [...]" - Go in Accounting > Configuration > Journals - Click on "Ventas Preimpreso" - The journal don't have "Use Documents" ticked but it should ### Cause: When loading the data, `_get_chart_template_data()` calls `_get_ar_base_res_company()` and `_get_latam_document_account_journal()`. The first one returns the data to change `res.company.account_fiscal_country_id` to `base.ar`. The second one [checks](https://github.com/odoo/odoo/blob/26a5384af0af8fc6e6b5a10bea277f937e2b3481/addons/l10n_latam_invoice_document/models/account_chart_template.py#L12) that [`self.env.company.account_fiscal_country_id.code == "AR"`](https://github.com/odoo/odoo/blob/d985ec2e9b61b5e6c36a278654d526aaa5b512e2/addons/l10n_ar/models/res_company.py#L36) before returning the data to change `l10n_latam_use_documents` to `True`. As `res.company.account_fiscal_country_id` has not been updated, it's not Argentina during the check and `_get_latam_document_account_journal()` returns nothing. ### Solution: When loading the template, we cannot use `res.company.account_fiscal_country_id` to know if we are in LATAM or not. So instead we check on `chart_template`. opw-5221931 Forward-Port-Of: odoo/odoo#237725 Forward-Port-Of: odoo/odoo#236217
This update resolves an issue where related fields in Odoo were incorrectly identified as 'float' instead of 'numeric'. This fix ensures data types are consistent, preventing potential errors during upgrades and improving data integrity. The change also addresses a performance concern related to unnecessary computations during upgrades.
Original PR description
**Steps to Reproduce:** 1. create test ``Float`` field in model ``A`` with ``digits`` args 2. create ``Many2One`` field with comodel ``A`` and then create Float Field in ``B Model`` with related…
**Steps to Reproduce:** 1. create test ``Float`` field in model ``A`` with ``digits`` args 2. create ``Many2One`` field with comodel ``A`` and then create Float Field in ``B Model`` with related ``A`` model test and store True **Issue:** 1. ``column_type`` for both model table will be different. For ``test field in model A`` the ``column_type`` will be ``numeric``. But for the related field ``column_type`` ``float`` it should be ``numeric``. This happen because the @lazy_propery it hold the ``column_type`` which is ``float8`` and other related attributes from ``setup_related`` before that ``_digits`` have the null value. So, from [here](https://github.com/odoo-dev/odoo/blob/a9398502260fa57573b88fd62ca3f554e0685c7b/odoo/fields.py#L772) it remains ``float8`` it should update with ``numeric`` **Second issue comes From odoo 18.3**:= during upgrade if any new ``module`` is intalled due to dependency change and inherits the same model that is ``A``. Due to ``_auto_init`` it will recompute this related field because due to this newly [commit](https://github.com/odoo/odoo/commit/f5ce6784fce1ae27c3e92090b3723e9d4ce45808) clear the columns column becomes [``False``] and [``not column``] becomes true from ``update_db`` and same reason as above it didn't return from [here](https://github.com/odoo/odoo/commit/f5ce6784fce1ae27c3e92090b3723e9d4ce45808#diff-956d895aa67961bac940841f7c3d1e10eb8ecabec82ef017803c4a6a3bb7cd22R1074) because column type is ``float8`` which leads to memory of unecessary compute which shouldn't do in first place. **FIX:** Remove the ``column_type`` and let it get again as soon ``_digits`` attribute add. before fix:- ``` SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'account_move_line' AND column_name = 'test_line_id'; column_name | data_type --------------+------------------ test_line_id | double precision (1 row) ``` After fix:- ``` SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'account_move_line' AND column_name = 'test_line_id'; column_name | data_type --------------+----------- test_line_id | numeric (1 row) ``` opw-5222760 upg-3253635 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237544 Forward-Port-Of: odoo/odoo#235112
This update fixes an issue where adding shifts to existing rental orders didn't correctly update the order line and total price. The fix ensures that the order line is created and updated when a shift is added to the last rental order, improving the accuracy of rental order management. This prevents discrepancies in pricing and order details.
Original PR description
**steps to reproduce:** - Configure a booking product as service and rental. - Confirm a shift to create a rental order. - Activate sync on the role. - Add a new shift with the same product using "Add to last order". - Open the rental order: the order line and total price are not updated. **issue:** The price and the order line were not updated when a new shift was added to the last order. **cause:** Previously, adding a new shift to a rental order did not add the order line on the corresponding order. becacuse we was not checking the state of the order and at line creation line will be created for confirmed order only. **fix:** A check is added when the getting the rental order it should be confirmed. task-5093190
This update resolves an error in the French payroll module (l10n_fr_payroll) caused by a change in the underlying Odoo database structure. Specifically, the module was referencing an outdated field name ('contract') instead of the correct one ('version'). This fix ensures the payroll calculation process runs smoothly.
Original PR description
Steps to reproduce: 1. Open database with version saas-18.4 2. Install module l10n_fr_hr_payroll_with_accounting 3. Make sure that your company's country is France. 4. Set `Salary Journal` in:…
Steps to reproduce: 1. Open database with version saas-18.4 2. Install module l10n_fr_hr_payroll_with_accounting 3. Make sure that your company's country is France. 4. Set `Salary Journal` in: `Configuration` -> `Structure` -> `FR: Employe Carde` -> `Employe Carde` 5. In Payroll app create a payslip for any employee having contract. 6. Make sure in `other inputs` you make new type and in that in the `availability in structure` has Employee cadre chosen. 7. Now with that Salary Input type click on `Compute sheet` button. 8. The `Invalid Operation` error card will appear. **Description:** In saas-18.4, the model hr.contract was [changed](https://github.com/odoo/upgrade/blob/fa44eb03c2b46d948e20dc6f5ac01dca2b625b90/migrations/hr/saas~18.4.1.1/pre-migrate.py#L41) to hr.version . All related code https://github.com/odoo/enterprise/commit/46052c4bc5ad1bd2549a6125202e0671b56beac8 was updated to use version instead of contract. in this commit. However, in the module l10n_fr_hr_payroll, there where some fields which is still using `contract` to refer other fields . https://github.com/odoo/enterprise/blob/e29aadef1a81c662d9a4d33879b440dbe4390c0b/l10n_fr_hr_payroll/data/l10n_fr_hr_payroll_employe_cadre_data.xml#L130 Because of this, Odoo raises the error `Wrong python code name 'contract' is not defined when evaluating the code`. I have fixed the issue by updating the name from contract to version in that module contract to version. opw: [5259362](https://www.odoo.com/odoo/project/70/tasks/5259362)
This update corrects a bug where the tax amount on invoices wasn't accurately updated after deleting and adding a line. Specifically, deleting a taxed line followed by an untaxed line would result in an incorrect tax total. The fix adjusts the system's logic to properly recompute tax amounts in these scenarios.
Original PR description
**PROBLEM** If in an invoice you delete a taxed line, and then add an untaxed line the tax amount might not be up to date. **STEP TO REPRODUCE** 1. create an invoice with 2 lines both taxed. 2.…
**PROBLEM** If in an invoice you delete a taxed line, and then add an untaxed line the tax amount might not be up to date. **STEP TO REPRODUCE** 1. create an invoice with 2 lines both taxed. 2. remove one of the line, and create a new line which is untaxed. 3. confirm the invoice and notice the tax amount is not correct (= to the tax amount with the 2 taxed lines). Be sure to not click on the "journal items" tab, else the bug will not occur. **ISSUE** In _sync_tax_lines(), there is checks to know if we should recompute the tax amount, or keep the old one. We enter the check that checks the changed lines and determine if we should recompute the tax amount. This check doesn't take into account the fact that a line could have been deleted. Because we are in a elif chain, we don't do other checks. **FIX** Moving up in the elif chain the check that test if a base line with tax was removed and recompute the tax amount if that's the case. [opw-5157090](https://www.odoo.com/odoo/project/49/tasks/5157090) Forward-Port-Of: odoo/odoo#237060
This change prevents tracebacks that occurred when clicking the 'add' button on the shopfloor, specifically when a manufacturing operation had a quality check set to 'Register Consumable Material'. The issue stemmed from a missing variable in the display logic, now corrected to ensure proper functionality.
Original PR description
**Issue** In shopfloor, a traceback occurs when clicking on the add button if the associated operation has a `quality_check` of type `register_consumed_materials`. **Steps to reproduce** 1. Create…
**Issue** In shopfloor, a traceback occurs when clicking on the add button if the associated operation has a `quality_check` of type `register_consumed_materials`. **Steps to reproduce** 1. Create two products (product and component) 2. Create a BOM for this product that consumes that component 3. Create an operation linked to that BOM (Manufacturing > Configuration > Operations) 4. Add a quality check of type “Register Consumable Material” for this operation 5. Create a MO from that BOM and confirm it 6. Click on the shopfloor smart button → If debug mode is activated, a traceback occurs → Otherwise 7. Click on the 'add' button → A traceback occurs **Cause** In the method [`subRecordProps`](https://github.com/odoo/enterprise/blob/d180235b7946c7219385df263f13f780e7faea50/mrp_workorder/static/src/mrp_display/mrp_display_record.js#L190C9-L194C14), when a quality check of type `register_consumed_materials` is done, the variable `production` is not propagated into the props. And [this](https://github.com/odoo/enterprise/blob/d180235b7946c7219385df263f13f780e7faea50/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L184) tries to access the production in the props, which is [called](https://github.com/odoo/enterprise/blob/d180235b7946c7219385df263f13f780e7faea50/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L163) when the user clicks the 'add' button. **Solution** Add the `production` variable to the props. opw-5165259 Forward-Port-Of: odoo/enterprise#98808
This update resolves an issue where pasting formatted content (like bold or small tags) into existing regions caused excessive styling, resulting in "double" formatting. The change now unwraps nested identical tags to prevent this amplification of styles, ensuring consistent formatting within the editor.
Original PR description
### Description of the issue/feature this PR addresses: - When pasting formatted content (like `<strong>` or `<font>`) into a region that already had same formatting, it caused nested identical tags, leading to exaggerated styling (e.g., "double bold"). ```html <!-- User pastes <strong>text</strong> inside <strong> --> <p><strong>text []</strong></p> <!-- Resulting HTML --> <p><strong>text <strong>text</strong>[]</strong></p> ``` ### Desired behavior after PR is merged: - Prevents unwanted style amplification by unwrapping nested identical formatting tags. ```html <!-- Resulting HTML --> <p><strong>text text[]</strong></p> ``` task-5138472 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#230915
This update ensures that analytic line values are calculated using the company's currency, resolving discrepancies caused by using the journal item's currency and rounding factors. This change improves the accuracy of financial reporting and balances, particularly when dealing with multi-currency transactions.
Original PR description
Analytic line values are determined by the balance of a journal item, not their amount_currency. https://github.com/odoo/odoo/blob/8258ddf12ed6c0495628f7a480d1e2424e756540/addons/account/models/account_move_line.py#L3230-L3237 However, the journal item's currency is referenced when creating an analytic line. This can cause discrepancies when the journal item's currency has a different rounding factor (`rounding`). [Ticket link](https://www.odoo.com/odoo/unassigned-tasks/5171681) opw-5171681 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237129 Forward-Port-Of: odoo/odoo#234797
This update fixes an issue where changing the quantity of a sales order didn't correctly trigger the creation of return shipments. Previously, only the first quantity change was processed, leading to inaccurate procurement calculations. Now, the system properly accounts for multiple quantity adjustments, ensuring accurate inventory management and order fulfillment.
Original PR description
Steps to reproduce: - Enable Multi-step routes & set warehouse to 3 steps delivery - Make a SO for 5 qty of a stored product - Validate the PICK - Set the SO line qty to 3 & save - Set the SO line…
Steps to reproduce: - Enable Multi-step routes & set warehouse to 3 steps delivery - Make a SO for 5 qty of a stored product - Validate the PICK - Set the SO line qty to 3 & save - Set the SO line qty to 5 & save Issue: While the first update to 3 creates a return PICK from Packing Zone -> Stock for 2 qty, the second updates does nothing. When checking the outgoing/incoming moves to see which quantity should be set in the procurement, it only considered the outgoing quantity from the first step of the delivery. Which means that the return wasn't taken into account, so since we only compare the new SO line qty to the already moved PICK, there was no difference thus no procurement made. Now, we also consider less strict critera for incoming moves when checking in `strict == False` mode, as this is only used to compute the procurement quantity. opw-5028794 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237609 Forward-Port-Of: odoo/odoo#233796
This update fixes an issue where updating the quantity to consume for a component would incorrectly mark a stock move as 'picked,' preventing further reservations. The change prevents moves from being marked as picked when the consumed quantity is zero, ensuring accurate inventory tracking and order fulfillment. This resolves a potential conflict in the manufacturing process.
Original PR description
Steps to reproduce the issue:
- Create a storable product “P1” with the following BoM:
- Component: - 1 unit of C1
- Update the quantity on hand of C1 to 10 units
- Create a manufacturing order to produce one unit of P1
- Confirm the order → The quantity of C1 is reserved, and the produced quantity of P1 is 0 (expected behavior)
- Update the component's quantity to consume (C1) to 2
- The consumed quantity is set to 0 and the move marked as picked
- Try to reserve the quantities again
Problem:
Since the move is picked, the
new quantity cannot be reserved.
Solution:
Prevent the move from being marked as picked when the consumed quantity is zero.
opw-5152592
Forward-Port-Of: odoo/odoo#231875This update fixes an issue where point-of-sale bookings only saved one table selection, even when multiple tables were chosen. The change allows users to select and save multiple tables simultaneously, providing greater flexibility in booking restaurant resources. This improves the user experience and ensures accurate booking management.
Original PR description
Currently, when creating a booking from inside a point of sale, if you select multiple tables, only one will be saved. Steps to reproduce: ------------------- * Open the restaurant * Open booking tab…
Currently, when creating a booking from inside a point of sale, if you select multiple tables, only one will be saved. Steps to reproduce: ------------------- * Open the restaurant * Open booking tab * Create a new booking for 3 people * Select 2 tables of 2 capacity * Save > Observation: Only one table resource is saved Why the fix: ------------ By having the context key `default_resource_total_capacity_reserved` we would recompute the resources for the booking. It was recomputed in a way that we just une the minimum resources needed in regards of the resource capacity. For example if we had 3 tables of 2 and we are booking for 3, we wouldn't need the 3rd extra table. In our case the capacity was always set to 2, as the point of sale form actually uses the field `waiting list capacity`. Since most table are usually for at leat 2 people only 1 would be needed. Removing `default_resource_total_capacity_reserved` from the context gives more freedom upon reservation and does not compute resources, it uses those selected on the form. opw-5109501 Community: https://github.com/odoo/odoo/pull/230920 Forward-Port-Of: odoo/enterprise#96811
This update corrects a reporting issue where employee leave days were incorrectly included in project hour calculations within the Timesheets > Planning Analysis report. The fix ensures that leave and holidays are properly excluded, providing more accurate planned hour projections. This improves the reliability of project time tracking.
Original PR description
**Description** The Timesheet/Planning Analysis report (Timesheets > Planning Analysis) incorrectly calculates planned hours by not excluding employee time-off and public holidays. This results in…
**Description** The Timesheet/Planning Analysis report (Timesheets > Planning Analysis) incorrectly calculates planned hours by not excluding employee time-off and public holidays. This results in leave days being assigned the average daily hours from planning slots and incorrectly attributed to projects. **Steps to Reproduce** 1. Create a planning slot for an employee spanning a full month 2. Add employee time-off (resource.calendar.leaves) during that period 4. Navigate to Timesheets > Timesheets / Planning Analysis report 5. Filter by the employee and date range 6. Observe: Planned hours include leave days, incorrectly attributed to the planning slot's project **Root Cause** The SQL query filters by day of week (weekends) but never queries `resource_calendar_leaves`. While `working_days_count` correctly excludes leaves, the report still generates rows for those leave days and assigns them average hours per day, causing the discrepancy. **Solution** Filter out dates that have employee time-off or public holidays by joining to `resource_calendar_leaves` and excluding matching dates. opw-5027070 Forward-Port-Of: odoo/enterprise#100516 Forward-Port-Of: odoo/enterprise#97657
This update fixes a bug that prevented users from editing statement lines when currency exchange differences were involved. Previously, attempting to mark an invoice as fully paid would trigger an error. Now, the system correctly handles exchange differences during edits, allowing users to modify statement lines without encountering reconciliation issues.
Original PR description
When you create a statement line with one currency rate, and you reconcile it with a move with a different currency rate, this creates an exchange move. But when you want to edit the statement line amount, like marking the invoice as fully paid, this raise a UserError, as the Exchange move is reverted and reconciled, which means it throw an error like "You are trying to reconcile some entries that are already reconciled." This commit, fix this behaviour, by excluding the exchange moves from the check process. Linked:https://github.com/odoo/odoo/pull/237367 [opw-5184679](https://www.odoo.com/odoo/my-support-tasks/5184679) Forward-Port-Of: odoo/enterprise#100493
This update ensures that Point of Sale orders in Mexico correctly utilize the customer's CFDI usage setting, rather than defaulting to 'G03'. This fix addresses a previous issue where CFDI usage wasn't being properly applied, ensuring compliance with Mexican tax regulations for PoS transactions.
Original PR description
When making an order in the PoS in Mexico, if the customer has a CFDI usage set on their partner, it should be used for the order instead of the default one. Steps to reproduce: ------------------- * Install l10n_mx_edi_pos * Create a partner with a CFDI usage different than 'G03' * Open the PoS, select the partner and make an order * Validate the order and check the order in the backend > Observation: The CFDI usage is 'G03' instead of the one set on the partner. opw-5018288 Forward-Port-Of: odoo/enterprise#98607
17 changes
Resolved issues and error corrections
This update resolves an issue where clicking the 'add' button on the shopfloor caused a traceback when a specific quality check was applied to an operation. The fix ensures the necessary data is correctly propagated, preventing the error and improving user experience. This improves stability and reduces potential disruptions.
Original PR description
**Issue** In shopfloor, a traceback occurs when clicking on the add button if the associated operation has a `quality_check` of type `register_consumed_materials`. **Steps to reproduce** 1. Create…
**Issue** In shopfloor, a traceback occurs when clicking on the add button if the associated operation has a `quality_check` of type `register_consumed_materials`. **Steps to reproduce** 1. Create two products (product and component) 2. Create a BOM for this product that consumes that component 3. Create an operation linked to that BOM (Manufacturing > Configuration > Operations) 4. Add a quality check of type “Register Consumable Material” for this operation 5. Create a MO from that BOM and confirm it 6. Click on the shopfloor smart button → If debug mode is activated, a traceback occurs → Otherwise 7. Click on the 'add' button → A traceback occurs **Cause** In the method [`subRecordProps`](https://github.com/odoo/enterprise/blob/d180235b7946c7219385df263f13f780e7faea50/mrp_workorder/static/src/mrp_display/mrp_display_record.js#L190C9-L194C14), when a quality check of type `register_consumed_materials` is done, the variable `production` is not propagated into the props. And [this](https://github.com/odoo/enterprise/blob/d180235b7946c7219385df263f13f780e7faea50/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L184) tries to access the production in the props, which is [called](https://github.com/odoo/enterprise/blob/d180235b7946c7219385df263f13f780e7faea50/mrp_workorder/static/src/mrp_display/mrp_record_line/stock_move.js#L163) when the user clicks the 'add' button. **Solution** Add the `production` variable to the props. opw-5165259
This update fixes an issue where search results on the website weren't displaying correctly when the search term returned more results than a single page. The system now automatically redirects users to the last page of results, ensuring all relevant items are shown. This improves the user experience and prevents missed information.
Original PR description
Scenario: - enable website_studio - go to contact -> open studio -> website - add a listing and open it on website - go to page 2 and search a specific terms with less than 20 results Result: we see "5 results" in the search bar, but no result are shown and the pager is hidden. Cause: the pager is hidden since there is only one page, and we are currently displaying the records of page 2 that do not exist. Fix: if we detect that we are on a page over the last page, redirect to the last page. Eg. if there is 2 pages and we are in page 500, redirect to page 2. opw-5008556 Forward-Port-Of: odoo/odoo#236600 Forward-Port-Of: odoo/odoo#223447
A technical issue causing tracebacks when canceling orders with a specific restaurant preset was fixed. The update redirects to the correct screen and prevents new orders from being created, ensuring a smoother order cancellation process for restaurant staff. This improves the overall user experience.
Original PR description
### step to reproduce: - Set default preset to "Takeout or Delivery" in restaurant config. - Open restaurant . - Open any table and add a product. - Cancel the order using the action button. ### issue: - A popup appears asking to select a partner/floating order name, followed by a traceback. ### cause: - Traceback occures as next screen is loaded after order deletion. ### fix: - Redirect to the default screen before deleting the order. - Ensure that no new order is created when the next screen is the floor screen. task: 5092951 Forward-Port-Of: odoo/odoo#227925
This update resolves an issue where editing a statement line with a currency exchange rate would trigger an error. The fix prevents the system from attempting to reconcile exchange moves during edits, allowing users to accurately mark invoices as paid without encountering conflicts. This improves the usability of bank statement reconciliation.
Original PR description
When you create a statement line with one currency rate, and you reconcile it with a move with a different currency rate, this creates an exchange move. But when you want to edit the statement line amount, like marking the invoice as fully paid, this raise a UserError, as the Exchange move is reverted and reconciled, which means it throw an error like "You are trying to reconcile some entries that are already reconciled." This commit, fix this behaviour, by excluding the exchange moves from the check process. Linked:https://github.com/odoo/odoo/pull/237367 [opw-5184679](https://www.odoo.com/odoo/my-support-tasks/5184679)
This update fixes a visual issue where the comparison price wasn't displayed on subscription product pages. The change updates the way the pricing information is rendered, ensuring the correct comparison price is shown to customers. This improves the user experience and accuracy of subscription pricing.
Original PR description
Steps to reproduce: 1. Install website_sale_subscription 2. Enable Comparison Price from the settings 3. Create a Subscriptions product with a recurring plan and 'compare to price' > recurring price…
Steps to reproduce: 1. Install website_sale_subscription 2. Enable Comparison Price from the settings 3. Create a Subscriptions product with a recurring plan and 'compare to price' > recurring price 4. Go to product page via smart button Issue: - The comparison price is not visible beside the recurring plan. Cause: - The product page updates the pricing display dynamically using client-side rendering when the subscription plan information is loaded. The XML template `website_sale_subscription.SubscriptionPricingSelect` used the <field> tag `<field name="product.compare_list_price"/>` to render the comparison price. The <field> tag is a server-side QWeb element and is not supported by the client-side Owl engine, causing the rendering to display nothing. Additionally, client-side templates do not have automatic access to server-side field formatting (like currency symbols) when simply escaping raw values. Solution: - In `variant_mixin.js`, extract the already formatted comparison price text from the existing DOM element (the `<del>` tag inside the pricing selector) before the element is replaced and pass this formatted string to the rendering context. Update the XML template to use `t-esc` to display this pre-formatted string instead of using `<field>` before: <img width="426" height="79" alt="image" src="https://github.com/user-attachments/assets/fe34b4c5-5cd6-4877-80e3-9ed4481cd86f" /> After: <img width="392" height="115" alt="image" src="https://github.com/user-attachments/assets/ed043fef-bfd3-46de-aeb2-1a48cacc89ed" /> opw-5248297 Forward-Port-Of: odoo/enterprise#100140
This update resolves an issue where the 'Use Documents' setting wasn't correctly applied to LATAM invoices during setup. The fix ensures that when LATAM fiscal localization is selected, the system automatically enables this setting for relevant journals, streamlining invoice processing for Latin American businesses. This improves compliance and accuracy.
Original PR description
### Issue: During the loading of fiscal position data for LATAMs the option "Use Documents" on Journals is not set-up. ### Steps to reproduce: - Install 'l10n_ar' - Settings > Accounting - Make sure…
### Issue: During the loading of fiscal position data for LATAMs the option "Use Documents" on Journals is not set-up. ### Steps to reproduce: - Install 'l10n_ar' - Settings > Accounting - Make sure the "Fiscal Localization" have a value (not Argentina) - Change the "Fiscal Localization" to "Argentine - Generic Chart of Accounts [...]" - Go in Accounting > Configuration > Journals - Click on "Ventas Preimpreso" - The journal don't have "Use Documents" ticked but it should ### Cause: When loading the data, `_get_chart_template_data()` calls `_get_ar_base_res_company()` and `_get_latam_document_account_journal()`. The first one returns the data to change `res.company.account_fiscal_country_id` to `base.ar`. The second one [checks](https://github.com/odoo/odoo/blob/26a5384af0af8fc6e6b5a10bea277f937e2b3481/addons/l10n_latam_invoice_document/models/account_chart_template.py#L12) that [`self.env.company.account_fiscal_country_id.code == "AR"`](https://github.com/odoo/odoo/blob/d985ec2e9b61b5e6c36a278654d526aaa5b512e2/addons/l10n_ar/models/res_company.py#L36) before returning the data to change `l10n_latam_use_documents` to `True`. As `res.company.account_fiscal_country_id` has not been updated, it's not Argentina during the check and `_get_latam_document_account_journal()` returns nothing. ### Solution: When loading the template, we cannot use `res.company.account_fiscal_country_id` to know if we are in LATAM or not. So instead we check on `chart_template`. opw-5221931 Forward-Port-Of: odoo/odoo#237725 Forward-Port-Of: odoo/odoo#236217
This update corrects a bug that prevented users from sending E-Factura (SPV) invoices in the Romanian localization (l10n_ro_edi) when linking a bank account. The issue stemmed from a mismatch in how bank and partner information handled the 'state' field. The fix ensures the correct field is used, allowing E-Factura transmission to proceed smoothly.
Original PR description
Same issue already fixed for 18.4+ here: https://github.com/odoo/odoo/pull/231399 Issue: When setting up a payment reference and linking a bank to an invoice, sending an E-Factura (SPV) triggers an…
Same issue already fixed for 18.4+ here: https://github.com/odoo/odoo/pull/231399 Issue: When setting up a payment reference and linking a bank to an invoice, sending an E-Factura (SPV) triggers an exception: state_id not defined for res.bank. Repro Steps: 1- Create invoice for romanian localization. 2- Link payment account to invoice. 3- Add bank to payment account. 4- Confirm and send invoice with "Send E-Factura SPV" checked. Cause: The state field is defined differently for res.bank and res.partner. res.partner uses state_id, while res.bank uses state. The code that retrieves addresses assumes the same field for both, leading to an exception when accessing state for res.bank. Fix: The fix checks the type of the input and selects the appropriate field (state or state_id) accordingly. opw-5362000 (cherry picked from commit a2af8d434bfc7f77008959c8179e8f158bcf9e93) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237615
This update corrects a bug where the tax amount on invoices wasn't properly updated after deleting and adding a line. Specifically, removing a taxed line followed by an untaxed line would result in an incorrect tax total. The fix adjusts the system's logic to ensure accurate tax calculations in these scenarios.
Original PR description
**PROBLEM** If in an invoice you delete a taxed line, and then add an untaxed line the tax amount might not be up to date. **STEP TO REPRODUCE** 1. create an invoice with 2 lines both taxed. 2.…
**PROBLEM** If in an invoice you delete a taxed line, and then add an untaxed line the tax amount might not be up to date. **STEP TO REPRODUCE** 1. create an invoice with 2 lines both taxed. 2. remove one of the line, and create a new line which is untaxed. 3. confirm the invoice and notice the tax amount is not correct (= to the tax amount with the 2 taxed lines). Be sure to not click on the "journal items" tab, else the bug will not occur. **ISSUE** In _sync_tax_lines(), there is checks to know if we should recompute the tax amount, or keep the old one. We enter the check that checks the changed lines and determine if we should recompute the tax amount. This check doesn't take into account the fact that a line could have been deleted. Because we are in a elif chain, we don't do other checks. **FIX** Moving up in the elif chain the check that test if a base line with tax was removed and recompute the tax amount if that's the case. [opw-5157090](https://www.odoo.com/odoo/project/49/tasks/5157090) Forward-Port-Of: odoo/odoo#237060
This update resolves an issue where pasting formatted content (like bold or small tags) into existing regions would create nested, amplified styling, resulting in overly emphasized text. The fix unwraps these nested tags, ensuring consistent and appropriate formatting. This improves the user experience by preventing unexpected styling issues.
Original PR description
### Description of the issue/feature this PR addresses: - When pasting formatted content (like `<strong>` or `<font>`) into a region that already had same formatting, it caused nested identical tags, leading to exaggerated styling (e.g., "double bold"). ```html <!-- User pastes <strong>text</strong> inside <strong> --> <p><strong>text []</strong></p> <!-- Resulting HTML --> <p><strong>text <strong>text</strong>[]</strong></p> ``` ### Desired behavior after PR is merged: - Prevents unwanted style amplification by unwrapping nested identical formatting tags. ```html <!-- Resulting HTML --> <p><strong>text text[]</strong></p> ``` task-5138472 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#230915
This update fixes an issue where changing the quantity of a sales order didn't correctly trigger the creation of return shipments. Previously, only the first quantity change was processed, leading to inaccurate procurement calculations. The fix ensures that subsequent quantity adjustments are properly reflected, leading to accurate inventory management.
Original PR description
Steps to reproduce: - Enable Multi-step routes & set warehouse to 3 steps delivery - Make a SO for 5 qty of a stored product - Validate the PICK - Set the SO line qty to 3 & save - Set the SO line…
Steps to reproduce: - Enable Multi-step routes & set warehouse to 3 steps delivery - Make a SO for 5 qty of a stored product - Validate the PICK - Set the SO line qty to 3 & save - Set the SO line qty to 5 & save Issue: While the first update to 3 creates a return PICK from Packing Zone -> Stock for 2 qty, the second updates does nothing. When checking the outgoing/incoming moves to see which quantity should be set in the procurement, it only considered the outgoing quantity from the first step of the delivery. Which means that the return wasn't taken into account, so since we only compare the new SO line qty to the already moved PICK, there was no difference thus no procurement made. Now, we also consider less strict critera for incoming moves when checking in `strict == False` mode, as this is only used to compute the procurement quantity. opw-5028794 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237609 Forward-Port-Of: odoo/odoo#233796
This update corrects a reporting issue where the Timesheet/Planning Analysis report incorrectly included employee leave days in project hour calculations. The fix ensures that leave and holidays are properly excluded, providing a more accurate view of planned project hours. This improves reporting reliability and helps with resource planning.
Original PR description
**Description** The Timesheet/Planning Analysis report (Timesheets > Planning Analysis) incorrectly calculates planned hours by not excluding employee time-off and public holidays. This results in…
**Description** The Timesheet/Planning Analysis report (Timesheets > Planning Analysis) incorrectly calculates planned hours by not excluding employee time-off and public holidays. This results in leave days being assigned the average daily hours from planning slots and incorrectly attributed to projects. **Steps to Reproduce** 1. Create a planning slot for an employee spanning a full month 2. Add employee time-off (resource.calendar.leaves) during that period 4. Navigate to Timesheets > Timesheets / Planning Analysis report 5. Filter by the employee and date range 6. Observe: Planned hours include leave days, incorrectly attributed to the planning slot's project **Root Cause** The SQL query filters by day of week (weekends) but never queries `resource_calendar_leaves`. While `working_days_count` correctly excludes leaves, the report still generates rows for those leave days and assigns them average hours per day, causing the discrepancy. **Solution** Filter out dates that have employee time-off or public holidays by joining to `resource_calendar_leaves` and excluding matching dates. opw-5027070 Forward-Port-Of: odoo/enterprise#100516 Forward-Port-Of: odoo/enterprise#97657
This update resolves an issue where the DIOT tax report export failed when journal entries lacked a linked partner. The fix ensures that the export process gracefully handles entries without partners, preventing errors and improving report generation reliability. This ensures accurate reporting for all financial data.
Original PR description
**Steps to reproduce:** 1. Install `Accounting` and `l10n_mx_reports` modules. 2. Create two journal entries using DIOT tax grid: one with partner, one without 3. Confirm the entries. 4. Go to `Accounting → Reporting → Tax Report → DIOT (MX)`. 5. Try to print the DIOT report in TXT format from the top-right dropdown. **Observed behavior:** * Export fails with a traceback if any entry has no partner. **Root cause:** The method `_get_diot_values_per_partner` does not handle entries without partners. **Solution:** raise `Usererror` if entries without partners when sorting and exporting. note: The second commit addresses a traceback caused by a missing operation_type_code. This occurs when all entries lack a partner or when a partner’s operation_type_code field is not set. opw-5060825 Forward-Port-Of: odoo/enterprise#100740 Forward-Port-Of: odoo/enterprise#96529
This update fixes an issue where changes made within the Colibri interaction framework weren't being properly restored when the interaction ended. The update ensures that fields are reset to their original values, improving the stability and reliability of the Colibri experience. This prevents data inconsistencies and ensures a smoother user experience.
Original PR description
When the Interaction framework was introduced in [1], fields that were modified by t-outs weren't restored to the initial values, although initial values were saved. This commit restores them on destroy. [1]: https://github.com/odoo/odoo/commit/dd13994674d4ef4683f5a4d46a1f604650cfb92b
This update corrects a bug where 'Cash on Delivery' was incorrectly offered for 'In-Store' delivery types. The fix ensures that cash on delivery payment methods are properly disabled when the delivery type is set to 'in_store', improving the checkout experience for customers choosing this option. This resolves an issue reported in opw-5258535.
Original PR description
### Issue: In this issue, `allow_cash_on_delivery` is allowed when delivery type is pick up in store. #### Steps to reproduce: 1. Create a `fixed_price` delivery method 2. Check `Cash on delivery` checkbox 3. Change the delivery type to `in_store` and configure it 4. Activate cash on delivery payment method 5. Choose a storable ptoduct on the /shop, checkout with a created dm and proceed to payment 6. Observe that you see the 'cash on delivery' pm for pickup in store. Currently, `allow_cash_on_delivery` is invisible when `delivery_type` is set to `in_store`. However, it's not set to `False`, once the type is changed to `in_store`. opw-5258535
This update resolves an issue where users creating text or date filters in the spreadsheet edition would encounter errors when working with broken data sources. The fix extends a previous safeguard to all filter types, ensuring a smoother user experience and preventing crashes during filter creation.
Original PR description
Forward-Port-Of: odoo/enterprise#99269 Forward-Port-Of: odoo/enterprise#98448
This update fixes a bug in the shop floor component consumption process when using lot tracking. Previously, incorrect quantities were consumed, often resulting in over-consumption. The fix ensures accurate component usage based on lot quantities, resolving a key issue for inventory management.
Original PR description
**PROBLEM** Component consumption behavior in shop floor is buggy when the component is tracked by lot. When "selecting" a lot to take from, the consumed amount is not correct. (ex, we ask for 50g,…
**PROBLEM** Component consumption behavior in shop floor is buggy when the component is tracked by lot. When "selecting" a lot to take from, the consumed amount is not correct. (ex, we ask for 50g, and it consumes 1000kg). **STEP TO REPRODUCE** 1. create a product. 2. create a bom with: - a component tracked by lot, with kg as product uom, but g as the bom uom. - create a step, during which 50g of the component is consumed. 3. create two lots of the component, with 1kg each. 4. create a MO for the product with the bom. 5. in the shop floor, try consuming the component and select one of the lot as a source. 6. the consumed amount should be 50g, remove the move line created (pencil icon, then remove). 7. recreate the move line, the consume amount will be nonsensical (something like 1 000 000g). **CAUSE** 1. The dialog opened for selecting the lot create a new `stock.quant` record, instead of returning the existing quant for the lot. This quant will have a quantity of 0, impacting the computation we do for the quantity we should take from this quant. 2. The formula for the quantity to take from the quant was : `max(min(remaining_qty, quant.available_quantity), 1)`. The `max(...,1)` doesn't work well when `remaining_qty` is between 0 and 1. For example, when using UoM like we do in the repro steps, `remaining_qty = 50g = 0.05kg`. But instead of taking 50g, because of the max we take 1kg = 1000g. 3. There was a double UoM conversion (`_prepare_move_line_vals` already does the conversion, so we don't need to do it before passing qty_to_take as parameter). opw-5136050
This update ensures that the CFDI usage setting on a customer's partner is correctly applied when creating orders through the Point of Sale (PoS) in Mexico. Previously, the system defaulted to 'G03', which is now fixed to use the partner's specified CFDI usage, aligning with Mexican tax regulations. This improves data accuracy and compliance for Mexican businesses using Odoo.
Original PR description
When making an order in the PoS in Mexico, if the customer has a CFDI usage set on their partner, it should be used for the order instead of the default one. Steps to reproduce: ------------------- * Install l10n_mx_edi_pos * Create a partner with a CFDI usage different than 'G03' * Open the PoS, select the partner and make an order * Validate the order and check the order in the backend > Observation: The CFDI usage is 'G03' instead of the one set on the partner. opw-5018288 Forward-Port-Of: odoo/enterprise#98607
7 changes
Resolved issues and error corrections
This update resolves an issue where invoices weren't created for alternative sale orders generated from upsells. The fix ensures the 'next invoice date' is correctly copied from the original upsell order, preventing a date calculation error that previously blocked invoice creation. Now, invoices are generated successfully for these orders, ensuring accurate payment and billing.
Original PR description
Version - 17.0 Issue: - When creating and confirming an alternative sale order (SO) from an upsell order, attempting to generate an invoice would raise a deferred end date error - As a result, the…
Version - 17.0 Issue: - When creating and confirming an alternative sale order (SO) from an upsell order, attempting to generate an invoice would raise a deferred end date error - As a result, the invoice was not created, and even though the customer's payment succeeded, no invoice was issued. Steps to reproduce: - Create an upsell order of a subscription. - Click Create Alternative to generate an alternative SO. - Confirm the SO and click on Create Invoice to make the invoice - This will throw an error of defferred end date Cause: - The `next_invoice_date` was not copied from the previous upsell order to the new alternative SO. - Without this value, the deferred end date was incorrectly computed as today’s date - 1, triggering the error. Fix: - Copy the `next_invoice_date` from the previous upsell order to the new alternative SO to ensure proper deferred date computation. Impact: Invoices for alternative upsell sale orders can now be created successfully without errors. task-5241150 Forward-Port-Of: odoo/enterprise#99831 Forward-Port-Of: odoo/enterprise#98983
This update fixes a visual issue where the comparison price wasn't showing on subscription product pages. The fix involves updating how the pricing information is displayed dynamically on the website, ensuring customers see the correct recurring price alongside the subscription plan. This improves the user experience and accuracy of pricing information.
Original PR description
Steps to reproduce: 1. Install website_sale_subscription 2. Enable Comparison Price from the settings 3. Create a Subscriptions product with a recurring plan and 'compare to price' > recurring price…
Steps to reproduce: 1. Install website_sale_subscription 2. Enable Comparison Price from the settings 3. Create a Subscriptions product with a recurring plan and 'compare to price' > recurring price 4. Go to product page via smart button Issue: - The comparison price is not visible beside the recurring plan. Cause: - The product page updates the pricing display dynamically using client-side rendering when the subscription plan information is loaded. The XML template `website_sale_subscription.SubscriptionPricingSelect` used the <field> tag `<field name="product.compare_list_price"/>` to render the comparison price. The <field> tag is a server-side QWeb element and is not supported by the client-side Owl engine, causing the rendering to display nothing. Additionally, client-side templates do not have automatic access to server-side field formatting (like currency symbols) when simply escaping raw values. Solution: - In `variant_mixin.js`, extract the already formatted comparison price text from the existing DOM element (the `<del>` tag inside the pricing selector) before the element is replaced and pass this formatted string to the rendering context. Update the XML template to use `t-esc` to display this pre-formatted string instead of using `<field>` before: <img width="426" height="79" alt="image" src="https://github.com/user-attachments/assets/fe34b4c5-5cd6-4877-80e3-9ed4481cd86f" /> After: <img width="392" height="115" alt="image" src="https://github.com/user-attachments/assets/ed043fef-bfd3-46de-aeb2-1a48cacc89ed" /> opw-5248297 Forward-Port-Of: odoo/enterprise#100140
This update resolves an issue where the DIOT tax report export failed when journal entries lacked a linked partner. The fix ensures the report generation process continues smoothly by explicitly handling entries without partners, preventing errors and improving data accuracy for Mexican tax reporting. This ensures reliable reporting for all journal entries.
Original PR description
**Steps to reproduce:** 1. Install `Accounting` and `l10n_mx_reports` modules. 2. Create two journal entries using DIOT tax grid: one with partner, one without 3. Confirm the entries. 4. Go to `Accounting → Reporting → Tax Report → DIOT (MX)`. 5. Try to print the DIOT report in TXT format from the top-right dropdown. **Observed behavior:** * Export fails with a traceback if any entry has no partner. **Root cause:** The method `_get_diot_values_per_partner` does not handle entries without partners. **Solution:** raise `Usererror` if entries without partners when sorting and exporting. note: The second commit addresses a traceback caused by a missing operation_type_code. This occurs when all entries lack a partner or when a partner’s operation_type_code field is not set. opw-5060825 Forward-Port-Of: odoo/enterprise#100671 Forward-Port-Of: odoo/enterprise#96529
This update enhances the reliability of payment processing by automatically retrying failed requests (specifically 5xx errors) when the payment server is temporarily unavailable. This ensures that tills remain operational and prevents payment processing interruptions, improving the overall user experience. The changes simplify the code and improve error handling for the l10n_de_pos_cert module.
Original PR description
In this task: --------------- - Moved the status code handling logic at proper place for all transactions API responses. - Removed the mixed usage of async/await and .then() by async/await totally in all transaction calls to simplify flow and improve readability. - For 5xx errors (e.g., 503), retry once as they occur when the server is unreachable. Print "TSS not reachable" if even after retries followed by exponential backoff logic. - Guarantee tills remain operational and not blocked even if the TSS is unreachable. task:5051693 Forward-Port-Of: odoo/enterprise#93694
This update fixes an issue where scanning a lot multiple times during a barcode picking process would incorrectly create a backorder. The fix ensures that quantity updates are applied correctly to the relevant lines, preventing the unnecessary creation of a backorder when scanning the same lot multiple times. This improves the accuracy of inventory management.
Original PR description
**Steps to reproduce:** - create a product tracked by lot - create a lot with a quantity of 2 - create a new sale order - add two sale order lines, both for a quantity of 1 of the product - confirm -…
**Steps to reproduce:** - create a product tracked by lot - create a lot with a quantity of 2 - create a new sale order - add two sale order lines, both for a quantity of 1 of the product - confirm - open the picking in barcode - scan the stock location - scan the lot - scan the lot another time - validate **Current behavior:** a backorder is created **Expected behavior:** No back order should be created **Cause of the issue:** After scanning the lot for the first time we have the following situation: two lines : - one with a quantity of 1, qty_done of 1 and reserved_uom_qty of 1 - one with a quantity of 1, qty_done of 0 and reserved_uom_qty of 1 both lined grouped in a parent line with quantity of 1 qty_done of 1 and reserved_uom_qty of 2 All of this is correct. when scanning the lot for the second time: _findLine iterates through the lines to select the right line to use. _findLine calls _lineIsNotComplete on the first line to check if it's complete (this first line is complete). https://github.com/odoo/enterprise/blob/58d55868750b827a9d5ebd8b4ab2cc23c4445eca/stock_barcode/static/src/models/barcode_model.js#L1684 But _lineIsNotComplete will actually do the check on the parent line (which is not complete), so the return value will be true. https://github.com/odoo/enterprise/blob/58d55868750b827a9d5ebd8b4ab2cc23c4445eca/stock_barcode/static/src/models/barcode_picking_model.js#L1338 As a consequence, the quantity will be added in the first line and we will have a qty_done of 2 in the first line and a qty_done of 0 in the second line. Which will lead to the creation of a back order opw Forward-Port-Of: odoo/enterprise#99774
This update corrects a reporting issue where employee leave days were incorrectly included in planned hours calculations. The fix ensures that leave and holidays are properly excluded from the Timesheets > Planning Analysis report, providing more accurate project time tracking. This improves reporting reliability and data accuracy.
Original PR description
**Description** The Timesheet/Planning Analysis report (Timesheets > Planning Analysis) incorrectly calculates planned hours by not excluding employee time-off and public holidays. This results in…
**Description** The Timesheet/Planning Analysis report (Timesheets > Planning Analysis) incorrectly calculates planned hours by not excluding employee time-off and public holidays. This results in leave days being assigned the average daily hours from planning slots and incorrectly attributed to projects. **Steps to Reproduce** 1. Create a planning slot for an employee spanning a full month 2. Add employee time-off (resource.calendar.leaves) during that period 4. Navigate to Timesheets > Timesheets / Planning Analysis report 5. Filter by the employee and date range 6. Observe: Planned hours include leave days, incorrectly attributed to the planning slot's project **Root Cause** The SQL query filters by day of week (weekends) but never queries `resource_calendar_leaves`. While `working_days_count` correctly excludes leaves, the report still generates rows for those leave days and assigns them average hours per day, causing the discrepancy. **Solution** Filter out dates that have employee time-off or public holidays by joining to `resource_calendar_leaves` and excluding matching dates. opw-5027070 Forward-Port-Of: odoo/enterprise#100516 Forward-Port-Of: odoo/enterprise#97657
This update resolves a bug that caused the system to crash when users attempted to validate signatures on employee contracts. The issue stemmed from a missing field in the HR employee model after the 'Sign, Employee Contracts, and Documents' app was uninstalled. The fix adds a graceful bypass to handle the missing field, ensuring smooth contract signing functionality.
Original PR description
The system will crash with an error when the user tries to validate the signature.
**Steps to produce:**
- Install `Sign, Employee Contracts, and Documents` apps with demo data.
- Go to Apps and uninstall the `hr_contract_sign`module.
- Send any employee a sign request for a document.
- When the employee tries to validate and send the document, the error appears.
**Error:**
`KeyError: 'sign_request_ids'
ValueError: Invalid field hr.employee.sign_request_ids in condition ('sign_request_ids', 'in', [1])`
**Cause:**
- When `sign` route is called, then we try to search field `sign_request_ids` in `hr_employee`. but we can see the field `sign_request_ids` is defined in `hr_contract_sign` module.
- And user removed the `hr_contract_sign` module, so the field no longer exists. in the hr_employee model.
**Solution:**
- Added a graceful bypass when `sign_request_ids` is missing,
**sentry-6819182542**
Forward-Port-Of: odoo/enterprise#954497 changes
Resolved issues and error corrections
This update fixes an issue where documents and moves were incorrectly linked across companies in a multi-company setup. By explicitly including the company ID, the system now accurately creates and searches for documents within the correct company context, preventing errors and ensuring data integrity. This improves the reliability of financial reporting and move management.
Original PR description
Behavior before: In a multi-company setup, fetching documents could include records from different companies based on VAT numbers. When creating attachments or searching for existing moves, the company ID was not properly considered, leading to incorrect company assignments and failed move creation. Behavior after: Documents and moves are now created and searched within the correct company context by explicitly including the company ID. Root Cause: The company ID was missing in both the attachment creation and the domain used to search for existing moves, causing cross-company mismatches. opw-4929985 Forward-Port-Of: odoo/enterprise#99192
This update fixes an issue where time logs were incorrectly assigned to the user marking work orders as complete, instead of the assigned employee. Now, time logs accurately reflect the employee who actually worked on the order, improving data accuracy and reducing user confusion. This ensures proper tracking of labor costs.
Original PR description
## **Issue Before This Commit:** When a work order is assigned to an employee (not linked to the current user), and the current user marks it as done, the time log is wrongly created under the…
## **Issue Before This Commit:** When a work order is assigned to an employee (not linked to the current user), and the current user marks it as done, the time log is wrongly created under the current user’s employee instead of the assigned one. This behavior caused confusion for the user as the wrong person was shown as working on the order. ## **Steps to Reproduce:** - Create an MO with work orders and confirm it. - Assign another employee to a work order. - Mark the work order as done with the current user from the work order line. - Open the workorder and notice that the time log is created for the current user’s employee. ## **Cause of the Issue:** The bug was introduced in PR (https://github.com/odoo/enterprise/pull/84790), where the logic for assigning the main employee was overridden, ignoring the case of an already assigned employee. ## **With This Commit:** The time log is now created for the assigned employee, This resolves the confusion by ensuring the right person is tracked on the work order. TaskID: 4983514 Forward-Port-Of: odoo/enterprise#100604 Forward-Port-Of: odoo/enterprise#93378
This update simplifies the process of adding products to the shopping cart on the website. By removing outdated forms and consolidating event handlers, the system is now more efficient and reliable. This change enhances the user experience and streamlines the checkout process.
Original PR description
This PR: - Relies on dataset instead of hidden inputs to provide the necessary info to the cart service, - Removes the useless "add to cart" forms (which were used to add products to the cart in a distant past), - Merges all "add to cart" event handlers into a single one to avoid duplication. task-5116935 Community PR: https://github.com/odoo/odoo/pull/229931
This update corrects a previous issue where VoIP calls ending within a calendar range were not displayed. The change ensures that calls, regardless of their end date, are correctly shown in the calendar view, resolving a bug and improving calendar functionality. This also addresses a related crash during testing.
Original PR description
This restores a feature lost at [1]: a call beginning before the calendar current range but ending inside it was not shown anymore. Indeed the `end_date` became computed from the `duration` instead…
This restores a feature lost at [1]: a call beginning before the calendar current range but ending inside it was not shown anymore. Indeed the `end_date` became computed from the `duration` instead of the other way around, allowing efficient domain manipulation based on the duration. However, it prevented domain manipulation based on the end date, which the calendar view needs. It also just makes sense to allow filtering based on the end date too (even if we judged it less useful when making [1]). A solution could be to store the end date too, but it would be redundant data. This instead allows domain manipulation through a field `compute_sql` definition. At the same time, this does the same thing for the start date: creating a new computed field `effective_start_date`, which is either the call start date or its `create_date`. This allows to entirely remove the domain override needed in the calendar model (combined with the community commit that comes with this one, which makes the calendar now consider records without a set end date but which started within range). Note: the date_delay option of the calendar was removed at [2]. This also fixes a runbot issue during the "click everywhere" test: - Enter VoIP app - Go to calendar - Enter web studio => Crash, because the studio calendar ignores the VoIP custo about the calendar domain and filters on `end_date`. The VoIP custo being gone and filtering on `end_date` restored, this is not a problem anymore. [1]: https://github.com/odoo/enterprise/commit/47300cc462420273dd90d5668f542878b6f73254 [2]: https://github.com/odoo/odoo/commit/40c75d3635b4d0de8fca631e4aebd26a466a8709 task-5350495 runbot-234398
This update streamlines the process of generating SSL certificates for IoT devices. Previously, certificates were only issued to trial users or those with enterprise codes. Now, certificates are automatically generated based on a valid database ID, resolving potential issues in Point Of Sale and ensuring consistent IoT device connectivity.
Original PR description
Note: needs to be merged after the https://github.com/odoo/internal/pull/3858 otherwise iot pairing / certificate generation won't work Currently we are only providing the ssl certificates to the iot users if they are on trial (free certificate first 30 days) or they have an enterprise code in their db. The issue here is that if the iot box doesn't get a new certificate after a trial period they will experience a lot of issues in Point Of Sale where a lot of requests rely on local network and ssl certificates. This PR removes the logic around the enterprise code for the generation of the certificates. Now we always generate a certificate as long as the database has a valid db_uuid registered on our servers. Related Odoo PR: https://github.com/odoo/odoo/pull/232681 Related internal PR: https://github.com/odoo/internal/pull/3858
This update resolves an issue where adding serial numbers to subcontracting manufacturing orders (MOs) through the portal would incorrectly cancel and delete associated work orders, which portal users couldn't manage. The change prevents the creation of work orders for subcontracted MOs, aligning with the correct product structure and improving data consistency.
Original PR description
When adding/changing serial number on a subcontracting MO via portal view, Odoo will cancel and unlink the old MO(s) to recreate new ones. This include cancelling workorders, which a portal user doesn't have access to. Since subcontracted MO should not have workorders because the bom should not have operations, this PR adds a call to `_has_workorders` before searching for workorders. Forward-Port-Of: odoo/enterprise#98611
This update corrects a calculation error related to PFA (Pension Funds Account) computations within the Belgian HR payroll module. The fix ensures accurate PFA deductions are processed, improving payroll accuracy and compliance. This change impacts the way PFA contributions are handled.
Original PR description
This commit refactors and fixes the PFA computation. task-5103485 Forward-Port-Of: odoo/enterprise#97978
29 changes
Resolved issues and error corrections
This update resolves a validation error that occurred when creating new offer templates for employees with existing work entries. The fix ensures the system correctly identifies existing contracts, preventing duplicate entries and improving data accuracy. This change ensures a smoother process for managing employee offers.
Original PR description
Steps to reproduce the bug: 1. install hr_contract_salary_payroll 2. check "My US Company" 3. go on "Work Entries", then click on the arrow to view the next month. -> This will generate work entries…
Steps to reproduce the bug: 1. install hr_contract_salary_payroll 2. check "My US Company" 3. go on "Work Entries", then click on the arrow to view the next month. -> This will generate work entries for the next month 4. Go back to employees / Troy Cruz / Offers (smart button) -> You should be on the form view of a new offer. Do not save it. 5. Change the contract template to (e.g.) Experienced Developer -> A validation Error should appear The validation error would tell us that we are trying to set a new contract to the employee, but the employee already had a running contract. This happens because `self.employee_id` would be set to false just after the write of it's version's `contract_date_end`: https://github.com/odoo/enterprise/blob/9ea4c1382a75024acacba7af1529d0c5cc762827/hr_contract_salary_payroll/models/hr_contract_salary_offer.py#L78C1-L78C7 This only happens when there are work entries after the specified end date. This is why we had to look at the next month's work entries. The problematic code gets rolled back at some point, but `self.employee_id` stays empty if we don't save the form, since self is a `newId` in this case, which is not stored in the DB (and thus not rolled back) The issue was that the context was supposed to have the `salary_simulation` key present, since we are doing a salary simulation. But, the backend would still try to unlink the work entries of current_version during the simulation. Which is not needed and causes `self.current_employee_id` to be set to `False` The context variable and a check before `_remove_work_entries()` has thus been added to fix that. task-5207567
This update resolves a validation error that occurred when changing a contract template on a new offer, specifically when work entries existed for the next month. The fix ensures the system correctly handles salary simulations and prevents incorrect contract assignments. This improves data accuracy and prevents users from creating conflicting contracts.
Original PR description
Steps to reproduce the bug: 1. install hr_contract_salary_payroll 2. check "My US Company" 3. go on "Work Entries", then click on the arrow to view the next month. -> This will generate work entries…
Steps to reproduce the bug: 1. install hr_contract_salary_payroll 2. check "My US Company" 3. go on "Work Entries", then click on the arrow to view the next month. -> This will generate work entries for the next month 4. Go back to employees / Troy Cruz / Offers (smart button) -> You should be on the form view of a new offer. Do not save it. 5. Change the contract template to (e.g.) Experienced Developer -> A validation Error should appear The validation error would tell us that we are trying to set a new contract to the employee, but the employee already had a running contract. This happens because `self.employee_id` would be set to false just after the write of it's version's `contract_date_end`: https://github.com/odoo/enterprise/blob/9ea4c1382a75024acacba7af1529d0c5cc762827/hr_contract_salary_payroll/models/hr_contract_salary_offer.py#L78C1-L78C7 This only happens when there are work entries after the specified end date. This is why we had to look at the next month's work entries. The problematic code gets rolled back at some point, but `self.employee_id` stays empty if we don't save the form, since self is a `newId` in this case, which is not stored in the DB (and thus not rolled back) The issue was that the context was supposed to have the `salary_simulation` key present, since we are doing a salary simulation. But, the backend would still try to unlink the work entries of current_version during the simulation. Which is not needed and causes `self.current_employee_id` to be set to `False` The context variable and a check before `_remove_work_entries()` has thus been added to fix that. task-5207567
This update resolves an error that occurred when users attempted to assign multiple stock references of the same name on Reception reports. The fix allows for the correct handling of duplicate references, ensuring the reporting functionality works as expected. This improves the reliability of the sales order fulfillment process.
Original PR description
Currently an error occurs when there are multiple stock references of same name, and user assigns references on Reception report. Steps to replicate: - Install `sale_stock`. - Load Demo data from…
Currently an error occurs when there are multiple stock references of same name, and user assigns references on Reception report.
Steps to replicate:
- Install `sale_stock`.
- Load Demo data from Settings.
- From settings, check `Reception Report`.
- Go to Operations > Reference > S00004 > Duplicate it (from the form view).
- Open Receipts > WH/IN/00002 > Allocation (Smart button) > Click 'Assign All' or the S00004 line.
Error:
```
File "/home/odoo/odoo18/community/addons/stock/report/report_stock_reception.py", line 271, in action_assign
self._action_assign(in_move, out)
File "/home/odoo/odoo18/community/addons/stock/report/report_stock_reception.py", line 343, in _action_assign
in_move._get_source_document()._add_reference(out_ref)
File "/home/odoo/odoo18/community/addons/stock/models/stock_picking.py", line 2102, in _add_reference
self.move_ids.reference_ids = [Command.link(reference.id)]
File "/home/odoo/odoo18/community/odoo/orm/fields_misc.py", line 112, in __get__
raise ValueError("Expected singleton: %s" % record)
ValueError: Expected singleton: stock.reference(3, 19)
```
Cause:
- As the user duplicated the record, there were two records received in the variable `reference` at [1] that caused the expected singleton error.
Solution:
- The methods `_add_reference()` and `_remove_reference()` can now handle multiple reference records.
[1]: https://github.com/odoo/odoo/blob/4b2154870eebcce449f53d8f593386ae6af04a83/addons/sale_stock/models/sale_order.py#L329
sentry-6982131891
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where documents and moves were incorrectly linked across companies in a multi-company setup. By explicitly including the company ID during attachment creation and searching, the system now accurately assigns documents to the correct company, preventing errors and ensuring data integrity. This improves the reliability of financial reporting and move management.
Original PR description
Behavior before: In a multi-company setup, fetching documents could include records from different companies based on VAT numbers. When creating attachments or searching for existing moves, the company ID was not properly considered, leading to incorrect company assignments and failed move creation. Behavior after: Documents and moves are now created and searched within the correct company context by explicitly including the company ID. Root Cause: The company ID was missing in both the attachment creation and the domain used to search for existing moves, causing cross-company mismatches. opw-4929985 Forward-Port-Of: odoo/enterprise#99192
This update resolves an issue where CFDI invoices generated in the Mexico localization were producing incorrect rounding values. The fix involves a refined process for calculating tax amounts and aggregating line items, ensuring accurate CFDI invoice generation. This improves compliance and data integrity for Mexican businesses using Odoo.
Original PR description
- Refactor the CFDI generation using the EDI tax helpers to prevent rounding issues by spreading the amounts according a tolerance of 0.000001. - Aggregate lines before computing the global invoice CFDI. That way, we avoid creating new rounding issues by post-processing the created CFDI. task_id: 5096249 Forward-Port-Of: odoo/enterprise#100373 Forward-Port-Of: odoo/enterprise#99395
This update fixes an issue where search results on the website were not displaying correctly when the search returned more results than a single page could handle. The system now automatically redirects users to the last page of results, ensuring a seamless browsing experience. This improves usability and prevents misleading 'no results' messages.
Original PR description
Scenario: - enable website_studio - go to contact -> open studio -> website - add a listing and open it on website - go to page 2 and search a specific terms with less than 20 results Result: we see "5 results" in the search bar, but no result are shown and the pager is hidden. Cause: the pager is hidden since there is only one page, and we are currently displaying the records of page 2 that do not exist. Fix: if we detect that we are on a page over the last page, redirect to the last page. Eg. if there is 2 pages and we are in page 500, redirect to page 2. opw-5008556 Forward-Port-Of: odoo/odoo#236600 Forward-Port-Of: odoo/odoo#223447
This update significantly improves the speed of the website builder when managing forms and data. Previously, rendering large lists of options took over a second, causing delays. Now, the process is much faster – just a few hundred milliseconds – making the website builder more responsive and user-friendly.
Original PR description
Before this commit, rendering BuilderList with many elements caused noticeable delays. How to reproduce: ======================= - Use a runbot with all demo data - Switch to edit mode in the website…
Before this commit, rendering BuilderList with many elements caused noticeable delays. How to reproduce: ======================= - Use a runbot with all demo data - Switch to edit mode in the website builder - Add a form - Link the form to the Contact model - Add the "State" field Before this commit: The options related to the "State" field took more than one second to render. After this commit: Rendering is several hundred milliseconds faster. Additional commits will follow to further improve the situation. Reason for the slowdown: ======================= BuilderList is not optimized to render several thousand records (about 1900 in this example). This commit addresses the identified bottlenecks to reduce rendering time. 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#237462
This update restricts the 'Export ZIP' menu option to the invoice list view, addressing an issue where non-sent invoices didn't generate PDFs in the download. While this doesn't fully resolve the PDF generation problem, it improves usability. Further improvements are being considered to optimize performance and provide clearer error messages for non-sent invoices.
Original PR description
- Earlier, when downloading an invoice, invoices that were never sent didn’t have a generated PDF. This happened because the method _get_invoice_legal_documents_all had allow_fallback=False by…
- Earlier, when downloading an invoice, invoices that were never sent didn’t have a generated PDF. This happened because the method _get_invoice_legal_documents_all had allow_fallback=False by default. As a result, those invoices returned no attachments, leading to blank pages or missing files in the ZIP download — since the invoices weren’t sent and no fallback was allowed. **Steps to reproduce:** **1:** Go to Invoices **2:** Try to use Export ZIP for any non-sent invoice → you’ll see a blank page **What this patch does:** - It limits the Export ZIP option to the list view only. This doesn’t fix the missing PDF issue, but it makes sense — having “Export ZIP” on every single invoice form view isn’t useful. **Possible improvements to consider:** **1:** Restrict Export ZIP so it’s only available for sent invoices. This would improve performance since sent invoices already have PDFs stored in the filestore. **2:** Allow a fallback for invoices that haven’t been sent, so their PDFs are generated when exporting — but this may cause performance issues if too many non-sent invoices are processed at once. **3:** Instead of showing a blank page for non-sent invoices, show a user-friendly error message. (I noticed this was in the original commit odoo/odoo@c81ab09d0404cc57f48c202360361a1700f060db where this was introduced but was later removed — not sure why.) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#234886
This update fixes an issue where POS receipts in non-English languages (like French) didn't accurately show the change amount after an overpayment. The fix ensures that change is correctly calculated and displayed on receipts regardless of the selected language, improving the user experience.
Original PR description
Currently, if a user overpays while using a different language, like French, the receipt does not show the change. **Steps to replicate:** * Install POS with demo data and change language to French .…
Currently, if a user overpays while using a different language, like French, the receipt does not show the change. **Steps to replicate:** * Install POS with demo data and change language to French . * POS > Furniture Shop > Open the register * Select a product, overpay with cash, and validate. **Issue:** * As seen in [1], the `Change` field doesn’t appear when overpaying with cash, even though it shows in the English version. **Root cause:** * The issue happens because changing the language translates the payment line name at [2] (coming from the translated return at [3]). This makes it get included in the sum at [4], which incorrectly subtracts it from the total cash paid and causes the change amount to disappear on the receipt. **Solution:** * Check and add up the payment lines where `is_change` is `false`, and use that instead of relying on the payment line’s name at [3]. **Before:** <img width="830" height="556" alt="image" src="https://github.com/user-attachments/assets/5aaddfe0-fe46-49e1-a877-4fe4de2fb5c7" /> **After:** <img width="931" height="596" alt="image" src="https://github.com/user-attachments/assets/4215d6b8-14b4-4e59-85bc-4d0f43f1d09c" /> [1]: https://www.odoo.com/web/image/91240289?access_token=bef22d9abd1232e34f510648a34f7709d82b848ed852fccdb893f2d1149067abo0x69505fa6&filename=image.png&unique=dd2a62fbe180532cf5cf00c27adc60742f113ddc [2]: https://github.com/odoo/odoo/blob/0581b7fb6abc8e856cedf13254ba1f9d362d6d34/addons/point_of_sale/static/src/app/models/accounting/pos_order_accounting.js#L146 [3]: https://github.com/odoo/odoo/blob/0581b7fb6abc8e856cedf13254ba1f9d362d6d34/addons/point_of_sale/models/pos_order.py#L188-L195 [4]: https://github.com/odoo/odoo/blob/0581b7fb6abc8e856cedf13254ba1f9d362d6d34/addons/point_of_sale/static/src/app/models/accounting/pos_order_accounting.js#L147 opw-5344903
This update corrects a configuration issue within the l10n_fr_hr_payroll module that was causing an 'Invalid Operation' error during payroll processing. The fix involved changing a field name from 'company_20id' to the correct 'company_id', ensuring proper integration with employee data and payroll calculations.
Original PR description
**Steps to reproduce:** 1. Open database with version 19.0 2. Install module l10n_fr_hr_payroll_with_accounting 3. Set `Salary Journal` in: `Configuration` -> `Structure` -> `FR: Employe Carde` ->…
**Steps to reproduce:** 1. Open database with version 19.0 2. Install module l10n_fr_hr_payroll_with_accounting 3. Set `Salary Journal` in: `Configuration` -> `Structure` -> `FR: Employe Carde` -> `Employe Carde` 4. In Payroll app create a payslip for any employee 5. In `structure` Employee cadre be choosen, And also 6. Make sure in salary inputs you make new type and in that in the `availability in structure` has Employee cadre chosen. 7. Now with that Salary Input type click on `Compute sheet` button. 8. The `Invalid Operation` error card will appear. **Description:** After this changes in the [commit](https://github.com/odoo/enterprise/pull/100112/files) you will face another issue for which the steps are there in steps to reporduce. In this [commit](https://github.com/odoo/enterprise/commit/bd2ee7546df3f31c73e8aaae0244ac6767f982fb#diff-5b26ac7c31dbf0286aa98671d7dadb50c117ea2ffb0d52d55a8f4e5d16d7ee88R709) Instade of `company_id` there is `company_20id`, which is not valid field. As in this code: https://github.com/odoo/enterprise/blob/e29aadef1a81c662d9a4d33879b440dbe4390c0b/l10n_fr_hr_payroll/models/res_config_settings.py#L11 we can see that `company_id ` is set as related field for nombre_employes, so I have changed from `company_20id ` to `company_id` **opw**: [5259362](https://www.odoo.com/odoo/project/70/tasks/5259362)
This update resolves an issue where payment validation in the POS system would fail when orders included products with different unit of measures. The fix ensures that a single sale order line is passed during payment validation, preventing a system error and allowing successful payment processing.
Original PR description
**Steps to reproduce:** * Install the **pos_sale** module. * In **Settings**, enable the *Units of Measure & Packagings* option. * Create two products, each using a different **Unit of Measure**…
**Steps to reproduce:** * Install the **pos_sale** module. * In **Settings**, enable the *Units of Measure & Packagings* option. * Create two products, each using a different **Unit of Measure** (e.g., *Unit*, *Hours*), and ensure both are available in POS. * Open the **Sales** app and create a quotation including both products. Confirm the order. * Open the **POS Store** and go to **Quotation/order** options , and select *Created Sale Order* with the option **Settle the order**. * Proceed to the payment screen and attempt to validate the payment. **Observed behavior:** * A **singleton error** is raised when validating the payment for a sale order containing multiple lines with different UoMs. **Cause:** * The code incorrectly passes `self`, which may contain multiple sale order lines, leading to a singleton expectation failure. **Fix:** * Pass a single sale order line to avoid the singleton error during payment validation. --- opw-5251840 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue that occurred when users edited sale order lines, specifically replacing combo products. The fix prevents a technical error (IndexError) that arose during the order saving process, ensuring smoother operation for users.
Original PR description
Currently, an error occurs when a user replaces a `combo product` with another product in a sale order line before the order is saved. **Steps to produce:** - Install the `sale_management` module…
Currently, an error occurs when a user replaces a `combo product` with another product in a sale order line before the order is saved. **Steps to produce:** - Install the `sale_management` module with demo data. - Open `sale order`, click `Add a product`, and add a `combo product` (Office Combo). (`Make sure the form is not saved`) - Click on the `combo name` (Office combo x 1) and replace it with another product. **Error:** `IndexError: tuple index out of range` **Root cause:** After PR [1], at [2], when a combo product is replaced before the order is saved, the code attempts to update the combo item lines even though the template type (`product_template_id.type`) is not `combo`. This leads to an update of `product_uom_qty`, which triggers the `_compute_price_unit` method and results in the error at [3]. **Fix:** This commit prevents errors when a user replaces a combo product with another product. [1]: https://github.com/odoo/odoo/pull/194496 [2]: https://github.com/odoo/odoo/blob/47e561bd1f6bc14724d60ebf09a66e458dfd4799/addons/sale/models/sale_order.py#L966-L970 [3]: https://github.com/odoo/odoo/blob/c758b93a57cd98ab76c26c03bd0097f2eef50961/addons/sale/models/sale_order_line.py#L766 sentry-7009976704
This update fixes a technical error that occurred when users attempted to adjust partial payments made through SEPA QR payments in the Point of Sale module. The fix ensures that the system handles these adjustments correctly, preventing a traceback and improving the payment process for business customers. The change restricts the 'Adjust Amount' button to compatible payment methods.
Original PR description
Steps to reproduce: ==================== - Create a SEPA QR payment method (for a BE company). - Create an order and select this payment method. - Manually change the payment amount (partial amount). - Confirm the partial payment. - Click on the "Adjust Amount" button a traceback occurs. Issue: ======= In the XML template, the JS method `sendPaymentAdjust()` was being called, but this method was not defined on the JS side, leading to a traceback when the button was clicked. Fix: ===== - Restricted visibility of the "Adjust Amount" button to payment terminal methods that support adjustment. - Added the missing JS method to handle the call and prevent traceback. Task-5241346 Forward-Port-Of: odoo/odoo#237608 Forward-Port-Of: odoo/odoo#235281
This update corrects a bug where the 'Use Documents' option wasn't correctly configured for LATAM invoices during data loading. The fix ensures that when a LATAM chart of accounts is selected, the system automatically enables this crucial setting, streamlining invoice processing for Latin American businesses. This resolves an issue impacting invoice accuracy and compliance.
Original PR description
### Issue: During the loading of fiscal position data for LATAMs the option "Use Documents" on Journals is not set-up. ### Steps to reproduce: - Install 'l10n_ar' - Settings > Accounting - Make sure…
### Issue: During the loading of fiscal position data for LATAMs the option "Use Documents" on Journals is not set-up. ### Steps to reproduce: - Install 'l10n_ar' - Settings > Accounting - Make sure the "Fiscal Localization" have a value (not Argentina) - Change the "Fiscal Localization" to "Argentine - Generic Chart of Accounts [...]" - Go in Accounting > Configuration > Journals - Click on "Ventas Preimpreso" - The journal don't have "Use Documents" ticked but it should ### Cause: When loading the data, `_get_chart_template_data()` calls `_get_ar_base_res_company()` and `_get_latam_document_account_journal()`. The first one returns the data to change `res.company.account_fiscal_country_id` to `base.ar`. The second one [checks](https://github.com/odoo/odoo/blob/26a5384af0af8fc6e6b5a10bea277f937e2b3481/addons/l10n_latam_invoice_document/models/account_chart_template.py#L12) that [`self.env.company.account_fiscal_country_id.code == "AR"`](https://github.com/odoo/odoo/blob/d985ec2e9b61b5e6c36a278654d526aaa5b512e2/addons/l10n_ar/models/res_company.py#L36) before returning the data to change `l10n_latam_use_documents` to `True`. As `res.company.account_fiscal_country_id` has not been updated, it's not Argentina during the check and `_get_latam_document_account_journal()` returns nothing. ### Solution: When loading the template, we cannot use `res.company.account_fiscal_country_id` to know if we are in LATAM or not. So instead we check on `chart_template`. opw-5221931 Forward-Port-Of: odoo/odoo#237725 Forward-Port-Of: odoo/odoo#236217
This update resolves an issue where price adjustments on lots weren't correctly updating the associated stock move value. The fix maps the `lot_id` from the `stock.move.line` model to the `stock.move` model, ensuring accurate value tracking after price changes. This improves the reliability of inventory valuation.
Original PR description
**Steps to Reproduce the Issue**: 1. Install the following apps in version 19.0 database: * stock_account 2. Go to Settings → enable Lots & Serial Numbers. 3. Open the Inventory app, then go to…
**Steps to Reproduce the Issue**:
1. Install the following apps in version 19.0 database:
* stock_account
2. Go to Settings → enable Lots & Serial Numbers.
3. Open the Inventory app, then go to Products and create a new product
with the following configuration:
* Product Type: Goods
* Track Inventory: By Unique Serial Number
* Inventory tab: Enable Valuation by Lot/Serial
* General Information tab: Create a new Product Category with:
* Costing Method: AVCO (Average Cost)
4. Go to Products → Lots/Serial Numbers.
5. Create a new Lot/Serial Number and select the product you just created, then
click Save.
6. Now update the Cost in the Lot/Serial Number form and click Save again.
7. You will now encounter the trackback error.
**Description:**
In the [commit](odoo@22b9e1a#diff-2623d0e4c393b65afe1c6d00f55af80d19f022aaeb0da0e5e173e37a84138159R42) The `lot_id` is written but in `stock.move` model there is `lot_ids` [field]((https://github.com/odoo/odoo/blob/6496653de3c9bb2a3cde8e38fdda8fb7abe27713/addons/stock/models/stock_move.py#L189)) so it gives error `keyerror`.
Now i have used [`lot_id`](https://github.com/odoo/odoo/blob/9333df06e15134df92efed765cf95db38c0dfede/addons/stock/models/stock_move_line.py#L48) field of `stock.move.line` for mapping the `move_id` so that after price adjustment correct move value is set.
opw-[5266457](https://www.odoo.com/odoo/project/70/tasks/5266457)
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis update fixes an issue where Verifactu invoices generated from Point of Sale orders were incorrectly using 'F1' instead of 'F3' after invoicing. The change ensures that orders previously invoiced as simplified versions retain the correct 'F3' invoice type, aligning with Spanish tax regulations. This prevents potential discrepancies with tax authorities.
Original PR description
To reproduce ------------- 1. Install `l10n_es_edi_verifactu_pos`, and select the ES company 2. Make an order in PoS with a price less than 400, and don't invoice it. 3. Close the PoS session, then…
To reproduce ------------- 1. Install `l10n_es_edi_verifactu_pos`, and select the ES company 2. Make an order in PoS with a price less than 400, and don't invoice it. 3. Close the PoS session, then go to PoS > Orders, and select the previously made order 4. It will have a Verifactu generated document with invoice type as 'F2', which is correct since it's a simplified order. 5. Click invoice to invoice the order; the invoice is no longer simplified. Notice now that the new Verifactu document has an invoice type of 'F1', which corresponds to a normal non simplified invoice. However, since the new invoice is replacing an old simplified one, it should be of type 'F3' instead. The fix ------- We add a new field on the `pos.order` model to retain if that order was previously invoiced with a simplified invoice, in that case, we set its type to 'F3' instead of 'F1' when fully invoicing it. Sources: -------- Difference between 'F1', 'F2', and 'F3' invoice types: https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html?faqId=bdbd20022fe06910VgnVCM100000dc381e0aRCRD opw-5343973
This update ensures analytic line values are calculated using the company's currency, resolving discrepancies caused by using the journal item's currency and rounding factors. This change improves the accuracy of financial reporting and balances, particularly when dealing with multi-currency transactions.
Original PR description
Analytic line values are determined by the balance of a journal item, not their amount_currency. https://github.com/odoo/odoo/blob/8258ddf12ed6c0495628f7a480d1e2424e756540/addons/account/models/account_move_line.py#L3230-L3237 However, the journal item's currency is referenced when creating an analytic line. This can cause discrepancies when the journal item's currency has a different rounding factor (`rounding`). [Ticket link](https://www.odoo.com/odoo/unassigned-tasks/5171681) opw-5171681 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237129 Forward-Port-Of: odoo/odoo#234797
This update fixes an issue where changes to a sales order's quantity weren't correctly reflected in the procurement process when using multi-step delivery routes. Specifically, the system was only considering the initial quantity moved, failing to account for returns. This ensures accurate inventory management and procurement quantities are calculated, preventing discrepancies.
Original PR description
Steps to reproduce: - Enable Multi-step routes & set warehouse to 3 steps delivery - Make a SO for 5 qty of a stored product - Validate the PICK - Set the SO line qty to 3 & save - Set the SO line…
Steps to reproduce: - Enable Multi-step routes & set warehouse to 3 steps delivery - Make a SO for 5 qty of a stored product - Validate the PICK - Set the SO line qty to 3 & save - Set the SO line qty to 5 & save Issue: While the first update to 3 creates a return PICK from Packing Zone -> Stock for 2 qty, the second updates does nothing. When checking the outgoing/incoming moves to see which quantity should be set in the procurement, it only considered the outgoing quantity from the first step of the delivery. Which means that the return wasn't taken into account, so since we only compare the new SO line qty to the already moved PICK, there was no difference thus no procurement made. Now, we also consider less strict critera for incoming moves when checking in `strict == False` mode, as this is only used to compute the procurement quantity. opw-5028794 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237609 Forward-Port-Of: odoo/odoo#233796
This update corrects a bug where the tax amount on invoices wasn't accurately calculated after deleting and adding a line. Specifically, removing a taxed line followed by an untaxed line would result in an incorrect tax total. The fix adjusts the system's logic to properly recompute tax amounts in these scenarios.
Original PR description
**PROBLEM** If in an invoice you delete a taxed line, and then add an untaxed line the tax amount might not be up to date. **STEP TO REPRODUCE** 1. create an invoice with 2 lines both taxed. 2.…
**PROBLEM** If in an invoice you delete a taxed line, and then add an untaxed line the tax amount might not be up to date. **STEP TO REPRODUCE** 1. create an invoice with 2 lines both taxed. 2. remove one of the line, and create a new line which is untaxed. 3. confirm the invoice and notice the tax amount is not correct (= to the tax amount with the 2 taxed lines). Be sure to not click on the "journal items" tab, else the bug will not occur. **ISSUE** In _sync_tax_lines(), there is checks to know if we should recompute the tax amount, or keep the old one. We enter the check that checks the changed lines and determine if we should recompute the tax amount. This check doesn't take into account the fact that a line could have been deleted. Because we are in a elif chain, we don't do other checks. **FIX** Moving up in the elif chain the check that test if a base line with tax was removed and recompute the tax amount if that's the case. [opw-5157090](https://www.odoo.com/odoo/project/49/tasks/5157090) Forward-Port-Of: odoo/odoo#237060
This update corrects a reporting issue where planned hours incorrectly included employee leave days and public holidays. The fix ensures that the Timesheet/Planning Analysis report accurately calculates planned hours by excluding time-off and holidays, providing more reliable project time tracking.
Original PR description
**Description** The Timesheet/Planning Analysis report (Timesheets > Planning Analysis) incorrectly calculates planned hours by not excluding employee time-off and public holidays. This results in…
**Description** The Timesheet/Planning Analysis report (Timesheets > Planning Analysis) incorrectly calculates planned hours by not excluding employee time-off and public holidays. This results in leave days being assigned the average daily hours from planning slots and incorrectly attributed to projects. **Steps to Reproduce** 1. Create a planning slot for an employee spanning a full month 2. Add employee time-off (resource.calendar.leaves) during that period 4. Navigate to Timesheets > Timesheets / Planning Analysis report 5. Filter by the employee and date range 6. Observe: Planned hours include leave days, incorrectly attributed to the planning slot's project **Root Cause** The SQL query filters by day of week (weekends) but never queries `resource_calendar_leaves`. While `working_days_count` correctly excludes leaves, the report still generates rows for those leave days and assigns them average hours per day, causing the discrepancy. **Solution** Filter out dates that have employee time-off or public holidays by joining to `resource_calendar_leaves` and excluding matching dates. opw-5027070 Forward-Port-Of: odoo/enterprise#100516 Forward-Port-Of: odoo/enterprise#97657
This update fixes an issue where chart granularity options were limited when no date filter was applied. Now, 'day' granularity is consistently available, and the system efficiently caches these options to avoid unnecessary calculations. This improves chart performance and usability.
Original PR description
## Description Current behavior before PR: - Day granularity was not added when no date global filter was defined. - Charts inserted from graph view with default day granularity behaved incorrectly. When switching from day to week granularity, day would disappear from the available options. - Granularities were recomputed on every call, causing repeated work. Desired behavior after PR is merged: - Day granularity is now added to the available granularities when no date global filter is set. - Granularities are cached per chart, avoiding repeated computation. - Redundant code paths were cleaned up to simplify the logic. Task: [5155481](https://www.odoo.com/odoo/project/2328/tasks/5155481) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update adds a warning to bank statement lines when an analytic distribution is required. Previously, users weren't alerted to this requirement, potentially leading to errors. Now, users will receive a clear warning, guiding them to set up the necessary analytic distribution plan.
Original PR description
When setting the account on a bank statement line, analytic distribution might be required due to a mandatory plan. Before this commit, the user had no idea if the analytic is required or not. After this commit, lines that required analytic distribution will have a warning directing the user to set it. task-5055351 This is a backport of: https://github.com/odoo/enterprise/commit/00396d24114b8747ff73ae60f032b630ce88c7a4 Community PR: https://github.com/odoo/odoo/pull/237368 Forward-Port-Of: odoo/enterprise#100494
This update fixes an issue where the cost of products in POS orders wasn't accurately calculated when using product variants with multiple attribute values. The fix ensures that the correct cost is applied based on the specific variant used in the order, improving order accuracy and financial reporting. This was triggered by a misinterpretation of how BOM lines and product attributes are linked during cost computation.
Original PR description
When you create a product with atleast one variant that has 2 value, and create a BoM for this product that has 2 lines with each line having one of the two values, then create a POS order with one…
When you create a product with atleast one variant that has 2 value, and create a BoM for this product that has 2 lines with each line having one of the two values, then create a POS order with one unit of each variant, the cost of the first line not correctly computed. Steps to reproduce: ------------------- * Create a prodcut P with one attribute A that has two values A1 and A2 * Create a product C with no attribute and a cost of 10$ * Create a BoM for P with two lines: - Line 1: product C, quantity 1, only for attribute value A1 - Line 2: product C, quantity 2, only for attribute value A2 * Open a PoS session * Add Product P with attribute value A1 to the order * Add Product P with attribute value A2 to the order * Validate the order and close the session * Go to the order and check the cost of each line > Observation: The cost are not correct, they should be 10$ and 20$ Why the fix: ------------ Before this fix we were not taking the `bom_product_template_attribute_value_ids` into account when filtering the stock moves to consider for the cost computation. This value represent the attribute values that the product must have for this BoM line to be considered. opw-4765234 Forward-Port-Of: odoo/odoo#236450 Forward-Port-Of: odoo/odoo#225014
This update resolves an issue where editing a statement line with a currency exchange rate would trigger an error. The fix prevents the system from attempting to reconcile exchange moves during edits, allowing users to correctly mark invoices as paid without encountering the 'reconciled' error. This improves the usability of bank statement reconciliation.
Original PR description
When you create a statement line with one currency rate, and you reconcile it with a move with a different currency rate, this creates an exchange move. But when you want to edit the statement line amount, like marking the invoice as fully paid, this raise a UserError, as the Exchange move is reverted and reconciled, which means it throw an error like "You are trying to reconcile some entries that are already reconciled." This commit, fix this behaviour, by excluding the exchange moves from the check process. Linked:https://github.com/odoo/odoo/pull/237367 [opw-5184679](https://www.odoo.com/odoo/my-support-tasks/5184679) Forward-Port-Of: odoo/enterprise#100493
This update fixes an issue where the mobility budget was incorrectly calculated for part-time employees during salary simulations. The system now accurately uses a full-time equivalent for budget calculations, aligning with Belgian regulations. The change also restores the display of mobility budget wages on employee views.
Original PR description
Mobility budget should be computed based on a full time equivalent: https://lebudgetmobilite.be/fr/6-quel-est-le-montant-du-budget-mobilite#te During salary simulation, that is based on work time rate, a payslip is computed and triggers to recompute the version on which the payslip is bas That makes the mobility budget recompute as well, but this time, based on part time wage (e.g.: 2000 instead of 4000 for a mid-time). This PR adds context keys to ensure that during the salary simulation, the Mobility budget is still computed based on a full time equivalent. Also, this PR reintroduces wage with mobility budget on employee view Task-5360844
This update ensures the Sign app meets legal requirements for U.S. companies by notifying users when the sender is based in the U.S. and offering the option to request a paper copy of signed documents. This compliance update protects the company from potential legal issues related to electronic signatures.
Original PR description
Previously, the Sign app did not comply with the ESIGN Act. It now notifies users when the sender company is U.S.-based that they can request a paper copy of a signed document, ensuring ESIGN Act compliance. task-5166918 Forward-Port-Of: odoo/enterprise#100618 Forward-Port-Of: odoo/enterprise#97163
This update ensures that Point of Sale orders in Mexico correctly utilize the customer's CFDI usage setting, rather than defaulting to 'G03'. This fix addresses a previous issue where CFDI usage wasn't being properly applied, ensuring compliance with Mexican tax regulations for PoS transactions.
Original PR description
When making an order in the PoS in Mexico, if the customer has a CFDI usage set on their partner, it should be used for the order instead of the default one. Steps to reproduce: ------------------- * Install l10n_mx_edi_pos * Create a partner with a CFDI usage different than 'G03' * Open the PoS, select the partner and make an order * Validate the order and check the order in the backend > Observation: The CFDI usage is 'G03' instead of the one set on the partner. opw-5018288 Forward-Port-Of: odoo/enterprise#98607
This update ensures that when users modify the serial number of a product during a delivery process (e.g., changing a lot ID), the change is accurately saved and used. Previously, the system reverted to the original serial number, causing inconsistencies. This fix resolves a critical issue impacting order fulfillment accuracy.
Original PR description
In the stock.picking form, we can modify the `lot_id` of the product we deliver to the customers. Since 19.0, the edited `lot_id` wasn't saved properly, leading to the original `lot_id` being used…
In the stock.picking form, we can modify the `lot_id` of the product we deliver to the customers. Since 19.0, the edited `lot_id` wasn't saved properly, leading to the original `lot_id` being used when confirming the delivery. ### Steps to reproduce: 1. Install the Stock (`stock`) app. 2. Enable the *Lots & Serial Numbers* traceability settings. 3. Create a product tracked *By Unique Serial Number* 4. Create a quotation with a line that includes the product tracked by unique serial number 5. Confirm the quotation 6. Click on the *Delivery* smart button 7. Display the *Serial Numbers* column in the list view 8. Update the Serial Number of the product (remove the original serial number, then add a new one) 9. Click *Validate*, or *Save manually* and reload the page 10. The Serial Number set in step 8 is replaced by the original one The condition at the start of the `StockMove._set_lot_ids` method was preventing the `stock.move.line` from being updated. In the context of this issue, at the moment of execution, the `stock.move.line` still has the original `lot_id`, but it should be updated to the `lot_id` set by the user. This update does not occur because of the condition. https://github.com/odoo/odoo/blob/af4365421bc7ba990420789c12c98270d723fa1a/addons/stock/models/stock_move.py#L606-L607 After applying this fix, the serial number set by the user is correctly saved and used when clicking the *Validate* button on the stock picking form. opw-5169690
This update fixes a bug that prevented video auto-focus during call joins and mid-call camera activations, particularly in different call layouts (mobile, chat, PiP). It now ensures a smooth video experience for all users, resolving layout overflow issues and improving call usability.
Original PR description
Before this PR: - Auto focus on a participant’s video when joining a call did not trigger due to a typo in the find() callback, causing it to always return undefined. - The video-focus-on-join…
Before this PR:
- Auto focus on a participant’s video when joining a call did not trigger due
to a typo in the find() callback, causing it to always return undefined.
- The video-focus-on-join feature was only conditioned on the call component
not being shown in the Discuss desktop view. This does not handle the cases
when call is in meeting view or PiP view
- The video-focus-on-join feature only ran at call join time. In one-one calls,
when the other participant turned on their camera after the call started,
their video was not focused even when auto-focus was enabled
- When any participant had video enabled, the call component could overflow
the chat window, causing an unwanted horizontal scrollbar.
This PR:
- Fixes the find() callback typo so the active streaming session is correctly
detected and auto-focused when joining a call.
- Updates the video-focus-on-join conditions to support all intended layouts:
1. mobile (small UI)
2. chat window
3. PiP window.
- Extends the video-focus-on-join feature: in one-one calls, when the other
participant turns on their camera mid-call, their video is now automatically
focused (when auto-focus is enabled and the above layout conditions are met).
- Fixes layout overflow by preventing the call component from exceeding the
chat window width.
Before / After fix (overflow issue):
<img width="300" height="640" alt="image" src="https://github.com/user-attachments/assets/a291949f-5a82-4c0c-a3c3-d31078e2e62e" /> <img width="300" height="640" alt="image" src="https://github.com/user-attachments/assets/f8405be4-e200-416b-b582-ecc057a0f9a3" />
part of task-[5227387](https://www.odoo.com/odoo/project/1519/tasks/5227387)8 changes
Resolved issues and error corrections
This update fixes an issue where accessing work orders in new work centers on the Shop Floor view would reset the default filters (All MO & My WO). The fix ensures the Shop Floor view retains its expected default filters, improving user workflow and data visibility. This prevents disruption when working with production orders in different work centers.
Original PR description
Issue: ---------------------------------- When accessing a work order in a work center not included in the default selection on the shop floor, the system would change the default view by removing…
Issue: ---------------------------------- When accessing a work order in a work center not included in the default selection on the shop floor, the system would change the default view by removing `All MO` and `My WO`, disrupting the expected behavior for users. Steps to reproduce: ---------------------------------- - Open the Shop Floor view and note the default filters like All MO and My WO. - Access a production whose work order is in a work center not included in the current selection, and move it to that work center. - Observe that the view reloads and the default filters are removed, showing only the newly added work center. With this commit: ---------------------------------- The function is fixed to keep default selections like All MO and My WO when adding a new work center. These were previously removed because they aren't stored and weren't re-added. Now, the new work center is added without altering the default view. Task-id: [4392236](https://www.odoo.com/odoo/project/966/tasks/4392236)
This update fixes a bug that caused double gift cards to be created during order synchronization with the preparation display. The change ensures that a key processing step is completed before subsequent actions, preventing duplicate loyalty calculations and improving the accuracy of gift card usage. This resolves an issue impacting the customer experience.
Original PR description
Before this commit, it was possible that double gift cards were created when syncing orders with preparation display. This was due to the fact that the postSyncAllOrders method was not awaited, leading to duplicate processing of loyalty when calling syncAllOrders twice. opw-5246407 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where the automatic link between a Purchase Order and a Repair Order breaks when the PO is confirmed. The fix ensures the smart link remains active, streamlining the process of managing stock and related orders. This prevents disruptions in the workflow for users relying on this integration.
Original PR description
The link between purchase order and a repair order break at when the PO is confirmed. ### Steps to reproduce: * Install the Repair and Purchase modules * Activate multi-steps routes * Unarchive the…
The link between purchase order and a repair order break at when the PO is confirmed. ### Steps to reproduce: * Install the Repair and Purchase modules * Activate multi-steps routes * Unarchive the MTO route * Create a product with the MTO route enabled * Create a Repair * On the Repair Order, in part add: - type : ADD - product : mto product * Save the RO * Go to Purchase Order * Confirm the PO -> Issue Smart link between PO and RO broken. ### Observation: The smart link is defined on: RO -> PO: https://github.com/odoo/odoo/blob/a2be8182010613c6f92f59e686a2fbf066cc6b68/addons/purchase_repair/models/repair_order.py#L15-L17 PO -> RO: https://github.com/odoo/odoo/blob/a2be8182010613c6f92f59e686a2fbf066cc6b68/addons/purchase_repair/models/purchase_order.py#L15-L17 When we confirm the PO, from the picking information it will create new moves: https://github.com/odoo/odoo/blob/2c87f3b2b397f268f0e50cb73cd81de992ddd42e/addons/purchase_stock/models/purchase_order.py#L293-L298 To create those stock moves, we go into_create_stock_moves where, for each POL, we will generate their values and erase the smart link: https://github.com/odoo/odoo/blob/a2be8182010613c6f92f59e686a2fbf066cc6b68/addons/purchase_stock/models/purchase_order_line.py#L362-L365 ### Origin: In this commit https://github.com/odoo/odoo/commit/9d98c43581e2579f43b35541b43264866dede5a5: "`created_purchase_line_id` is cleared after confirming the RFQ. This allows to merge more in `_merge_moves`." This breaks the link between PO <-> RO to maybe merge the move in the future. This issue is not present in 19.0 since it was solve in this commit : https://github.com/odoo/odoo/commit/2713876dbc70d3984e584a9037a2206dcda4e84a ### About the fix: The root cause of this issue remains ambiguous despite the analysis. Therefore, in the interest of stability and caution, we opted to implement the fix in a safer location. opw-5121816
Incoming Peppol invoices were incorrectly assigned to the current user's company. This fix ensures invoices are now automatically created in the correct receiving company, aligning with Peppol standards and improving accounting accuracy. The issue stemmed from a failure to properly propagate the intended journal to the invoice creation process.
Original PR description
### **Summary** In a real multi-company setup with multiple Belgian companies registered on Peppol, incoming Peppol invoices are systematically created in the **current user’s company**, instead of…
### **Summary**
In a real multi-company setup with multiple Belgian companies registered on Peppol, incoming Peppol invoices are systematically created in the **current user’s company**, instead of the company that actually received the document.
The problem occurs even though the correct journal is identified in `account_edi_proxy_client.user` and used to call `_create_document_from_attachment()`.
### **How to reproduce**
#### **Environment**
* Two Belgian companies: e.g. **Company A** and **Company B**
* Both registered and active on Peppol
* Each company has its own **Peppol purchase journal** (`company.peppol_purchase_journal_id`)
* An accountant with access to both companies
#### **Steps**
1. Trigger Peppol incoming document retrieval (`_peppol_get_new_documents`)
2. Odoo resolves the correct receiving company and journal:
```python
company = edi_user.company_id
journal = company.peppol_purchase_journal_id
```
3. The code uses this journal to import the invoice:
```python
move = journal\
.with_context(
default_move_type='in_invoice',
default_peppol_move_state=content['state'],
default_peppol_message_uuid=uuid,
)\
._create_document_from_attachment(attachment.id)
```
4. **Actual result**:
The `account.move` is created in **the company of the current user**, *not* in `journal.company_id`.
5. **Expected result**:
The vendor bill must belong to the company that received the Peppol document (i.e. `journal.company_id`).
This behaviour is reproducible 100% of the time when a user has multiple companies enabled.
---
### **Root Cause**
The selected journal is **never propagated** to the EDI XML decoder.
#### 1. The call in the Peppol module *looks* correct:
```python
journal.with_context(...)._create_document_from_attachment(...)
```
…but `_create_document_from_attachment()` in `account.journal` does *not* use `self` to determine the journal:
```python
invoices = self.env['account.move']
# `self` (journal) is not used at all during decoding
decoders = self.env['account.move']._get_create_document_from_attachment_decoders()
```
So the journal passed to `.with_context()` is effectively **ignored** inside the decoder chain.
#### 2. The XML decoder in `account.edi.format` explicitly uses the *environment company*:
```python
res = edi_format.with_company(self.env.company)._create_invoice_from_xml_tree(...)
```
Thus:
* The company used during invoice creation is **self.env.company**
* That is the **current user’s company**
* Not the Peppol recipient’s company
* Not the journal’s company
* Not the company associated with the Peppol identifier
#### 3. `_create_invoice_from_xml_tree()` supports a journal, but it is never provided
```python
if not journal:
journal = self.env['account.journal'].browse(self._context.get("default_journal_id"))
```
Since `default_journal_id` is **never set**, the fallback is always used.
---
### **Why the fix requires passing `default_journal_id` explicitly**
Even if it **feels redundant**, it is necessary.
* We *are* calling the decoder through `journal.with_context(...)`
* But `_create_document_from_attachment()` does **not** use `self`
* The decoder receives **no reference to the journal**
* And is executed in a context where `self.env.company` = current user’s company
Because Odoo intentionally allows calling `_create_document_from_attachment()` on an **empty journal recordset**, the decoder cannot deduce the journal from `self.id`.
Therefore, the only reliable way to pass the journal down the stack is through the context key `default_journal_id`.
---
### **Proposed Fix**
Add `default_journal_id=journal.id` in the context at the point where the journal is still known:
```diff
--- a/addons/account_peppol/models/account_edi_proxy_user.py
+++ b/addons/account_peppol/models/account_edi_proxy_user.py
@@
move = journal\
.with_context(
default_move_type='in_invoice',
default_peppol_move_state=content['state'],
default_peppol_message_uuid=uuid,
+ default_journal_id=journal.id, # ensure correct company is used
)\
._create_document_from_attachment(attachment.id)
```
This allows the EDI decoder to resolve:
```python
journal = self.env['account.journal'].browse(self._context.get("default_journal_id"))
```
Which in turn ensures:
* the invoice is created in `journal.company_id`
* the correct taxes, accounts, fiscal settings, and partner mapping are applied
* multi-company Peppol setups behave as designed
---
### **Impact**
Without this fix:
* All incoming Peppol invoices are created in the wrong company in multi-company environments.
* This leads to:
* wrong journal assignment
* wrong fiscal configuration
* partner mismatches
* tax errors
* reconciliation issues
With this fix:
* Each Peppol invoice is correctly routed to the receiving company’s journal
* Behaviour is stable and consistent with Odoo’s EDI design
---
### ✔️ This is a minimal, safe and backward-compatible fix
* It changes only the Peppol integration behavior
* It does not modify EDI core internals
* It uses an existing mechanism (`default_journal_id`) already expected by Odoo
* It matches the intended API contract
* It prevents silent cross-company data corruption
Forward-Port-Of: odoo/odoo#237904This update fixes an issue where adding a note to a combo orderline didn't correctly update the quantities of its child lines. The fix ensures that quantities are synchronized, preventing incorrect order totals and improving the accuracy of combo orders. Future changes in version 18.3 will require further adjustments to handle duplicate items within combos.
Original PR description
**Steps to reproduce:** - Go to the restaurant - Select a table, click on a combo and order it - Add quantity to the ordered combo and add a note to it - Select the desired combo options in the popup…
**Steps to reproduce:** - Go to the restaurant - Select a table, click on a combo and order it - Add quantity to the ordered combo and add a note to it - Select the desired combo options in the popup - The combos' children lines' qty are not updated and are either too much or 1 **Why the fix:** When we add a note to an orderline that has qty that has not been sent to the kitchen, we split the line in 2 lines, one with everything that has been sent to the kitchen and one with everything that has not been sent and the note we just added. This implementation didn't account for the combos, so the combo_line_ids' qty were never updated and stayed as is in the original line, and were set as 1 in the new line. We now update the children lines' qty at the same time as the parent lines. This behavior will need to change with the changes made in version 18.3, as this version introduces the possibility of having the same child line multiple times in the same combo, like 2 of the same burger in a single combo. Another problem is there is currently a bug in 18.3 preventing us from correctly changing the qty of a combo's children by changing the parent's qty if the same item is ordered twice (the qty will still be set to the parent's qty instead of being multiplied). So this will need to be changed once this reaches 18.3 opw-5164102
This update corrects an issue where the invoice date was unexpectedly changing after a company partner's address was modified. The fix prevents the date from being recalculated when an invoice is in the 'posted' state, ensuring data consistency. This improves the accuracy of invoices generated for Czech businesses.
Original PR description
**Steps to reproduce** 1.Install Accounting, Contacts, and l10n_cz. 2.Create an invoice with a future `invoice date` and confirm it. 3.Go to Contacts → open the company (res.partner). 4.Modify any…
**Steps to reproduce** 1.Install Accounting, Contacts, and l10n_cz. 2.Create an invoice with a future `invoice date` and confirm it. 3.Go to Contacts → open the company (res.partner). 4.Modify any address field (street, zip, etc.) and save. 5.Return to the invoice → in the chatter, the `date` field has change unexpectedly > Note: The `date` field is not shown in invoice default form view. Add it manually for clearer reproduction. **Issue** - The confirmed invoice `date` changes when updating the company partner’s address. **Cause** https://github.com/odoo/odoo/blob/7a1b27e5985b3b16768bea450c51226ae3659c76/addons/l10n_cz/models/account_move.py#L20-L24 - When creating an invoice, the `date` field is correctly set based on the `taxable_supply_date` while the invoice is in the draft state. After confirming (posting) the invoice, it moves to the `posted` state. - However, when updating the partner address, the `_compute_date` method is triggered again, which calls `super()` and recomputes the `date` field using the standard logic. Since the invoice is already in the `posted` state, the CZ-specific condition is not satisfied, and the `date` gets updated incorrectly. **Solution** - Update `_compute_date` to only call super() for invoices in draft state. - This prevents unwanted recomputation of the `date` on post invoices. opw - 5086961 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves an issue where 'Loop' and 'Hide Player Controls' settings weren't correctly applied to Vimeo videos embedded in the website. The fix removes a redundant escaping process that was causing the video player to misinterpret the URL parameters, ensuring these settings now function as expected.
Original PR description
When setting options like "Loop" or "Hide Player Controls" on an embedded Vimeo video, these settings were not applied on the final page after saving. Steps to reproduce: =================== - Go to…
When setting options like "Loop" or "Hide Player Controls" on an embedded Vimeo video, these settings were not applied on the final page after saving. Steps to reproduce: =================== - Go to the Website editor. - Drag and drop a "Media List" or similar snippet. - Double-click the video placeholder to open the media dialog. - In the "Video" tab, paste a Vimeo URL. - Enable "Loop" and/or "Hide Player Controls". - Save the page. -> Observe that the video does not loop and the controls are still visible. Cause: ====== When rebuilding the iframe, `generateVideoIframe` was processing the video's `src` URL through using `escape()` function. This function is designed to prevent XSS by converting characters like `&` into their HTML entity equivalent, `&`. However, Vimeo video URLs use the `&` character to separate query parameters (e.g., `?loop=1&controls=0`). The `escape()` function was converting this URL to `?loop=1&controls=0`. but `setAttribute` already handles URL values safely. so Vimeo player will receive url containing &amp;. This broke the URL's structure. The Vimeo player received a malformed URL, could not parse the parameters correctly, and therefore ignored the options for looping and controls. escape was used before cause The original code was adding the iframe using `.html(...)` see commit: https://github.com/odoo-dev/odoo/commit/8749410b1033ddec1207ce1db42d1889a0d2ea33 side note 1: before saving the vimeo video works because we render it without the double escaping of & (as will be the case for saved video if this PR is applied) side note 2: the issue of double escaping also apply to youtube, but it seems to be ok with superfluous & in URL while in vimeo: https://player.vimeo.com/video/1138854841?autoplay=1&muted=1&autopause=0&controls=0&loop=1 has the video that doesn't loop, is not muted (so doesn't auto play in an iframe on most browser) and show controls https://player.vimeo.com/video/1138854841?autoplay=1&muted=1&autopause=0&controls=0&loop=1: all option works Solution: ========= The unnecessary `escape()` call has been removed. since the video should be only added using media dialog and the `setAttribute(...)` will escape it by default opw-5225261 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update fixes a frustrating issue where background blur in video calls would cause streams to freeze when switching tabs. By using a separate worker thread, the system now maintains a consistent frame rate, ensuring smooth video playback regardless of which tab you're in. This improves the overall video call experience for users.
Original PR description
**Description of the issue/feature this PR addresses:** This PR fixes an issue where the video stream freezes when the background blur effect is enabled and the user switches to another browser tab…
**Description of the issue/feature this PR addresses:** This PR fixes an issue where the video stream freezes when the background blur effect is enabled and the user switches to another browser tab during video calls. **Current behavior before PR:** When background blur is enabled during a video call, the user’s video stream freezes if they switch to another browser tab. This happens because currently frame scheduling relies on `requestAnimationFrame` and `setTimeout`, which modern browsers pause or throttle in inactive tabs to conserve system resources and battery life. **Desired behavior after PR is merged:** The user’s video stream continues to render with the background blur effect, even when the browser tab is inactive. This is achieved by moving the frame scheduling logic to a Web Worker, which runs in a separate thread and is not subject to browser throttling. As a result, a consistent frame rate is maintained at all times. task-[4781227](https://www.odoo.com/odoo/project/1519/tasks/4781227) --- 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 resolves a bug where changing the quantity of a combo product in Point of Sale (PoS) didn't correctly update the quantities of its child items. The fix ensures that when a combo's parent quantity is adjusted, the child items are also updated accordingly, preventing incorrect order totals. This improves the accuracy of PoS transactions.
Original PR description
When changing the quantity of a combo parent product in a PoS that doesn't allow changing quantity (like when using blackbox), the children of the combo would not be updated correctly. Steps to reproduce: ------------------- * Open any PoS and use this command to change the behavior of changing quantity : `posmodel.disallowLineQuantityChange = () => true;` * Add any combo product to the order. * Change the quantity of the combo parent product to 0 > Observation: The children of the combo are still there. Why the fix: ------------ We make sure to adapt the quantity of the combo children when the parent quantity is changed. opw-4876979
Incoming Peppol invoices were incorrectly assigned to the current user's company instead of the receiving company. This fix ensures that invoices are now automatically created in the correct company’s purchase journal, streamlining the accounting process for multi-company Peppol setups.
Original PR description
### **Summary** In a real multi-company setup with multiple Belgian companies registered on Peppol, incoming Peppol invoices are systematically created in the **current user’s company**, instead of…
### **Summary**
In a real multi-company setup with multiple Belgian companies registered on Peppol, incoming Peppol invoices are systematically created in the **current user’s company**, instead of the company that actually received the document.
The problem occurs even though the correct journal is identified in `account_edi_proxy_client.user` and used to call `_create_document_from_attachment()`.
### **How to reproduce**
#### **Environment**
* Two Belgian companies: e.g. **Company A** and **Company B**
* Both registered and active on Peppol
* Each company has its own **Peppol purchase journal** (`company.peppol_purchase_journal_id`)
* An accountant with access to both companies
#### **Steps**
1. Trigger Peppol incoming document retrieval (`_peppol_get_new_documents`)
2. Odoo resolves the correct receiving company and journal:
```python
company = edi_user.company_id
journal = company.peppol_purchase_journal_id
```
3. The code uses this journal to import the invoice:
```python
move = journal\
.with_context(
default_move_type='in_invoice',
default_peppol_move_state=content['state'],
default_peppol_message_uuid=uuid,
)\
._create_document_from_attachment(attachment.id)
```
4. **Actual result**:
The `account.move` is created in **the company of the current user**, *not* in `journal.company_id`.
5. **Expected result**:
The vendor bill must belong to the company that received the Peppol document (i.e. `journal.company_id`).
This behaviour is reproducible 100% of the time when a user has multiple companies enabled.
---
### **Root Cause**
The selected journal is **never propagated** to the EDI XML decoder.
#### 1. The call in the Peppol module *looks* correct:
```python
journal.with_context(...)._create_document_from_attachment(...)
```
…but `_create_document_from_attachment()` in `account.journal` does *not* use `self` to determine the journal:
```python
invoices = self.env['account.move']
# `self` (journal) is not used at all during decoding
decoders = self.env['account.move']._get_create_document_from_attachment_decoders()
```
So the journal passed to `.with_context()` is effectively **ignored** inside the decoder chain.
#### 2. The XML decoder in `account.edi.format` explicitly uses the *environment company*:
```python
res = edi_format.with_company(self.env.company)._create_invoice_from_xml_tree(...)
```
Thus:
* The company used during invoice creation is **self.env.company**
* That is the **current user’s company**
* Not the Peppol recipient’s company
* Not the journal’s company
* Not the company associated with the Peppol identifier
#### 3. `_create_invoice_from_xml_tree()` supports a journal, but it is never provided
```python
if not journal:
journal = self.env['account.journal'].browse(self._context.get("default_journal_id"))
```
Since `default_journal_id` is **never set**, the fallback is always used.
---
### **Why the fix requires passing `default_journal_id` explicitly**
Even if it **feels redundant**, it is necessary.
* We *are* calling the decoder through `journal.with_context(...)`
* But `_create_document_from_attachment()` does **not** use `self`
* The decoder receives **no reference to the journal**
* And is executed in a context where `self.env.company` = current user’s company
Because Odoo intentionally allows calling `_create_document_from_attachment()` on an **empty journal recordset**, the decoder cannot deduce the journal from `self.id`.
Therefore, the only reliable way to pass the journal down the stack is through the context key `default_journal_id`.
---
### **Proposed Fix**
Add `default_journal_id=journal.id` in the context at the point where the journal is still known:
```diff
--- a/addons/account_peppol/models/account_edi_proxy_user.py
+++ b/addons/account_peppol/models/account_edi_proxy_user.py
@@
move = journal\
.with_context(
default_move_type='in_invoice',
default_peppol_move_state=content['state'],
default_peppol_message_uuid=uuid,
+ default_journal_id=journal.id, # ensure correct company is used
)\
._create_document_from_attachment(attachment.id)
```
This allows the EDI decoder to resolve:
```python
journal = self.env['account.journal'].browse(self._context.get("default_journal_id"))
```
Which in turn ensures:
* the invoice is created in `journal.company_id`
* the correct taxes, accounts, fiscal settings, and partner mapping are applied
* multi-company Peppol setups behave as designed
---
### **Impact**
Without this fix:
* All incoming Peppol invoices are created in the wrong company in multi-company environments.
* This leads to:
* wrong journal assignment
* wrong fiscal configuration
* partner mismatches
* tax errors
* reconciliation issues
With this fix:
* Each Peppol invoice is correctly routed to the receiving company’s journal
* Behaviour is stable and consistent with Odoo’s EDI design
---
### ✔️ This is a minimal, safe and backward-compatible fix
* It changes only the Peppol integration behavior
* It does not modify EDI core internals
* It uses an existing mechanism (`default_journal_id`) already expected by Odoo
* It matches the intended API contract
* It prevents silent cross-company data corruption
Forward-Port-Of: odoo/odoo#237904This update corrects a bug where credit notes weren't automatically generating deferred revenue entries. The system incorrectly relied on expense entry settings. Now, credit notes will correctly create deferred revenue entries when configured to 'On bill validation', aligning with how invoices are handled.
Original PR description
The system incorrectly uses the `Deferred Expense Entries` configuration to determine whether to create deferrals for credit notes, while it should follow the `Deferred Revenue Entries` setting, as invoices do. As a result, deferred entries for credit notes are not created when expected. Steps to reproduce: - Go to Accounting → Configuration → Settings. - In the Deferred Expense Entries section, set Generate entries to: Manually & Grouped - In the Deferred Revenue Entries section, set Generate entries to: On bill validation - Navigate to Accounting → Customers → Credit Notes. - Create a credit note with at least one line containing Date From and Date To (i.e., deferrable line). - Validate the credit note. - No deferred revenue entries are created. Ticket [link](https://www.odoo.com/odoo/project.task/5187051) opw-5187051
This update resolves an issue where scanning items during a delivery didn't always correctly associate the new line with the original package. The change ensures that when splitting a delivery, the new line automatically pulls from the same package as the initial quantity, improving order fulfillment accuracy. This prevents errors and ensures correct stock tracking.
Original PR description
Backport of 9685a42 Steps to reproduce ----- - Enable packages - Create a stored Product "Prod" - Add a quantity of 5 "Prod" in stock, in package "PACK1" - Create a delivery for 3 units of "Prod" (so as to not move the whole package) - Open the delivery in Barcode - Scan "Prod" - Put in pack > The new line created for the remainder of the delivery is not taken from PACK1 ----- Ticket: opw-5081496