Commit Graph
5979 Commits
Author SHA1 Message Date
Xavier BOL (xbo) 581056425f [FIX] projet: fix duplicate id in project demo data
Before this commit, 3 xmlid are duplicated, so the result is not
expected.

This commit changes the duplicated xmlid to create the 6 tasks as
expected.

Part of task-2671848

closes odoo/odoo#80661

X-original-commit: 12e848cb200d4b763563e0b110c963aeb71d706e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-12-01 11:05:09 +00:00
Anjali 86f5ca73d9 [IMP] sale_(project): generic UX improvement for project
Purpose of the commit is to improve the generic UX of task
and project views.

task-2590412

closes odoo/odoo#75509

Related: odoo/enterprise#20423
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-30 14:30:43 +00:00
Nidhi Patel 1c6103c22a [IMP] (hr,sale)_timesheet, *: improve header for portal view
* = project, sale_project

Currently, the header is displayed above every group when the group by is
applied.

In this commit, we move the header with the fields labels at the top of
the table. Also, remove the string before the field indication.

task-2655707

closes odoo/odoo#77408

Related: odoo/enterprise#21989
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-30 12:51:55 +00:00
Xavier BOL (xbo) 428721d28a [FIX] project: remove duplicate filter in rating.rating search view
Before this commit, the `Last 30 days` filter is duplicate in the search
view of rating.rating in `Reporting > Customer Ratings` menu of Project
app.

This commit removes the duplicate one.

Part of task-2671848

closes odoo/odoo#80506

X-original-commit: 492ab65c2dad6ce65e27e266777f13a8ba1f8acb
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-29 14:08:49 +00:00
Kartik Chavda 17e58758de [IMP] sale,sale_(project,timesheet): improve the UI
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

closes odoo/odoo#77065

Related: odoo/enterprise#21199
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-26 13:37:58 +00:00
Bonis ModiandKartik Chavda f4c054e473 [IMP] project, hr_timesheet, *: improve generic ux
Purpose of this commit to improve generic UX for the project app.

So, In this commit done following changes:

- add 'subtask_effective_hours' and 'total_hours_spent' fields in the page of
subtask in task form view.
- change invisible attrs to column_invisible attrs for block_by page in task
form view.
- add 'task in progress' subtype for project.task and move 'stage changed'
subtype above 'task blocked'.
- remove the 'is_close' field and all its references from project.task.type.
- unarchive all of its tasks when the user unarchives the task stage.
- sort projects on 'is_favorite'.
- internal users following the project automatically follow its updates and
their notification preferences propagated accordingly.
- duplicating a task will duplicate all of its subtasks.
- move parent task field in extra info page of task form view.
- change the label of 'edit' to 'view' in the burger menu of project kanban view.
- user can delete task without sale_order validation error.
- add constraints for 'seller_ids' field.
- add remaining_hours_so field in task tree view.
- add unusual_days in task calendar view.
- add 'no content helper' in action of burndown chart.

task-2536044

closes odoo/odoo#74018

Related: odoo/enterprise#19880
Related: odoo/upgrade#2801
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Kartik Chavda <kcv@odoo.com>
2021-11-23 12:04:00 +00:00
Cedric Prieels (cpr) ea038c6b19 [IMP] project: follow up the project overview removal
The project overview is a significant technical debt
as it is a custom qweb view. It is quite limited:

It is not possible to group the data, to filter on dates,
SOs or Field Service projects.
Improving this is very difficult and would require weeks
of development that are not worth it.
In any case, all the information provided by the project overview
can be found elsewhere. The stat buttons of the report are basically
duplicates of the ones from the project form view.
Therefore, we are removing this report and its twin,
the Project Costs and Revenues.
In addition, analytic items lack context for the user to understand
what generated a certain cost or revenue:

there is no link to the source document;
the entries are not categorized (e.g. it is not easy to understand
if a cost comes from a timesheet cost, a purchase order or an expense);
the billable type group by works fine for timesheets but then all
the other entries are flagged as Undefined, which is not very helpful;
there is no option to easily isolate costs from revenues.

task-2646234
See odoo/enterprise#20936

closes odoo/odoo#76553

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-23 11:12:14 +00:00
Thibault Delavallée 869ada08a0 [IMP] mail: rename tracking methods and clean dead code
Purpose is to have tracking methods beginning with ``_track``, indicating
those are tool methods used for tracking. It helps organizing the mail thread
file and having short but precise method names.

We also remove the usage of ``mail_track_log_only`` context key that is not
used anymore in the code. It allows to shorten a bit the code and make it
easier to read.

Task-2671709

Part-of: odoo/odoo#78648
2021-11-23 09:39:52 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
Jeremy Kersten b8a2565444 [FIX] project: don't check access if in sudo
Before this commit, since the code make a sudo -> unsudo to check the rights,
whatever the previous env, it is no more possible to create a task from an
alias.

This commit check that we are not already in sudo before, or in this case it
doesn't check the access right with an unsudo.

closes odoo/odoo#80131

X-original-commit: 56c625079ac5e4da9c7d9994b4459aa06cbfe727
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-19 17:18:53 +00:00
Thibault Libioulle e458ab7a06 [REM] project: remove unused data
Prior to this commit, the tasks_analysis information was added to the
panel data dict but never used clientside.

This commit removes this useless call to avoid a Traceback on large
projects, with lots of tasks (MemoryError).

task-2694765

closes odoo/odoo#80030

X-original-commit: 33446939e0cc625832de3b22661709508a01044a
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-18 18:45:15 +00:00
William BraeckmanandThibault Libioulle a2036c5dd7 [FIX] project: make better use of cache in dependency tracking
Minor changes to allow a better usage of the cache in dependency
tracking in order to reduce the query count.

See odoo/odoo#79931

TaskId-2693899

closes odoo/odoo#79956

X-original-commit: 52123efd0cbc77564d6dfc12856996b39666ad64
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Thibault Libioulle <tle@odoo.com>
2021-11-17 16:36:50 +00:00
William Braeckman a05eff87a1 [FIX] project: fix not checking for user_ids presence
Fixes an issue where new followers would always be checked upon updating
a task. Which could result in a lot more queries than necessary when
changes are cascading.

See odoo/odoo#79931

TaskId-2693899

X-original-commit: 09adeb7fe2b4345bd476058b2bf85ac1c08a1d1f
Part-of: odoo/odoo#79956
2021-11-17 16:36:50 +00:00
Xavier BOL (xbo) b66b36db9c [FIX] project: fix access error when project user goes to project form
Before this commit, when a project user wants to see the project form
view, he has an access error because he does not have any access to
`project.collaborators`.

This commit adds `ir.model.access` to give read access to the project
user to `project.collaborators` model.

task-2692587

closes odoo/odoo#79899

X-original-commit: 012b014d0b95f10f7b512ac547b166e28bf32b65
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-16 20:05:16 +00:00
Fabio Barbero 1a9b6422ff [IMP] digest: organise digest view
Purpose
=======

Give the user a more organized view of the digest KPIs in the backend and
improve global wording of digest sections and KPIs.

Specifications
==============

Reorganize order of KPIs in digest view. Fix some typos, move buttons in
list and form views.

Task-2582128

closes odoo/odoo#77507

Related: odoo/enterprise#21340
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-16 19:20:57 +00:00
William Braeckman 85577f7b33 [FIX] project: fix following on assignation
This commit fixes an issue since user_id was changed to user_ids.

The default behaviour of `_message_auto_subscribe_followers` could not
work with the user_ids field as it is only meant to work with user_id.

This also fixes a related issue due to the same problem where the
assignation emails were not sent.

TaskId-2691486

closes odoo/odoo#79831

X-original-commit: 3510251ad19d4394f4613924aa2af20abb7c35d9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-16 12:19:57 +00:00
Aktiv Software 1d908a14eb [FIX] project: remove gantt and map views from project.task actions
Prior to this commit:

    * The `action_dependent_tasks` and `action_recurring_tasks` were wrongly
      returning a view_mode containing the gantt and map views, which are part
      of enterprise.

After this commit:

    * The `action_dependent_tasks` and `action_recurring_tasks` will return a
      community valid view_mode.

closes #79785
Related to issue https://github.com/odoo/odoo/issues/79555

X-original-commit: c2e1a3133e2a9cff2db8ceb86d242930e17480e2
Part-of: odoo/odoo#79797
2021-11-16 07:39:10 +00:00
Laurent Stukkens (LTU) 919cc3314c [FIX] project: correctly display the 'Assign to Me' button
Priori to this fix:

    * The domain provided to the invisible member of the attrs was wrong
      as it was using the '=' operator.

After this fix:

    * The domain provided to the invisible member of the attrs is using
      the 'in' operator.

task-2691562

closes odoo/odoo#79800

X-original-commit: e69012541dbba5a98a3b847c78b2ac17455601b3
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-15 20:38:08 +00:00
Laurent Stukkens (LTU) a3e0f96fe1 [FIX] project: correctly color project and task rating stat buttons
Prior to this commit:

    * Although the display was correct in enterprise, the look was awful in community.

After to this commit:

    * The icon is colored in both comunity and enterprise and the text is always visible.

task-2531428
closes #73581

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-15 17:29:38 +00:00
Laurent Stukkens (LTU) 0a9e5f7c7d [FIX] project: use html_escaping in project form view rating buttons
This commit fixes an html escaping issue in the project form rating buttons.

task-2531428
closes #73581
2021-11-15 17:29:37 +00:00
Mitali Patel 8ccba2ce15 [IMP] project, hr_timesheet: improve customer rating on project
Purpose of the commit is to improve the customer rating report
of the project app.

So in this commit, done the below changes:

- remove the project and task measures
- switch the rating value and the count from place in pivot view
- remove the default group by rated operator, keep it fot grap view
- reorder the some fields on form and list view
- use the badge widget for the rating field and the color code is applied to the form view
- add some demo data for the feedback field in list view
- center the information vertically in kanban view
- move the 'customer ratings' menu item below the 'project costs and revenues' one
- add the following filters: My Projects, My Team
  - reorder the group bys and rename 'Resource' into 'Task'
  - reorder the search fields
- project kanban card
  - the ratings % is represent the average satisfaction rate of the ratings submitted in the last 30 days (including today)
  - change the tooltip to: Average satisfaction rate for the last 30 days
- the 'customer satisfaction' stat button display the last 30 days rating on the project.project
and this stat button should open the kanban view by default instead of the list view

task-2531428
closes #73581
2021-11-15 17:29:37 +00:00
Martin Trigaux 91d5aef00c [FIX] project: translate panel data
Give the language in the context

closes odoo/odoo#79594

X-original-commit: 9939a0cbfae814f6b4d66c0ca45e0a84d3f57836
Related: odoo/enterprise#22205
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-10 07:45:53 +00:00
Odoo's Mergebot be5332fe55 [FW][MERGE] project: Project Sharing feature follow-up
This PR are the follow-up of #73341 PR to fix the various points to finalize the feature for the v.15.

These points are done only in the Project Sharing feature:
- remove import button in favorite menu
- remove some filters in search view and update the search view
- add uom in session to use timesheet_uom widget for timesheets: this widget uses the uom stored in the session to display the unit_amount in hours or in day format.
- remove the using of avatar widget for employees.
- remove checkboxes in list view.
- change label for group by user_ids
- not set by default the height of the chatter
- remove the 'Set a cover' button in kanban view because the portal user has no access to `ir.attachment` model.
- add unit tests for project sharing feature.
- force staying in the project sharing form view when the user wants to see a subtask.
- display subtask planned hours
- allow the portal user to edit priority task when he is in project sharing feature.
- show "Assign to me" button
- see custom kanban state label
- get all options when the chatter is reloaded in project sharing.

In classic portal views:
- use task in sudo for classic portal form view

General point:
- prevent click on avatar user when `noOpenChat` is `true`

task-2633229

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#79429

Forward-port-of: odoo/odoo#77156
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-05 18:33:40 +01:00
Xavier BOL (xbo) 708861ed3d [IMP] project: manage column_invisible in project sharing list
Before this commit, it was impossible to to hide a column when the
timesheets or subtasks features are not enabled to the project shared.

This commit manages the column_invisible for the list view in project
sharing to compute the domain in this modifiers. We assume all tasks
displayed in project sharing are linked to a project shared.

task-2633229

closes #77156

X-original-commit: ab2b5d1fd1f09d804ab410bc326cfebf26d5a7c6
2021-11-05 17:16:13 +01:00
Xavier BOL (xbo) fbac7f191d [FIX] project: exclude project sharing assets qweb from web.assets_qweb
Before this commit, we import all xml in project module. The problem is
the ones for project sharing should not be included in `web.assets_qweb`.

This commit excludes the project sharing assets from `web.assets_qweb`.

task-2633229

closes #77156

X-original-commit: 21e21d7956d6de1775f4230060cdff7c39015bbc
2021-11-05 17:16:09 +01:00
Xavier BOL (xbo) d3b8d1fd31 [FIX] project: remove 'Share with all users' checkbox in project sharing
Before this commit, the portal user could see the checkbox in search
view to share his favorite item with all users. This action is not
authorize in project sharing feature and should be removed.

This commit removes this checkbox to avoid the portal user to share his
favorite item with others users.

task-2633229

closes #77156

X-original-commit: 19b38074dd8bfe4d8347db31f946beeb2850d453
2021-11-05 17:16:05 +01:00
Xavier BOL (xbo) 95c0fe5729 [FIX] project: favorite menu in project sharing
Before this commit, when the collaborator clicks on the favorite menu,
he has a traceback because the 'spreadsheet' service is not available.

Since we don't want to use this service and we just want the menu item
to save the current as favorite. This commit override the favorite menu
to remove the registry items to add the menu item and we just add the
one we want.

task-2633229

closes #77156

X-original-commit: d970c13494db2c3e085155b7855b656fbbe26467
2021-11-05 17:15:54 +01:00
Xavier BOL (xbo) 614657d799 [FIX] project: show 'Assign To Me' only if the user is not assigned
Before this commit, when the task has a user assigned to a task and the
current user wants to assign himself to this task. He cannot see the
'Assign To Me' button because this button is only visible if the
`user_ids` field is empty.

This commit changes the visibility of this button to show this button
only if the current user is not yet assigned to the task.

task-2633229

closes #77156

X-original-commit: cfba241bada2b3690b4303b7e01747301925d162
2021-11-05 17:15:47 +01:00
Xavier BOL (xbo) adf3aca403 [FIX] project: use task in sudo for classic portal task view
Before this commit, when the portal user has access to a project and a
task has a customer who is not in the same company than the portal user,
the portal user has a AccessError when he wants to consult this task.

This commit uses the task in sudo to have the same information shown in
/my/task/<id of the task>.

Steps to reproduce:
------------------
1. Share in readonly mode a project to the portal user (with
visibility set to 'portal')
2. Create a task in this project and set a Customer A (a customer who
has not the same company than the portal user).
3. Log in as portal user (Joel Willis).
4. Go to '/my/projects' and select the project shared.
5. Select the task created.

Actual Behaviour:
----------------
AccessError exception is displayed because the portal user has no access
to partner in other company than his yours.

Expected Behaviour:
------------------
Display the task portal form view like the one shown in /my/task/<id of
the task created>.

task-2633229

closes #77156

X-original-commit: 3b0d6d0cef73baa5b5f235c3518c8bd698c81e21
2021-11-05 17:14:46 +01:00
Xavier BOL (xbo) c0c1af4ca2 [FIX] project: see custom kanban state label
Before this commit, the user could only see the default kanban state
label in kanban state label. That is, "Ready", "Blocked" and "Normal".

This commit allows to see the custom kanban state label in project
sharing feature.

task-2633229

closes #77156

X-original-commit: a9a884cfe1f8328ae71edc93832e4c4408d9c581
2021-11-05 17:14:38 +01:00
Xavier BOL (xbo) 9089dfef5e [FIX] project: allow edit priority task in project sharing
Before this commit, the `priority` field in task was in readonly in
project sharing feature.

This commit allows the `priority` field in task be edited by a portal
user in project sharing.

task-2633229

closes #77156

X-original-commit: 62572e17d6cd62f16287d530c247dbe9b8501e0c
2021-11-05 17:14:33 +01:00
Xavier BOL (xbo) 5eddca2ace [FIX] project: force the project sharing form view for subtasks
Before this commit, when we do a fields_view_get in unit test, we get
the form view of project task view in backend and not the project
sharing form view in project sharing feature.

This commit adds in the context the `xml_id` of the form view used in
project sharing feature.

task-2633229

closes #77156

X-original-commit: 7dfb44e703f9ff8293412030cfd308e2545f121c
2021-11-05 17:14:26 +01:00
Xavier BOL (xbo) bd4acaa220 [IMP] project: add unit tests for project sharing feature
This commit adds unit tests to check the access of portal user. That is,
we check if the readable fields are only available in read access and
writable fields are available for the edition of the task.
We also check if the other fields in task model raise a AccessError if
the portal user wants to access to one of them.

task-2633229

closes #77156

X-original-commit: 1e7185bcdd8913c006148466dec260b8f6d53c0b
2021-11-05 17:14:19 +01:00
Xavier BOL (xbo) 0f24225bbe [FIX] project: remove the set a cover button in project sharing
Before this commit, we add the Set a cover image in the kanban view of
task for portal user in project sharing feature. However, the portal
user has not access to `ir.attachment` model. So, those users cannot
selects a cover image for a task.

This commit removes this button in project sharing feature.

task-2633229

closes #77156

X-original-commit: 2f8bb52c942416528de4d7d95c53e0ac1c99bf5b
2021-11-05 17:13:43 +01:00
Xavier BOL (xbo) 8f84155337 [FIX] project: not set by default the height of the chatter
Before this commit, the border left displayed when the chatter is aside
the task form view is not from the top to the bottom of the page in
project sharing feature.

This commit removes the fit-content set to the height in css to have the
border left displayed from the top to the bottom as expected in project
sharing feature.

task-2633229

closes #77156

X-original-commit: 886bc7577b2d6f437c28ea18e5786b36930a7cc2
2021-11-05 17:13:24 +01:00
Xavier BOL (xbo) 4c12d0410d [FIX] project: remove checkboxes in list view for project sharing
Before this commit, the portal user can select multiple tasks in the
list view with the checkboxes but no action is available.

For this reason, this commit removes these checkboxes.

task-2633229

closes #77156

X-original-commit: cef79697a014c6443c1d1dfdcf498c18fcb27fb9
2021-11-05 17:13:19 +01:00
Xavier BOL (xbo) 150686947b [FIX] project,hr_timesheet: add uom in session to use widget
Before this commit, since we don't have the uom in the session, the
timesheet_uom widgets does not work in project sharing feature.
Because those widgets need the uom stored in the session.

This commit adds the uoms needed in the session used for project
sharing feature.

task-2633229

closes #77156

X-original-commit: a8f27ac776e8f381cb467be3a0256b197d6e688f
2021-11-05 17:10:15 +01:00
Xavier BOL (xbo) 0b8961a963 [FIX] project: search view in project sharing feature
Before this commit, we add the same search view than one in backend
views. But some filters are not needed since we display only one
project. For instance, the group by project is not useful since we have
only one project.

This commit removes the groups by project and create_date and add a
separator in filters.

task-2633229

closes #77156

X-original-commit: 1af17e529161bb745a183458b91972fa3a9b69f7
2021-11-05 17:09:53 +01:00
Xavier BOL (xbo) d04b1c2abc [FIX] project: remove import button in favorite menu for project sharing
Before this commit, the portal user can see this button, but this button
should not be accessible by collaborators.

This commit removes the import button in project sharing feature to not
allow this to collaborators.

task-2633229

closes #77156

X-original-commit: 74d7308dfb8df0b923e68aa228ec406e36b0b89a
2021-11-05 17:07:49 +01:00
Vincent Larcin d12c747002 [FIX] sale_timesheet: remove empty sections from project updates
With the sale_timesheet module installed, some Project Updates can contain an "Activities" section in the description, despite there being no activities to be shown, and some empty divs.

This commit will remove all of those unnecessary sections, which also spares us an expensive call to `project._get_profitability_common()`.

Task-2675389

closes odoo/odoo#79415

X-original-commit: 0741dde0598186d395a06ab6a9ea7056f0ff00ff
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-05 14:32:47 +00:00
Vincent Larcin b70752321a [IMP] project: add demo data for tasks in personal stages
This commit will modify some of the tasks from the demo data to place them in different personal stages for the demo users, to better showcase the feature.

Previously, none of the demo tasks belonged to a personal stage of any user.

Task-2657697

Closes #77870

Related: odoo/enterprise#21463
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-05 11:00:41 +00:00
Vincent Larcin f4373cd034 [IMP] project: indicate private tasks in multiple views
This commit will indicate 'fa-lock private' for the 'Project' field for private tasks in the following views: list, calendar popover, kanban, activity.

Previously, this field was left blank.

Task-2657697

Closes #77870
2021-11-05 11:00:41 +00:00
Vincent Larcin 95b0bcca6d [IMP] project: change default project tasks pivot view
This commit will change the default pivot view for tasks to only show the "Count" measure.

Task-2657697

Closes #77870
2021-11-05 11:00:41 +00:00
Laurent Stukkens (LTU) 8abe924d2d [FIX] project: prevent duplication of project update stat button
Prior to this fix:

    The project update stat button is duplicated.

After this fix:

    The project update stat button is no more duplicated.

task-2684233

closes odoo/odoo#79347

Signed-off-by: Xavier <xbo@odoo.com>
2021-11-04 13:40:48 +00:00
Thibault Libioulle 2a6650dc81 [FIX] project: copy display_project_id of subtasks
Prior to this commit, when a subtask is copied through the recurrence,
it loses its display_project_id in the copied sub-tasks.

Current Behavior

The display project id is left empty.

Expected Behavior

The display project id is copied.

task-2672243

closes odoo/odoo#79290

X-original-commit: 758b1a2f233bccd7fe7ac73119c12c4152d68e21
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-02 16:17:01 +00:00
Kartik Chavda e62320f0c6 [FIX] project: fix copy functionality of project
Purpose of this commit to do not copy progress of the project
update when coping project.

So, In this commit make last_update_id field copy false
so default progress of the project update will be 0%.

task-2664773

closes odoo/odoo#79283

X-original-commit: 69dab41858ea737929591123e85f2f982f58589c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-11-02 15:06:57 +00:00
Ipsita Borisagar 706247a605 [IMP] project: private task visibility for users
PURPOSE

In project, private tasks (with no project) are visible to other users even if
they have project admin rights.

SPECIFICATION

Private tasks will not be visible to other users even if they have project admin
rights.

Task-2656512

closes odoo/odoo#78601

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-29 13:22:41 +00:00
William Braeckman 3d10c7c708 [IMP] project,*: improve project UX
* = hr_timesheet, sale_project, test_main_flows

Smaller changes:
 - Projects created on the fly (through `name_create`) will now come with a
   default `new` stage in order for them to not be empty.
 - Removed task auto assign upon creation besides in FSM's 'My tasks' menu.
 - Allow the reordering of projects without needing to group by
   anything.
 - Make `project.task`.`description` and `project.tags`.`name`
   translatable.
 - Disable the creation of records in the view when clicking on `Tasks
   in recurrence` stat button.
 - Track the planned date of the task in the chatter
 - Disable the creation of records in the view when clicking on
   'invoices' stat button and add the kanban view to that action.
 - Make milestones completely available to regular project users.
 - Remove the 'Documents' button in the project's kanban settings menu.
 - Add kanban, pivot and graph views to the 'Hours Recorded' stat button
   on projects
 - Add the calendar view on the 'Hours Forecast' stat button on projects
 - The 'Sales Orders' stat button on the `project.project`'s form view
   will now display the amount of sales order linked to the whole
   project. So the one linked to the project itself if it exists + all
   the tasks. It will also open them, form view if 1 else list view.
 - Fix a typo in the settings 'projets' => 'projects'
 - The analytic account  of the project will now be assigned to the
   sales order when a task is created through the 'Create a task in an
   existing project' option.

Changed the portal task view to include a sidebar similar to sales
orders, with a simple menu leading to different parts of the screen.

Changed the `project.task` 'rating' stat button:
 - The icon will now represent the latest review.
 - The action will directly lead to the record's form view if there is
   only 1 rating.
 - Make some fields readonly in the form view.
 - Display the % of satisfaction instead of the number of ratings.

Reorder all stat buttons on the `project.task` form view in this order:
 - Products, Worksheet, Sales Order(s), Invoices, Ratings, Hours
   Forecast, Parent Task, Tasks in recurrence, Tickets, Quotations and
   lastly Customer Preview

Make the status of the project editable directly through the kanban
view. A new widget has been added to handle that properly. When editing
the status through that means, a `project.update` will be created with
the current date and the appropriate status. In addition to that a new
status has been added (only on `project.task`, not `project.status`)
namely `to_define` in order to differentiate new and running projects.
Projects now start with the `to_define` status.

The `project.project`'s  rating stat button has been changed in the
following ways:
 - The icon will now change in function of the satisfaction percentage,
   smile above 66%, meh between 33% and 66% and frown below 33%.
 - The color will also change depending on the rate, smile is green, meh
   is orange and frown is red.
 - The ratings will now be in function of the last 30 days instead of
   all time and the action will also filter on those 30 days.
 - Change the action name from 'Rating' to 'Ratings'.

`project.project` ticket stat button:
 - Will now open the form view when there is only one record.
 - Added the activity view.
 - Disable the creation of new records.
 - Rename the action to 'Tickets'.

Closes: odoo/odoo#75269

See: odoo/enterprise#20334

Task ID: 2611006

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-28 15:27:36 +00:00
Laurent Stukkens (LTU) fd2a6c904d [IMP] project: add task dependencies in demo data
This commit adds task dependencies data in the demo data.

task-2647340
Related PR: odoo/enterprise#21391

closes odoo/odoo#79103

X-original-commit: d7c2a7eb5b6ee77772b0f104515125f3f31eb50d
Related: odoo/enterprise#21933
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-27 19:24:01 +00:00
Kartik Chavda 9e0621db01 [IMP] project: improve follow and unfollow functionality for project
Currently, unfollowing a project removes the user from all the tasks he was
following. Conversely, following a project or updating your notification
preferences makes the user a follower of all the tasks of the project without
distinction. These consequences are a bit extreme in case the user misclicked,
or simply decided he no longer wanted to be a follower of every newly created
task.

In this commit, when unfollowing a project should not remove the user from
the followers of all the tasks, and following a project should not add the user
to the followers of all the existing active tasks, neither should updating the
user's notification preferences But if the user explicitly update the user's
notification preferences for the project then its propagated to all the tasks
that the user is currently following.

closes odoo/odoo#67142

Task-id: 2440659
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-26 20:25:04 +00:00