51f8d2a7e865d4d2a4b0519943189bc4de661d47
If a project had a single rating associated to its tasks, opening the customer rating view would create a traceback. This happened because both the mail.thread model and the rating.parent.mixin model have a rating_ids field, and project inherits from both of them (mail.thread on its own doesn't have it, but the rating mixin adds it). In the action_view_all_rating method, we try to access the first element of the rating_ids recordset, if the rating_count field is equal to 1. But since the rating_ids field belonged to the mail.thread mixin, and not to the rating.parent.mixin, there could be occurences where rating_count was equal to 1 while the recordset was actually empty ; accessing the first element of the recordset would then create a traceback. To fix this, the rating.parent.mixin model was put before the mail.thread model in the _inherit list, this way the rating_ids field from rating.parent.mixin has the priority. A test was also added to check if the rating_ids is working correctly. task-3360029 closes odoo/odoo#127243 X-original-commit: 1039c80a8ff5e219e9c2679505015288c8d8dd35 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%