Daily updates from Odoo
Monday, June 19, 2023
15 changes · master
Enhancements to existing features
Field service task deadlines now turn red when the due date has passed and the task is still open. This helps teams quickly identify overdue work and prioritize follow-up before delays grow.
Original PR description
In this PR, The date deadline field turns red when the date has passed and the task has not been closed.
Portal users can now more easily read long helpdesk ticket names by hovering over them in the ticket list. The ticket date alignment was also adjusted, making the list cleaner and easier to scan.
Original PR description
Improve the following generic UX - before in the portal tickets list view name of the ticket has not hovered so it was hard to view the ticket name when it was too long so I added the title to template so the name will hover - earlier the date was not vertically centered after applying style date is vertically centered task-3251721
The Helpdesk and Planning Kanban cards no longer show a separate edit button because users can already open the full record by clicking the card itself. This reduces visual clutter and makes the interface simpler and easier to use.
Original PR description
This PR focuses on enhancing the Kanban card functionality by removing a redundant button. Previously, users were already able to access the form view by clicking directly on the Kanban card itself. However, the presence of the redundant button caused potential confusion and cluttered the interface. With this update, we have improved the user experience by eliminating the unnecessary button, allowing users to seamlessly access the form view with a simple click on the card. This change simplifies the workflow, removes redundant elements, and contributes to a cleaner and more visually appealing user interface. The aim is to optimize usability and improve the overall aesthetic of the application. task: 3369698
Resolved issues and error corrections
This fixes the ordering of document tags shown in facets by giving them distinct sequence values. Users will see tags listed consistently and correctly, making document filtering easier and less confusing.
Original PR description
Due to multiple tags having same sequences in document facets, tags are not displayed in correct order. This fix takes care of this issue by giving facets correct sequences. task-3198692
Code cleanup and technical improvements
This update consolidates two internal Point of Sale data-handling components into one shared structure. It should make future Point of Sale maintenance easier across country-specific and hardware-related features without changing day-to-day user workflows.
Original PR description
*: l10n_de_pos_cert, l10n_de_pos_res_cert, l10n_mx_edi_pos, pos_iot, pos_l10n_se, pos_preparation_display, pos_settle_due After the architectural refactor of the PoS App, there are two classes that make sense to merge. In this refactoring task, we're merging them. Task: 3358550
Miscellaneous changes
After ad1db53b84d2ae780f905564e75bb47905687f16, the writeoff button was remaining on secondary color when model was selected. opw-3290904 Forward-Port-Of: odoo/enterprise#42265
Original PR description
After ad1db53b84d2ae780f905564e75bb47905687f16, the writeoff button was remaining on secondary color when model was selected. opw-3290904 Forward-Port-Of: odoo/enterprise#42265
Data for tax groups was completed for IGV GyNG and IGV NG because the tax report for PLE requires PE groups, that are found when the PE code is set in the tax groups. With this the base amount in the PLE report is assigned correctly. Forward-Port-Of: odoo/enterprise#42577 Forward-Port-Of: odoo/enterprise#42088
Original PR description
Data for tax groups was completed for IGV GyNG and IGV NG because the tax report for PLE requires PE groups, that are found when the PE code is set in the tax groups. With this the base amount in the PLE report is assigned correctly. Forward-Port-Of: odoo/enterprise#42577 Forward-Port-Of: odoo/enterprise#42088
When the user opens the VOIP app, selects any contact, and clicks on the number the error would be generated. Steps to reproduce : -Install the VoIP module. -Open the VoIP app. -Go to the contacts tab. -Select any one contact. -Click on Number Error: A traceback appears traceback:- ``` DatatypeMismatch: column "partner_id" is of type integer but expression is of type integer[] LINE 1: ... 2, '2023-06-09', 'outgoing', true, '', 'Test 1', ARRAY[11],...
Original PR description
When the user opens the VOIP app, selects any contact, and clicks on the number the error would be generated. Steps to reproduce : -Install the VoIP module. -Open the VoIP app. -Go to the contacts…
When the user opens the VOIP app, selects any contact, and clicks on the number the error would be generated.
Steps to reproduce :
-Install the VoIP module.
-Open the VoIP app.
-Go to the contacts tab.
-Select any one contact.
-Click on Number
Error: A traceback appears
traceback:-
```
DatatypeMismatch: column "partner_id" is of type integer but expression is of type integer[]
LINE 1: ... 2, '2023-06-09', 'outgoing', true, '', 'Test 1', ARRAY[11],...
^
HINT: You will need to rewrite or cast the expression.
File "odoo/http.py", line 2114, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, 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 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1921, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 234, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, 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 "home/odoo/src/enterprise/saas-16.3/voip/models/voip_phonecall.py", line 223, in create_from_contact
return self._create_and_init(vals)
File "home/odoo/src/enterprise/saas-16.3/voip/models/voip_phonecall.py", line 205, in _create_and_init
phonecall = self.create(vals)
File "<decorator-gen-10>", line 2, in create
File "odoo/api.py", line 409, in _model_create_multi
return create(self, [arg])
File "odoo/models.py", line 4207, in create
records = self._create(data_list)
File "odoo/models.py", line 4410, in _create
cr.execute(
File "odoo/sql_db.py", line 311, in execute
res = self._obj.execute(query, params)
```
sentry- 4238616490
Forward-Port-Of: odoo/enterprise#42258Related PR: - [ ] https://github.com/odoo/odoo/pull/123374 Forward-Port-Of: odoo/enterprise#41968 Forward-Port-Of: odoo/enterprise#41818
Original PR description
Related PR: - [ ] https://github.com/odoo/odoo/pull/123374 Forward-Port-Of: odoo/enterprise#41968 Forward-Port-Of: odoo/enterprise#41818
When the number of `active=True` tickets for a given team becomes big, computing the team's `success_rate` can take a bit of time. This is coming from the iteration through search_read's results that becomes a small bottleneck for larger number of tickets. This commit fixes this by changing the `search_read` call + iteration to a call to `read_group` + `search_count`. This gives an average speed up of 4.24 for a customer database with 150 000 tickets in total. This commit also adds a unit
Original PR description
When the number of `active=True` tickets for a given team becomes big, computing the team's `success_rate` can take a bit of time. This is coming from the iteration through search_read's results that…
When the number of `active=True` tickets for a given team becomes big, computing the team's `success_rate` can take a bit of time. This is coming from the iteration through search_read's results that becomes a small bottleneck for larger number of tickets. This commit fixes this by changing the `search_read` call + iteration to a call to `read_group` + `search_count`. This gives an average speed up of 4.24 for a customer database with 150 000 tickets in total. This commit also adds a unit test for the computation of success rate to ensure that the basic cases stay correct afterwards. It's possible to do the `read_group` + `search_count` in one single custom SQL query (self-join on a CTE or Left Join Lateral for instance) but it might be harder to maintain and a bit overkill for a compute field. #### Speedup Customer database with 4 helpdesk team and 147 000 tickets. `_compute_success_rate` timing increasing the number of tickets. | Number of tickets | Before PR | After PR | |:------------------:|:-----------:|:--------:| | 1000 | 70ms | 99ms| | 5000 | 118ms | 103ms | | 10000 | 196ms | 97ms | | 30000 | 490ms | 102ms| | 65842 | 1.13s | 90ms| Forward-Port-Of: odoo/enterprise#42650 Forward-Port-Of: odoo/enterprise#41961
The error will occur when a user tries to click `payment matching` after confirming payment. steps to produce: 1. install the Accounting module 2. open accounting > customer > payments > create new 3. fill required fields > confirm > click `payment matching` button Note: Amount field must be greater than 0 (>0). ``` AttributeError: 'dict' object has no attribute 'append' File "odoo/http.py", line 2114, in __call__ response = request._serve_db() File "odoo/http.py", line 1699
Original PR description
The error will occur when a user tries to click `payment matching` after confirming payment. steps to produce: 1. install the Accounting module 2. open accounting > customer > payments > create new…
The error will occur when a user tries to click `payment matching` after confirming payment.
steps to produce:
1. install the Accounting module
2. open accounting > customer > payments > create new
3. fill required fields > confirm > click `payment matching` button
Note: Amount field must be greater than 0 (>0).
```
AttributeError: 'dict' object has no attribute 'append'
File "odoo/http.py", line 2114, in __call__
response = request._serve_db()
File "odoo/http.py", line 1699, 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 1726, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1921, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 190, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 716, 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.3/account_accountant/models/account_payment.py", line 17, in action_open_manual_reconciliation_widget
context.append({'search_default_partner_id': self.partner_id.id})
```
so `action_open_manual_reconciliation_widget` is trying to call the append method on a context dictionary:
https://github.com/odoo/enterprise/blob/102466295ef19a14b187e63945245d6f2e514ff8/account_accountant/models/account_payment.py#L17 As a dictionary object does not support append() function, the above traceback is generated.
sentry-4235353456
Forward-Port-Of: odoo/enterprise#42172*: account_accountant, documents, documents_account, helpdesk, hr_expense_extract, hr_payroll, industry_fsm, industry_fsm_sale, planning, sale_renting, sale_subscription, sign, social, stock_barcode_mrp_subcontracting, timesheet_grid, web_studio In odoo/odoo#111103 the tour system was rewritten. The previous tour system used to depend on the `root.widget` js module, and this module was an async module that indirectly depended on `session_bind` which would load the translations, meaning that t
Original PR description
*: account_accountant, documents, documents_account, helpdesk, hr_expense_extract, hr_payroll, industry_fsm, industry_fsm_sale, planning, sale_renting, sale_subscription, sign, social,…
*: account_accountant, documents, documents_account, helpdesk, hr_expense_extract, hr_payroll, industry_fsm, industry_fsm_sale, planning, sale_renting, sale_subscription, sign, social, stock_barcode_mrp_subcontracting, timesheet_grid, web_studio In odoo/odoo#111103 the tour system was rewritten. The previous tour system used to depend on the `root.widget` js module, and this module was an async module that indirectly depended on `session_bind` which would load the translations, meaning that the js module definition code of the tours would only run after the translations were loaded. This is no longer the case with the new tour system, this means that the module definition code is executed as soon as the dependencies of that module are fulfilled, which is generally before the translations are loaded, causing most tour tips to not be translated. The community commit adds a legacy module that can be imported for the side-effect of loading the translations, and this commit imports that module in the onboarding tours, which causes them to be correctly translated once again. Community: https://github.com/odoo/odoo/pull/124784 Forward-Port-Of: odoo/enterprise#42559 Forward-Port-Of: odoo/enterprise#42440
Steps to reproduce: Set a vendor on purchase tab of a product Set a fiscal position and payment term on the vendor Approvals > Create RFQ Create an RFQ for the product we setup earlier Bug: The RFQ is created for the vendor, but the payment terms and fiscal position are blank Fix: call the onchange to set the payment terms and fiscal position opw-3221681 Forward-Port-Of: odoo/enterprise#42686 Forward-Port-Of: odoo/enterprise#42050
Original PR description
Steps to reproduce: Set a vendor on purchase tab of a product Set a fiscal position and payment term on the vendor Approvals > Create RFQ Create an RFQ for the product we setup earlier Bug: The RFQ is created for the vendor, but the payment terms and fiscal position are blank Fix: call the onchange to set the payment terms and fiscal position opw-3221681 Forward-Port-Of: odoo/enterprise#42686 Forward-Port-Of: odoo/enterprise#42050
… unpaused When unpausing a subscription a log "new" is wrongly created and the graph become wrong. taskid: 3366504 Forward-Port-Of: odoo/enterprise#42354
Original PR description
… unpaused When unpausing a subscription a log "new" is wrongly created and the graph become wrong. taskid: 3366504 Forward-Port-Of: odoo/enterprise#42354
Selecting a contact in VoIP, then folding/unfolding the VoIP window, then calling the contact causes a crash Steps to reproduce: 1. Install VoIP 2. Click on the phone icon in the systray to open the VoIP window 3. Go to the Contacts tab 4. Select a contact by clicking on it 5. Click twice on the top bar of the VoIP window to fold/unfold it 6. Click on the bottom phone button to make a call -> Traceback generate This is because the logic that restores the selection after a tab refre
Original PR description
Selecting a contact in VoIP, then folding/unfolding the VoIP window, then calling the contact causes a crash Steps to reproduce: 1. Install VoIP 2. Click on the phone icon in the systray to open the…
Selecting a contact in VoIP, then folding/unfolding the VoIP window,
then calling the contact causes a crash
Steps to reproduce:
1. Install VoIP
2. Click on the phone icon in the systray to open the VoIP window
3. Go to the Contacts tab
4. Select a contact by clicking on it
5. Click twice on the top bar of the VoIP window to fold/unfold it
6. Click on the bottom phone button to make a call -> Traceback generate
This is because the logic that restores the selection after a tab
refresh is based on the phonecall id. Since contacts are not phonecalls,
they use virtual phonecall ids that are regenerated each time the tab is
refreshed, so the virtual id is not longer valid and the restoration
mechanism fails.
Traceback in sentry :
```
InvalidTextRepresentation: invalid input syntax for type integer: "virtual_phone_call_id_1_53"
LINE 1: ...M "voip_phonecall" WHERE ("voip_phonecall"."id" = 'virtual_p...
^
File "odoo/http.py", line 2116, in __call__
response = request._serve_db()
File "odoo/http.py", line 1698, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "odoo/service/model.py", line 134, in retrying
result = func()
File "odoo/http.py", line 1725, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 1923, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "addons/website/models/ir_http.py", line 234, in _dispatch
response = super()._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 154, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 715, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 28, in call_kw
return self._call_kw(model, method, args, kwargs)
File "addons/web/controllers/dataset.py", line 24, 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 5088, in search_read
records = self.search_fetch(domain or [], fields, offset=offset, limit=limit, order=order)
File "odoo/models.py", line 1538, in search_fetch
return self._fetch_query(query, fields_to_fetch)
File "odoo/models.py", line 3358, in _fetch_query
self.env.cr.execute(query_str, params)
File "odoo/sql_db.py", line 311, in execute
res = self._obj.execute(query, params)
```
This commit fixes the problem by overriding the selection restoration
logic for the Contacts tab to reconcile the selection based on the
partner id rather than the phonecall id.
sentry-4066220991
Forward-Port-Of: odoo/enterprise#42698
Forward-Port-Of: odoo/enterprise#42154