Thursday, November 9, 2023
17 changes · master
Miscellaneous changes
When the user tries to add properties field in domain of a model without property name the error occurs. To reproduce the issue: - Install knowledge module. - Go to Settings > Technical > User Defined Filters. - Enter a name, add 'Knowledge Article' as model and then add domain [('article_properties', '!=', False)]. - Click on save button and then on refresh button below code editor of domain. - The traceback will be generated Error: ``` File "odoo/http.py", line 2134, in __call_
Original PR description
When the user tries to add properties field in domain of a model without property name the error occurs. To reproduce the issue: - Install knowledge module. - Go to Settings > Technical > User…
When the user tries to add properties field in domain of a model without property name the error occurs.
To reproduce the issue:
- Install knowledge module.
- Go to Settings > Technical > User Defined Filters.
- Enter a name, add 'Knowledge Article' as model and then add domain [('article_properties', '!=', False)].
- Click on save button and then on refresh button below code editor of domain.
- The traceback 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 30, in call_kw
return 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 457, in call_kw
result = _call_kw_model(method, model, args, kwargs)
File "odoo/api.py", line 430, in _call_kw_model
result = method(recs, *args, **kwargs)
File "odoo/models.py", line 1587, in search_count
query = self._search(domain, limit=limit)
File "odoo/models.py", line 5027, in _search
query = self._where_calc(domain)
File "odoo/models.py", line 4768, in _where_calc
return expression.expression(domain, self).query
File "odoo/osv/expression.py", line 777, in __init__
self.parse()
File "odoo/osv/expression.py", line 1012, in parse
if len(path) != 2 and "." in path[1]:
IndexError: list index out of range
```
The issue is occurring because we are getting single element in path over here -
https://github.com/odoo/odoo/blob/f4e60765db57fe3612f267e8fa44d10ccf5ff107/odoo/osv/expression.py#L649 but we are trying to access path[1] due to which IndexError is occurring over here -
https://github.com/odoo/odoo/blob/f4e60765db57fe3612f267e8fa44d10ccf5ff107/odoo/osv/expression.py#L683 and here -
https://github.com/odoo/odoo/blob/f4e60765db57fe3612f267e8fa44d10ccf5ff107/odoo/osv/expression.py#L687
The condition is also wrong over here -
https://github.com/odoo/odoo/blob/f4e60765db57fe3612f267e8fa44d10ccf5ff107/odoo/osv/expression.py#L683-L684 in which we are checking length of path is not equals to 2 and then also we are trying to access path[1], due to which ValueError becomes a dead code.
To fix this issue length of path has been checked and when it will be 2 then only path[1] will be accessed.
sentry-4499339271
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#141533
Forward-Port-Of: odoo/odoo#138370The name field has been to be able to order on it but it is added and just invisible instead of completely hide the column. This commit changes `invisible` attribute to `column_invisible` to completely hide that field in the project list view. X-original-commit: 62f49331ba4dc923031603c86931fa4c8b028f32 Forward-Port-Of: odoo/odoo#141455
Original PR description
The name field has been to be able to order on it but it is added and just invisible instead of completely hide the column. This commit changes `invisible` attribute to `column_invisible` to completely hide that field in the project list view. X-original-commit: 62f49331ba4dc923031603c86931fa4c8b028f32 Forward-Port-Of: odoo/odoo#141455
Forward-Port-Of: odoo/odoo#141622
Original PR description
Forward-Port-Of: odoo/odoo#141622
Forward-Port-Of: odoo/odoo#141458
Original PR description
Forward-Port-Of: odoo/odoo#141458
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#139514
Original PR description
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#139514
This PR fixes the missing caret in some of the selection fields inside the settings. It is not possible to fix it another way than adding a `:not` targeting the settings `formView`, because the `formView` css rule is overriding any css in settings. The caret was also hidden in the `datepicker` field. This PR also change the `$-down-arrow` variable to a global one, `$o-caret-down`. This issue was discovered while fixing the new milk version of Odoo, but this PR target 16.0 because t
Original PR description
This PR fixes the missing caret in some of the selection fields inside the settings. It is not possible to fix it another way than adding a `:not` targeting the settings `formView`, because the `formView` css rule is overriding any css in settings. The caret was also hidden in the `datepicker` field. This PR also change the `$-down-arrow` variable to a global one, `$o-caret-down`. This issue was discovered while fixing the new milk version of Odoo, but this PR target 16.0 because the issue appeared in this version, but the task is a part of the 16.3 Milk fixes. task-3451370 Related to task-3326263 Forward-Port-Of: odoo/odoo#140570 Forward-Port-Of: odoo/odoo#130490
Enterprise PR: odoo/enterprise#49584 Task link: http://www.odoo.com/web#id=3569752&model=project.task task-3569752 Forward-Port-Of: odoo/odoo#141554 Forward-Port-Of: odoo/odoo#139912
Original PR description
Enterprise PR: odoo/enterprise#49584 Task link: http://www.odoo.com/web#id=3569752&model=project.task task-3569752 Forward-Port-Of: odoo/odoo#141554 Forward-Port-Of: odoo/odoo#139912
On top of the change in the template done in https://github.com/odoo/odoo/commit/5dc625fada8ac07ba419f60a7d416210d7b1cb89 This will change the Payment Receipt string when using the en_au language in order to also display that this will print a remittance advice. Task id #3465257 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141144
Original PR description
On top of the change in the template done in https://github.com/odoo/odoo/commit/5dc625fada8ac07ba419f60a7d416210d7b1cb89 This will change the Payment Receipt string when using the en_au language in order to also display that this will print a remittance advice. Task id #3465257 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#141144
When the bus service is loaded, it connects to the websocket worker and passes some information that are used to determine whether the websocket connection is outdated. Amongst them, the user id is used to detect when the user changed and when the websocket connection should be refreshed. This is not enough to ensure the websocket connection is still relevant: the user id could be the same but the db could have changed. The websocket would then be linked to the previous database. This c
Original PR description
When the bus service is loaded, it connects to the websocket worker and passes some information that are used to determine whether the websocket connection is outdated. Amongst them, the user id is used to detect when the user changed and when the websocket connection should be refreshed. This is not enough to ensure the websocket connection is still relevant: the user id could be the same but the db could have changed. The websocket would then be linked to the previous database. This commit fixes the issue by sending the db name alongside the user id. This will ensure the connection is refreshed when it is outdated. Steps to reproduce the issue: - Log in on db1 on 2 tabs - Log out - Log in on db2 - Try to star a message in the discuss app - Nothing happens, the messages are sent from db2 but the socket listens to db1 Forward-Port-Of: odoo/odoo#141263
This commit contains the tests related to the screen sharing at the same time with camera sharing on call Forward-Port-Of: odoo/odoo#141275
Original PR description
This commit contains the tests related to the screen sharing at the same time with camera sharing on call Forward-Port-Of: odoo/odoo#141275
Community PR: odoo/odoo#139912 Task link: http://www.odoo.com/web#id=3569752&model=project.task task-3569752 Forward-Port-Of: odoo/enterprise#50423 Forward-Port-Of: odoo/enterprise#49584
Original PR description
Community PR: odoo/odoo#139912 Task link: http://www.odoo.com/web#id=3569752&model=project.task task-3569752 Forward-Port-Of: odoo/enterprise#50423 Forward-Port-Of: odoo/enterprise#49584
Forward-Port-Of: odoo/enterprise#50472
Original PR description
Forward-Port-Of: odoo/enterprise#50472
Steps: In Planning, create an open shift from 2PM to 8PM. Note that the pill will display "2:00 PM - 8:00 PM (6h)", which means that 6h are allocated. For shifts with a resource that have a fixed scheduled (shift.resource_id.calendar_id != False), this value is computed by finding the intersection of its calendar and the shift. However, for shift with resource that have a flexible schedule (shift.resource_id.calendar_id == False) or, in this case, open shifts (shift.resource_id == False),
Original PR description
Steps: In Planning, create an open shift from 2PM to 8PM. Note that the pill will display "2:00 PM - 8:00 PM (6h)", which means that 6h are allocated. For shifts with a resource that have a fixed…
Steps: In Planning, create an open shift from 2PM to 8PM. Note that the pill will display "2:00 PM - 8:00 PM (6h)", which means that 6h are allocated. For shifts with a resource that have a fixed scheduled (shift.resource_id.calendar_id != False), this value is computed by finding the intersection of its calendar and the shift. However, for shift with resource that have a flexible schedule (shift.resource_id.calendar_id == False) or, in this case, open shifts (shift.resource_id == False), this value is just the duration of the shift, maxed to the company calendar's "hours per day". Issue: The "Total" row's value is "03:00", where it should have the same value as the shift. Causes: - `gantt_resource_work_interval` returns a dict where "no resource" is not considered as flexible hours. As explained earlier, it should. - When we want to access this dict on client-side, we don't handle the case where `record.resource_id` is false, rather than a tuple. task-3412654 Forward-Port-Of: odoo/enterprise#50252 Forward-Port-Of: odoo/enterprise#43675
- Install l10n_lu_reports - Export a BS or P&L as an XML file - The declarations are empty, only the dates are added The way the lines are retrieved has been changed during the reportalypse. This commit adjusts report generation accordingly. opw-3421063 Forward-Port-Of: odoo/enterprise#50479 Forward-Port-Of: odoo/enterprise#50172
Original PR description
- Install l10n_lu_reports - Export a BS or P&L as an XML file - The declarations are empty, only the dates are added The way the lines are retrieved has been changed during the reportalypse. This commit adjusts report generation accordingly. opw-3421063 Forward-Port-Of: odoo/enterprise#50479 Forward-Port-Of: odoo/enterprise#50172
Prior to this commit, there was a spacing issue and also a small contrast issue with the active state for logged-in users in the permission panel. Additionally, the action buttons (such as remove member, leave article) for hovered-over invited members were not optimally positioned and were only clickable icons. These have now been upgraded to more user-friendly buttons. <table> <tr> <td>Before</td> <td> After</td> <tr> <td> <img width="1726" alt="Before" src="https://github.com/odoo
Original PR description
Prior to this commit, there was a spacing issue and also a small contrast issue with the active state for logged-in users in the permission panel. Additionally, the action buttons (such as remove member, leave article) for hovered-over invited members were not optimally positioned and were only clickable icons. These have now been upgraded to more user-friendly buttons. <table> <tr> <td>Before</td> <td> After</td> <tr> <td> <img width="1726" alt="Before" src="https://github.com/odoo/enterprise/assets/80678921/c7fb3879-562c-4c61-aa3d-8eb192af7f02"> </td> <td><img width="1726" alt="After" src="https://github.com/odoo/enterprise/assets/80679690/c282f6fe-f28e-4aee-b5db-62e37fa729ab"> </td> </table> task-3575300 Forward-Port-Of: odoo/enterprise#49811
In this PR, reducing generate coupon performance cause it is sending generated coupon mail twice when coupon is created and if user send coupon to partner. Query Execution time Before : 311 2.4421675205230713 After: 92 0.08694791793823242 task: 3460049 Forward-Port-Of: odoo/enterprise#50050 Forward-Port-Of: odoo/enterprise#46302
Original PR description
In this PR, reducing generate coupon performance cause it is sending generated coupon mail twice when coupon is created and if user send coupon to partner. Query Execution time Before : 311 2.4421675205230713 After: 92 0.08694791793823242 task: 3460049 Forward-Port-Of: odoo/enterprise#50050 Forward-Port-Of: odoo/enterprise#46302
Before this commit, when the user clicks on a gantt cell to plan a shift, a plan dialog is displayed even if there is nothing to plan. That behavior could be annoying for the user if he just wants to plan a new shift each time he clicks on a gantt cell. This commit checks if there is at least one shift to plan, if yes then the plan dialog will be displayed otherwise the form view dialog will be displayed to create a new shift to plan. Forward-Port-Of: odoo/enterprise#50383
Original PR description
Before this commit, when the user clicks on a gantt cell to plan a shift, a plan dialog is displayed even if there is nothing to plan. That behavior could be annoying for the user if he just wants to plan a new shift each time he clicks on a gantt cell. This commit checks if there is at least one shift to plan, if yes then the plan dialog will be displayed otherwise the form view dialog will be displayed to create a new shift to plan. Forward-Port-Of: odoo/enterprise#50383