d300a0a021bf5b36121428013a52a4463029835a
When submitting a rating without submitting a feedback, the value of the field "rating_last_value" is not updated, because the rating values are not yet updated in the database when the method _compute_rating_last_value is called. Steps to reproduce ------------------ The following steps are for an helpdesk ticket, but it should behave the same way on all models implementing the rating mixin. 1. Create a ticket in a team with a stage with the default rating email template. 2. Move it to the stage with the template (it should create a rating email) 3. Use the email to submit a rating. 4. When you get to the feedback page, close it without doing anything. 5. Go to your ticket's form view => the rating you submitted correctly appears in the stat button. 6. Go back to the team, and filter tickets by "No Rating" => your ticket appears, despite having a rating. Expected behavior ----------------- The field "rating_last_value" should have the value of the last rating submitted. Technical --------- This commit adds a flush right before the SQL query in `_compute_rating_last_value` to make sure the rating values are up to date in the database before the query is executed. It also updates the test for rating submissions to also check the rating_last_value, and creates a new test for the route currently used in the first step of a rating. Task-2880707 closes odoo/odoo#93846 X-original-commit: 2b3b840cdb2721759552c6b0003bcd2a69c9b34f Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com> Signed-off-by: Larcin Vincent (vila) <vila@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%