Before this commit, the group by in the gantt view of project didn't
allow the user to find records for which there were not scheduled tasks.
For example, if a Sale Order didn't have a scheduled task, when grouping
by Sale Order, the latter was not displayed. And searching for its name
was not displaying it either.
After this commit, when a user is searching for a sale order, even if
the latter does not have any scheduled task, it is displayed in order to
facilitate the scheduling of new tasks.
In order to do so, a group expand on sale_order_id for the project.task
model have been introduced.
closesodoo/odoo#121819
Taskid: 3251630
Related: odoo/enterprise#41257
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, the conversion from a subtask to a standalone task
or the opposite was possible in debug mode. In order to provide for
users a way to convert task to subtask or the opposite without polluting
the interface, a action is added. Also, when the user clicks on search
more on a many2one field pointing on `project.task`, if the active_model
and the active_id are defined then if we will try to load the last
update status by using `active_id` even if `active_model` is not the
`project.project` model.
This commit adds a action that opens a form dialog. The user
can choose to put a parent task or not. If not, the task becomes a
standalone task. Otherwise, the selected parent task becomes the parent.
This commit adds also an additional check before loading and displaying
the last update status of the project active to be sure the `active_id`
is the id of a project, that is, `active_model` has to be equal to
`project.project` to be able to load the last project update status.
Moreover, a UI change in the stat button showing the number of subtask
is modified in order to display also the number of closed sub tasks.
task-3251617
closesodoo/odoo#120911
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Currently, the field date_last_stage_update is updated when the state of the task is changed,
but only if the target stage is a closing state.
It could however be useful to know when the state was last changed regardless of if it's closing or not.
This commit makes it so that the field is updated after any state change.
Task-3455177
Part-of: odoo/odoo#130880
Before this commit 'project.task' model 'planned_hours' field
is inconsistent to the 'allocated_hours' field.
After this commit rename the 'planned_hours' to 'allocated_hours'
and related string change to 'Allocated Time'.
task-3231680
closesodoo/odoo#120405
Related: odoo/upgrade#4617
Related: odoo/enterprise#40643
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This will improve the following generic UX
- rename 'personal user stage' into 'personal stage' for private task
- added the 'personal stage' field to the right of the stage optional=hide
- earlier gantt view open with the user now it will open with groupby project
- removed groupby stage in pivot view
- rename 'undefined' into 'private' for graph view of private task
task-3251648
closesodoo/odoo#120094
Related: odoo/upgrade#4607
Related: odoo/enterprise#40515
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
As sub-tasks are a sub-set of a task that should logically be completed
for the parent task to be completed, it would make sense for the
sub-tasks to share the same milestone as their parent task by default.
The milestone of a parent task is automatically set to its subtasks if:
- The subtask has no milestone set
- AND They belong to the same project or the subtask has no project set
- OR they shared the same milestone before the change on the parent
task (side effect for that case: if an invalide milestone is set on the
parent task, both parent task's and subtasks' milestones which are equal
are gonna be reset)
task-3450281
closesodoo/odoo#130439
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, when deleting a task with subtasks, only the parent
task was deleted. As child tasks are the required to have the same
project_id as their parent, they could end up views of another project
with no clear link to it. Generally speaking, keeping child task, when
their container (parent task) is removed does not make sense.
Therefore, this commit changes the default behavior for task
deletion. When a parent task is removed, all its child tasks are removed
as well. To avoid such a behavior in exceptional situation where child
task can make sense without their parents, the user first need to remove
this link before unlinking the parent task.
A warning is added in all the views where a task can be deleted (form,
calendar and list) to warn the user of this new behavior when he deletes
a task.
task-3044991
closesodoo/odoo#121260
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
_*: hr_timesheet,sale_project,sale_timesheet
Generally, you don't want subtasks to be displayed at the same level
as their parent tasks. You want to consider the subtasks as part of
their parent's project, but don't want to see them directly in this
project. Rather, you want them to be accessible only via their parent.
(There are exceptions to that and we want to stay flexible.)
First solution that comes to mind is to have `project_id` set to False
for the latter tasks, but then how to get the value of the fields that
are related to the project?
So, second solution would be to have a field `project_root_id`,
which would be the project of the parent, or the grand-parent, etc.
The issue now is that we have to fields "project", and it isn't obvious
when to use one or the other.
The most simple way to answer this need is to keep one field "project",
that will always be set for (non-private) tasks,
and create a boolean field : `display_in_project`.
But we want it to be technical (no checkbox in the view).
So, when the user unsets the project on a subtask, the view will act
as if the project was unset, but in the back-end,
we'll set `display_in_project` to False and set `project_id` back.
The fact that all tasks have a project allows us to know if action x
can be perform on this task t, dependind on t.project_id.allow_x.
task-3367246
closesodoo/odoo#128281
Related: odoo/enterprise#43996
Related: odoo/upgrade#4930
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit's purpose is to allow the user to set the company_id of a project to False, meaning the project is no longer restricted for the user who does not have access to the company of the project. This change induces a lot of other small behavior changes/approximation. Since some fields (currency_id, resource_calendar_id, etc) were company dependent, we had to updates some use cases.
task-3084819
closesodoo/odoo#122144
Related: odoo/enterprise#41363
Related: odoo/upgrade#4947
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit implements the `mail.tracking.duration.mixin` with the
`statusbar_duration` widget for `crm.lead` and `project.task`.
The goal is to compute and display how long a record has spent in each stage in
the statusbar of their form view.
Task-3032773
Part-of: odoo/odoo#108554
Current behaviour:
If you disable the recurrence for 1 task in a suite of recurrence,
if you had other tasks belonging to the same recurrence suite, they
would still be with recurrence activated.
Expected behaviour:
It doesn't make sense for some of the tasks in a suite of tasks in a
recurrence to enabled and others disabled. If we disable the
recurrence on 1 such tasks, all tasks should linked to that
recurrence should be set as non-recurrent, regardless if the
edit-mode is set on "This task".
Steps to reproduce:
- For 14.0 -> saas-16.1:
- Install Project, Studio
- Turn on in Settings the "Recurrent Tasks"
- Create a new project and a task in it
- With studio, in debug mode, add a related field to the task form
that relates to `next_recurrence_date`. Make sure it's not "read
only"
- On the task, turn on the recurrence, set the frequency to each
day, set the `next_recurrence_date` as a day in the past
- Run the Scheduled Action "Project : Create Recurring Tasks"
- On one of the task, disable the recurrence
- Go to the other task, see that their recurrence is still active,
and the frequency changed to the defaults values of once a week.
- For saas-16.2 -> master:
- Install Project
- Turn on in Settings the "Recurrent Tasks"
- Create a new project and a task in it
- Activate the recurrence on the task, set a planned date in the past
- Set the task as "Done", this should create an new instance of the
recurrence.
- Disable the recurrence option in one of the task, observe that
is doesn't change for the other task, and the recurrence
frequency is reset to default values.
Reason for the problem:
When disabling the recurrence on 1 task, with the edit-mode set as
"This task", the recurrence is being deleted, but we don't disable
the recurrence of the other tasks linked to that recurrence.
Fix:
When we are writing `False` on `recurring_task` on a task, we
explicitely write `False` on `recurring_task` on all tasks that belong
to the recurrence after the deletion of the recurrence itself.
Affected versions:
- 14.0
- 15.0
- saas-15.2
- 16.0
- saas-16.1
- saas-16.2
- saas-16.3
- master
opw-3265212
closesodoo/odoo#128703
X-original-commit: 0a83f4030b07aba25b054aa453d81c0e27b98cc8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Adds missing index on `project.task` `state`, this field is used in
a lot of searches as a search criteria like "open tasks".
task-3416393
closesodoo/odoo#127841
X-original-commit: 147446d86d7d33a83f83a8699c930fcdd3dbb99b
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Issue:
------
When we want to add a newly-created user
who does not yet have "personal stages" to an fsm task,
it triggers a User Error.
Cause:
------
There's a mistake in the `project_id` field,
which is missing the 's'.
Therefore, when creating the personal stage,
the ORM does not find the value in the context
and inserts the command to set the default project.
As a result, when checking constraints,
we will trigger an error for the
`_check_personal_stage_not_linked_to_projects` method.
opw-3390169
closesodoo/odoo#127694
X-original-commit: 05722c9710f74a073833235de9bbe4743485174a
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Steps
=====
- Install module industry_fsm
- Create a task from the kanban view
- In the form view, add a title but no customer
- Open the subtasks tab of the notebook
- Add a subtask and add a title to it
- Save the created parent task
- A pop-up indicate that the customer is missing
- Add a customer and save the task
Issue
=====
A pop-up indicate that the subtasks field is invalid and there is no way
to save the current task with its subtask.
Cause
=====
the module industry_fsm introduces a required=True for the field
"partner_id" when edited from a view in the app Field Service. When a
parent task is created without a "partner_id" id set, it can not be
saved, but subtasks can still be created from it. Those child tasks
should have the "partner_id" set to the same value as the one of their
parent. As it is not set in the parent task, its value will be False for
the child task, and changing it in the parent task (by adding a
customer) will not update the child task. As this field is required when
a task is edited from the app Field Service, the task can not be saved.
Fix
===
A dependency to "parent_id.partner_id" is added to the method
"_compute_partner_id" of model project.task allowing to updating it if
needed when a "partner_id" is set on the parent task.
task-3343423
closesodoo/odoo#127088
X-original-commit: 7f8da6a4148c86b61d994bf692725378f8dafc52
Related: odoo/enterprise#43515
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit In the task's form view, the parent field shows the other
task but also shows the current task.
In this commit, the domain is applied, ensuring that the id is not the same
as the current id. As a result, the parent field of the task does not
include itself
task-3330841
closesodoo/odoo#122286
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, when the user installs `sale_project` and some
of his projects has no partner set but a partner is set on some
tasks of those projects then the user will no longer see the partner
field in those tasks because the project is not billable.
This commit checks if one of the tasks has a partner set to make the
project linked billable if it is not yet the case.
closesodoo/odoo#126880
X-original-commit: b0cb255577a7a0c49c2c764dbad715d3842b9508
Related: odoo/enterprise#43384
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
*: account, event_booth, gamification, hr, project,
website_event_track, website_hr_recruitment, website_slides
HTML fields that appear in the front-end can be modified using the
website editor. Some of them are sanitized in a way that breaks the
behavior of snippets that can be dropped within them.
This commit adapts the sanitization of those HTML fields so that the
snippets behave as expected.
opw-3267589
closesodoo/odoo#126708
X-original-commit: 7fd28afaf3e45cafbef80b69aa45c58b31fb3de6
Related: odoo/enterprise#43311
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
When a user creates the task without a name field and directly clicks on the
'Mark as Done' button, will give UnboundLocalError like the local variable
'task' referenced before assignment.
Steps to produce:
- Install the 'Field Service' module.
- Field Service > My Tasks > Open any task.
- Make the name field unrequired (Studio or Edit form View)
- Create a new task > Set the Customer field and leave the Name field as blank.
- Before saving the task click on the 'Mark as Done' button > Discard Changes.
- Error will be produced.
Fixing the indentation for `task.date_last_stage_update = now` will solve this
issue. We have used the task variable in for loop.
Sentry-4276832131
closesodoo/odoo#126752
X-original-commit: c3649a32c98d7093610a4367b1e72c1b4b0085b7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit increases the priority of the sequence in the ordering of tasks
so that reordering by drag & dropping is more useful.
Task-3371921
closesodoo/odoo#125073
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit:
In 16.2, we have implemented a nice tool to set various fields at the creation of a task from
the Kanban quick create using shortcuts.
This implementation is simple (only a few lines of code), but is not very flexible.
Indeed, shortcuts need to be in a specific order and at a specific place for them to work.
As a consequence, it is very easy for the user to fail in the creation of their tasks using shortcuts.
This task aims at making this feature more robust and complex so that it works in more cases.
In this commit:
It should be possible for the #tag, 23h, @demo, ! shortcuts to be put in whatever order, as long as they are at the end of the name
task-3349154
closesodoo/odoo#124155
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Prior this commit:
In project when tasks was moved to different stages users will get notify with
emails where there is a field showing assigned_date and deadline.
After this commit:
Instead of those fields it's showing only Stage: Stage name
Task-3285822
closesodoo/odoo#119973
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
The following changes are made in this PR:
- sort projects by favorite > sequence > name for project
- add the 'tasks' stat button for project form view
- when creating a project on the fly from a task's form view, allow_billable
should be set to true by default
- Display only the colored dot, hide the status label for project list view
- remove following fields from project
allow_recurring_tasks
task-3251656
closesodoo/odoo#119154
Related: odoo/upgrade#4569
Related: odoo/enterprise#40050
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
New features developed in this PR:
- Write Javascript tests for the project.task.state widget
- Tests are in the project_task_state_selection.js
- rewrite Research & Development demo data
- Created a digest tip for task state selection (in Settings > technical > digest tips)
- Tip: Use task state to keep track of the task progression
- Fix Sharingview (Readonly) icons for the project.task.state widget, previously only the color bubble were displayed in readonly sharing views, now all of the icons are displayed
- Display state in the Calendar view
- Display the same widget as in the kanban/list views
- Remove is_closed References
- Adapt Kanban stages Exemples
- Kanban exemples are available when creating a new stage in kanban view
- improve Progressbar colors (different color for approved/done, in_progress/waiting)
Task-3213526
closesodoo/odoo#117968
Related: odoo/enterprise#39714
Related: odoo/upgrade#4548
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Allow timesheeting on sub-tasks with no project_id set.
Instead, refer to the project_id set on its parent_id, and so on,
recursively.
task-3336215
X-original-commit: d794e41619a36a8c9ad1e77a816e57051207cdcf
Part-of: odoo/odoo#124563
X2many fields tracking was not supported in the implementation of
`mail` module:
* not needed in the past
* the logic was not hooked in the same place before. Now that it is
managed pre-commit, x2many values don't have to be handled as commands,
but can be compared as records.
* ...
The support was added for two specific models in specific modules, but
it's a good opportunity to clean that and to support it directly in `mail`.
Task-3316528
Part-of: odoo/odoo#121244
This commit reverts a previous commit which allowed to
display the current stage when the state is changed.
The reverted PR: https://github.com/odoo/odoo/pull/119925
The reversion was done as what was implemented does not
follow the standard display of tracking messages and
because it doesn't look good in the chatter.
Task-3336184
closesodoo/odoo#123797
X-original-commit: eff511140175ba8224c2f9be59a798a3e1dee6da
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Previous commit (https://github.com/odoo/odoo/pull/116570) renamed
this method _get_subtasks_recursively.
But instead of calling itself in the return statment, the
method _get_all_subtasks was called resulting in a non-recursive
function and to potential undesired behavior as _get_all_subtasks calls
_get_subtask_ids_per_task_id that calls _get_subtasks_recursively in
some cases.
With this commit, we just call _get_subtasks_recursively on the children
to make it actually recursive, like it was in the first place.
closesodoo/odoo#123149
X-original-commit: 3a6f5e4d8eddaa4effbf96d8b59d47afc0ee9503
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Audric Onockx (auon) <auon@odoo.com>
During the creation of a private task (model project.task with not
project_id set), the current user is added as assignee. For all the demo
data, OdooBot is therefore added as a default assignee. This commit
avoid this situation by performing a check on user id at creation of a
private task.
task-3085077
- Impacted modules:
- todo (new module)
- note (deprecated app)
- project
- test_discuss_full (adding a dependency)
- Main changes:
- The Notes app is deprecated
- A To-do app is created to replace it
- The To-do app uses the model project.task (from module project)
for to-dos. To-dos are equivalent to private tasks (tasks without
project) with no parent task set.
- Private tasks/to-dos can either be displayed in the My Tasks menu
of the Project app or in the To-do app that proposes simplified
views to edit them.
- Details:
- depracation of Notes: Before the module note can be fully removed,
some changes still need to be done in other modules that use its
models (mainly note.note model). This commit deprecate the Notes
app in the meantime by removing it from the main menu/dashboard
and by replacing the creation of notes directly from the systray
by the creation of private tasks (to-dos).
- activity: In the systray, it is currently not possible to
segregate records using the same model. Therefore to-dos will
appear in the task section. This will change in the future when
this possibility will be implemented in mail.
- name generation: When edited from To-do, a name is auto-genrated
for private tasks. This behavior is similar to the one existing in
notes with a few adaptation to Todo UX. When a to-do is untitled
and saved (through the save button or when leaving the form view),
a name is generated based on the first line of the description of
this to-do. If the generated name is longer than 100 characters it
is truncated.
- security:
- project.task model need to be accessible in all crud modes to
all internal users as it is used in the to-do module. This is
a big change compared to the previous behavior where only
project users could edit tasks.
- project.tags model access is way more permisive now. All users
have access to edition/delition of tags as they are use in the
to-do app.
- Record rules: A similar behavior as the current one is
implemented, i.e:
- project users can access all tasks (with edition rights)
verifying one of the following conditions:
- they follow the task
- they follow the project the task belongs to
- they are assigned to the task
- the project the task belongs to is accessible for all
internal users.
- internal users have only read-access to the non-private
tasks shared with them.
- Those changes related to security only occurs when the app
To-do is installed. When it is note, the current behavior of
Project security-wise is kept unchanged.
Note on this last point: As the write access of internal users to
project.task is now managed with record rules, the form of this model
won't be displayed in read-only anymore when To-do is installed. This
will results in access error message for the tasks for which the write
access is restricted. Unfortunatelly, there is no better solution at the
moment as neither restricted read access, nor extendent write access for
internal users are desired. An improvement of the framework to deal with
such situation could be benificial.
task-3085077
Description of the issue/feature this PR addresses:
Before this commit assign_me button and clock icon from start button is shown in
project task , project sharing as well as helpdesk ticket.
This commit remove assign_me buttom and clock icon from start button in project
task, project sharing and helpdesk ticket.
task-3292056
closesodoo/odoo#120378
Related: odoo/enterprise#40630
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, when the user changes the state, the followers
receive a notification about this change. Since the label of the
state is no longer customize by stage, the followers cannot know
in which stage the task is before clicking on the link to go to
the task form view. And so, if one of those followers has to
check the task in a specific, he has to click on the link in
the notification to know in which stage the task is.
This commit fixes the issue by adding the curent stage in the
notification to inform the user who received the notification
in which stage the task is when the state has been changed.
task-3284597
closesodoo/odoo#120959
X-original-commit: d78c79d9a9f8ac108251c57c732cfb5b71b53fd5
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
The refactor of the kanban quick create implemented in
https://github.com/odoo/odoo/pull/117449 introduced a traceback when
creating a task from the My Tasks kanban view due to the presence of
'default_personal_stage_type_ids' key in the context.
This commit fix that by removing this key from the context in the
customization of the kanban view for project.task model. It also add a
js tour test to ensure that personal tasks can be created from the quick
create form in the My Tasks kanban view.
Steps
=====
- Install module project
- Go to the view "Tasks -> My Tasks"
- In the main Kanban View click on "New"
- Enter a Task title and clicl on "ADD"
Issue
=====
A traceback appears indicating that the value of the field user_id is
missing for the model project.task.stage.personal and the task is not
created.
Cause
=====
In kanban and list views, when the records a grouped by a given field, a
key is added in the context when creating a record from one of the
resulting categories. This key is of the form:
`default_fieldGroupedBy: current_category_value`
In the case of the view My Tasks, the records are grouped by their
fields personal_stage_type_ids (M2M). Therefore, the key
default_personal_stage_type_ids will results in a write in that M2M
table when creating the record. But the way personal stages are managed
in project is as confusing as it is mindblowing and the M2M table
storing the relation between task and personal stages is also the table
that store records from the model project.task.stage.personal. And this
model also as a field user_id that is required. Therefore
at creation of the project.task record with that key, the orm will miss
a user_id for the newly created project.task.stage.personal.
Fix
===
The correct way to add/modify a record project.task by setting its
personal stage is actually to use the already existing methods of
project.task, i.e. _inverse_personal_stage_type_id. Therfore, instead of
modifying directly the M2M relation, update the computed M2O field and
let the inverse method to the job of personal stage assignment.
To do that, the value contained in the context for the M2M relation is
copied in the write value of the M2O (personal_stage_type_id) and the
key in the context corresponding to the M2M relation is deleted.
task-3281005
closesodoo/odoo#119055
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Current behaviour:
On a brand new task with no assignees, when we add an user to follow
the task with an email, there is a link "I take it" that is supposed
to assign the newly following user as the assignee of the task. This
link is dead, returning a 404.
Expected behaviour:
Either correct the link, or remove it from the email header.
Steps to reproduce:
- Install Project
- Create a task, with no assignees
- Add a new follower to the task with Send Email checked.
- Check the outgoing email, and click on the link "I take it".
- 404 response
Reason for the problem:
The route which we were using for this `/mail/assign` doesn't exist
anymore since version 15. This was an intended design change, to
remove noice. The user can click on "See task" and assign himself on
there.
Fix:
Remove the "I take it" link from the email header.
Affected versions:
- 15.0
- saas-15.2
- 16.0
- saas-16.1
- saas-16.2
- master
opw-3276036
closesodoo/odoo#119920
X-original-commit: 2d3134381c23675199bd8e14fafb1804d54339e6
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Before this commit:
1- project sharing task form: Internal users can't see and edit all fields.
They need to go back to backend interface. Some users don't even know the
difference between project sharing and backend, and the others need to navigate
manually to that interface
2- portal tasks list view: Currently, the name of tasks will be cropped if it is
too long. However, the user has no choice but to open the form view to get the
full name of the task. This can be quite bothersome when each task has to be open
individually in order to differentiate them
3- portal tasks list view: Currently, projects are displayed as tags
After this commit:
1- we added a shortcut to redirect them in one click.
2- display the full name of the task on hover
3- display project as a normal field
task-3186689
closesodoo/odoo#114531
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Enforce strict types for returned values for
* create
* write
* unlink
* default_get
to make those methods more consistent and reliable.
Also make sure they can be called with empty self/values,
i.e. that they follow the same behavior as the base methods
defined in the main orm Model.
closesodoo/odoo#116809
Related: odoo/enterprise#38880
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Prior to this notification actions are shown as such:
MODEL RECORD_NAME won | lost | settings
After they will be shown as such:
MODEL won lost settings RECORD_NAME
with the action links colored to match the company color.
The aim is to streamline the layout of e-mails and make actions
clearer.
task-3067315
closesodoo/odoo#106307
Related: odoo/enterprise#34284
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit there is a sub-type to notify parent
if child stage change but with new to-do state feature
we don't to unnecessory notification on parent which is
more problemation then informative.
This commit remove task dependency sub-type and it's related
code.
task-3252755
closesodoo/odoo#118418
Related: odoo/enterprise#39972
Related: odoo/upgrade#4542
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Lot of override of read_group reimplement partially custom security
rule of `_search` method. In order to simplify these security check
and have a consistent behavior between the search and read_group method,
_read_group now use _search to create the from and where clause.
Part-of: odoo/odoo#110737
*_= project, sale_timesheet,
The purpose of this commit is to improve the UX of the project and timesheet app
So in this commit done following changes:
- In the timesheet time off form view changes the label from
timesheet to timesheets
- In the timesheet list view added a 'no_open' option on the SOL field to
make not be clickable
- In project form view removed the 'quick' create option from the
user_id field
- In project task form view added a 'no_open' option on the SOL field to
make not be clickable
- Color of the Gantt and calendar views in project app
My Tasks:
the color used should be according to the personal stage set on the task.
All tasks:
the color used should be according to the project set on the task.
When the user clicks on a project in the main view of Project app:
the color used should be according to the stage.
task-3125942
closesodoo/odoo#111688
Related: odoo/enterprise#36615
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
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>
Before this commit, even if customer rating is disabled from setting user can
get subscription of task rating.
This commit ensures that only when the customer rating field is enabled, the user can
get a subscription to task rating.
task-323170
closesodoo/odoo#117577
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
It takes a too long to load project task kanban view.
And ~85% of this time is spent in `ProjectTask._get_all_subtasks`,
which is a recursive method returning the children of the children,
while any, of the task, for each task, just to display their count.
We replaced this recursive method with a SQL request,
which is way faster. Also, it can be called in batch.
It will return a dict {id: subtask_ids}.
task-3246085
closesodoo/odoo#117624
X-original-commit: 3b55936fed9ebdcfb8190437ad66c3e42c26b01c
Related: odoo/enterprise#39295
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Purpose of the commit is to do the generic improvements for project.
So in this commit did the following changes:
- adding a label 'last update' to the stat button in project form view.
- indicate 'my project' in the tab instead of 'project sharing view in portal' in project sharing.
- set the first non-folded stage of the project as default on newly created tasks.
- remove user confirming the SO as the default project manager.
- hide fields service_tracking, service_upsell_threshold if sale_ok is false.
- set purchase_method to purchase by default if product is of service type.
- remove the : next to the totals labels and decrease the font-size for values of 'total hours'
and 'remaining hours' in timesheets notebook in project task form view.
task-2897867
closesodoo/odoo#96548
Related: odoo/enterprise#29774
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Manisha Tulsiyani <matu@odoo.com>
This commit reviews the UX and UI in Project app and improves the usability of the
new features recently added (subtasks list in kanban card, state field replacing
kanban_state field, etc).
The following changes are made in this commit:
- swap of user_id icon in the kanban box and the removal of the allow_unassign field and setting
- change the ordering of the fields in the subtask list
- make small layout changes in the project.task and project.project kanban cards
- remove the "lock-icon private" sub-title of private tasks, replace it with a
little lock icon on the bottom right icons of the kanban card.
- remove the break tag in the project.task kanban card that was unecessary
given the new display and margin style settings
- lock icon is bigger
- kanban icons are better aligned
- state is as big as avatar
- remove the 'remaining hours on SO' field
- deadline field will be optional and hidden by default in project.task list view
- remove the rating field
- add stage field as optional in project.task list views
- priority and state fields will no longer be optional
- stage_id will be copied when duplicating a task, except when the task is
generated through the recurrence
- remove the tooltip of the tag_ids field
- When duplicating a task having sub-tasks, '(copy)' is no longer
added to the name of the sub-tasks of this task.
- project.task kanban view:
* (+ x tasks) mention next to the name is removed
* The caret is replaced with 'fa-check-square-o x/y'
which will represent the number of sub-tasks closed
compared to the total number of sub-tasks
* Only open subtasks are displayed
* When changing the state of a sub-task to a closing one,
the sub-task is muted and removed from the list on the view reload
* The name of the parent task on the kanban card of sub-tasks is
displayed except when viewing the sub-tasks of a particular task
through the sub-tasks stat button
* project.project kanban view: the fa-check-square-o icon of
milestones is replaced with fa-flag-o
* project.task kanban card: the fa-play and fa-pause icons
are moved on the right of the remaining hours widge.
* Allow users to edit the stage_id in batch from the list view of tasks
if all of the selected tasks are part of the same project.
* the state will have the same size as the avatar
* change the opacity of the tasks that are closed
* state is at the right of subtask list
* the striked should be replaced by the opacity on the kanban card
Enterprise PR: odoo/enterprise#38132
Task-3229873
closesodoo/odoo#116628
X-original-commit: 09b5d5843096d27b5a4ab0f603ad44bdb2e74723
Related: odoo/upgrade#4478
Related: odoo/enterprise#38771
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Co-authored-by: Panagiotis Kyriakou <paky@odoo.com>
Co-authored-by: Bastien (bvdn) <bvdn@odoo.com>
Before this commit user able to see and add customers on non fsm and
non billable tasks/projects which is not provide any significance as
user don't need customer for normal tasks/projects.
So, in this commit hide customer field and also move partner phone
and city to field service app as it was only usefull for FSM project
and task.
task-3141350
closesodoo/odoo#111335
Related: odoo/upgrade#4274
Related: odoo/enterprise#36459
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit allocated hours field label on task has
to change allocated days when user change encoding unit.
This commit change label to allocated time that work for
both encodinging unit and we don't have to change label
depending upon encoding unit.
task-3141350
Part-of: odoo/odoo#111335
The rating email template should not be sent if:
there is no partner set on the task
or if the current user is set as the partner of the task
task-2924559
closesodoo/odoo#96452
Related: odoo/enterprise#29728
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
All write operations on the `project.task` model are slowed down significantly
by a dict comprehension mapping tasks to their user_ids because of the access
rules checks. By adding a sudo to that dict comprehension, this commit makes it
bypass those checks and speeds it up.
Task-3164004
closesodoo/odoo#115037
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>