-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
[MIG] project_forecast_line: migration to 16 #1140
Conversation
514d2c6
to
5004bc2
Compare
Project HR ========== This is a technical module for adding some HR information to projects and provide technical fields with HR information: - Employee categories at project and task level. - Employee linked to the user assigned to a task. - Employee categories at user level. These fields can be used later for extra features like task scheduling or security restrictions. It also provides some facilities on project management: * Limit selection of assigned users according selected employee category at task level. * Limit selection of employee categories at task level depending on the selected categories at project level. All are shown if no categories at project level. Configuration ============= For setting employee categories at project level: 1. Go to *Project > Dashboard*. 2. Click on the 3 vertical dots for unfolding options and select "Settings". 3. Put the wanted employee categories on the field "Employee Categories". For setting employee categories: 1. Go to *Project > Search > Tasks*. 2. Select or create a new task. 3. Put the wanted employee categories on the field "Employee categories". 4. If there's already some employee categories selected at project level, those will be the only selectable ones in the task. Usage ===== 1. Go to *Project > Search > Tasks*. 2. If there's an employee category selected in the task, you will only be able to select those users whose employee belongs to that category. Known issues / Roadmap ====================== * Limit project and task visibility according employee categories through overriding security methods (as through record rules is not possible without modifying existing ones).
…oyee is not active
add demo data to the module to help making demos closes: OCA#990
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
Fix an issue in project_forecast_line where lines would be removed by the cron. When an employee has a forecast role with an end date set, depending on the order of the processing of records in the cron, a bug could remove forecast lines of other employees when attempting to remove the forecast lines related to thatrole which had been generated after the end date in previous runs (before the end date was set). Fix this by using the correct domain.
ffe8cc6
to
7331cf5
Compare
/ocabot migration project_forecast_line |
@@ -538,7 +569,7 @@ def setUpClass(cls): | |||
# flush needed here to trigger the recomputation with the correct | |||
# frozen time (otherwise it is called by the test runner before the | |||
# tests, outside of the context manager. | |||
cls.task.flush() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, flush_recordset() is more correct (on all calls).
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
No description provided.