Daily updates from Odoo
Monday, January 26, 2026
76 changes · master
Resolved issues and error corrections
This update removes unnecessary integer rounding from monthly Italian VAT reports. Previously, rounding was incorrectly applied, causing discrepancies in reporting. This change ensures accurate monthly VAT calculations, aligning with Italian tax regulations.
Original PR description
**Description of the issue/feature this PR addresses**: Integer rounding is only required on annual l10n_it VAT reports. It appears that it was incorrectly added to the monthly report when the two were split in #193662. **Current behavior before PR**: Integer rounding on monthly l10n_it tax reports. **Desired behavior after PR is merged**: No more integer rounding on monthly l10n_it tax reports. [opw-5292310](https://www.odoo.com/odoo/project.task/project.task/5292310) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244389 Forward-Port-Of: odoo/odoo#243100
This update removes unnecessary integer rounding from the monthly Italian VAT reports. The rounding was mistakenly carried over from annual reports due to a previous split in the codebase. This ensures accurate VAT reporting for Italian businesses.
Original PR description
Integer rounding is only required on annual l10n_it VAT reports. It appears that it was incorrectly added to the monthly report when the two were split in [#193662](https://github.com/odoo/odoo/pull/193662). [opw-5292310](https://www.odoo.com/odoo/project.task/project.task/5292310) Forward-Port-Of: odoo/enterprise#104679 Forward-Port-Of: odoo/enterprise#103852
This update resolves an issue where website tour tests would fail after changing the header template to 'Sidebar'. The fix ensures the website builder remounts correctly before the tour proceeds, preventing the builder from resetting to its initial state and maintaining test stability.
Original PR description
When changing the header template to 'Sidebar', the loading screen disappears but the WebsiteBuilder component remounts asynchronously. If the tour proceeds to the theme tab before the remount completes, the builder resets to the Edit tab (its initial state), breaking the test flow. We wait for the builder to remount, and add `.editor_enable` class to the body of the iframe, so then nothing disrupts the flow. runbot-234504 Forward-Port-Of: odoo/odoo#245271 Forward-Port-Of: odoo/odoo#243518
This update resolves a frustrating issue where the website builder would sometimes freeze while waiting for user input in dialog boxes. The fix introduces a timeout mechanism to prevent these stalls, ensuring a smoother and more reliable experience for users building their websites. This improves the overall usability of the website builder.
Original PR description
Commit 6df83abb35c95ab42e55d9a08cf6c411efa64b3e added a timeout on operations, as an heuristic to detect when an operation is stuck. This timeout may be triggered when the action opens a dialog and wait for user choice. This commit sets `canTimeout = false` on actions that open a dialog and wait for user choice in the `apply` method. Steps to reproduce: - Open website builder - Click on "Theme" tab - Click "Add a language" - Wait a bit - Bug: It show the error message "A technical issue occurred..." task-5867364 Forward-Port-Of: odoo/odoo#245217
This update corrects a bug where multiple calls to a loyalty program processing function could overwrite important coupon information. Previously, when the system processed orders multiple times, crucial details about customer loyalty discounts were lost. This fix ensures that loyalty data is consistently recorded, improving the accuracy of customer rewards.
Original PR description
Before this commit, when syncAllOrders was called more than once, for example when there were a preparation display, the second call to postProcessLoyalty would override the new_coupon_info set by the first call, resulting in the loss of information. The second call to confirm_coupon_programs is not an issue, as it's already handled. opw-5440543 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242087
This update fixes an issue where fiscal data for Chinese credit notes wasn't appearing in the PDF reports. The fix involved ensuring the correct display of a conditional element within the report template, now correctly rendering the required financial information.
Original PR description
The fiscal data is not displayed in the credit note pdf. This is because we're relaying on a div that is conditionnally displayed in the inherited template. opw-5467583 Forward-Port-Of: odoo/enterprise#104924
This update resolves an issue where the invite input field automatically gained focus, disrupting other dialogs like the call permission dialog. Now, the input only focuses when it's active and the user's context is engaged. Additionally, a testing helper was moved to improve test reliability.
Original PR description
**Current behavior before PR:** - The invite input always tried to autofocus, in turn stealing focus from dialogs like the call-permission dialog. **Desired behavior after PR is merged:** - Autofocus only when the input exists and the context is active. - Moved `mockPermissionsPrompt` to `mail_test_helpers`. **Part of task-**[5227387](https://www.odoo.com/odoo/project/1519/tasks/5227387) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245334 Forward-Port-Of: odoo/odoo#236248
This update improves the product information displayed in the point-of-sale system. It now shows the product's internal 'default_code' alongside its name in the product info popup. This provides additional context and traceability for sales staff and inventory management.
Original PR description
This commit adds the default_code (internal reference) to the display name of the product in the product info popup. opw-5493827 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244068
This update resolves an issue where Odoo invoices with discounts generated for Nemhandel invoices were failing validation. The fix ensures that discounts are correctly accounted for, allowing these invoices to be properly transmitted to customers. This improves the reliability of invoice processing for Danish customers using Nemhandel.
Original PR description
Before this fix, all the OIOUBL invoices with a discount generated by Odoo would fail the schematron validation, meaning they can't be sent to the customer through Nemhandel. The schematron enforces that the discount is taken into account at the PriceAmount, to keep the rules on lineExtensionAmount working. Also changes the import to understand that it's a discount. opw-5379474 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242315 Forward-Port-Of: odoo/odoo#241614
This update optimizes how Odoo sends notifications, specifically when the system is under heavy load. By using a faster JSON serialization library, ‘orjson’, the system processes notifications more efficiently, reducing delays and improving overall responsiveness. This results in a smoother user experience.
Original PR description
When the gevent server is under high load, the time required to acquire a cursor and fetch notifications increases. This causes notifications to accumulate, leading to larger payloads. Serializing these large payloads using the standard json library becomes a bottleneck. In a gevent environment, this monopolizes the event loop, delaying the processing of other greenlets. This commit introduces optional support for `orjson`. If installed, it is used to significantly speed up JSON encoding, freeing up the event loop. Using `orjson` increases the throughput by ~20% under high load. Forward-Port-Of: odoo/odoo#245307 Forward-Port-Of: odoo/odoo#241601
This update re-enables key test tours within the MRP Workorder module, ensuring proper functionality testing. A dedicated test company was created to isolate these tests from demo data, and a helper method was added for easier setting enablement. This resolves a previous issue preventing these tests from running correctly.
Original PR description
This PR does 2 things: ## Create a test company Add a company dedicated to TestShopFloor's tests so those tests won't be affected by demo data anymore. ## Enable tours Until then, 10 tours related to Shop Floor were skipped after [a refactor of the Shop Floor](https://github.com/odoo/enterprise/pull/80469) design and functionality. This PR re-enables 7 of these 10 tests tour (3 remaining need more work to pass when demo data are installed.) Also it adds a test helper method, `_enable_settings`, to enable wanted setting(s) easily. [task-5365014](https://www.odoo.com/odoo/966/tasks/5365014) Forward-Port-Of: odoo/enterprise#105117 Forward-Port-Of: odoo/enterprise#88338
A recent test for our live chat feature was intermittently failing due to a timing issue. This update increases the test's waiting period, allowing it to reliably process notifications even under heavy load. This ensures the live chat test remains stable and provides consistent results.
Original PR description
The `Only two quick actions are shown` live chat test awaits the first posted message because to avoid conflict with the reaction being added afterwards. To do so, the test uses the `waitForSteps` helper. However, during high load, 200ms might be too short to receive the notification, leading to the test failing. This commit increases the timeout. runbot-237587 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#245421
This update resolves an intermittent error that occurred when printing multiple receipts quickly via USB. The fix prevents multiple threads from accessing the printer simultaneously, ensuring reliable ESC/POS printing and eliminating fallback to CUPS. This improves the overall stability of receipt generation.
Original PR description
When printing many receipts quickly using a USB printer, this error was occasinally occuring: ``` WARNING ? odoo.addons.iot_drivers.iot_handlers.drivers.printer_driver_base: Failed to query ESC/POS…
When printing many receipts quickly using a USB printer, this error was occasinally occuring: ``` WARNING ? odoo.addons.iot_drivers.iot_handlers.drivers.printer_driver_base: Failed to query ESC/POS status ERROR ? root: Could not set configuration: [Errno 16] Resource busy ``` This would cause `python-escpos` to be disabled and fallback to just CUPS printing. The issue was caused by two threads trying to access the printer at the same time, which could happen in two ways: - IoT thread with `python-escpos` and CUPS try to access the printer at the same time. - Two IoT threads with `python-escpos` try to access the printer at the same time (this can happen if two receipt actions are received at the same time). Both of these scenarios should now prevented: - Now, if we are using `python-escpos`, we also use it to print the receipt as well as checking the status. CUPS is never used so there should be no interference from it. - We now have an `escpos_lock` (per printer, not global) that is acquired when accessing the printer via `python-escpos`. This ensures that different threads cannot both try to access the printer at the same time. task-5490942 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245122 Forward-Port-Of: odoo/odoo#244031
This update corrects a bug in how Odoo calculates product values for AVCO products after a stock valuation adjustment. Previously, adjustments resulted in inflated unit costs and total values. The fix ensures accurate valuation calculations for these products, preventing financial discrepancies.
Original PR description
**Steps to reproduce:** - Create a storable product "P1" - Product category: AVCO - Create a purchase order with 100 units of P1 at $10 - Confirm the PO and validate the receipt - Go to Inventory ->…
**Steps to reproduce:**
- Create a storable product "P1"
- Product category: AVCO
- Create a purchase order with 100 units of P1 at $10
- Confirm the PO and validate the receipt
- Go to Inventory -> Reporting -> Stock
- P1 unit cost is $10 and total value is $1000
- Click on $1000
- Select the first stock move
- Action -> Adjust valuation
- New value: $2000 -> Save
- Go back to Inventory -> Reporting -> Stock
**Problem:**
- The unit cost becomes $2,000 and the total value $200,000
When a valuation adjustment is made on an AVCO product, a `product.value`
record is created with the new total valuation value.
However, `product.value.value` can represent two different things:
- for a standard price update, `value` contains the new unit cost
- for a stock move valuation, `value` contains the total value of the move
When `run_avco` processes a `product.value` coming from a move valuation,
it incorrectly treats the value as a unit price and multiplies it by
the quantity
opw-5460829
Forward-Port-Of: odoo/odoo#244957This update resolves an issue preventing grouping within the planning module's slot templates. The fix ensures that parameters are passed to the underlying method in the correct order, enabling proper data aggregation. This improves the functionality of the planning system.
Original PR description
Before this commit, it was impossible to group by on any field in `planning.slot.template` model, because the parameters given to the parent method of `formatted_read_group` method were not given into the right order. This commit makes sure the order is respected. Forward-Port-Of: odoo/enterprise#105211
This update resolves an issue where the system would crash when users attempted to upload corrupted or encrypted PDF files for quotation document headers and footers. The fix prevents errors related to PDF reading and decryption, ensuring users can now successfully upload valid PDF files without causing the system to fail.
Original PR description
Currently, an error occurs when uploading `encrypted or incomplete` PDF files (missing EOF marker) while creating a quotation document header or footer. **Steps to reproduce:** - Install the…
Currently, an error occurs when uploading `encrypted or incomplete` PDF files (missing EOF marker) while creating a quotation document header or footer. **Steps to reproduce:** - Install the `sale_pdf_quote_builder` module. - Navigate to: Sales > Configuration > Headers/Footers. - Upload encrypted file [1], or incomplete file [2]. **Error:** `PyPDF2.errors.DependencyError: PyCryptodome is required for AES algorithm` `PyPDF2.errors.PdfReadError: EOF marker not found` **Root cause:** At [3], `_get_form_fields_from_pdf` and `_ensure_document_not_encrypted` directly call `pdf.PdfFileReader`, when it fails to read or decrypt the file, Python raises an error. **Fix:** This commit prevents errors when users upload unreadable or encrypted PDF files. [1]: https://drive.google.com/file/d/1moSlwXHkqcV6_7zHBNhLMLi-9Ye_xDGJ/view?usp=sharing [2]: https://drive.google.com/file/d/16O4LLH8dL0RWmbOx4HrcooFUyesWaVi-/view?usp=sharing [3]: https://github.com/odoo/odoo/blob/694f1d0fb03b56dd41a59eb676e56622634cc91b/addons/sale_pdf_quote_builder/utils.py#L11 sentry-6928220164 opw-5227601 Forward-Port-Of: odoo/odoo#245264 Forward-Port-Of: odoo/odoo#230712
A technical error prevented the creation of a key email template when rental orders were present. This fix moved a necessary method to the `sale_renting` module, ensuring template validation works correctly regardless of whether the rental module is installed. This resolves a potential issue with e-commerce order emails.
Original PR description
The mail template `mail_template_sale_cart_recovery` creation fails in some cases if there is a rental order in the database. Indeed, during a template creation, the first record of the corresponding model is used to validate the template validity. In this case, the template is only meant for e-commerce orders and there won't be any e-commerce rental order without `website_sale_renting` but the validation is not aware of functional specificities, leading to a traceback because the method `_get_rental_pricing_description` doesn't exist when only `sale_renting` and `website_sale` are installed. To avoid this error, we move the method to `sale_renting`, even though there is no real life flows where this was breaking (except templates validation ofc). Was fixed first with c3f5dafa23a8b1fd36eaedd83a575b717e5e9377 but moved back into `website_sale_renting` by mistake with fd1d7f91e7e60a20a5401201ff89a7e875faad82 Forward-Port-Of: odoo/enterprise#105318
This update resolves an issue where shared subfolders within the Documents app weren't initially displayed correctly for users accessing them through a link. The fix ensures that subfolders are immediately accessible upon initial loading, eliminating the need for a refresh or multiple clicks to view them. This enhances the user experience for sharing and accessing documents.
Original PR description
**Steps to reproduce:** - Create a portal user - Go to the documents app - Click on the marketing folder - Share the marketing folder through a link (Anyone with a link = viewer + discoverable) -…
**Steps to reproduce:** - Create a portal user - Go to the documents app - Click on the marketing folder - Share the marketing folder through a link (Anyone with a link = viewer + discoverable) - Copy the share link - Login with the portal user in an incognito window - Paste the share link in an incognito browser - Click on "brand 1" folder, result nothing is showing while there should be a folder and a picture - Click on "brand 2" - Click back on "brand 1" and now the folder and picture are visible - If you click on a subfolder of "brand 1" you also get an error **Issue:** Discoverable subfolders accessed using `accessToken` are not available on the first read of a user and this happens for each level of the hierarchy (refresh is needed each time). When using sharing link to display folders with a user, the subfolder document access is created on `/documents/touch/` using `_from_access_token`. But on the js side the call is delayed (with debounce) and occurs after the `web_search_read`. This means that subfolders are only accessible after a refresh or by switching back and forth between folders. Also, even after the folder is displayed, if there are other subfolders in it, going deeper in the hierarchy won't work as well without a refresh due to the `search_panel_select_range` missing the new folder. **Fix:** Not sure on the best way to fix this, the issue will always be related to performance. Current fix checks if a reload is needed by sending a flag in the `/documents/touch/<access_token>` request result when a new document access was created. opw-5156297 Forward-Port-Of: odoo/enterprise#104845 Forward-Port-Of: odoo/enterprise#99820
This update corrects a bug where the price of reward items was incorrectly reset to zero after multiple reward clicks. The fix ensures that the reward line's unit price accurately reflects the product's original sale price, maintaining correct calculations for discounts and totals. This improves the reliability of reward programs.
Original PR description
### Issue: Due to this issue, by clicking twice on `Reward` button on SO, reward line unit price will be reset to zero. #### To reproduce: 1- Create a `Buy X Get Y` program: rule: minimum quantity:…
### Issue: Due to this issue, by clicking twice on `Reward` button on SO, reward line unit price will be reset to zero. #### To reproduce: 1- Create a `Buy X Get Y` program: rule: minimum quantity: 3, product: `Large Desk Wood` reward: 1 `Large Desk Wood` for free 2- Create a SO, and add a line with 3 `Large Desk Wood` 3- Click on `Reward` button. A new line should be automatically created. The unit price should be the product sale price and line `Amount` should be 0. 4- Re-click on reward. The reward line price unit is set to zero. Expected: The reward line price unit should remain as product sale price with a discount of 100 and line.amount of 0. ### Cause and Fix: In `_reset_loyalty`, price_unit is set to zero. The method `compute_amount` depends on `price_unit`, which means setting `price_unit` will make amount to be recomputed: https://github.com/odoo/odoo/blob/4fa9f9b849016f312efcb73f9a76b223e429aec0/addons/sale/models/sale_order_line.py#L843-L844 https://github.com/odoo/odoo/blob/4fa9f9b849016f312efcb73f9a76b223e429aec0/addons/sale/models/sale_order_line.py#L848 https://github.com/odoo/odoo/blob/4fa9f9b849016f312efcb73f9a76b223e429aec0/addons/account/models/account_tax.py#L1613 Which leads to `_compute_price_unit`. In this compute, the unit price will not be recomputed if `technical_price_unit` and `price_unit` differ. https://github.com/odoo/odoo/blob/4fa9f9b849016f312efcb73f9a76b223e429aec0/addons/sale/models/sale_order_line.py#L606-L611 https://github.com/odoo/odoo/blob/4fa9f9b849016f312efcb73f9a76b223e429aec0/addons/sale/models/sale_order_line.py#L588-L595 So IMO if we want to recompute `price_unit`, we need to also reset `technical_price_unit` in `_reset_loyalty`. opw-5467623 Forward-Port-Of: odoo/odoo#244290
This update removes the Sign menu item from Odoo's Discuss channels. Previously, this menu was incorrectly displayed, which was confusing for users. This change ensures Discuss channels function as intended, focusing on mail threads instead of sign requests.
Original PR description
Currently, the Sign menu item is displayed in discuss channels, which is not making sense. This was due to an incomplete check in the isDisplayed method of the SignRequestCogMenu component. To fix this, we enhance the condition to ensure that the menu item is not displayed when the current model is 'discuss.channel'. Discuss channels inherently support mail threads, but should not have the Sign menu item. task-5494751 Forward-Port-Of: odoo/enterprise#105201
This update resolves a bug where changes to the source lot location during barcode delivery weren't being saved correctly. Now, when you update the source location, the system will re-prompt you to confirm the change and display the new location. Additionally, the system now only shows active lot locations for editing, improving efficiency.
Original PR description
This PR fixes the bug of not making the source location persistent when changing it from the form view. To reproduce the bug: 1- Create a product tracked by lot. 2- Create 3 different lot locations…
This PR fixes the bug of not making the source location persistent when changing it from the form view. To reproduce the bug: 1- Create a product tracked by lot. 2- Create 3 different lot locations with each having a quantity of 100. 3- Create an out delivery of 140 and notice 100 are assigned from the first lot and 40 are assigned from the second lot. 4- Set the scanning source location to be mandatory in Barcode for deliveries. 5- Go to Barcode app, navigate to the delivery, you find it mandatory to scan a source location. 6- Scan the source location for the first lot location, choose the product and click on the edit pen icon. 7- Choose another lot location as your source location, let it be the third lot location and confirm. 8- Choose to assign the qty by clicking on the +100 button. = See that the new chosen source location is not persistent. The fix: After this PR, if you follow the steps up to step 7 and after you confirm your new source location, the Barcode makes the lines inactive again and asks you to scan the source location (since it's mandatory) and it also shows the new source location on the line. Another fix this commit addresses is that when you scan a source location, only the lines with this location are active to choose/edit not all the lines. Task-4809491 Forward-Port-Of: odoo/enterprise#97777
This update resolves an issue where the l10n_cl_edi module was incorrectly creating duplicate vendor bills when receiving identical XML invoices via the incoming mail server. The fix prevents duplicate bill creation, ensuring accurate record-keeping and avoiding potential accounting discrepancies. This addresses previous support tickets opw-5362664 and opw-5409700.
Original PR description
Steps to reproduce: - With a CL Company setup - Configure an incoming mail server with DTE server option enabled - In Vendor Bills journal, enable 'Use Documents?' - Receive the same XML twice via the incoming mail server - Check created vendor bills Issue: There will be duplicated bills. Each duplicate will show the message 'E-invoice already exist: nnnnn' However, the system should avoid duplicates from being created. opw-5362664 opw-5409700 Forward-Port-Of: odoo/enterprise#103211
This update corrects a payroll calculation issue related to the import of single canton tax rates for Switzerland (l10n_ch_hr_payroll). Specifically, it adapts the import process to accurately reflect the 2026 tax regulations, ensuring correct payroll calculations for businesses operating in multiple cantons.
Original PR description
Forward-Port-Of: odoo/enterprise#104991 Forward-Port-Of: odoo/enterprise#104333
This update resolves a visual bug where email columns would overflow when using a specific layout configuration. The fix prioritizes using 'md' column variants for desktop layouts, ensuring consistent column alignment and a better email presentation. This improves the overall user experience for email communications.
Original PR description
### [FIX] mail: properly handle col overflow in bootstrap row Problem: The grid conversion logic only finalized a row when iterating through the last column in the input list. If a row reached…
### [FIX] mail: properly handle col overflow in bootstrap row Problem: The grid conversion logic only finalized a row when iterating through the last column in the input list. If a row reached exactly 12 grid spans while more columns remained (e.g., a `col-12` in the middle), the logic did not start a new row. As a result, remaining columns overflowed the current row visually. Cause: In a single row, if a column had a size 12 and was followed by another column of any size, it would crash because the algorithm did not reset the index to the start of the next row. Steps to reproduce: - Add a Marketing block. - Reduce the size of the left card from the left side.<img width="719" height="580" alt="image" src="https://github.com/user-attachments/assets/1e62eaf7-6ab1-4120-b643-62427ce3ec3a" /> - Save. - Traceback. ### [FIX] mail: ensure -md variant of col and offsets are prioritized Prior to this commit, if an element had a mix of `col-x` and `col-md-y` classes, the regexes used in `convert_inline` would not guarantee that they would be used consistently. How to reproduce: - create a new mailing and add the "three columns" snippet - resize from the right the middle column (reduce the size and revert back to the original size) Issue: - when sending the email, the columns are not aligned horizontally in a desktop layout Solution: Prioritize usage of `-md` variants to compute the size of a column/offset, when available (these are the one used by the mass_mailing editor for desktop mode), and use any otherwise. opw-5439481 Co-authored-by: Damien Abeloos <abd@odoo.com> Co-authored-by: Thomas Josse <thjo@odoo.com> Co-authored-by: Walid Sahli <wasa@odoo.com> Forward-Port-Of: odoo/odoo#241851
This update resolves an issue where Odoo could encounter errors due to invalid IDs used when browsing data. The fix adds a filter to ensure all IDs are valid before processing, preventing a potential crash. This improves stability and reliability of Odoo trials.
Original PR description
Since https://github.com/odoo/odoo/pull/227477, using falsy ids ids illegal This commit adds an additional filter to the domain used to browse `ir.model.data` to compute the following fields:…
Since https://github.com/odoo/odoo/pull/227477, using falsy ids ids illegal
This commit adds an additional filter to the domain used to browse `ir.model.data` to compute the following fields: `(menus|views|reports)_by_module` in order to avoid selecting any that would contain a falsy `res_id` and thus cause the above-mentioned assertion to fail.
One way to reproduce this in a new trial:
- Create a new trial with several modules: `account`, `crm`, `project`, `sales`
- Install `web_studio`
- Uninstall `base_automation`
- Traceback
```
File “/home/odoo/src/odoo/saas-19.1/odoo/orm/models.py”, line 5200, in browse
assert all(ids) or all(isinstance(x, NewId) or x for x in ids), “Invalid falsy real id”
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Invalid falsy real id
```
This is due to an `ir.model.data` containing a falsy res_id in the internal code of `saas_trial` (`installed-17`)
This fix will avoid any additional traceback like this one.
opw-5865316
Forward-Port-Of: odoo/odoo#245469This update resolves a problem where a test tour for tax reports failed when specific localization modules weren't installed. The fix involved adjusting how the tour handles date calculations and ensuring it correctly identifies the appropriate tax report type based on the company's configuration. This ensures the test tour runs reliably across different Odoo environments.
Original PR description
- The tour shouldn't run if a localization with 'Tax Report' for the country is not installed (i.e. l10n_us_account) - Dynamic Javascript dates calculation don't mix well with Python's freeze_time running in the "No future" 2026 preparation build, so I froze the time in the Python test but resorted to hardcode the Javascript dates. - No need to check the position of the column "Column 1". In debug mode for the tour, there will be the "Debug" column where the info about the computations are shown, so it won't be the last. We just need to see that it shows, after all. Runbot error [link](https://runbot.odoo.com/odoo/error/234624) runbot-234624 Forward-Port-Of: odoo/enterprise#101689
This update resolves a bug where loyalty trigger products wouldn't load correctly into the Point of Sale (PoS) when assigned to a different company. The fix ensures that all associated products are now properly displayed, improving the functionality of loyalty programs within the PoS system. This change was made to prevent lost sales and ensure accurate product availability for customers.
Original PR description
Before this commit, if a loyalty trigger product was assigned to another company, non of the products would be loaded in the PoS. opw-5499108 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243993
This update corrects a display issue in the Barcode application where the inventory count badge incorrectly showed requests from one company even when no count existed for another. The fix ensures the badge accurately reflects the current inventory count for the company currently being viewed, improving data accuracy and reporting.
Original PR description
Steps to reproduce: - Create two companies (A and B) - Create a storable product "P1" - Log in with company A - Update the on-hand quantity of P1 in company A only - From Physical Inventory, request an inventory count for P1 - Switch to company B - Open the Barcode application Problem: The inventory count badge in the Barcode main menu displays a request count created for company A, even though no inventory count exists for company B. The badge incorrectly shows "1" instead of "0". opw-[5472031](https://www.odoo.com/web#id=5472031&view_type=form&model=project.task) Forward-Port-Of: odoo/enterprise#104065
This update resolves an issue where currency rounding errors were causing the system to incorrectly remove small cash differences from reports. The fix ensures that even minor discrepancies, resulting from rounding, are accurately reflected, preventing unintended cash adjustments. This improves the reliability of our sales reporting.
Original PR description
Before this commit, when calculating the cash difference in the report, the code did not account for currency rounding. This could lead to situations where a very small cash difference, due to rounding errors, was not recognized as zero, resulting in the unintended removal of cash moves. opw-5489958 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245251
This update fixes an issue where the 'Pending' button in the manufacturing order system incorrectly stopped productivity records for all employees involved, instead of just the current one. The change ensures that only the employee actively working on the operation is impacted, improving workflow efficiency and preventing unnecessary resource allocation.
Original PR description
Steps to reproduce the bug:
- Create a storable product P1 with the following BoM:
- Create a new operation OP1
- Create a manufacturing order to produce one unit of P1
- Confirm the manufacturing order
- Log in as Mitchel (admin) and start OP1
- Log in as Marc (demo) and also start OP1
- Click on Pending
Problem:
Both “mrp.workcenter.productivity” records are stopped, instead of stopping only the one linked to
The `button_pending` method was stopping productivity records for all employees linked to the work order.
opw-5453752
Forward-Port-Of: odoo/enterprise#105238
Forward-Port-Of: odoo/enterprise#103553This update allows users to modify fields within the 'stock.quant' view through Odoo's Studio interface, even if those fields don't have a unique identifier. Previously, this was restricted, but this change ensures Studio customizations are correctly applied to stock quantities.
Original PR description
In versions prior to 18.3, the “stock.quant” view did not have an “xml_id”, which prevented it from being modified through Studio. However, starting from version 18.3 and specifically since this commit: https://github.com/odoo/enterprise/commit/f4a4d54d45392c2ba46a123d4951f8b4468c5cba it is now possible to modify views through Studio even if they don't have an xml_id. But in the 'stock.quant' view, we perform a check at creation time to ensure that the field is among the allowed fields. Fields coming from Studio or from a customized view should, however, be ignored by this check and allowed. opw-5107591 Forward-Port-Of: odoo/odoo#230126
This update fixes a problem where Stripe payments were failing due to incorrect currency decimal handling. The fix adjusts how amounts are rounded before being sent to Stripe, ensuring accurate payment processing. This resolves a previous payment failure issue and improves the reliability of Stripe transactions.
Original PR description
### Issue: The stripe payments are failing to due setting currency decimals. #### Steps to reproduce: 1- In USD currency form in developer mode, set the rounding factor to `0.001000`, so we have 3…
### Issue: The stripe payments are failing to due setting currency decimals. #### Steps to reproduce: 1- In USD currency form in developer mode, set the rounding factor to `0.001000`, so we have 3 decimal places. 2- From `Decimal Accuracy` set Price Unit to 4 digits. 3- Refresh the page. 4- Create a SO and add a line. Set the price to `200.7647`. 5- Refresh the page again and generate a payment link. 6- Pay through stripe. As you see payments fail. ### Cause: This is due to rounding the amount before sending to stripe: https://github.com/odoo/odoo/blob/824e0c42c62de7f570f106860e7dcbf1f7344c14/addons/payment_stripe/models/payment_transaction.py#L160-L165 We are rounding the amount to the minor currency unit. However, we make a compare between `tx_amount` and the amount paid through stripe: https://github.com/odoo/odoo/blob/824e0c42c62de7f570f106860e7dcbf1f7344c14/addons/payment/models/payment_transaction.py#L726-L732 Which are not equal. We should use minor current unit as `precision_digits` to fix this issue. opw-5496825 Forward-Port-Of: odoo/odoo#245593 Forward-Port-Of: odoo/odoo#245059
This update resolves an issue where the user interface was blocked when the PIN modal appeared, preventing users from completing clock-in processes. The fix ensures the UI remains responsive and usable while the PIN modal is active, improving the overall user experience.
Original PR description
We now unblock the UI when the PIN modal appears, as it was unusable behind the loader telling "clocking in". Forward-Port-Of: odoo/enterprise#105335 Forward-Port-Of: odoo/enterprise#105039
This update fixes a potential issue in the Swiss payroll reporting process. It now only creates a snapshot of the required data if one doesn't already exist, preventing unnecessary data duplication and improving the efficiency of the reporting system. This ensures more accurate and timely payroll reports for our Swiss clients.
Original PR description
Forward-Port-Of: odoo/enterprise#105258 Forward-Port-Of: odoo/enterprise#105135
This update resolves a potential issue where tracking numbers in the POS Self Order module could collide. Due to limitations in adding new fields to the main Odoo version, a simple method was implemented to randomly add a letter prefix (K) to tracking numbers, preventing duplicates and ensuring accurate order tracking.
Original PR description
Since we cannot add fields in stable we use a little trick to avoid collisions in tracking numbers for POS Self Order module. We do a modulo operation on the ID of the PoS config to select a random letter from A-Z and prepend it to the tracking number. Forward-Port-Of: odoo/odoo#245476
This change removes a previous restriction that limited the ability to use certain journal accounts for reconciliation. Previously, accounts used as default debit or credit accounts within journals were automatically prevented from being reconciled. This update provides greater flexibility for users to reconcile accounts as needed, improving the system's usability.
Original PR description
Previously, a constraint prevented accounts from being non-reconcilable if they were used as default debit/credit accounts involved in journals. This behavior is too restrictive. This commit removes the constraint. task-5254202 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245608 Forward-Port-Of: odoo/odoo#244398
This update fixes an issue where iOS users were unable to save custom star ratings for product reviews. The fix prevents a technical glitch that caused the rating to reset to the default 4-star rating before submission. This ensures a consistent and reliable review experience for all users on iOS devices.
Original PR description
## Versions
18.0+
## Issue
On iOS devices, when submitting a product review with a custom star rating, the selected value would revert to the default (4 stars) before submission.
## Steps to reproduce
*On a laptop*
- Open Editor mode on a product eCommerce page:
- Select any product element (e.g. click on the price);
- Activate customer ratings and save.
*On a physical Apple mobile device (iPhone or iPad) or on an iOS emulator via XCode (only on MacOS)*
- Go to the product's eCommerce page:
- Move down to the "Customer Reviews" section and un-toggle it:
- Write down a review;
- Click on any star rating but 4;
- Send.
## Cause
`mouseleave` event is triggered before the rating is saved and resets the rating to the default 4-star one.
## Solution
Only trigger `mouseleave` event on devices handling them correctly and post the number of visible stars on the form.
opw-5142682
Forward-Port-Of: odoo/odoo#245135
Forward-Port-Of: odoo/odoo#234308This update fixes an issue where DHL labels were consistently delivered in PDF format, regardless of the user's selected format. It also ensures that DHL error messages (like 'Invalid Credentials') are now displayed to the user, providing clearer guidance when delivery issues occur.
Original PR description
This PR contains fixes for 2 issues: 1. Changing the label format in the Delivery Method has no effect, labels are always received in PDF format. 2. Some DHL errors (eg "Invalid Credentials") do not get propagated to the user, they get a "Validation Error" prompt with an empty message body. opw-5423897 Forward-Port-Of: odoo/enterprise#103660
This update resolves an issue preventing dropshipping orders from being processed correctly. Specifically, a user with limited access rights was encountering an error when validating picking for products with 'Average Cost' pricing. The fix adds necessary permissions to ensure these orders can be completed without interruption. Users should now be able to successfully create and fulfill dropship orders.
Original PR description
Steps to Reproduce 1. Create a database in Odoo 19.0 with the stock_account module installed. 2. Enable Dropshipping from Inventory → Settings. 3. Create a product with a category whose Cost Method…
Steps to Reproduce 1. Create a database in Odoo 19.0 with the stock_account module installed. 2. Enable Dropshipping from Inventory → Settings. 3. Create a product with a category whose Cost Method is set to Average Cost (AVCO). 4. Create a user with Inventory / User access rights only (no Inventory Administrator rights). 5. Create a dropship order using the product and validate the picking. ``` You are not allowed to access 'Product Value' (product.value) records. This operation is allowed for the following groups: - Inventory/Administrator Contact your administrator to request access if necessary. ``` Issue:- During picking validation, moves are getting [done](https://github.com/odoo/odoo/blame/5d91798f0f5f712bf5210edd0bf6788f32d0c316/addons/stock/models/stock_picking.py#L1265) if move is is_dropship enable which lead to [update_standard_price]( https://github.com/odoo/odoo/blob/5d91798f0f5f712bf5210edd0bf6788f32d0c316/addons/stock_account/models/stock_move.py#L169) if product cost_method is [avco.](https://github.com/odoo/odoo/blob/5d91798f0f5f712bf5210edd0bf6788f32d0c316/addons/stock_account/models/product.py#L462-L476) So, it call run_avco during that getting [the _get_manual_value]( https://github.com/odoo/odoo/blob/5d91798f0f5f712bf5210edd0bf6788f32d0c316/addons/stock_account/models/stock_move.py#L409) it through access error Fix:- To fix this sudo is added during getting _run_avco opw-5431121 upg-3762999 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#242841
This update resolves a bug that occurred when generating German reports. Specifically, a division-by-zero error was triggered when currency exchange differences (where the amount_currency was zero) were processed. The fix ensures that these lines are correctly handled, preventing the error and improving report accuracy.
Original PR description
On move lines with zero `amount_currency` ( ex. currency exchange difference ), `_get_product_base_line_currency_rate` returns 0 currency rate which causes a division by zero error. Ignore the rate for lines with zero `amount_currency` opt-5358954 Forward-Port-Of: odoo/enterprise#105432 Forward-Port-Of: odoo/enterprise#105360
An upgrade issue with the Belarusian localization module (l10n_id) was causing errors during the update process. This fix addresses a problem where the migration script incorrectly created tax records, leading to data inconsistencies. This ensures smoother and more reliable upgrades for Odoo users with the l10n_id module installed.
Original PR description
Encountered an issue during upgrade from v16 with existing l10n_id installed on the DB. The script will try to force create the tax and create extra `repartition_line_ids` which is causing multiple "base" line to be added and trigger the `ValidationError`. Upgrade request: [3442445](https://upgrade.odoo.com/odoo/request/3442445) Upgrade task: [5314508]( https://www.odoo.com/odoo/70/tasks/5314508) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237897
This update fixes a calculation error in the VAT sales reports for Vietnam. The previous formula excluded the base amount for 8% VAT transactions, leading to inaccurate sales reporting. This change ensures the total taxable base is calculated correctly, improving the accuracy of financial reports.
Original PR description
`VAT_SALES` report line aggregates total untaxed amount from its children lines. Previously, the formula for this line was missing `VAT_SALES_8.amount_untaxed`. As a result, the base amount for 8% VAT transactions was excluded from the total sales base calculation. This commit adds the missing tag to the `VAT_SALES` formula to ensure the total taxable base is calculated correctly. task-5836154 Forward-Port-Of: odoo/odoo#244915
This update resolves a technical issue where creating two Sri Lanka companies resulted in an error due to duplicate tax IDs with periods. The fix removes the periods from the tax IDs in the system's configuration, ensuring proper company identification and preventing the error. This improves data accuracy for Sri Lankan businesses using Odoo.
Original PR description
**STEP TO REPRODUCE** 1. create a company, and set country to Sri Lanka. 2. create a 2nd company, and do the same. 3. There is a company inconsistencies error. **CAUSE** There is 2 taxes defined in `account.tax-lk.csv` with `.` in their id. This messes up with the function `company_xmlid()`: we end up loading the `account.tax` record of the 1st company when saving the 2nd company. opw-5473952 Forward-Port-Of: odoo/odoo#245244
A test failure in the payroll system's 13th month calculation was identified and fixed. The issue stemmed from incorrect date calculations within the test environment, specifically related to standard work hour calendars. This change ensures accurate 13th month pay calculations for employees.
Original PR description
[FIX] test_l10n_be_hr_payroll_account: fix the test of 13th month full leave Bug production: It is a runbot error occurred in test_13th_month_full_leave (version: master); 1 - Install and update…
[FIX] test_l10n_be_hr_payroll_account: fix the test of 13th month full leave
Bug production: It is a runbot error occurred in test_13th_month_full_leave (version: master);
1 - Install and update l10n_be_hr_payroll,l10n_be_hr_payroll_account,test_l10n_be_hr_payroll_account,hr_holidays,resource modules in localhost
2 - Execute the test test_13th_month_full_leave and it will fail, also in the same class (Test13thMonth) many other tests were failing.
Bug cause:
1 - In test test_13th_month_full_leave, for all year the sick day timeoff is allocated. (year: 2025), generate work entries for 2025 and expecting payslip amount must be 0 but it is not.
2 - When I looked to _get_paid_amount -> _get_paid_amount_13th_month -> _compute_presence_prorated_fixed_wage: Some days in the year was not counted as sick day and since few days are not counted, the payslip amount is > 0.
3 - By diving deeper: in function _get_calendar_days: date_to = min(date_max, leave.date_to.date()), from this line, I observed that leave.date_to is calculated 1 days before sometimes.
4 - In hr.leave model -> _compute_date_from_to -> hour_from, hour_to = holiday._get_hour_from_to(holiday.request_date_from, holiday.request_date_to) -> In here hour_from and hour_to is (0,0) when the calendar (id = 1) standard 40h/week is used.
5 - Since it returns (0,0) and converted to UTC in the next line, the date_to becomes 1 day before the expected date_to.
6 - After finding that, the standard 40h/week calendar returns (0,0) for work start hour and work end hour, I looked to 'resource.calendar' model.
7 - In function _get_default_attendance_ids, hour_from and hour_to returns 0,0 for typical 40 hours/week calendar which is not true.
8 - This standard calendar with id = 1 is used in other 4 tests in class Test13thMonth and they were failing as well, now all of them are fixed.
Bug solution:
1 - Fixing the hour_from and hour_to of standard 40h/week calendar from (0,0) -> (8, 16).
task - 5853076
Runbot Error
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-prThis update resolves an issue where applying text colors to lists in the HTML editor didn't correctly color the list markers. The fix corrects a logic error that was removing the text color class from the list item itself. Now, text color selections will consistently apply to both the text and the list marker.
Original PR description
### Steps to reproduce: - Create a list and type some text. - Press Ctrl + A and apply a text color from the toolbar. - Observe that the list marker is not colored. ### Description of the issue/feature this PR addresses: - `getFonts` looked for the closest element with a text color class, and this also matched `<li>` elements. When a `<li>` was selected, its text color class was removed and moved to a new <font> element created inside the `<li>`. - As a result, the color class was removed from the list item itself, which broke list marker coloring. ### Desired behavior after PR is merged: - Text color classes remain on list item, so list markers are colored correctly. task-5454639 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#243005
A test failure related to the 13th month full leave calculation was identified and resolved. The fix addresses an issue where sick days weren't being correctly counted, leading to incorrect payslip amounts. This ensures accurate 13th month payments for employees.
Original PR description
Bug production: It is a runbot error occurred in test_13th_month_full_leave (version: master); 1 - Install and update…
Bug production: It is a runbot error occurred in test_13th_month_full_leave (version: master); 1 - Install and update l10n_be_hr_payroll,l10n_be_hr_payroll_account,test_l10n_be_hr_payroll_account,hr_holidays,resource modules in localhost 2 - Execute the test test_13th_month_full_leave and it will fail, also in the same class (Test13thMonth) many other tests were failing. Bug cause: 1 - In test test_13th_month_full_leave, for all year the sick day timeoff is allocated. (year: 2025), generate work entries for 2025 and expecting payslip amount must be 0 but it is not. 2 - When I looked to _get_paid_amount -> _get_paid_amount_13th_month -> _compute_presence_prorated_fixed_wage: Some days in the year was not counted as sick day and since few days are not counted, the payslip amount is > 0. 3 - By diving deeper: in function _get_calendar_days: date_to = min(date_max, leave.date_to.date()), from this line, I observed that leave.date_to is calculated 1 days before sometimes. Bug solution: 1 - In _get_calendar_days, leave.date_from and leave.date_to is converted to the employee's timezone from UTC. task - 5853076 Runbot Error
This update resolves an issue where users were blocked from completing settlement payments in Point of Sale when ZATCA integration was active. Previously, the system incorrectly forced an invoice to be created, preventing the payment from being processed. This change removes this forced invoice requirement for settlement orders, allowing users to correctly settle outstanding balances.
Original PR description
## Dependent PR https://github.com/odoo/enterprise/pull/98463 ## Description of the issue/feature this PR addresses: Users are blocked when trying to use the **Settle Due** feature in Point of Sale…
## Dependent PR https://github.com/odoo/enterprise/pull/98463 ## Description of the issue/feature this PR addresses: Users are blocked when trying to use the **Settle Due** feature in Point of Sale if the ZATCA (l10n_sa_edi_pos) integration is enabled. ## Current behavior before PR: When a PoS order is created using a "Pay Later" payment method, an invoice is correctly generated and sent to ZATCA. However, when the user later tries to settle that customer's due balance (using the **Settle Due** option), the l10n_sa_edi_pos module incorrectly forces the Invoice option to be enabled and makes the field read-only. This blocks the user because: - Settlement orders do not contain any lines, so a new invoice cannot be generated. - The original invoice was already sent to ZATCA, and the settlement payment should not be sent as a new e-invoice. Thus, the user cannot proceed with the settlement. ## Desired behavior after PR is merged: After this fix, the **Invoice** checkbox will no longer be forced or marked as read-only during **Settle Due** operations. The field will default to False, aligning with standard Odoo behavior for settlements and allowing the user to complete the payment. task-5144679 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245163 Forward-Port-Of: odoo/odoo#233769
This update resolves an issue where a Point of Sale order incorrectly remained flagged as a 'settlement' after a user canceled a payment attempt. By resetting the relevant flag, this ensures orders process correctly and avoids potential conflicts with other business integrations. This improves order processing reliability.
Original PR description
## Description of the issue/feature this PR addresses: The `is_settling_account` flag on a Point of Sale order is not reset to False if the user cancels a **Settle Due** operation. ## Current…
## Description of the issue/feature this PR addresses: The `is_settling_account` flag on a Point of Sale order is not reset to False if the user cancels a **Settle Due** operation. ## Current behavior before PR: When a user initiates a **Settle Due** payment for a customer, Odoo creates a new order and sets the `is_settling_account` flag to True. If the user proceeds to the payment screen but then navigates back (to the product screen) instead of completing the payment, the flag remains True. This is problematic because the user can then add regular products to this same order and check out. The order is processed as a normal sale, but it is incorrectly flagged as a settlement, which can lead to error on codes depending on this. ## Desired behavior after PR is merged: After this fix, if a user leaves the payment screen during a **Settle Due** operation, the `is_settling_account` flag on the order will be correctly reset to False. task-id - 5144679 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/enterprise#105129 Forward-Port-Of: odoo/enterprise#98463
This update resolves an issue where combo choices weren't displaying correctly in the self-order and kiosk modes. Previously, users had to reconfigure combo choices after setting a product variant. This change ensures combo choices are displayed correctly and automatically, streamlining the self-order process.
Original PR description
Before the fix, when we set a product variant as combo choice. In self/kiosk, we'll see the product template instead of the product itself. And we need to configure it again. It occured because for all of the products in the kiosk/self, we display the product template. The expected behavior if we set a product variant as combo choice is to have the product variant in the combo directly without having to reconfigure it. The bug occurs only since 19.0 because a fix was already done from 18.3 to 18.4 in this pr : #219908 but the fwport for 19.0 has never been merged. task: 5493798 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244788 Forward-Port-Of: odoo/odoo#244055
This update resolves an issue that caused a traceback during employee searches within appraisals. The fix removes a restricted field from the search domain, ensuring compatibility with the public employee model and preventing errors. This improves the reliability of the appraisal process.
Original PR description
Steps to reproduce: 1. Log in with demo user 2. Create a new appraisal 3. Search for an employee Issue: A traceback occurs when searching for an employee. Cause: The `registration_number` field is not available on the `hr.employee.public` model for public users. Fix: Remove `registration_number` from the employee search domain and restrict the search to fields available on the public model. task-5864546
This update resolves an issue where using certain reserved words (like 'constructor') as customer names would trigger an error in reporting. The fix prevents the system from incorrectly interpreting these names, ensuring customer data can be accurately displayed in reports. This improves the reliability of customer reporting.
Original PR description
Steps:
- Have a customer named "constructor" (or any valid json prototype key value)
- Install `sale_management`
- Create a sale order with "constructor"
- Open Reporting -> Customers
- Traceback `Caused by: TypeError: groupedDataPoints[key].push is not a function`
This problem occurs because we use the client name directly in an object, and “constructor” already exists in all objects but is not initialized correctly, which raises a traceback.
One solution is to use `let object = Object.create(null)` instead of `let object = {}`, which prevents inheritance of `Object.prototype` properties.
https://github.com/odoo/odoo/blob/5e74f04ff35ed3efa25be295567be41f42024692/addons/web/static/src/views/graph/graph_model.js#L451-L457
opw-5474691
Forward-Port-Of: odoo/odoo#245369
Forward-Port-Of: odoo/odoo#245206This update resolves an issue where invoices sent to Peppol were failing validation due to an incorrect UN/ECE code. The fix removes a specific code ('HD') that was valid under UN/ECE standards but not accepted by Peppol, ensuring invoices now pass validation and can be successfully transmitted.
Original PR description
**Steps to reproduce:** - Use a Belgian company - Create a Belgian contact with "EU Standard (Peppol Bis 3.0)" as eInvoice format - Create an invoice for that customer with a product using "Pack of 6" as unit of measure - Confirm the invoice - Send it to Peppol **Issue:** The validation of the invoice fails with the following error: "[BR-CL-23]-Unit code MUST be coded according to the UN/ECE Recommendation 20 with Rec 21 extension" **Cause:** The UNECE code used for "Pack of 6" UoM is "HD". "HD" is a correct UNECE code for "Half Dozen". However, it is not part of the subset of codes accepted by Peppol. opw-5463212 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244668
This update resolves an issue where non-administrator users were unable to validate direct debit mandates. The fix restricts access to the `payment.provider` model during validation, aligning with the permissions granted to users who can create new mandates. This ensures all users with the necessary role can complete the validation process.
Original PR description
## Versions saas-18.3+ ## Issue Non admin users get an access error when trying to validate a direct debit mandate. ## Steps to reproduce As admin user: - Navigate to "Users": - Select Marc Demo: -…
## Versions
saas-18.3+
## Issue
Non admin users get an access error when trying to validate a direct debit mandate.
## Steps to reproduce
As admin user:
- Navigate to "Users":
- Select Marc Demo:
- Under "Access Rights", in the "Accounting" section, set his "Accounting" role to "Invoicing & Banks";
As Marc Demo:
- Navigate to "Direct Debit Mandates":
- Create a new mandate for Deco Addict and its first IBAN record;
- Click on the "Validate" button.
## Cause
Issue introduced by the `action_validate_mandate` method override from b63eb2d6b91be28f4837309b5d972cc0b05846e0 Non admin users have no permissions on `payment.provider` while `_read_group` checks read rights on model via https://github.com/odoo/odoo/blob/ac084b1010faf49b63844ecc96284d567e59de2e/odoo/orm/models.py#L1632
## Fix
Allow `payment.provider` access only on mandate validation as only `account.group_validate_bank_account` users can create a new mandate.
opw-5255694
Forward-Port-Of: odoo/enterprise#105428
Forward-Port-Of: odoo/enterprise#103673This update fixes a bug that caused a 'RecursionError' when producing large quantities of serial-tracked products. The issue stemmed from a process of repeatedly updating deadlines within the system, leading to a depth of recursive calls exceeding Python's limits. This change ensures stable production processes for high-volume manufacturing.
Original PR description
**Issue** When producing a large number of serial-tracked products, a RecursionError can occur. **Steps to reproduce** - Create three products tracked by serial number (ensure MTO and Manufacture…
**Issue** When producing a large number of serial-tracked products, a RecursionError can occur. **Steps to reproduce** - Create three products tracked by serial number (ensure MTO and Manufacture routes are enabled). - Create a BoM for product A containing product B. - Create a BoM for product B containing product C. - Create a BoM for product C containing another product. - Create a manufacturing order of 100 units for product A and confirm it. - Produce the 100 units on the child MO of product C (100 backorders are created). - On the main MO (product A), click on "Prepare MO". - Attempt to produce product B. → RecursionError: maximum recursion depth exceeded. **Cause** While setting `move_finished_ids`: https://github.com/odoo/odoo/blob/3056facc07024d02829bf2e27c9ee2f56695c99e/addons/mrp/models/mrp_production.py#L806 the `deadline_date` of the final move is updated: https://github.com/odoo/odoo/blob/3056facc07024d02829bf2e27c9ee2f56695c99e/addons/stock/models/stock_move.py#L742C1-L743C63 This deadline is then propagated to chained moves: https://github.com/odoo/odoo/blob/3056facc07024d02829bf2e27c9ee2f56695c99e/addons/stock/models/stock_move.py#L539C1-L541C55 via: https://github.com/odoo/odoo/blob/3056facc07024d02829bf2e27c9ee2f56695c99e/addons/stock/models/stock_move.py#L559C1-L562C61 This propagation retriggers the `move_finished_ids` setter recursively on other moves. The recursion depth grows with the number of generated moves, eventually exceeding Python's maximum recursion limit. opw-[5265424](https://www.odoo.com/web#id=5265424&view_type=form&model=project.task) Forward-Port-Of: odoo/odoo#239648
This update reorganizes code within the Odoo platform to better align with project standards. Specifically, a previously misplaced override function has been moved to the `portal_rating` module, as the `rating` module doesn't require direct portal integration. This improves maintainability and reduces potential conflicts.
Original PR description
Since #234356, `_get_allowed_message_post_params` method of the `PortalChatter` has been overridden in the `rating` module. As the `rating` has no dependency on the portal, the current change moves this override to the `portal_rating` module.
This update fixes a previous issue where employees on leave were incorrectly flagged for overtime. Now, if an employee takes a full day off and then works that day, all hours worked are treated as overtime, excluding breaks. This ensures accurate overtime calculations for all employees.
Original PR description
This PR aims to fix how the overtime is being calculated with quantity based rules : - The expected _hours didn't take into account the leaves of the day , so if the user was on a leave, it would considered him absent ( give him negative overtime) , because he has no attendances that day. - if the employee took a whole day off, and decided to work on it, all the hours should be considered as overtime, the brake shouldn't be included (ex : his normal work sched is morning (9h-12h) , break(12h-13h), afternoon(13-17h) , he's already getting paid for that time , so every single hour worked that day from 12am to 12 pm is added time , and there is no break in added time) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244048
This update fixes tests related to overtime calculations, specifically those using quantity-based rules. The changes align the tests with a recent update to the overtime calculation logic, ensuring accurate tracking and reporting of overtime hours. This improves the reliability of our attendance data.
Original PR description
this PR made some changes to how overtime is calculated by quantity based rules. This PR aims to adapt the test to the new calculation logic Forward-Port-Of: odoo/enterprise#104607
This update fixes an issue where portal users from other companies couldn't be mentioned in chat due to incorrect access permissions. The fix ensures that read access to portal users is correctly determined based on the currently active company, resolving a previous data storage issue. This improves the usability of the portal for users across different companies.
Original PR description
* = test_discuss_full Before this commit, mentioning a portal user from another company would result in an access error. Steps to reproduce: 1. Install `hr_holidays` module. 2 Have a portal user in company A. 3. Switch the active company to company B. 4. In any chatter, try to mention said portal user. This happens because portal user read access depends on the current active company (see `res_users_rule`). The access error happens since [1], which added user information to the partner's default Store fields. [1] https://github.com/odoo/odoo/pull/212173 task-5499827 Forward-Port-Of: odoo/odoo#245395 Forward-Port-Of: odoo/odoo#245224
This update fixes an issue where the FedEx rate selection process was failing when the requested currency didn't match the account setup. By explicitly setting the rate request type to 'PREFERRED', the system now correctly identifies the appropriate rate, preventing errors and ensuring accurate shipping charges are calculated.
Original PR description
Issue ----- Commit 76196c4c5f2ff01354931df6ad615f1b2c4d9a22 introduced logic to select the rate based on the requested currency. This causes problems when the requested currency does not match the…
Issue ----- Commit 76196c4c5f2ff01354931df6ad615f1b2c4d9a22 introduced logic to select the rate based on the requested currency. This causes problems when the requested currency does not match the one set up on the Fedex account, because the 'actualRateType' gets set to payor instead of preferred for the rate's 'rateType', which means `d['rateType'] == rating_result['actualRateType']` is false, so `actual` is empty, leading to an error when doing `actual['totalNetCharge']`. Solution ----- In the request we send, we hardcode `'rateRequestType': ['PREFERRED']` so we can look for a match using 'PREFERRED' as a prefix of `rateType`. The Fedex API lists all possible values of the enum `rateType` https://developer.fedex.com/api/en-us/catalog/ship/v1/docs.html <details> <summary>Enum values as per the API</summary> "enum": [ "INCENTIVE", "NEGOTIATED", "PAYOR_ACCOUNT_PACKAGE", "PAYOR_ACCOUNT_SHIPMENT", "PAYOR_CUSTOM_PACKAGE", "PAYOR_CUSTOM_SHIPMENT", "PAYOR_LIST_PACKAGE", "PAYOR_LIST_SHIPMENT", "PAYOR_RETAIL_PACKAGE", "PAYOR_RETAIL_SHIPMENT", "PREFERRED_ACCOUNT_PACKAGE", "PREFERRED_ACCOUNT_SHIPMENT", "PREFERRED_CUSTOM_PACKAGE", "PREFERRED_CUSTOM_SHIPMENT", "PREFERRED_INCENTIVE", "PREFERRED_LIST_PACKAGE", "PREFERRED_LIST_SHIPMENT", "PREFERRED_NEGOTIATED", "PREFERRED_RETAIL_PACKAGE", "PREFERRED_RETAIL_SHIPMENT", "RATED_ACCOUNT_PACKAGE", "RATED_ACCOUNT_SHIPMENT", "RATED_CUSTOM_PACKAGE", "RATED_CUSTOM_SHIPMENT", "RATED_LIST_PACKAGE", "RATED_LIST_SHIPMENT", "RATED_RETAIL_PACKAGE", "RATED_RETAIL_SHIPMENT", "UNKNOWN" ], </details> There are only 3 possible prefixes: `PAYOR`, `PREFERRED` & `RATED`, so replacing the other 2 by `PREFERRED` should be safe. ----- Ticket: opw-5482949 Forward-Port-Of: odoo/enterprise#105156
This update resolves a customer complaint regarding demo data containing the name "Deco Addict". All instances of "Deco Addict" have been replaced with "Acme Corporation" across multiple Odoo modules to ensure accurate demo data and avoid user confusion. This improves the user experience and data integrity.
Original PR description
A company that happens to be named "Deco Addict" has complained some of our users thought they had business with them due to test and demo data containing that name. It will now be named Acme Corporation. task-5865502 Forward-Port-Of: odoo/odoo#245659 Forward-Port-Of: odoo/odoo#245205
This update resolves a customer complaint regarding test data. The name "Deco Addict" has been replaced with "Acme Corporation" to ensure demo data accurately reflects business scenarios. This change improves the user experience and avoids confusion.
Original PR description
A company that happens to be named "Deco Addict" has complained some of our users thought they had business with them due to test and demo data containing that name. It will now be named Acme Corporation. task-5865502 Forward-Port-Of: odoo/enterprise#105447 Forward-Port-Of: odoo/enterprise#105151
This update resolves an issue where the tour pointer might not function correctly if the element it's trying to trigger isn't immediately available. The change ensures the tour pointer only attempts to interact with elements that are accessible, improving the overall tour experience and preventing potential errors. This is a technical fix to enhance usability.
Original PR description
POC for task-5490670 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update resolves issues caused by deleted records not being properly removed from email notification systems. Specifically, it prevents errors related to scheduled notifications and ensures that failed notifications are no longer displayed to users, improving the user experience and system stability. This fix addresses a cascade delete scenario where related records weren't being removed, leading to potential errors.
Original PR description
-> Speedup-ed forward-port in master to ease development RATIONALE When a cascade delete occurs in DB, ORM methods are not called. More specifically loosely connected records using res_model / res_id pair are not removed when unlink override exists. SPECIFICATIONS Fix various use case in mail * notifications sent for scheduled messages; * failure notifications management; * activities mark as done; Task-5138556 Forward-Port-Of: odoo/odoo#243964 Forward-Port-Of: odoo/odoo#233071
This update addresses an issue where deleted records in the database weren't properly removed, leading to potential problems with notifications, activity management, and related processes. The fix ensures that deleted records are fully cleaned up, preventing data inconsistencies and improving system performance. This primarily impacts the Enterprise version of Odoo.
Original PR description
-> Speedup-ed forward-port in master to ease development RATIONALE When a cascade delete occurs in DB, ORM methods are not called. More specifically loosely connected records using res_model / res_id pair are not removed when unlink override exists. SPECIFICATIONS Fix various use case in mail * notifications sent for scheduled messages; * failure notifications management; * activities mark as done; Task-5138556 Forward-Port-Of: odoo/odoo#243964 Forward-Port-Of: odoo/odoo#233071
This update corrects inconsistencies in how input fields respond to arrow keys, ensuring consistent behavior across different browsers. It also fixes a sorting issue in mock models, preventing incorrect ordering when values are empty. This improves the user experience and data integrity.
Original PR description
[FIX] web: make mock model field sort browser-independent The sorting done by `orderByField` for mock models was incorrect: when two values were empty and compared: the old comparator returned 1 when…
[FIX] web: make mock model field sort browser-independent
The sorting done by `orderByField` for mock models was incorrect: when
two values were empty and compared: the old comparator returned 1 when
v1 === false, even if v2 === false too. That makes the comparator
inconsistent (as it basically says "a > b" and "b > a"), so Array.sort
is free to reorder differently per engine.
This was discovered while making a unit test where it was actually
working on Chrome and not on Firefox because of that (and switching
some contact records creation order would make it work on Firefox and
not on Chrome).
[IMP] web: review press/keydown HOOT helpers regarding selection changes
Commit [1] made it so HOOT keydown helper somewhat handles selection
changes in input and textarea when pressing arrow keys.
It assumed that:
- "up" and "left" have the exact same behavior: going left 1 character
or to the start if the CTRL key is held.
- "right" and "down" have the exact same behavior: going right 1
character or to the end if the CTRL key is held.
The logic is really wrong or at least very incomplete. The minimal
behavior is:
- "left" goes 1 character left; if the CTRL key is held, it jumps to the
previous word.
- "right" goes 1 character right; if the CTRL key is held, it jumps to
the next word.
- "up" goes to the start of the line (independently from the CTRL key).
- "down" goes to the end of the line (independently from the CTRL key).
This commit implements something in between: the correct behavior,
without the notion of lines and words, limiting the helper behavior
change and the line of code added:
- "left" goes 1 character left; if the CTRL key is held, it jumps to the
start.
- "right" goes 1 character right; if the CTRL key is held, it jumps to
the end.
- "up" goes to the start (independently from the CTRL key).
- "down" goes to the end (independently from the CTRL key).
Meaning those limitations:
- "CTRL+left" is only correct if no whitespace in all the chars before.
- "CTRL+right" is only correct if no whitespace in all the chars after.
- "up" in textarea is only correct if on first line.
- "down" in textarea is only correct if on last line.
[1]: https://github.com/odoo/odoo/commit/ab7d02f49182845e48b31e331d3ccad8d2f36560
Related to task-5441808This update fixes a visual issue in the VoIP demo mode, ensuring a helpful tooltip is consistently displayed when hovering over the 'Demo Mode' indicator in the Softphone header. Previously, the tooltip text wasn't correctly linked, but this change ensures users understand how to configure Production Mode and improves the demo experience. This resolves a minor usability concern.
Original PR description
## Context There are two modes in VoIP: _Production Mode_ and _Demo Mode_. Demo Mode enables you to simulate a call in the UI without actually calling someone. This is useful for showing customers…
## Context There are two modes in VoIP: _Production Mode_ and _Demo Mode_. Demo Mode enables you to simulate a call in the UI without actually calling someone. This is useful for showing customers the features and for developers to test the UI 💡 Though useful, this feature can be confusing. Users may not realize they aren't in Production Mode, and developers may forget to switch back to Demo Mode when testing the UI. 535a7aef3e410d997baa093cc111527814c29253 improved the situation by displaying "Demo Mode" in the Softphone header when Demo Mode is enabled. It was intended to include a tooltip explaining how to configure Production Mode when hovering over it. However, although the tooltip text is present in the code, it was not correctly mapped to the "demo indicator" ¯\\\_(ツ)\_/¯ ## In this PR After this commit, - the tooltip text is correctly provided to the "demo indicator", enabling it to be displayed on hover; - the tooltip text is slightly reworded in the hope of making it clearer. [Task-5804537](https://www.odoo.com/odoo/project/5778/tasks/5804537) Fix https://github.com/odoo/enterprise/pull/95742 Forward-Port-Of: odoo/enterprise#105284
This update corrects an issue where full payments on invoices with installment payment terms resulted in incorrect and duplicated cash basis tax calculations. The fix ensures that only the remaining balance's tax is recorded when a full payment is made, aligning with the intended batch processing functionality. This improves the accuracy of financial reporting.
Original PR description
**Steps to reproduce:** 1. Install the `Accounting` module. 2. Enable cash basis taxes in `Accounting → Configuration → Settings → Taxes → Cash Basis`. 3. Create a tax, set `Tax Exigibility` to…
**Steps to reproduce:** 1. Install the `Accounting` module. 2. Enable cash basis taxes in `Accounting → Configuration → Settings → Taxes → Cash Basis`. 3. Create a tax, set `Tax Exigibility` to `Based on Payment`, and assign a `Cash Basis Transition Account`. 4. Create an invoice with the cash basis tax and a payment term such as `30% now, balance in 60 days`. 5. Record a full payment on the invoice instead of just the first installment. 6. Review the generated cash basis journal entries. **Observed behavior:** * Cash basis entries are created for the full tax amount, not proportionally. * Paying the full invoice with payment terms causes duplicated tax entries. This came from the fact that we didn't consider a move would be fully paid by several lines at the same time, like with installments. We now only put the leftover amount when the move is fully paid and we're on the last partial. Also fix the fact that paying 2 invoices at the same time in full does not benefit from the batches opw-5061136 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#244733 Forward-Port-Of: odoo/odoo#236536
This update fixes an issue where LATAM invoices with numeric sequence prefixes would incorrectly restart the invoice sequence, leading to duplicate document numbers. The change allows for correct invoice numbering by temporarily disabling sequence filtering for LATAM invoices, ensuring consistent and accurate document generation.
Original PR description
**Issue:** When invoices in a journal enabled to "Use Documents" for LATAM legal invoicing have a sequence prefix with numbers, the next invoice will restart the sequence and try to use already-used…
**Issue:** When invoices in a journal enabled to "Use Documents" for LATAM legal invoicing have a sequence prefix with numbers, the next invoice will restart the sequence and try to use already-used sequences. **Steps to Reproduce:** - Install l10n_pe_edi - Change to PE Company - Duplicate the Customer Invoice journal, give it shortcode "01A" - Create an invoice in dupe journal, set customer to "Comercial Constructora los Patitos S.A.", set product and tax, Document Type = (01) Factura - Confirm the invoice, it will have name "F F01-00000001" - Duplicate the invoice -> The new invoice has the same sequence number, and the document number is visible Expected: Invoice is called "Draft" (/), document number is not visible, and upon confirming the invoice, it will have the name "F F01-00000002" **Cause:** - LATAM invoices do not follow the standard formats in sequence_mixin.py, so _deduce_sequence_number_reset will always return "never" - However, the result of this method is used in _get_last_sequence_domain, and assumes that the sequence follows the corresponding format to "never" (_sequence_fixed_regex) - This isn't the case if the prefix has numbers, it will be captured in the _sequence_yearly_regex - anti-regex is used to filter sequences that aren't _sequence_fixed_regex, but this causes prefixes with numbers to never be found, and always restart the sequence **Solution:** - Add context value "no_anti_regex" to skip sequence exclusion - If the invoice is LATAM, call _get_last_sequence_domain with context "no_anti_regex" = True so no sequences are excluded. - Because LATAM invoices are always in a fixed format, we don't need to filter out sequences in other formats opw-5111844 Forward-Port-Of: odoo/odoo#243939 Forward-Port-Of: odoo/odoo#235000
This update fixes an issue where LATAM invoices with numeric sequence prefixes were incorrectly restarting their invoice sequences. The change allows for proper sequence generation, ensuring invoices are uniquely numbered and avoids conflicts, improving invoice processing for our LATAM customers. It achieves this by temporarily disabling a sequence filtering rule.
Original PR description
**Issue:** When invoices in a journal enabled to "Use Documents" for LATAM legal invoicing have a sequence prefix with numbers, the next invoice will restart the sequence and try to use already-used…
**Issue:** When invoices in a journal enabled to "Use Documents" for LATAM legal invoicing have a sequence prefix with numbers, the next invoice will restart the sequence and try to use already-used sequences. **Steps to Reproduce:** - Install l10n_pe_edi - Change to PE Company - Duplicate the Customer Invoice journal, give it shortcode "01A" - Create an invoice in dupe journal, set customer to "Comercial Constructora los Patitos S.A.", set product and tax, Document Type = (01) Factura - Confirm the invoice, it will have name "F F01-00000001" - Duplicate the invoice -> The new invoice has the same sequence number, and the document number is visible Expected: Invoice is called "Draft" (/), document number is not visible, and upon confirming the invoice, it will have the name "F F01-00000002" **Cause:** - LATAM invoices do not follow the standard formats in sequence_mixin.py, so _deduce_sequence_number_reset will always return "never" - However, the result of this method is used in _get_last_sequence_domain, and assumes that the sequence follows the corresponding format to "never" (_sequence_fixed_regex) - This isn't the case if the prefix has numbers, it will be captured in the _sequence_yearly_regex - anti-regex is used to filter sequences that aren't _sequence_fixed_regex, but this causes prefixes with numbers to never be found, and always restart the sequence **Solution:** - Add context value "no_anti_regex" to skip sequence exclusion - If the invoice is LATAM, call _get_last_sequence_domain with context "no_anti_regex" = True so no sequences are excluded. - Because LATAM invoices are always in a fixed format, we don't need to filter out sequences in other formats opw-5111844 Forward-Port-Of: odoo/enterprise#104395 Forward-Port-Of: odoo/enterprise#101620
This update removes an unnecessary delay in Odoo's tour engine, resolving inconsistent behavior and improving tour reliability. By eliminating this delay, tours now execute predictably, reducing errors and enhancing the user experience. This change ensures tours function consistently across all modules.
Original PR description
We noticed that allowing a delay between each step of the tours (in the macro engine) leads to indeterministic behavior within the tours, such as: - letting animationframes to be calculated - waiting for the RPC response, which sometimes arrives, sometimes not within 50ms. Most of the time, a tour is indeterministic because it takes a wrong way by pointing to overly general triggers. Removing this (arbitrary) delay is the final step to ensure the macro engine always works the same way. Find trigger => Do Action => Find trigger => Do Action => ... No more delay between each step of the process. With this commit, by default, the delay is removed in all tours by default but it is necessary to tag the tours which are still indeterministic.
This update enhances the reliability of Odoo's tour functionality by adding a key to handle tours that previously caused crashes. This resolves an issue affecting approximately 220 tours, improving overall performance and user experience. The change aims to eliminate random errors and make tour execution more deterministic.
Original PR description
Add tags to tours
This update simplifies the process for creating leave requests in Odoo. The toggle button for date ranges has been removed, now requiring users to select a start and end date for their leave. This change ensures more accurate leave tracking and reporting.
Original PR description
- removed the toggle button so leaves can be only created with date range task-id: 5065209
A test failure related to employee assignments within the MRP Work Order module has been resolved. The fix prevents a constraint error that occurred when multiple employees were repeatedly assigned to the same user, ensuring consistent test results. This improves the reliability of our core work order processes.
Original PR description
Before this commit, the test `test_allowed_employees_restriction` was failing because two different employees of the same company were assigned one after another to a same user. When the changes are commited, the constraint `_user_uniq` was triggered. Solution: use a different user instead of reassigning to the same one so that the constraint isn't triggered when setting another employee to the user. fixes odoo/enterprise#96931 runbot error 234537 Forward-Port-Of: odoo/enterprise#103833
This update fixes issues related to how tax information is processed for HR documents, particularly those using the UBL (Universal Business Language) standard. It now displays warnings instead of silently skipping documents, providing clearer information for users and improving the reliability of tax calculations. This ensures accurate tax reporting for HR-related transactions.
Original PR description
- Improving error handling for various requests - Adjusting XML generation to not conflict with `account_edi_ubl_cii_tax_extension` if it is installed - Adding a separate test for HR:E category taxes - Replacing skipping import of not successfully fiscalized document with warnings displayed on the moves after import task-none --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#245625 Forward-Port-Of: odoo/odoo#245028
This update fixes a build error that occurred when displaying call status badges, preventing a crash in certain scenarios. The issue stemmed from an undefined 'id' value within the call status calculation logic. The fix ensures the correct record ID is used, regardless of whether the call is a real or virtual record, improving stability.
Original PR description
We fix the build error 238415: _Cannot read properties of undefined (reading 'isInProgress')_. That error is raised in the class UserAgent ```js isInProgress(callId) { return (…
We fix the build error 238415: _Cannot read properties of undefined (reading 'isInProgress')_.
That error is raised in the class UserAgent
```js
isInProgress(callId) {
return (
(this.mainSession?.call?.id === callId && this.mainSession.isInProgress) ||
(this.transferSession?.call?.id === callId && this.transferSession.isInProgress)
);
}
```
because both this.mainSession and callId are undefined in the test context.
### Root cause
In the class CallStatusBadgeField
```js
get statusLabel() {
const isInProgress = this.isInProgress(this.props.record.data.id);
const { direction, state } = this.props.record.data;
return Call.getStatus({ direction, isInProgress, state });
}
```
isInProgress is called with this.props.record.data.id but id can not be found in this.props.record.data so that when there
is no main voip session, the crash occurs.
Actually, for a real record, the id is given by this.props.record.resId and for a virtual record (a record not already created in db) the id is given by this.props.record.virtualId. Note that resId and virtualId are never both defined.
### Fix
Since a session is always linked to a read record, we pass to isInProgress the id given by this.props.record.resId but we have to protect us from the case were the record is virtual. Hence the use of the optional chaining operator in case the sessions would not be defined.
runbot-error-238415This update prevents the OCR from automatically updating a user's address information when processing QR-bills. Previously, the system would incorrectly overwrite existing partner details, causing confusion for users who receive QR-bills via email and forward them. This change ensures accurate address data is maintained, streamlining the billing process.
Original PR description
When the OCR detects that the document is a QR-bill, it will always overwrite the address information from the partner currently set on the record. We shouldn't do that if the partner wasn't created by the OCR. In the following scenario, it's pretty obvious why it is a bad idea: - User receives his QR-bills on his personnal email address. - He forwards it to the email alias set up for vendor bills. - A vendor bill is created with himself set as the supplier (already a bit annoying for him) - The OCR automatically analyses the document and updates the user's record with the address found in the QR-bill (really annoying). The same issue can arise if the user manually sets a supplier before sending the QR-bill for digitization. task-none Forward-Port-Of: odoo/enterprise#105343 Forward-Port-Of: odoo/enterprise#104902