Monday, January 3, 2022
34 changes · master
New functionality added to Odoo
Odoo can now sort records more flexibly when some values are empty, allowing those blank entries to appear last instead of first. This helps businesses present ranked lists, scores, and similar data in a more natural and useful order.
Original PR description
Description of the issue/feature this PR addresses: Allow more dynamic SQL searches on `_order` Current behavior before PR: You cannot order by `nulls last` since it is not required in the core from Odoo. Desired behavior after PR is merged: You can order by `nulls last` as it is supported. Example without `nulls last`: ``` name | score -------------------+---------------------- abc | def | 6.76 xxx | 5.8 ``` Example with `nulls last`: ``` name | score -------------------+---------------------- def | 6.76 xxx | 5.8 abc | ``` Fixes https://github.com/odoo/odoo/issues/51000 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Enhancements to existing features
Survey administrators will no longer see awkward line-break characters in technical field guidance for conditional questions and invite recipients. This makes the advanced configuration screens clearer and easier to understand without changing survey behavior.
Original PR description
PURPOSE Improve the technical tooltips of domain in triggering_question_id of survey.question and in partner_ids of survey.invite SPECIFICATION Current: A weird domain with '\n' is visible in UI of survey for triggering_question_id, partner_ids. To BE: Remove '\n' from the domain and improve the domain UI view. TaskId-2704057 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
This fix prevents the Mail app from crashing when a user edits a message while the file uploader is involved. It improves reliability in conversations and helps users continue editing messages without interruption.
Original PR description
task-2726182
Code cleanup and technical improvements
The website shop module's internal Python files were split, renamed, and moved into clearer locations. This does not change customer-facing behavior, but it makes the code easier to maintain and prepares the module for future improvements.
Original PR description
Split and reorder a bit website_sale python files before future work in this module :) -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Automated action with a many2many field and reference evaluation can be created but don't work Steps to reproduce: 1. Install Automated Action Rules module and Contacts app 2. Create an automated action for model 'Contact' with trigger 'On Creation' and action 'Update the Record' 3. Add a line to the automated action 'Data to Write' for the field 'Tags (res.partner)' with evaluation type 'Reference' 4. Go to Contacts, create and save a new one 5. An error is raised when trying to execute
Original PR description
Automated action with a many2many field and reference evaluation can be created but don't work Steps to reproduce: 1. Install Automated Action Rules module and Contacts app 2. Create an automated action for model 'Contact' with trigger 'On Creation' and action 'Update the Record' 3. Add a line to the automated action 'Data to Write' for the field 'Tags (res.partner)' with evaluation type 'Reference' 4. Go to Contacts, create and save a new one 5. An error is raised when trying to execute the automated action Solution: Raise an error when a many2many field is of evaluation type 'Reference' OPW-2673939 Forward-Port-Of: odoo/odoo#82035
Test runs now record browser console errors in the regular logs as soon as they happen. This makes failed automated website tests easier to diagnose and should reduce time spent investigating test failures.
Original PR description
When running test tours, logging a message to `console.error` causes the test tour to fail. Only one such message can cause the tour to fail, if other message are written on the console they are simply logged in the odoo logs. The offending message, however, is only shown at the end of run, as part of the failing test logs. Arguably, it is better to include it in the browser logs as well.
Point of Sale settings now let businesses decide whether regular cashiers can see product costs and margins. The option stays enabled by default to preserve existing behavior, but when turned off only PoS managers can access this sensitive profitability information.
Original PR description
Currently, the fact that PoS displays to any PoS users the costs and margins of product (new information popup) makes it difficult to sell in LATAM countries. In this commit we address this issue by adding the 'Costs & Margins' field in the settings of each PoS terminal. When this field is disabled, only PoS users with manager access rights will be able to view the costs and margins data in the information popup. In order to be compatible with previous behaviour this option is enabled by default. For this reason, default behaviour is that every PoS user will have access to the costs and margins of the products. task-2672063 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Sales invoice creation from advance payment workflows was improved so related invoices can be accessed more reliably and use the correct company from the sales order. Internal project names now show the company only when multiple companies exist, reducing clutter for single-company users.
Original PR description
Prior to this commit it was not possible to get a hook from sale.advance.payment.inv in order to get the created invoices. The create_invoices def returns either an action or an ir.actions.act_window_close The introduction of the _create_invoices def will allow to get the created invoices from the wizzard. task-2608812 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Field service teams get clearer worksheet navigation, better filtering, and more helpful labels across planning, worksheets, tasks, quotations, and invoices. The changes reduce manual effort and make it easier to identify the right projects, companies, documents, and signed customer reports.
Original PR description
* {helpdesk,industry}_fsm, industry_fsm_{report,sale}, worksheet **PURPOSE** Generic improvements for field services. **SPECIFICATION** In planning menus, - Extend the search on the fields like a…
* {helpdesk,industry}_fsm, industry_fsm_{report,sale}, worksheet
**PURPOSE**
Generic improvements for field services.
**SPECIFICATION**
In planning menus,
- Extend the search on the fields like a project, worksheet template so
that an empty line is displayed (no results) even if the search doesn't return
anything.
For configuration > worksheet templates > worksheets
- Apply a default group by created on > month
- Add a filter 'created on'.
- Display a field's('x_project_task_id') value as a title and make it 'readonly'.
- While clicking on worksheet stat button, the form view will be opened if the
number of worksheets = 1, else the list view and also remove creation of new
record.
- Display a 'create date' field to the list view of worksheets.
- Display project name with a company name by default.
- When new invoice/quotation is created from the task, log will be like "Invoice
created/Quotation created: name_of_quotation". And name will be clickable if
user has necessary access rights to read.
- Add a menu item 'Activity Types' below the configuration > tags one.
- Rename the 'worksheet completed' stat button into 'worksheet complete'.
- Display the fa-globe icon of the 'customer preview' stat button in green
once the worksheetreport is signed.
- Indicated the name of the task in the 'source document' field(origin) when a
new SO is created form that task.
- Disabled the creation of new records from the 'ticket' stat button.
task-2608812
Related PR: odoo/odoo#79926Helpdesk users now see clearer, more helpful validation messages when logging timesheets or working with tickets. The update also hides the forum post button when the Community Forum feature is turned off, reducing confusion and improving the support workflow.
Original PR description
*- = website_helpdesk_forum purpose: User/validation errors are sometimes not correct in English and/or quite obscure and don't help the user understand/solve the issue. Some copywriting should help make the experience better. In addition, some errors could also be avoided beforehand to provide a better ux. In this commit: - Rename the validation error from 'A timesheet cannot be linked to a task and a ticket at the same time.' to 'You cannot link a timesheet entry to a task and a ticket at the same time.' after adding helpdesk_ticket_id field from custom field in timesheets tree view - Hide the 'Forum Post' stat button when 'Community Forum' feature is disabled task-2615468
Planning now shows clearer, more helpful messages when users enter invalid shift or recurrence details. It also prevents some confusing actions up front, such as hiding publish options when no resources are selected and allowing tasks with shifts to be deleted without blocking the user.
Original PR description
*- = project_forecast The purpose of this commit is, to improve the statements of user/validation errors as sometimes they are incorrect in English or obscure and can be confusing for the user to…
*- = project_forecast The purpose of this commit is, to improve the statements of user/validation errors as sometimes they are incorrect in English or obscure and can be confusing for the user to understand the issue. Also some errors could be avoided beforehand to provide better UX. In this commit, made the following changes: - rename "You cannot have negative shift" to "Allocated hours and allocated time percentage cannot be negative." - rename "Shift end date should be greater than its start date" to "The end date of a shift should be after its start date." - rename "The recurrence until date should be after the shift start date" to "The recurrence's end date should fall after the shift's start date." - rename "Recurrency repeat interval should be at least 1" to "The recurrence cannot be negative.", display message when value is negative. - rename "Start hour must be a positive number" to "The start hour cannot be negative." - rename "You cannot have a negative duration" to "The duration cannot be negative." - rename "You cannot have a start hour greater than 24" to "The start hour cannot be greater than 24." - rename "This action is not allowed as there are no shifts planned for the selected time period." to "The shifts have already been published, or there are no shifts to publish.", display a red toast notification. - rename "There are no shifts to send or publish." to "The shifts have already been published, or there are no shifts to publish." - rename "There are no shifts to copy or the previous shifts were already copied." to "The previous shifts have already been copied, or there are no shifts to copy." - when we try to delete a task containing shifts, instead of rasing error the shifts are unlinked from the task. - "Publish & Send" button is made invisible if the resources field is empty. task-2615466
This update improves how extracted invoice words are stored so they can be found more quickly and handled more reliably. It should make invoice extraction support smoother without changing how users work with the system.
Original PR description
…n words The `index` will improve the performances to retrieve the words. The `required` and `ondelete` should have been there from the start.
This update makes an internal calendar test more reliable by ensuring the test scrolls to the calendar event before clicking it. This helps prevent false test failures and supports smoother ongoing development without changing the user-facing calendar experience.
Original PR description
This commit fixes the calendar test "select events and discard create" which was crashing certainly because the event we want to click on was out of the screen at this moment. Calendar tests use positional mouse[down|up] events to simulate clicks on events so we need first to scroll to the wanted event before clicking on it.
2 issues: - When going to the report forecast the value of the stock is computed. However the stock user should not be able to access the valuations - Since an access error is return the graph view is not instanciate and the javascript code try to amend an empty result to the DOM. It results with a traceback on top of 403 page Forward-Port-Of: odoo/odoo#82053
Original PR description
2 issues: - When going to the report forecast the value of the stock is computed. However the stock user should not be able to access the valuations - Since an access error is return the graph view is not instanciate and the javascript code try to amend an empty result to the DOM. It results with a traceback on top of 403 page Forward-Port-Of: odoo/odoo#82053
Current behavior : When creating payment from invoice, the payment had the wrong sales team id Steps to reproduce : - Create atleast 2 invoices with different sales team and same partner - Register payments for every invoice - Go in payments list view - Filter on partner and group by sales team - All the payments are grouped in the same sales team opw-2681041 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82083
Original PR description
Current behavior : When creating payment from invoice, the payment had the wrong sales team id Steps to reproduce : - Create atleast 2 invoices with different sales team and same partner - Register payments for every invoice - Go in payments list view - Filter on partner and group by sales team - All the payments are grouped in the same sales team opw-2681041 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82083 Forward-Port-Of: odoo/odoo#81593
Steps to reproduce: - Install Fleet - Go on report-cost - Click on a specifi vehicles -> The cost associated are not correct Solution: Correction of the SQL-query which was not correct (id not unique) 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#81644
Original PR description
Steps to reproduce: - Install Fleet - Go on report-cost - Click on a specifi vehicles -> The cost associated are not correct Solution: Correction of the SQL-query which was not correct (id not unique) 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#81644
Step to reproduce: - Duplicate expense with a uom different of Unit Current behaviour : - Error telling that the unit is not correctly chosen Behaviour After PR: - The uom is copied on duplication and no error opw-2714136 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81638
Original PR description
Step to reproduce: - Duplicate expense with a uom different of Unit Current behaviour : - Error telling that the unit is not correctly chosen Behaviour After PR: - The uom is copied on duplication and no error opw-2714136 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81638
When reversing the CABA entry, the CABA transition account was replaced by the final tax account if not set on the repartition line. Introduced by https://github.com/odoo/odoo/pull/79556 issue: 2718413 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81986 Forward-Port-Of: odoo/odoo#81983
Original PR description
When reversing the CABA entry, the CABA transition account was replaced by the final tax account if not set on the repartition line. Introduced by https://github.com/odoo/odoo/pull/79556 issue: 2718413 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81986 Forward-Port-Of: odoo/odoo#81983
Before the PR, when replying to an empty (only attachment) nothing was display in the message reply preview. This PR introduce a placeholder to handle this case. task-2664815 Forward-Port-Of: odoo/odoo#81989 Forward-Port-Of: odoo/odoo#81217
Original PR description
Before the PR, when replying to an empty (only attachment) nothing was display in the message reply preview. This PR introduce a placeholder to handle this case. task-2664815 Forward-Port-Of: odoo/odoo#81989 Forward-Port-Of: odoo/odoo#81217
PURPOSE To improve the UI of survey_question form. Specification: Current: There is duplication of scored label and all fields are not inline. To Be: There is a single label, the integer and boolean are on the same line, we display the score only if the option is activated Taskid-2704057 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81447
Original PR description
PURPOSE To improve the UI of survey_question form. Specification: Current: There is duplication of scored label and all fields are not inline. To Be: There is a single label, the integer and boolean are on the same line, we display the score only if the option is activated Taskid-2704057 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#81447
…nd reference evaluation Automated action with a many2many field and reference evaluation can be created but don't work Steps to reproduce: 1. Install Automated Action Rules module and Contacts app 2. Create an automated action for model 'Contact' with trigger 'On Creation' and action 'Update the Record' 3. Add a line to the automated action 'Data to Write' for the field 'Tags (res.partner)' with evaluation type 'Reference' 4. Go to Contacts, create and save a new one 5. An error is r
Original PR description
…nd reference evaluation Automated action with a many2many field and reference evaluation can be created but don't work Steps to reproduce: 1. Install Automated Action Rules module and Contacts app 2. Create an automated action for model 'Contact' with trigger 'On Creation' and action 'Update the Record' 3. Add a line to the automated action 'Data to Write' for the field 'Tags (res.partner)' with evaluation type 'Reference' 4. Go to Contacts, create and save a new one 5. An error is raised when trying to execute the automated action Solution: Raise an error when a many2many field is of evaluation type 'Reference' OPW-2673939 (This PR is a duplicate of https://github.com/odoo/odoo/pull/82035 which for some reason couldn't do the forward ports) Forward-Port-Of: odoo/odoo#82139
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#81897
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#81897
*: web_editor, pos_restaurant The grab cursor is currently not working on all browsers (at least Chrome Linux). The fallback rule does not even work, meaning that if you type: ``` cursor: move; cursor: grab; ``` Those browsers does not even use "move" as they see "grab" as valid but use the "default" cursor. This commit replaces our "grab" uses with a local cursor ensuring it works. Related to task-2431469 Forward-Port-Of: odoo/odoo#82071 Forward-Port-Of: odoo/odoo#82060
Original PR description
*: web_editor, pos_restaurant The grab cursor is currently not working on all browsers (at least Chrome Linux). The fallback rule does not even work, meaning that if you type: ``` cursor: move; cursor: grab; ``` Those browsers does not even use "move" as they see "grab" as valid but use the "default" cursor. This commit replaces our "grab" uses with a local cursor ensuring it works. Related to task-2431469 Forward-Port-Of: odoo/odoo#82071 Forward-Port-Of: odoo/odoo#82060
Before this commit, the `test_05_google_analytics_tracking` tour would often fail, due to some race condition. Rewritting the test to make it (a lot) simpler, should get rid of the race condition. task-2726482 Forward-Port-Of: odoo/odoo#82163
Original PR description
Before this commit, the `test_05_google_analytics_tracking` tour would often fail, due to some race condition. Rewritting the test to make it (a lot) simpler, should get rid of the race condition. task-2726482 Forward-Port-Of: odoo/odoo#82163
Before this commit temporary id could match an existing attachment id and replace that attachment by the new uploaded one. Even if this is very unlikly, using a negative id avoid it completly. Forward-Port-Of: odoo/odoo#82150 Forward-Port-Of: odoo/odoo#81891
Original PR description
Before this commit temporary id could match an existing attachment id and replace that attachment by the new uploaded one. Even if this is very unlikly, using a negative id avoid it completly. Forward-Port-Of: odoo/odoo#82150 Forward-Port-Of: odoo/odoo#81891
Prior to this commit: - When no user_id were set on the project, a with blank space was shown at the bottom right of the kanban card. After this commit: - When no user_id is set on the project, the kanban status is move at the bottom right of the kanban card. task-2703632 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#82181 Forward-Port-Of: odoo/odoo#80691
Original PR description
Prior to this commit:
- When no user_id were set on the project, a with blank space was shown at
the bottom right of the kanban card.
After this commit:
- When no user_id is set on the project, the kanban status is move at the
bottom right of the kanban card.
task-2703632
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#82181
Forward-Port-Of: odoo/odoo#80691Currently, when clicking on SLA Field numbers on the helpdesk kanban overview it generates a traceback due to an invalid argument in AND expression. so in this commit fix the argument for AND expression. task-2712024 Forward-Port-Of: odoo/enterprise#22820
Original PR description
Currently, when clicking on SLA Field numbers on the helpdesk kanban overview it generates a traceback due to an invalid argument in AND expression. so in this commit fix the argument for AND expression. task-2712024 Forward-Port-Of: odoo/enterprise#22820
Steps to reproduce: go to timesheets > settings > change the encoding unit to 'days' go to the 'all timesheets' menu and encode a few timesheets Observed behavior: when clicking on a cell, the new total is quickly displayed and then is reset to the previous value clicking on another cell makes the new total appear again Expected behavior: the new total should remain displayed after clicking on a cell task-2522612 Forward-Port-Of: odoo/enterprise#23207 Forward-Port-Of: odoo/enterpr
Original PR description
Steps to reproduce: go to timesheets > settings > change the encoding unit to 'days' go to the 'all timesheets' menu and encode a few timesheets Observed behavior: when clicking on a cell, the new total is quickly displayed and then is reset to the previous value clicking on another cell makes the new total appear again Expected behavior: the new total should remain displayed after clicking on a cell task-2522612 Forward-Port-Of: odoo/enterprise#23207 Forward-Port-Of: odoo/enterprise#22101
The grab cursor is currently not working on all browsers (at least Chrome Linux). The fallback rule does not even work, meaning that if you type: ``` cursor: move; cursor: grab; ``` Those browsers does not even use "move" as they see "grab" as valid but use the "default" cursor. This commit replaces our "grab" uses with a local cursor ensuring it works. Related to task-2431469 Forward-Port-Of: odoo/enterprise#23182 Forward-Port-Of: odoo/enterprise#23175
Original PR description
The grab cursor is currently not working on all browsers (at least Chrome Linux). The fallback rule does not even work, meaning that if you type: ``` cursor: move; cursor: grab; ``` Those browsers does not even use "move" as they see "grab" as valid but use the "default" cursor. This commit replaces our "grab" uses with a local cursor ensuring it works. Related to task-2431469 Forward-Port-Of: odoo/enterprise#23182 Forward-Port-Of: odoo/enterprise#23175
Forward-Port-Of: odoo/enterprise#23098
Original PR description
Forward-Port-Of: odoo/enterprise#23098
PR #22964 introduced new health indexes for 2022. This commit fixes the test that was failing as it was using values from 2021. TaskID: 2717439 Forward-Port-Of: odoo/enterprise#23208
Original PR description
PR #22964 introduced new health indexes for 2022. This commit fixes the test that was failing as it was using values from 2021. TaskID: 2717439 Forward-Port-Of: odoo/enterprise#23208
Current behaviour: When trying to download a signed document you had a Error 500 Steps to reproduce: -Go in sign/document -Find a fully signed document -Try to download it opw-2720807 Forward-Port-Of: odoo/enterprise#23166
Original PR description
Current behaviour: When trying to download a signed document you had a Error 500 Steps to reproduce: -Go in sign/document -Find a fully signed document -Try to download it opw-2720807 Forward-Port-Of: odoo/enterprise#23166
With the dynamic data based on the date of execution of the test, it's possible that the time set will overlap with the previous or next week. To avoid this, we set the date of the event as the 5th January of the next year between 10 and 11 AM and also one event a week after. Indeed, for example the end of the week is a saturday and the start of the week a sunday. Then if the test is executed during the night at 1 AM, it was possible that the events were located in previous week. This
Original PR description
With the dynamic data based on the date of execution of the test, it's possible that the time set will overlap with the previous or next week. To avoid this, we set the date of the event as the 5th January of the next year between 10 and 11 AM and also one event a week after. Indeed, for example the end of the week is a saturday and the start of the week a sunday. Then if the test is executed during the night at 1 AM, it was possible that the events were located in previous week. This was leading to an error as the test couldn't find the event in the view. Forward-Port-Of: odoo/enterprise#22954
mps add a button to MPS report however the demo user don't have access to it by default so it raise a Access Error Forward-Port-Of: odoo/enterprise#23168
Original PR description
mps add a button to MPS report however the demo user don't have access to it by default so it raise a Access Error Forward-Port-Of: odoo/enterprise#23168