forked from OCA/project
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][BCP] project_forecast_line from 15.0 #6
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85e829e
to
d696a91
Compare
Currently translated at 100.0% (43 of 43 strings) Translation: project-14.0/project-14.0-project_gtd Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_gtd/it/
Currently translated at 100.0% (77 of 77 strings) Translation: project-14.0/project-14.0-project_timesheet_time_control Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control/it/
Currently translated at 100.0% (7 of 7 strings) Translation: project-14.0/project-14.0-project_timesheet_time_control_sale Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control_sale/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: project-13.0/project-13.0-project_purchase_link Translate-URL: https://translation.odoo-community.org/projects/project-13-0/project-13-0-project_purchase_link/
Currently translated at 100.0% (57 of 57 strings) Translation: project-14.0/project-14.0-project_stock Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_stock/it/
188cbb5
to
91f8d9b
Compare
refactor the triggers for recomputation of tasks related to project.task and sale.order.lines to use an override of the _write() method to catch the computed fields changes. remove overrides of analytic line creation / update add a call to project.task::flush() in the test to force the recomputation add a call to project.project::flush() after changing the project stage to force the recomputation remove the utils module reduce mail in the tests (tracking_disable=1) make prepare_forecast_lines private
1. when only the remaining time of a project task is updated (e.g. when a user timesheets) then use a quick update that will compute the new forecast_hours on each line for the employee by applying a ratio new_remaining_hours / old_remaining_hours 2. in the normal path of forecast.line::_update_forecast_lines we write some values on the lines. This can trigger the recomputation of employee_resource_forecast_line_id which takes a significant amount of time -> avoid needless recomputation by avoiding a write of unchanged values
add a mixin class to meld in models which generate forecast lines
in that case we must recreate the employee role forecast lines
speed up leave approbation by only recomputing the forecast lines in the period of the leave
use ondelete='cascade' to handle the unlinking of forecast.line records
when running in multi company, sometimes the user making a change is not connected using the company of the record. In this case the default value for company_id on forecast.line will lead to a wrong forecast. we fix this by using the best company when updating the forecast (the employee's company for task assigned to employees or leaves, the sale line's company for sales forecast
the condition was wrong, preventing the fast update from being used when only the remaining time is updated
when using the quick update, we would get an inversion of the sign of the forecast because the ratio was negative
do not mix forecast.role, hr.employee.forecast.role when assigning an hr.job to an hr.employee, Fixed bug by adding hr.group_hr_user group to field not available in hr.employee.public, loop protection against duplicate forecast line creation holidays test: somehow hr.leave.action_validate does not trigger hr.employee.forecast.role forecast line recreation, add an explicit trigger for this. Also add 2x loop protection on write
…le in hr.employee.public
3436ee4
to
2ae9ed9
Compare
2ae9ed9
to
7c389c0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.