Monday, April 28, 2025
32 changes · 18.0
Enhancements to existing features
This update reduces low-value messages generated during Odoo test runs. It makes test log files shorter and easier to review, helping teams spot meaningful issues faster without changing product behavior.
Original PR description
Removes low value logs in order to have lighter log files and less confusing messages 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
The Australian Business Activity Statement now rounds amounts down to whole dollars in line with ATO guidelines. This helps businesses prepare BAS reports that better match official reporting requirements.
Original PR description
As per the ATO guidelines, the BAS should be rounded down to whole dollars. task-4734528 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
Automated browser tests now avoid depending on outside websites and services during execution. This makes test results more consistent, reduces random failures caused by network issues, and can slightly speed up runs by avoiding repeated external downloads.
Original PR description
Accessing external resources in chrome can increase randomness in execution for multiple reasons: - the external resource may temporary not be available - the external resource may be faster-slower…
Accessing external resources in chrome can increase randomness in execution for multiple reasons: - the external resource may temporary not be available - the external resource may be faster-slower to load - the external server could block some requests because of rate limiting - the network may be unreachable. Moreover, downloading fonts at every execution also slows down the tests A possibility to solve the issue was to block the network on runbot, in the dockers. The main problem with this solution is that it wouldn't be the same behavior locally. It is also hard to adapt all versions at the same time. This commit introduced another solution, using Fetch.enable in the chrome developers tools. This will allow to have a callback on every external request, allowing to enable/disable/give an alternate answer to the request. All local request are allowed, all external request should be either blocked or an alternative answer given. This could be costly but at first glance it looks like it had no visible negative impact on performances. The first version was blocking all external requests, leading to a lot of failing tests, most of them already seen in nighties. It is hard to say since depending on when it happens it could create different error message, at least a few dozens of error related to this where found, maybe a few hundreds looking at the kind of patterns it can cause. Following this attempts a fix was to vendor all needed sources leading to ~130 cached url, with more than 100 fonts. This list was furthered reduced to have default fonts that would be returned reducing the load. A test was made to return a 404 instead and it was actually enough, and it is the same for most requests (stripe, ayden, ...). Only a few of them needs a answer close to reality. - The gooleapis css can be emty but not a 404 because it may make some of the css computation fail (website.backend_assets_all_wysiwyg.min.css) One of the failling test is TestCustomSnippet.test_01_run_tour This final version returns a 404 for most resources. A version returning 500 also works fine. This pr could impact other cis (odoosh, other runbot) but the impact is expected to be slow wince only two tests needed to be adapted outside tests/common.py. It would be still possible to make Fetch.enable optional using an environment variable. Targeting 18.0 looks reasonable for a start, could be backported to 16.0 later Note that this pr may make some random error more frequent, #207469 was needed to make this pr green. The assumption is that the speedup of the loading of some resources (or possible slowdown of local request) may change the timing of the execution revealing making some error more frequent.
Features or functions removed from Odoo
This change removes an outdated browser-side adjustment for employee availability status in Time Off. The status is now provided correctly by the central identity data, reducing duplicate logic without changing expected user behavior.
Original PR description
Since #203903 the user `im_status` is sent directly from the identity model in order to take into account other module overrides without having to re-establish them client side. This commit removes the method patching `updateImStatus` as the value arrives client side already patched from `hr_holidays`.
Miscellaneous changes
Otherwise, it will create massive domains, which may exhaust the memory available to PG: ``` Traceback (most recent call last): File "/home/odoo/src/odoo/18.0/odoo/tools/safe_eval.py", line 397, in safe_eval return unsafe_eval(c, globals_dict, locals_dict) File "ir.actions.server(364,)", line 5, in <module> File "/home/odoo/src/odoo/18.0/addons/stock/models/stock_orderpoint.py", line 257, in action_open_orderpoints return self._get_orderpoint_action() File "/home/o
Original PR description
Otherwise, it will create massive domains, which may exhaust the memory available to PG: ``` Traceback (most recent call last): File "/home/odoo/src/odoo/18.0/odoo/tools/safe_eval.py", line 397, in…
Otherwise, it will create massive domains, which may exhaust the memory available to PG:
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/18.0/odoo/tools/safe_eval.py", line 397, in safe_eval
return unsafe_eval(c, globals_dict, locals_dict)
File "ir.actions.server(364,)", line 5, in <module>
File "/home/odoo/src/odoo/18.0/addons/stock/models/stock_orderpoint.py", line 257, in action_open_orderpoints
return self._get_orderpoint_action()
File "/home/odoo/src/odoo/18.0/addons/stock/models/stock_orderpoint.py", line 500, in _get_orderpoint_action
qty_by_product_loc, dummy = self.env['product.product'].browse(product_ids)._get_quantity_in_progress(location_ids=location_ids)
File "/home/odoo/src/odoo/18.0/addons/purchase_stock/models/product.py", line 50, in _get_quantity_in_progress
groups = self.env['purchase.order.line'].sudo()._read_group(domain,
File "/home/odoo/src/odoo/18.0/odoo/models.py", line 1989, in _read_group
row_values = self.env.execute_query(query.select(*groupby_terms.values(), *select_terms))
File "/home/odoo/src/odoo/18.0/odoo/api.py", line 978, in execute_query
self.cr.execute(query)
File "/home/odoo/src/odoo/18.0/odoo/sql_db.py", line 572, in execute
return self._cursor.execute(*args, **kwargs)
File "/home/odoo/src/odoo/18.0/odoo/sql_db.py", line 354, in execute
res = self._obj.execute(query, params)
psycopg2.errors.SyntaxError: memory exhausted at or near "("
LINE 1: ...((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...
^
```
upg-2461663
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#207421
Forward-Port-Of: odoo/odoo#202065This fix prevents company setup from failing when a user's language is not available during automated test preparation. It uses the company language, or English as a safe default, so setup processes can complete reliably.
Original PR description
user_lang was missing as it was not set in the test setup, which caused an error in the setup because when creating a company it needed a user_lang to be set in this function `_create_dashboard_notes` build_error-161173
This fix prevents an error that could occur when product pricing information is displayed in the Point of Sale pricer feature. It helps keep pricing screens stable by safely handling a missing internal calculation method.
Original PR description
The compute method was removed in this commit, but is declared in the field. Traceback: --- AttributeError: 'product.product' object has no attribute '_compute_pricer_display_price' This commit resolves the above error by skipping the compute method when it is called. commit : https://github.com/odoo/enterprise/commit/70d96c44bb834ecbe89b5720ae18a93038301796#diff-2f3d348951d6293f7e805819d7053ac4ec65994bbacc829dac5dc68b00c932c> sentry-6547636163
Printed payslips now respect the payslip structure setting for worked days. If worked day lines are disabled on the form, the printed report will no longer show the worked days table, reducing confusion for payroll users.
Original PR description
- If the payslip sturct has `use_worked_day_lines = False` the printed payslip shoud not have worked_days_table Task: 4720429
**Current behavior:** With anglo saxon accounting and real-time valuation, purchasing a kit product with a BoM that has components whose costs add up to the exact price of the kit product and that is invoiced on ordered qty and has avg costing, then billing before receiving will prevent the reception from being validate-able. **Expected behavior:** Can validate **Steps to reproduce:** 1. Create a kit product with avg costing, invoiced on ordered qty, and a BoM with 2 components tha
Original PR description
**Current behavior:** With anglo saxon accounting and real-time valuation, purchasing a kit product with a BoM that has components whose costs add up to the exact price of the kit product and that is…
**Current behavior:** With anglo saxon accounting and real-time valuation, purchasing a kit product with a BoM that has components whose costs add up to the exact price of the kit product and that is invoiced on ordered qty and has avg costing, then billing before receiving will prevent the reception from being validate-able. **Expected behavior:** Can validate **Steps to reproduce:** 1. Create a kit product with avg costing, invoiced on ordered qty, and a BoM with 2 components that have a cumulative cost equalling that of the final kit product 2. Make a purchase for it, invoice -> post 3. Try to validate the receipt -> can't due to attempted re-reconicilation **Cause of the issue:** When validating the receipt, we end up here: https://github.com/odoo/odoo/blob/c9ea75efb8e260d6bea5b777f4f950f106ffcfa5/addons/stock_account/models/stock_valuation_layer.py#L81-L90 And attempt to reconcile both the original kit product AML from corresponding to the purchase line as well as the AML for the component in the stock input account. But we only will capture 1 exploded component AML in each loop iteration, so the original kit product AML will not actually be set `reconciled = True`, so we will also add it to be reconciled again: https://github.com/odoo/odoo/blob/c9ea75efb8e260d6bea5b777f4f950f106ffcfa5/addons/stock_account/models/stock_valuation_layer.py#L90 The same thing happens in subsequent calls to `_stock_account_anglo_saxon_reconcile_valuation()`, except on a final call for the last component line- if the components' cumulative cost aligns with the total cost of the kit product (which it should) then the reconciliation attempt will succeed. Then here: https://github.com/odoo/odoo/blob/c9ea75efb8e260d6bea5b777f4f950f106ffcfa5/addons/stock_account/models/stock_valuation_layer.py#L92 `reconcile()` is called on the already-reconciled AML which will cause the re-reconiliation error. **Fix** Reconcile all the resulting kit AMLs (component AMLs + actual kit product AML from the bill) together. opw-4668004 Forward-Port-Of: odoo/odoo#206838 Forward-Port-Of: odoo/odoo#205401
The default rounding method of '_compute_quantity' function is "UP" while the rounding method used for stock quantities is "HALF-UP". Hence, small discrepancies in the valuation would be introduced over time. ## How to reproduce - Create product P, storable, tracked in Kg - Create a receipt/delivery move for 14g of P -> Stock Quant is updated by 0.01Kg -> Stock Valuation is updated by 0.02Kg OPW-4734980 --- Test result without fix: ``` 2025-04-22 13:40:45,088 38626 ERROR oes_tes
Original PR description
The default rounding method of '_compute_quantity' function is "UP" while the rounding method used for stock quantities is "HALF-UP". Hence, small discrepancies in the valuation would be introduced…
The default rounding method of '_compute_quantity' function is "UP" while the rounding method used for stock quantities is "HALF-UP". Hence, small discrepancies in the valuation would be introduced over time.
## How to reproduce
- Create product P, storable, tracked in Kg
- Create a receipt/delivery move for 14g of P -> Stock Quant is updated by 0.01Kg
-> Stock Valuation is updated by 0.02Kg
OPW-4734980
---
Test result without fix:
```
2025-04-22 13:40:45,088 38626 ERROR oes_test_16 odoo.addons.stock_account.tests.test_stockvaluation: FAIL: TestStockValuation.test_valuation_rounding_method
Traceback (most recent call last):
File "/home/odoo/projects/odoo-src/multiverse/src/16.0/odoo/addons/stock_account/tests/test_stockvaluation.py", line 4397, in test_valuation_rounding_method
self.assertEqual(receipt.move_ids.stock_valuation_layer_ids.quantity, 0.01)
AssertionError: 0.02 != 0.01
```
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#207066
Forward-Port-Of: odoo/odoo#206884Versions -------- - saas-17.4+ Steps ----- 1. Create a SO for non-user client; 2. add a product that isn't published on the website; 3. confirm SO; 4. create downpayment; 5. copy share SO link; 6. open link in private window. Issue ----- > 500: Internal Server Error > Error while render the template > ValueError: Expected singleton: product.product() Cause ----- Commit 9aa52dd6418e removed the creation of a "Down payment" product. Before it, order lines were either of typ
Original PR description
Versions -------- - saas-17.4+ Steps ----- 1. Create a SO for non-user client; 2. add a product that isn't published on the website; 3. confirm SO; 4. create downpayment; 5. copy share SO link; 6.…
Versions -------- - saas-17.4+ Steps ----- 1. Create a SO for non-user client; 2. add a product that isn't published on the website; 3. confirm SO; 4. create downpayment; 5. copy share SO link; 6. open link in private window. Issue ----- > 500: Internal Server Error > Error while render the template > ValueError: Expected singleton: product.product() Cause ----- Commit 9aa52dd6418e removed the creation of a "Down payment" product. Before it, order lines were either of type `display_section` or they had a `product_id` value. After the commit, a third option is for `is_downpayment` to be true. This regressed the fix to this issue added by 34d4ffa01d57d, as instead of ensuring lines have a `product_id` value before checking if reorder is allowed, it decided to check whether they're not of `display_type`. Solution -------- Ensure there's a `product_id` in `sale.order.line` instead of only relying on the caller to filter those out beforehand. opw-4711297 Forward-Port-Of: odoo/odoo#206435
https://runbot.odoo.com/odoo/error/163640 Forward-Port-Of: odoo/odoo#207642
Original PR description
https://runbot.odoo.com/odoo/error/163640 Forward-Port-Of: odoo/odoo#207642
Before this commit: - Changing the state via the GST warning did not update the fiscal position. After this commit: - Changing the state via the GST warning correctly update the fiscal position. Task-4681566 Forward-Port-Of: odoo/odoo#207078 Forward-Port-Of: odoo/odoo#205000
Original PR description
Before this commit: - Changing the state via the GST warning did not update the fiscal position. After this commit: - Changing the state via the GST warning correctly update the fiscal position. Task-4681566 Forward-Port-Of: odoo/odoo#207078 Forward-Port-Of: odoo/odoo#205000
There was an issue in the `PropertyDefinition:state.propertyDefinition`, which could sometimes not be updated properly, resulting in a traceback after multiple property definition changes. ### How to reproduce: - Open a CRM Lead form view and add a property of type `tags`. - Save and fully reload the form view. - Change the property type to `separator` - Change the property name to another value. - Click outside the popover to close it. => Traceback ``` Cannot read properties of und
Original PR description
There was an issue in the `PropertyDefinition:state.propertyDefinition`, which could sometimes not be updated properly, resulting in a traceback after multiple property definition changes. ### How to…
There was an issue in the `PropertyDefinition:state.propertyDefinition`, which could sometimes not be updated properly, resulting in a traceback after multiple property definition changes. ### How to reproduce: - Open a CRM Lead form view and add a property of type `tags`. - Save and fully reload the form view. - Change the property type to `separator` - Change the property name to another value. - Click outside the popover to close it. => Traceback ``` Cannot read properties of undefined (reading 'type') at PropertiesField.onPropertyDefinitionChange ``` ### Technical explanation: The `propertyDefinition` argument given to `onChange` props of `PropertyDefinition` component is expected to be modified in place, since it is used as the `propertyDefinition` state value. `pick` function creates a shallow copy, therefore using it on `propertyDefinition` in `PropertiesField:onPropertyDefinitionChange` and applying changes on that copy (i.e. in `_regeneratePropertyName`) will prevent these changes to be registered in the `PropertyDefinition:state.propertyDefinition`, resulting in inconsistent values with `PropertyField:propertyList`, which would manifest at the next definition change, since `_getPropertyIndex` would not be able to find the index of the now obsolete `propertyDefinition`. task-4743860 Forward-Port-Of: odoo/odoo#206977 Forward-Port-Of: odoo/odoo#206871
Before this commit: ===================== - The combo selection dialog flickered when a combo product had only one choice and was non-configurable, as it opened and closed rapidly. - In self-order mode, a traceback occurred in this scenario, and the auto- selection of the combo choice was missing, unlike in the main POS. After this commit: ============== - The dialog no longer flickers and will not open if there is only one non- configurable choice. It now only opens when multip
Original PR description
Before this commit: ===================== - The combo selection dialog flickered when a combo product had only one choice and was non-configurable, as it opened and closed rapidly. - In self-order mode, a traceback occurred in this scenario, and the auto- selection of the combo choice was missing, unlike in the main POS. After this commit: ============== - The dialog no longer flickers and will not open if there is only one non- configurable choice. It now only opens when multiple choices are available or configuration is required. - The auto-selection of the combo choice is now consistent between self-order mode and the main POS, preventing tracebacks. Task-4664491 Forward-Port-Of: odoo/odoo#203211
**Issue:** When User-defined Defaults are set for Unit of Measure (product.template or product.product) and sale_timesheet module is installed, the uom default is not respected. **Steps to reproduce:** - ensure sale_timesheet module is installed - settings > technical > user-defined Defaults - create a default for unit of measure (product.template) other than hour - create a new product of type service The issue occurs in both product.template and product.product opw-4604491 Forwa
Original PR description
**Issue:** When User-defined Defaults are set for Unit of Measure (product.template or product.product) and sale_timesheet module is installed, the uom default is not respected. **Steps to reproduce:** - ensure sale_timesheet module is installed - settings > technical > user-defined Defaults - create a default for unit of measure (product.template) other than hour - create a new product of type service The issue occurs in both product.template and product.product opw-4604491 Forward-Port-Of: odoo/odoo#206625 Forward-Port-Of: odoo/odoo#204423
[FIX] accounting: missing chart line "758 Indemnités et autres produits" was missing Steps to reproduce: ------------------- * French Fiscal Localization * Open the Chart of Accounts * Line 758 missing Why the fix: ------------ Based on French government documentation https://www.anc.gouv.fr/files/anc/files/1_Normes_fran%C3%A7aises/Plans%20comptables/Plan-de-comptes-PCG-2025.pdf opw-4699235 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/
Original PR description
[FIX] accounting: missing chart line "758 Indemnités et autres produits" was missing Steps to reproduce: ------------------- * French Fiscal Localization * Open the Chart of Accounts * Line 758 missing Why the fix: ------------ Based on French government documentation https://www.anc.gouv.fr/files/anc/files/1_Normes_fran%C3%A7aises/Plans%20comptables/Plan-de-comptes-PCG-2025.pdf opw-4699235 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#207312 Forward-Port-Of: odoo/odoo#205552
Since the widget for non trailing zeros float is used in payroll and payroll does not depend on hr_holidays now, we move the widget to core hr Forward-Port-Of: odoo/odoo#207441
Original PR description
Since the widget for non trailing zeros float is used in payroll and payroll does not depend on hr_holidays now, we move the widget to core hr Forward-Port-Of: odoo/odoo#207441
Steps to reproduce [17.1]: - Add a property field to a job application in the backend. - Go to the linked website job application form (in edit mode). - The property field is inaccessible. To be able to access the new property field in the application form, the `job_id` value of the related job record needs to be specified by default. Unfortunately, these values are removed before accessing "edit" mode: Starting from [1], a fix was added to clear default values coming from `data-f
Original PR description
Steps to reproduce [17.1]: - Add a property field to a job application in the backend. - Go to the linked website job application form (in edit mode). - The property field is inaccessible. To be able…
Steps to reproduce [17.1]: - Add a property field to a job application in the backend. - Go to the linked website job application form (in edit mode). - The property field is inaccessible. To be able to access the new property field in the application form, the `job_id` value of the related job record needs to be specified by default. Unfortunately, these values are removed before accessing "edit" mode: Starting from [1], a fix was added to clear default values coming from `data-for` attributes when the form is edited (at `cleanForSave()`) to prevent saving it with changed default values. Since the code from [1] can also remove default values set by the user, a new fix (see [2]) updated this implementation to ensure that only values from auto-fill and data-for fields will be removed (this time, when the form public widget is destroyed [3]). The behaviour from [3] will always unlink the `data-for` values in edit mode, and as a consequence, the related property fields won't be correctly retrieved. The goal of this commit is to fix this behaviour by excluding `data-for` values from the reset in [3]. An extra check will be added to be sure the form won't be saved with updated default values if it already has `data-for` ones [4]. Important: The diff from [5] made the `email_to` field as an exception for the data-for/prefill priority system and only used the `data-for` value if nothing has been configured by the user (it also used the `data-for` value if what was configured by the user is the dummy default email: `info@yourcompany.example.com`). That's why we need to exceptionally allow saving the default value added by the user in the check from [4] to preserve the same behavior. Following [6], The `email_to` value won't be kept in edit mode to prevent breaking its dynamic behavior. [1]: https://github.com/odoo/odoo/commit/b637a5e32f767b62736241042f88fa0cecf9f10b [2]: https://github.com/odoo/odoo/commit/043e1fdf923d2037dd8da128ab99388f0c92e544 [5]: https://github.com/odoo/odoo/commit/a08574a04ff2ce8ea2d6fd2b79f56cc57bba953b [6]: https://github.com/odoo/odoo/commit/6658d61e304c9dfd8e512648c4a001dcaac44bc1 task-3922573 Forward-Port-Of: odoo/odoo#166565
Currently the IoT Box are being infested with logs like `2025-04-17 11:30:46,925 13649 WARNING ? odoo.addons.hw_drivers.websocket_client: message type not supported: bundle_changed` This PR removes them as they aren't useful information task-4735615 Forward-Port-Of: odoo/odoo#206503
Original PR description
Currently the IoT Box are being infested with logs like `2025-04-17 11:30:46,925 13649 WARNING ? odoo.addons.hw_drivers.websocket_client: message type not supported: bundle_changed` This PR removes them as they aren't useful information task-4735615 Forward-Port-Of: odoo/odoo#206503
Currently an exception was generated when the user tries to save the new employee record after clicking on call icon. Steps to reproduce: 1) Install HR module 2) Create a new employee record by giving employee name 3) Click on the call icon of work phone 4) Now tries to save the new employee record Error: `KeyError: name` This issue occurs because, while clicking the call widget, it creates the record but does not update it in the browser. As a result, when the user tries to sa
Original PR description
Currently an exception was generated when the user tries to save the new employee record after clicking on call icon. Steps to reproduce: 1) Install HR module 2) Create a new employee record by…
Currently an exception was generated when the user tries to save the new employee record after clicking on call icon. Steps to reproduce: 1) Install HR module 2) Create a new employee record by giving employee name 3) Click on the call icon of work phone 4) Now tries to save the new employee record Error: `KeyError: name` This issue occurs because, while clicking the call widget, it creates the record but does not update it in the browser. As a result, when the user tries to save manually, It again creates the record with an empty vals_list. So it will leads to the above traceback from the below lines https://github.com/odoo/odoo/blob/2d64d94487d24278dc3c6615343a793e1ec94daf/addons/hr/models/hr_employee.py#L386 This fix resolves the issue by ensuring that clicking the call icon before saving retains the user input. Additionally, I have added a test to verify this behavior. sentry-6234873849 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#206227 Forward-Port-Of: odoo/odoo#195278
This is a fix for a bug that happens from time to time. It was reported more than once that another user was viewed as a caller instead of the actual caller. This happened because when someone calls from a local number, they have a `0` at the beginning of their number. For that case, we use a wildcard that matches anything that the phone number is a suffix to. So, it happened that it matched more than one number when the calling local number is a suffix to more than one international number.
Original PR description
This is a fix for a bug that happens from time to time. It was reported more than once that another user was viewed as a caller instead of the actual caller. This happened because when someone calls from a local number, they have a `0` at the beginning of their number. For that case, we use a wildcard that matches anything that the phone number is a suffix to. So, it happened that it matched more than one number when the calling local number is a suffix to more than one international number. Then, the code just picks the first one randomly, which may be incorrect. This commit fixes this bug by removing the logic of using a wildcard when the call is made through a local number. Instead, we use an exact match. Task-4707543 Forward-Port-Of: odoo/enterprise#84129
### Steps to reproduce: - Accounting dashboard - Click on the three dots of the "Bank" card - Click "import file" - Try importing a CAMT file with the namespace "camt" - Traceback Other issue: - Try importing a CAMT file with a custom Code in `ns:Domn/ns:Cd` (example: "IC1") - Traceback ### Cause: Namespaces can be used in CAMT files but the way Odoo handled them was incorrect. We were creating a dictionary using `root.nsmap`. It only worked when the file didn't have a namespace ke
Original PR description
### Steps to reproduce: - Accounting dashboard - Click on the three dots of the "Bank" card - Click "import file" - Try importing a CAMT file with the namespace "camt" - Traceback Other issue: - Try…
### Steps to reproduce: - Accounting dashboard - Click on the three dots of the "Bank" card - Click "import file" - Try importing a CAMT file with the namespace "camt" - Traceback Other issue: - Try importing a CAMT file with a custom Code in `ns:Domn/ns:Cd` (example: "IC1") - Traceback ### Cause: Namespaces can be used in CAMT files but the way Odoo handled them was incorrect. We were creating a dictionary using `root.nsmap`. It only worked when the file didn't have a namespace key because if the key was different from 'ns' the `findall` didn't work. Second issue: Some banks use their own codes in the CAMT files. The specification has numerous codes which Odoo added in a dictionary, and it reads from this dictionary to get a description. When there is a custom code, Odoo tries to read a key which doesn't exist explaining the traceback. ### Solution: - Change the way namespace is computed using the tag. - If the code is not in the dictionary, we take the custom code. opw-4553152 Forward-Port-Of: odoo/enterprise#82888
The exception for the second trimester for 2024 has been redone for 2025. task-4734827 Forward-Port-Of: odoo/enterprise#84024
Original PR description
The exception for the second trimester for 2024 has been redone for 2025. task-4734827 Forward-Port-Of: odoo/enterprise#84024
With this commit we remove the namespaces that are not used in the cdfi document. Steps: - Create an invoice and send the edi document - Look at the xml -> namespace `xmlns:cce20="http://www.sat.gob.mx/ComercioExterior20"` is included but unused opw-4493568 Forward-Port-Of: odoo/enterprise#83838
Original PR description
With this commit we remove the namespaces that are not used in the cdfi document. Steps: - Create an invoice and send the edi document - Look at the xml -> namespace `xmlns:cce20="http://www.sat.gob.mx/ComercioExterior20"` is included but unused opw-4493568 Forward-Port-Of: odoo/enterprise#83838
The pos.order form view removed the refund button for the inherited view. This can cause issues if other modules depend on that button to add to the arch, so making it invisible would still make the element accessible by xpath. ci error https://runbot.odoo.com/runbot/build/78974416 Forward-Port-Of: odoo/enterprise#84118 Forward-Port-Of: odoo/enterprise#84030
Original PR description
The pos.order form view removed the refund button for the inherited view. This can cause issues if other modules depend on that button to add to the arch, so making it invisible would still make the element accessible by xpath. ci error https://runbot.odoo.com/runbot/build/78974416 Forward-Port-Of: odoo/enterprise#84118 Forward-Port-Of: odoo/enterprise#84030
Beofre this commit: Products with both positive and negative sales order lines in SO can result it total quantity = 0 when calcuating average cost. Causing division by zero error. After this commit: Added a check to prevent division if total quantity of product is zero. Negative order lines are usually used for return of product, it is not included in shipping request. opw-4655713 Forward-Port-Of: odoo/enterprise#83911 Forward-Port-Of: odoo/enterprise#83500
Original PR description
Beofre this commit: Products with both positive and negative sales order lines in SO can result it total quantity = 0 when calcuating average cost. Causing division by zero error. After this commit: Added a check to prevent division if total quantity of product is zero. Negative order lines are usually used for return of product, it is not included in shipping request. opw-4655713 Forward-Port-Of: odoo/enterprise#83911 Forward-Port-Of: odoo/enterprise#83500
Steps to reproduce: - starting planning_test_tour => error raised Source: - https://github.com/odoo/enterprise/pull/69888 introduced a new method _get_non_working_days_bounds which computes user_tz but the value can be False and also not coherent with user_tz computed in _calculate_start_end_dates (method from wich this new method is called) Fix: user_tz is computed the same way as its computed in the original method, the code is duplicated as signature cannot be changed in stable. For
Original PR description
Steps to reproduce: - starting planning_test_tour => error raised Source: - https://github.com/odoo/enterprise/pull/69888 introduced a new method _get_non_working_days_bounds which computes user_tz but the value can be False and also not coherent with user_tz computed in _calculate_start_end_dates (method from wich this new method is called) Fix: user_tz is computed the same way as its computed in the original method, the code is duplicated as signature cannot be changed in stable. Forward-Port-Of: odoo/enterprise#83955 Forward-Port-Of: odoo/enterprise#83926
This PR adds a validation check for a company's GST token before making GST API calls via cron. These validations already exist when making GST API calls through the GST return period but were missing in the cron execution. This ensures that no unnecessary cron execution and api call takes place. task-4350780 Forward-Port-Of: odoo/enterprise#84061 Forward-Port-Of: odoo/enterprise#81974
Original PR description
This PR adds a validation check for a company's GST token before making GST API calls via cron. These validations already exist when making GST API calls through the GST return period but were missing in the cron execution. This ensures that no unnecessary cron execution and api call takes place. task-4350780 Forward-Port-Of: odoo/enterprise#84061 Forward-Port-Of: odoo/enterprise#81974
Before this commit, the function _generate_deferred_entries was basically a big for-loop in which a lot of account.moves and lines are created in each iteration. This was extremely inefficient because it wasn't leveraging any batch optimization of the ORM. This PR breaks down the for-loop into smaller ones that aggregate vals and performs a single call to create records, instead of individual creations. Same approach was taken for unlinked records and posting moves. The assumption is that rec
Original PR description
Before this commit, the function _generate_deferred_entries was basically a big for-loop in which a lot of account.moves and lines are created in each iteration. This was extremely inefficient…
Before this commit, the function _generate_deferred_entries was basically a big for-loop in which a lot of account.moves and lines are created in each iteration. This was extremely inefficient because it wasn't leveraging any batch optimization of the ORM. This PR breaks down the for-loop into smaller ones that aggregate vals and performs a single call to create records, instead of individual creations. Same approach was taken for unlinked records and posting moves.
The assumption is that records are created in the same order of the values list. This allows for breaking the for-loop because consecutive for-loops can simply inherit the order from the lists created in the loop just before. Another leverage point is that simply adding move_id to account.move.line(s) before creation is equivalent to `move.write({'line_ids': \[...\]})`. Based on the 2 assumptions, we could decouple the creation of moves and their lines into separate loops to aggregate their values.
After this PR creations, unlinks and posting operations are all batched to leverage the power of ORM optimization.
Benchmarks:
|Num deferred expenses | Time before | Time After | Num queries before | Num queries After |
|--------------------- | ----------- | ---------- | ------------------ | ----------------- |
| 100 | 23.9s | 13.1s | 3768 | 2918 |
| 1,000 |181.4s | 66.5s | 17885 | 9530 |
| 10,000 |TIMEOUT(>1200s)| 616,7s | 1379 | 1010 |
opw-4480919
opw-4403217
Forward-Port-Of: odoo/enterprise#81148
Forward-Port-Of: odoo/enterprise#79255Currently, we have regular (Raspberry Pi) IoT Boxes and Widnows ("Virtual") IoT Boxes The subscription for the Raspberry Pis cost a monthly fee to the users, while Windows IoT is considered to be free for the users. However when sending information about the number of IoT Boxes connected to a database we currently don't make a difference between Windows and Raspberry Pi IoT Boxes. This PR adds a distinction between the two and send the Raspberry Pi IoT Boxes under "IoTBox" message and t
Original PR description
Currently, we have regular (Raspberry Pi) IoT Boxes and Widnows ("Virtual") IoT Boxes
The subscription for the Raspberry Pis cost a monthly fee to the users, while Windows IoT is considered to be free for the users.
However when sending information about the number of IoT Boxes connected to a database we currently don't make a difference between Windows and Raspberry Pi IoT Boxes.
This PR adds a distinction between the two and send the Raspberry Pi IoT Boxes under "IoTBox" message and the Windows ones under "WindowsIoT" message.
This allows us to distinguish the two subscriptions on odoo.com
task-4567313
Forward-Port-Of: odoo/enterprise#78516Before this commit, the user could have a crash when he tries to create a shift in non-working period because the method to search on the right timezone to use does not take into account the shift could be not linked to a resource. This commit makes sure the timezone is correctly found without any issue when we search on a timezone. Forward-Port-Of: odoo/enterprise#84224
Original PR description
Before this commit, the user could have a crash when he tries to create a shift in non-working period because the method to search on the right timezone to use does not take into account the shift could be not linked to a resource. This commit makes sure the timezone is correctly found without any issue when we search on a timezone. Forward-Port-Of: odoo/enterprise#84224