Daily updates from Odoo
Wednesday, October 11, 2023
23 changes · master
Security fixes and vulnerability patches
This fix prevents survey users from viewing appraisal-related survey responses they should not access. It helps protect employee appraisal information and keeps appraisal data visible only to the appropriate users.
Original PR description
task-3497285
Enhancements to existing features
This update tidies short app summaries and longer descriptions across multiple Odoo Enterprise modules by removing line breaks and unnecessary spacing. It improves consistency in how module information is stored and displayed, with no expected change to business workflows.
Original PR description
The summary is a short char field. It should not contain carriage returns. The description is the longer text field. Remove unnecessary spaces in both. Enterprise part of odoo/odoo#138214
The calendar setting previously called quick add has been renamed to quick create across several Odoo apps. This is a low-impact consistency update that helps keep terminology aligned without changing business workflows.
Original PR description
This commit renames calendar's attribute quick_add to quick_create to be more consistent with other views.
Profit and loss reports across many country localizations now show comparison colors more consistently. Expense and depreciation increases are marked as negative where appropriate, making period-over-period performance easier to interpret.
Original PR description
Improves the profit and loss reports of most of the localizations by properly displaying the color of comparison between periods. This enables a better understanding of comparison. The modified behavior aligns the generic P&L where expenses and depreciation consider a growth as negative. More precisely, we set the attribute green_on_positive to 'account report expressions' which displayed an expense or depreciation with a positive sign. Indeed, some P&L display these lines with a negative, and these did not require modification as the color was already the expected one. task: 3271475
Spreadsheet dashboards and new spreadsheets created from templates now show numbers according to the user’s language and regional settings instead of always using US formatting. This makes dashboards and templates easier to read for international users, while also tightening internal spreadsheet revision consistency.
This change aligns how users add custom properties with the newer standard interface, reducing duplicate controls and keeping the experience consistent. It also enables properties for appraisals and planning, giving teams more flexibility to capture business-specific information.
Original PR description
### 1. Adapt to "Add Properties" button changes In the related community PR, hiding the "Add a property" button from the properties field and using the cog menu to add properties becomes the normal behavior, so there is no need to create an action to add the button in the cogmenu of the helpdesk ticket's form view. For the same reason, the "hideAddButton" option has been replaced in favor of a "showAddButton" option. The usage of the old option in knowledge has been replaced by the new one in (there is no cog menu in knowledge). ### 2. Add properties in hr_appraisal and in planning This PR adds properties (and related properties definitions) to the following models: - hr_appraisal.hr_appraisal (hr_appraisal.hr_department) - planning.planning (planning.planning_views) Task-3458627
India payroll now uses one regular pay structure instead of separate versions for employees with and without provident fund. This simplifies payroll setup and maintenance, while also capturing additional child hostel-related employee details needed for payroll calculations.
Original PR description
In this commit we have merged `Structure with PF`and `Structure without PF` structure into `India: Regular Pay`. task-3475977
The spreadsheet global filter side panel now uses a standard Bootstrap expand-and-collapse behavior instead of a custom animation. This should make the panel feel more consistent and reliable for users while reducing maintenance complexity.
Original PR description
This commit replaces the custom collapsible effect for the global filter side panel with the bootstrap collapsible effect.
The Sign app now loads its signature drawing component only when it is needed instead of including it upfront. This reduces unnecessary loading for users and helps keep the signing experience more efficient.
Resolved issues and error corrections
A recently added automated test for spreadsheet documents was disabled because it was failing intermittently in staging. This helps prevent unrelated development work from being delayed by unreliable test results while the issue is investigated.
Original PR description
This test merged this night already failed two times in staging builds today. This commit disable it to avoid slowing down merges of the entire R&D
This fix prevents an error when Sendcloud return products are not preloaded. It ensures the return workflow uses the expected empty default, reducing the chance of interruptions during shipping return setup.
Original PR description
If `return_product` is accessed without having set `return_products` in the context, the default is an empty list, on which we then call `.items()`. Which is not a method of list. Obviously this should default to a dict, like `shipping_products`.
Material resource avatars in Planning now display with better background colors when dark mode is enabled. This improves readability and visual consistency for users scheduling resources in the Gantt view.
Original PR description
Version: ---- master Steps: ----- - Open Planning - Switch to dark-mode - The avatar for material resources doesn't look good in dark mode Issue: ---- - Fix avatar appearance for material resources in dark mode. Cause: ---- - In the planning.slot gantt view, the avatar for material resources did not look good when dark mode was enabled. This was due to an issue with the background color. Fix: ---- - By decreasing the lightness and saturation in dark mode . Changes : ---- - Added a Sass loop to adjust the background color of material resource avatars. - Improved avatar appearance in dark mode. Task: 3524295
Bank synchronization connection lists and forms now show the related company. This makes it easier for users in multi-company environments to identify which connection belongs to which company.
Original PR description
…rm view That way it is easier to see which connection belong to which company in case of multicompany
Code cleanup and technical improvements
This update removes an outdated user link from email alias setup in selected Odoo areas. It keeps the system cleaner and prepares the platform for future support of aliases across multiple email domains, with little direct impact on day-to-day users.
Miscellaneous changes
Better embrace more accounts of the CoA in Financial Reports (even if they don't appear in exactly the right section) than have them ignored. The logic from the official documents is that as long as the incrementation of CoA accounts doesn't lead to switching section of each financial report, this account implicitly belongs to the same section as before This commit aims at filling most of the common blank spots in between account codes formula so that even if the customer created a new acc
Original PR description
Better embrace more accounts of the CoA in Financial Reports (even if they don't appear in exactly the right section) than have them ignored. The logic from the official documents is that as long as the incrementation of CoA accounts doesn't lead to switching section of each financial report, this account implicitly belongs to the same section as before This commit aims at filling most of the common blank spots in between account codes formula so that even if the customer created a new account that is not officially registered in the documents, it will still be included automatically (instead of being ignored) task-id: 3413145 Forward-Port-Of: odoo/enterprise#45704
In #42514, we try to acces a variable only defined for product.product in a method that can be both called for product.product and product.template. Forward-Port-Of: odoo/enterprise#48707
Original PR description
In #42514, we try to acces a variable only defined for product.product in a method that can be both called for product.product and product.template. Forward-Port-Of: odoo/enterprise#48707
It is now possible for aggregations to be defined with the formula 'sum_children'. An expression using this formula will take all the expressions with the same label, belonging to child lines of the line this expression belongs to, and will sum their values. This is done as an improvement in stable, as this feature is needed for a cleaner upgrade of custom-made tax reports from 15.0 to 16.0, since the former tax report engine used to behave like that by default (no formula meant you had to sum t
Original PR description
It is now possible for aggregations to be defined with the formula 'sum_children'. An expression using this formula will take all the expressions with the same label, belonging to child lines of the line this expression belongs to, and will sum their values. This is done as an improvement in stable, as this feature is needed for a cleaner upgrade of custom-made tax reports from 15.0 to 16.0, since the former tax report engine used to behave like that by default (no formula meant you had to sum the children). Task 3499260 Forward-Port-Of: odoo/enterprise#48724 Forward-Port-Of: odoo/enterprise#48019
When opening the partner ledger for a customer from the customer page, an error is raised when reloading the report, this is because the report id is take from the action context, which is reset when reloading. With this commit, if there is no report id in the action context, we take it from session storage.. Steps: Go to Accounting > Customers > Customers Open a customer form view and open his Partner Ledger Reload the page -> Error: "Cannot read properties of undefined (reading 'report_id')"
Original PR description
When opening the partner ledger for a customer from the customer page, an error is raised when reloading the report, this is because the report id is take from the action context, which is reset when reloading. With this commit, if there is no report id in the action context, we take it from session storage.. Steps: Go to Accounting > Customers > Customers Open a customer form view and open his Partner Ledger Reload the page -> Error: "Cannot read properties of undefined (reading 'report_id')" opw-3461791 Forward-Port-Of: odoo/enterprise#47896
In the specific case in which an invoice in company currency is paid by a payment in foreign currency, in that case, perform the reconciliation in foreign currency but convert the residual amount of the invoice to the foreign currency using the payment rate instead of the invoice one. Forward-Port-Of: odoo/enterprise#48666 Forward-Port-Of: odoo/enterprise#46238
Original PR description
In the specific case in which an invoice in company currency is paid by a payment in foreign currency, in that case, perform the reconciliation in foreign currency but convert the residual amount of the invoice to the foreign currency using the payment rate instead of the invoice one. Forward-Port-Of: odoo/enterprise#48666 Forward-Port-Of: odoo/enterprise#46238
According to documentation (https://www.odoo.com/documentation/16.0/developer/reference/backend/orm.html#related-fields) we can't chain m2m or o2m using related fields. It was made here (https://github.com/odoo/enterprise/commit/9c46725d58f1ed052ef509d18a514519c7fc7c64). So we don't call the route (/consent_expiring_date) to get the new synchronization expiring date because the field (journal_ids) doesn't work at all. The aim of this commit is changing the related field for a compute one. We
Original PR description
According to documentation (https://www.odoo.com/documentation/16.0/developer/reference/backend/orm.html#related-fields) we can't chain m2m or o2m using related fields. It was made here (https://github.com/odoo/enterprise/commit/9c46725d58f1ed052ef509d18a514519c7fc7c64). So we don't call the route (/consent_expiring_date) to get the new synchronization expiring date because the field (journal_ids) doesn't work at all. The aim of this commit is changing the related field for a compute one. We test the behavior too. task-id: none Side commit: **[FIX] account_online_synchronization: Fix constrains on journal and online account** It seems that we write wrong constrains for journals and online accounts. The constrains block every create/write multi if we add one journal per online account. no task id Forward-Port-Of: odoo/enterprise#48665
Open a Followup Report Assign a responsible to the contact Send Followup mail Issue: Current user will be sender of the email, but it should be the set responsible opw-3491907 Forward-Port-Of: odoo/enterprise#48296
Original PR description
Open a Followup Report Assign a responsible to the contact Send Followup mail Issue: Current user will be sender of the email, but it should be the set responsible opw-3491907 Forward-Port-Of: odoo/enterprise#48296
When the user removes module name and '.' (dot seperator) from template name of a report and then tries to click on 'Qweb Views' smart button the error will be generated. To reproduce the issue: - Turn on developers mode. - Install studio module. - Go to Settings > Technical > Actions > Reports. - Open any report and remove module name and '.' (dot seperator) from template name of the report. - Click on 'Qweb Views' smart button the error will be generated. Error: ``` File "od
Original PR description
When the user removes module name and '.' (dot seperator) from template name of a report and then tries to click on 'Qweb Views' smart button the error will be generated. To reproduce the issue: -…
When the user removes module name and '.' (dot seperator) from template name
of a report and then tries to click on 'Qweb Views' smart button the error will be
generated.
To reproduce the issue:
- Turn on developers mode.
- Install studio module.
- Go to Settings > Technical > Actions > Reports.
- Open any report and remove module name and '.' (dot seperator) from template name of the report.
- Click on 'Qweb Views' smart button the error will be generated.
Error:
```
File "odoo/http.py", line 2134, in __call__
response = request._serve_db()
File "odoo/http.py", line 1710, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 133, in retrying
result = func()
File "odoo/http.py", line 1737, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1938, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 191, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 717, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 34, in call_button
action = self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 26, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "home/odoo/src/enterprise/saas-16.4/web_studio/models/ir_actions_report.py", line 70, in associated_view
domain = expression.normalize_domain(action_data['domain'])
TypeError: 'bool' object is not subscriptable
```
The issue is occuring because False is returned from 'associated_view' method over here -
https://github.com/odoo/odoo/blob/5d98384e446fe8d62679d65baf1caf60bd92611b/odoo/addons/base/models/ir_actions_report.py#L169-L170
and we get above False value in action_data which is not subscriptable - https://github.com/odoo/enterprise/blob/ee406077a837c208c3b937152b3d5ca41599d85a/web_studio/models/ir_actions_report.py#L54-L55
So now a condition has been added which will check action_data is False or not
and if we get False in action_data we will return the same.
sentry-4484698044
Forward-Port-Of: odoo/enterprise#47593The test test_onchange_residual_amount fails undeterministically. The reason being that the unreconciled_aml_ids have no order defined in the Form. It is defined in the xml view, but the mocking does not take it into account. We just define which line corresponds to which date. Linked to runbot error 24031 Forward-Port-Of: odoo/enterprise#45722
Original PR description
The test test_onchange_residual_amount fails undeterministically. The reason being that the unreconciled_aml_ids have no order defined in the Form. It is defined in the xml view, but the mocking does not take it into account. We just define which line corresponds to which date. Linked to runbot error 24031 Forward-Port-Of: odoo/enterprise#45722