Daily updates from Odoo
Friday, October 25, 2024
17 changes · master
Enhancements to existing features
The Planning app now includes clearer demo examples showing how employee shifts and allocated hours vary across different contract periods. This helps business users better understand and evaluate contract-based planning scenarios during demonstrations or testing.
Original PR description
- master Before this commit, there was not quite much demo data to showcase about shifts and its allocated hours depending on various contracts of employees. This commit adds demo data to show shifts allocated to resource depending on their different contract period. task-3128491
Resolved issues and error corrections
This update aligns Odoo spreadsheet side panels with recent spreadsheet engine changes, improving consistency in menus, titles, fonts, and chart controls. It also adds test coverage for pivot autocomplete behavior to help prevent regressions in spreadsheet reporting features.
Miscellaneous changes
Fixed onboarding Social Marketing tour which is not working properly. Reason ====== We're not getting this `'textarea[name="message"]` for some reasons, & there is no `name` attribute in textarea. Also, we removed `extra_tringger` in later version, and we can use `run: 'edit` instead so removed that & used common classes that works on all version. Task-4210376 Forward-Port-Of: odoo/enterprise#72754 Forward-Port-Of: odoo/enterprise#71016
Original PR description
Fixed onboarding Social Marketing tour which is not working properly. Reason ====== We're not getting this `'textarea[name="message"]` for some reasons, & there is no `name` attribute in textarea. Also, we removed `extra_tringger` in later version, and we can use `run: 'edit` instead so removed that & used common classes that works on all version. Task-4210376 Forward-Port-Of: odoo/enterprise#72754 Forward-Port-Of: odoo/enterprise#71016
In this commit, we close active modals when the focussed element of a step (trigger) is below the modal. https://github.com/odoo/odoo/pull/185231 Forward-Port-Of: odoo/enterprise#72756
Original PR description
In this commit, we close active modals when the focussed element of a step (trigger) is below the modal. https://github.com/odoo/odoo/pull/185231 Forward-Port-Of: odoo/enterprise#72756
### Steps to reproduce the issue: 1. In a Multi-Company setup with different Charts of Accounts, create (or find) a Report with Availability set to Chart of Account Matches - For example, you can use Belgian Profit and Loss or Balance Sheet reports 2. With multiple companies visible, including the one with the correct Chart of Accounts, go to the Root Report of the one you created (or found) 3. Under the Report Variants filter, the "coa" Report can not be found, or the filter is simply
Original PR description
### Steps to reproduce the issue: 1. In a Multi-Company setup with different Charts of Accounts, create (or find) a Report with Availability set to Chart of Account Matches - For example, you can use…
### Steps to reproduce the issue:
1. In a Multi-Company setup with different Charts of Accounts, create (or find) a Report with Availability set to Chart of Account Matches
- For example, you can use Belgian Profit and Loss or Balance Sheet reports
2. With multiple companies visible, including the one with the correct Chart of Accounts, go to the Root Report of the one you created (or found)
3. Under the Report Variants filter, the "coa" Report can not be found, or the filter is simply not displayed
### Explanation:
When looking for variants with `availability_condition="coa"`, the current condition is for `companies.mapped("chart_template")` to consist of only `account.report.chart_template`.
Before 18.0, `account.report` using `account.account.code` as filter retrieved accounts from all active companies. `account.account` with a `code` corresponding to the request, even if their function is not the same, would be added into the report, falsing the amounts as a result.
### Fix reasoning:
Since 18.0, with commits odoo/odoo@854c3b27aa5476c208572f19e64f8f3364bfc381 and odoo/enterprise@92bf8e36c40f99c697318ddc9784cde0a1b3736e, `account.account.code` became company dependent, and only `self.env.company` is used to retrieve them in `account.report`.
Thanks to this change, `availability_condition="coa"` does no longer require a restriction to environments where all companies have `account.report.chart_template`.
opw-4263627
Forward-Port-Of: odoo/enterprise#72365When deleting the measure on which the pivot is sorted, the side panel would crash. This commit fixes this issue by removing the sortedColumn from the pivot when the measure is deleted. Task: [4154831](https://www.odoo.com/web#id=4154831&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#72684 Forward-Port-Of: odoo/enterprise#69926
Original PR description
When deleting the measure on which the pivot is sorted, the side panel would crash. This commit fixes this issue by removing the sortedColumn from the pivot when the measure is deleted. Task: [4154831](https://www.odoo.com/web#id=4154831&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#72684 Forward-Port-Of: odoo/enterprise#69926
### Steps to reproduce: - Create and configure a Sendcloud shipping method - Create a Contact Bob - Create a subconcat of type delivery for Bob without setting any name > by default its display name will be "Bob, delivery address" - Create a sale order for Bob - Add a Sendcloud shipment method to that SO and confirm the SO - Go on the associated delivery and try to validate it ### Expected behavior: You should raise a user error telling you that you a pickup point was required fo
Original PR description
### Steps to reproduce: - Create and configure a Sendcloud shipping method - Create a Contact Bob - Create a subconcat of type delivery for Bob without setting any name > by default its display name…
### Steps to reproduce: - Create and configure a Sendcloud shipping method - Create a Contact Bob - Create a subconcat of type delivery for Bob without setting any name > by default its display name will be "Bob, delivery address" - Create a sale order for Bob - Add a Sendcloud shipment method to that SO and confirm the SO - Go on the associated delivery and try to validate it ### Expected behavior: You should raise a user error telling you that you a pickup point was required for the selected shipping method. ### Current behavior: You raise a traceback prior to that point. ### Cause of the issue: Since you did not set a name on your delivery partner the code will break as soon as you try to generate the parcels data because "False" is not iterable, see: https://github.com/odoo/enterprise/blob/37577535a4482eaa1250b41136b47b3613eb7693/delivery_sendcloud/models/sendcloud_service.py#L576-L577 ### Fix: If for some reason the name of the delivery partner has been removed or was unset (e.g. display name is of the form: Bob, Delivery address), the name of its parent should be used to generate the parcel data. Note: This fix should normally not be that relevant, because, if you were to select a pickup point, the partner used to generate the parcel would already be the parent partner and is guarranteed to have a name: https://github.com/odoo/enterprise/blob/37577535a4482eaa1250b41136b47b3613eb7693/delivery_sendcloud/models/sendcloud_service.py#L556-L561already However, now, if you proceed with this flow without any pickup point (which you can only select form the website) you will now raise a relevant user error: #### Invalid Operation: "A service point is required for the selected shipping method" opw-4118362 Forward-Port-Of: odoo/enterprise#72076
Before this commit, in single app mode (only studio is installed), a tour failed because we added approvals on a button on the Form View of Apps without specifying which. At the end of the day, a module got actually installed which triggered a lot of crashes, including the tour itself and a few low-level cursor-related functions. After this commit, we precisely specify in the tour on which button and function we make approvals for. The tour succeeds and there is no crash. Forward-Port-Of: od
Original PR description
Before this commit, in single app mode (only studio is installed), a tour failed because we added approvals on a button on the Form View of Apps without specifying which. At the end of the day, a module got actually installed which triggered a lot of crashes, including the tour itself and a few low-level cursor-related functions. After this commit, we precisely specify in the tour on which button and function we make approvals for. The tour succeeds and there is no crash. Forward-Port-Of: odoo/enterprise#72702
Steps to reproduce the issue: 1. Install the MRP module 2. Go to Production Analysis 3. Click on the pivot table 4. Select the `Expected component cost / unit` field 5. The miscalculation will be show for `expected_component_cost_unit`. It is dividing by the MO quantity produced rather than the BOM quantity. Explanation: The issue lies in the SQL query, where the expected cost is divided by `prod_qty.product_quantity`, meaning we are using the quantity produced by a MO. instead,
Original PR description
Steps to reproduce the issue: 1. Install the MRP module 2. Go to Production Analysis 3. Click on the pivot table 4. Select the `Expected component cost / unit` field 5. The miscalculation will be show for `expected_component_cost_unit`. It is dividing by the MO quantity produced rather than the BOM quantity. Explanation: The issue lies in the SQL query, where the expected cost is divided by `prod_qty.product_quantity`, meaning we are using the quantity produced by a MO. instead, it should be divided by the BOM quantity. Fix reasoning: With this commit, the issue is resolved by dividing the expected cost by the BOM `product_qty`. Forward-Port-Of: odoo/enterprise#72647 Forward-Port-Of: odoo/enterprise#69905
Column L and M were static (hardcoded dates) Task: 4268760 Forward-Port-Of: odoo/enterprise#72445
Original PR description
Column L and M were static (hardcoded dates) Task: 4268760 Forward-Port-Of: odoo/enterprise#72445
Forward-Port-Of: odoo/enterprise#72577
Original PR description
Forward-Port-Of: odoo/enterprise#72577
Steps to reproduce: - multi-currency - upload an expense with a differenct currency than the company - OCRize it Issue: The exchange rate is always 1:1 Cause: We don't fetch the echange rate with OCR and the compute's cannot fetch it since we cill never satisfy the condition https://github.com/odoo/odoo/blob/86b748dc91f7260b30c6944fd906a4d68ec1849b/addons/hr_expense/models/hr_expense.py#L251-L261 Solution: Fetch the exchange rate directly during the process of the extracted data.
Original PR description
Steps to reproduce: - multi-currency - upload an expense with a differenct currency than the company - OCRize it Issue: The exchange rate is always 1:1 Cause: We don't fetch the echange rate with OCR and the compute's cannot fetch it since we cill never satisfy the condition https://github.com/odoo/odoo/blob/86b748dc91f7260b30c6944fd906a4d68ec1849b/addons/hr_expense/models/hr_expense.py#L251-L261 Solution: Fetch the exchange rate directly during the process of the extracted data. I differed the write operation at the end to avoid unwanted computed that could overwrite what we need. opw-4151571 Forward-Port-Of: odoo/enterprise#72112
Steps to reproduce: - Sign app > Upload a PDF & Sign - Add a Date field > Sign Now > Sign Now - Click the date field The value 'undefined' fills the field instead of today's date. This was caused by an oversight when resolving a conflict in https://github.com/odoo/enterprise/pull/71864, the query selector should have grabbed the date from the HTML document but didn't. opw-4278391 Forward-Port-Of: odoo/enterprise#72574
Original PR description
Steps to reproduce: - Sign app > Upload a PDF & Sign - Add a Date field > Sign Now > Sign Now - Click the date field The value 'undefined' fills the field instead of today's date. This was caused by an oversight when resolving a conflict in https://github.com/odoo/enterprise/pull/71864, the query selector should have grabbed the date from the HTML document but didn't. opw-4278391 Forward-Port-Of: odoo/enterprise#72574
Steps to reproduce: - install Documents and CRM - login as Marc Demo - go to any pivot view - click on "Insert in spreadsheet" - select the Dashboards tab and confirm => boom Task: 4273554 Forward-Port-Of: odoo/enterprise#72711 Forward-Port-Of: odoo/enterprise#72395
Original PR description
Steps to reproduce: - install Documents and CRM - login as Marc Demo - go to any pivot view - click on "Insert in spreadsheet" - select the Dashboards tab and confirm => boom Task: 4273554 Forward-Port-Of: odoo/enterprise#72711 Forward-Port-Of: odoo/enterprise#72395
… partners This enhancement introduces an XLSX export variant for the trial balance, specifically tailored for Colombian companies under the report name "BALANCE DE PRUEBA POR TERCERO." The requirement is to provide a detailed breakdown per partner for each account. The initial trial balance lines are primarily derived from the general ledger report, which originally focused on grouping by accounts. Inspired by the structure of the general ledger accounts, this implementation now extends t
Original PR description
… partners This enhancement introduces an XLSX export variant for the trial balance, specifically tailored for Colombian companies under the report name "BALANCE DE PRUEBA POR TERCERO." The requirement is to provide a detailed breakdown per partner for each account. The initial trial balance lines are primarily derived from the general ledger report, which originally focused on grouping by accounts. Inspired by the structure of the general ledger accounts, this implementation now extends the grouping to include both accounts and partners. While initially designed for the Colombian localization, the code is flexible and can be easily adapted for use in other localizations as needed. Co-authored-by: Brice Bartoletti <bib@odoo.com> task-3594546 Forward-Port-Of: odoo/enterprise#72471 Forward-Port-Of: odoo/enterprise#70110
Currently, Odoo supports several currencies (USD, EUR, JPY, GBP) for Banxico data parsing, but CNY (Chinese Yuan) is missing. This commit adds support for CNY in the list of currencies retrieved from Banxico’s API (through iap proxy). related pr: https://github.com/odoo/iap-apps/pull/912 task-4205613 Forward-Port-Of: odoo/enterprise#72202
Original PR description
Currently, Odoo supports several currencies (USD, EUR, JPY, GBP) for Banxico data parsing, but CNY (Chinese Yuan) is missing. This commit adds support for CNY in the list of currencies retrieved from Banxico’s API (through iap proxy). related pr: https://github.com/odoo/iap-apps/pull/912 task-4205613 Forward-Port-Of: odoo/enterprise#72202
When there are no journals and the user tries to open the balance sheet report, a traceback will appear. Steps to reproduce the error: - Install ``account_reports`` module without demo data - Remove all journals - Go Reporting > Open Balance sheet Traceback: ``` StopIteration: null File "odoo/http.py", line 2364, in __call__ response = request._serve_db() File "odoo/http.py", line 1891, in _serve_db return self._transactioning( File "odoo/http.py", line 1954, in _t
Original PR description
When there are no journals and the user tries to open the balance sheet report, a traceback will appear. Steps to reproduce the error: - Install ``account_reports`` module without demo data - Remove…
When there are no journals and the user tries to open the balance sheet report,
a traceback will appear.
Steps to reproduce the error:
- Install ``account_reports`` module without demo data
- Remove all journals
- Go Reporting > Open Balance sheet
Traceback:
```
StopIteration: null
File "odoo/http.py", line 2364, in __call__
response = request._serve_db()
File "odoo/http.py", line 1891, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1954, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1921, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2168, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 330, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 728, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "home/odoo/src/enterprise/18.0/account_reports/models/account_report.py", line 1914, in get_options
initializer(options, previous_options=previous_options)
File "home/odoo/src/enterprise/18.0/account_reports/models/account_report.py", line 379, in _init_options_journals
options['journals'].extend(next(iter(company_journals_map.values())))
```
https://github.com/odoo/enterprise/blob/302eb1052609462fe607f77fcc934690f9abbe5a/account_reports/models/account_report.py#L379
When there are no journals ``company_journals_map`` will be empty,
So, it will lead to the above traceback.
sentry-5993507281
Forward-Port-Of: odoo/enterprise#72072