4d2cb0ae829067ea17ad3fc26f7b80c7beafd2b9
Current behaviour: Search filter is not showing correct results for projects that are in overtime. Some projects that are not in overtime are not shown. Expected behaviour: Search filter for projects that are in overtime should work correctly. Steps to reproduce: - Install Project, Timesheets - In one of the projects, create a task in an "In Progress" stage - Add an employee on it, planned hours to 1h, and log in the timesheet 50 hours (so the task is clearly in overtime of 49h) - In that task, add an employee, planned hours to 50h - In the same project, create a task in a folded stage, log in the timesheet 1h (the task is +49h remaining hours in the green) - Fold the stage when done editing the stage. - In the project default view, we can clearly see that the project is in the red (-49h). - Filter based on overtime, the project is not present in the results Reason for the problem: There is a divergence of behaviour between the compute and the search method of the `is_project_overtime` on the project. The compute takes only the overtime of the tasks that are not in a folded stage. While the search is query all the tasks of the project, regardless of stage and summing those to deternine if the project is in overtime. So if you have 2 tasks, one in a folded stage and the other not, that have `remaining_hours` that are cancelling each other, the search result is incorrect for that project Fix: Update the SQL query in the search method for `is_project_overtime`, to reflect the domain conditions from the compute about the stages. Affected versions: - saas-15.2 - 16.0 - saas-16.1 - master opw-3182077 closes odoo/odoo#116992 X-original-commit: 69f1441133e30b8dc0cc331afcec933d694665e0 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com> Signed-off-by: Piryns Victor (pivi) <pivi@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%