Skip to content
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
merged 147 commits into from
Jan 29, 2024

Conversation

thomaspaulb
Copy link
Member

No description provided.

@thomaspaulb thomaspaulb force-pushed the 14.0-backport-project_forecast_line branch from 85e829e to d696a91 Compare June 26, 2023 19:45
mymage and others added 23 commits June 29, 2023 14:10
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/
Signed-off-by pedrobaeza
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/
Signed-off-by max3903
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/
@thomaspaulb thomaspaulb force-pushed the 14.0-backport-project_forecast_line branch from 188cbb5 to 91f8d9b Compare July 12, 2023 23:12
moitabenfdz and others added 4 commits July 15, 2023 12:29
gurneyalex and others added 26 commits January 16, 2024 11:28
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
@ntsirintanis ntsirintanis force-pushed the 14.0-backport-project_forecast_line branch from 3436ee4 to 2ae9ed9 Compare January 16, 2024 10:28
@ntsirintanis ntsirintanis force-pushed the 14.0-backport-project_forecast_line branch from 2ae9ed9 to 7c389c0 Compare January 16, 2024 11:25
@ntsirintanis ntsirintanis merged commit 523ead0 into 14.0 Jan 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.