Current behaviour:
When duplicating a project, new milestones are copied for the new
project, but none of them are assigned to the copied tasks like in
the original project.
Expected behaviour:
The new tasks in the new project should have the corresponding copy
of the milestone that were assigned in the original project.
Steps to reproduce:
- Install Project
- Duplicate "Office Design" (it has milestones)
- Observe that the tasks in the new project don't have milestones
assigned to them, like in the original project.
Reason for the problem:
When we copy the tasks, they have the milestones of the original
project correctly assigned to them, but since the project of the
milestone is different from the project of the task (former
references the original project, while the latter references the
copied project), so in `_compute_milestone_id`, the milestone of the
task is set to False.
Fix:
Remove `copy=True` from `milestone_ids` on the project, and copy the
milestone by hand. This allows us to use an overwrite of `copy()`
for `project.milestone`, and we create a mapping between the old
milestones and the new ones in the context, similar to how we did
with `task_mapping`. With this we can assign the newly created
milestones on the copied tasks correctly (while preserving the
mapping like in the original project).
Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- master
opw-3254868
closesodoo/odoo#118487
X-original-commit: aad60a2c8a887f3ea226af99be9b162673c33ec8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Purpose of this commit is to improve the generic usage of the project app.
So in this commit done the following changes:
- add done task count field in milestone and display it in milestone form view
stat button all tasks under this milestone and the done tasks of the milestone.
- rename 'project.project' form view field lable from 'Name of the tasks' to
'Name of the Tasks'.
- add 'invoiced' column in the project update description under the sales section.
- remove helper for 'project.project' name field in form view.
- add a placeholder in the 'project.task' form view.
task-3073860
closesodoo/odoo#107076
Related: odoo/enterprise#34593
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Purpose of this PR to improve the generic usage of project app
So in this commit done the following changes:
- when a project is archived, the 'tasks' stat button should
count/show archived tasks
- when delete project it's milestone should also be deleted automatically.
- project.task > blocked by notebook: it should be possible to select tasks
in projects that are not allowing 'task dependencies'
- project.task portal form view: hide the description if it is empty
task-2853991
closesodoo/odoo#94138
Related: odoo/enterprise#28654
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit, when all tasks linked to the milestone are done, it
means all tasks are in a closed stage. Then, the user has no visual
feedback to know if all tasks linked to the milestone are done to be
sure he can mark the milestone has reached without missing a task to
complete.
This commit checks if all tasks of unreached milestones shown in the
project update are done or not. If it is the case the milestone is
greened to show to the user that milestone can be marked as reached.
task-2829542
Before this commit, the milestones are only linked to a project without
any link to the tasks of the same project. However, the tasks could be
considered as steps to reach a project milestone.
This commit adds a link between the `project.task` and
`project.milestone` models. This link is added in the `project.task`
model with the Many2One field called `milestone_id`. With this field,
the user will be able to link a milestone to a task.
task-2829542
Currently, a service can be configured to be invoiced on milestones.
This means that the user has to manually update the delivered quantity on the SO in order to invoice it.
We now also have the notion of milestones in the project module.
It would be nice to have a link in between the milestone and the corresponding SOL, so that the delivered quantity is automatically updated when the milestone is reached.
This would help the users save time, limit the risk of error and reduce the confusion of having unrelated milestones at two different places.
To this end, this commit adds a new "milestones" invoice policy that computes the delivered quantity of a SOL based on the milestones that have been reached, and renames the previous "milestones" policy into "manual".
Task-2558889
Closes https://github.com/odoo/odoo/pull/81684closesodoo/odoo#81684
Related: odoo/upgrade#3265
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Purpose of the commit is to do the generic improvement for the
project:
So in this commit, done the following changes:
- duplicating a project, copy all milestone of project and
set is_reached and deadline field as 'False'.
- chanage the order of the state button in sale order form view.
- pass mail body as default description value in message_new
method of project task.
task-2652943
closesodoo/odoo#77065
Related: odoo/enterprise#21199
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit adds a right panel in the project update view.
This is done by extending each View and Controller by mixins handling
the RightPanel functionnality.
In the RightPanelControllerMixin, we use the component Adapter to launch
the Owl RightPanel Component from a Legacy Controller.
This solution is based on SearchPanel and ControlPanel implementation.
In the RendererMixin we handle some styling just as it's done for the
SearchPanel.
In the ViewMixin, we add the handling of a RightSidePanel config
parameter which is passed to the Controller via params.
The Project RightPanel Component gets information about the active
project in the context through a rpc call and render the resulting data
in a owl template. This template doen't have the ambition to be generic
but only specific to this view.
Serverside, the data are collected in a dict through few methods in
order to be easily extended.
Mixins are used in kanban and list views, each time a project update
view is added, the developper will have to extend the dedicated View,
Renderer and Controller.
PR: #68899
task-2393768
This commit adds project updates in project to take in stock the current
status of the project : which task or milestone changed in the past 30
days.
The project manager is able to add a status on the project update, and
edit the description of the update. There is also a chatter in which
he/she can discuss some points with other project users.
The description is build with informations retrieved from mail tracking
values or from project.* models. Those informations are collected in a
dict and rendered in a template to ease the inheritence in further
modules needs.
Following commits will add behaviour to handle those updates and
milestones in the various views. See PR for further information.
PR : #68899
task-2393768