Commit Graph
427 Commits
Author SHA1 Message Date
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
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
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
Vincent Larcin a06a99fb12 [FIX] project: remove a traceback when moving a project to a stage with a with an email template
Steps to reproduce:
==============
1) Go to Project app and create a project A if you don't have any project.
2) Go to Project > Configuration > Settings.
3) Enable the "Project Stages" feature.
4) Go to Project > Configuration > Project Stages.
5) Show the Email template field in the list view and set a template on a stage. (create a stage before this step if none exists)
6) Go to the main view of Project App.
7) Move Project A to the stage with the template set.

Expected Behavior:
==============
The system should use the template for the mail tracking.

Current Behavior:
============
Traceback because the method `xmlid_to_res_id` does not exist in `ir.model.data`.

Task-2677199

closes odoo/odoo#78947

X-original-commit: 1d1eaad402dac523404296024f44d3c852ee1daf
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-26 07:47:55 +00:00
5652e7ee91 [FIX] project: Fix user_ids access issues on project sharing
Both developments 6c4910a and 7563b44 have been introduced nearly
at the same time in the saas-14.5 version, but the later one is
introducing a side effect that breaks the project sharing feature.

Indeed, before there was one assignee per task (user_id), and now
we can assign several collaborators (user_ids).

As the read on a M2O is just calling the name_get method, it wasn't
an issue.

Now, as it implies to read the res.users (and the res.partner) model,
the assigned users were filtered according to a specific ir.rule
for the portal users:

    <record id="res_partner_rule" model="ir.rule">
        <field name="name">openerp.portal.res.partner</field>
        <field name="model_id" ref="base.model_res_partner"/>
        <field name="groups" eval="[(6,0,[ref('group_openerp_portal')])]"/>
        <field name="domain_force">[('id','child_of',user.commercial_partner_id.id)]</field>
    </record>

This commit creates a new compute non-stored field called
`portal_user_names` to display the name of all assignees in each task in
the project sharing feature. Thus, the portal user can see all assignees
via this char field. The `user_ids` field is removed in the views of
project sharing since the portal cannot see all assignees with this
field.
By doing this, a collaborator cannot edit the field to assign or unassign
himself to a task. To keep this behaviour, two buttons are added in the
form view of task. One called 'Assign To Me', the current collaborator
will be able to assign himself to the task when he will click on this
button. The other button called 'Unassign Me' is to allow the
collaborator to unassign himself to the task.

part of task-2633229

closes odoo/odoo#78538

X-original-commit: 3b5a657df086b54def0bc0bdae89c19c89cb39f5
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2021-10-18 14:01:36 +00:00
Nasreddin Boulif (bon) ea7c954cce [FIX] project: Use task object instead of self
Issue: Getting recurrence start date from self instead
of current task.

commit ref.: https://github.com/odoo/odoo/commit/b50f5f17ee7140160e72bd37241efb14e14a9484

opw-2628777

closes odoo/odoo#77985

X-original-commit: 864ae7d307dd192ada6f34b2685b5554b77a3756
Related: odoo/enterprise#21514
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-06 22:12:28 +00:00
Cedric Prieels (cpr) 56ef461f44 [FIX] project: follow-up the project overview removal
-- This is a follow-up of odoo/enterprise#72736 --

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-2637495
See odoo/enterprise#20740

closes odoo/odoo#77547

X-original-commit: 9bbfd3c8f948a3a947cbc0eb73ffc5d89c23d4ca
Related: odoo/enterprise#21324
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-30 20:56:12 +00:00
Thibault Libioulle 987023f3b5 [FIX] project: fix recurrence for child tasks
Previously, only the direct children of a recurrent tasks were copied
during a recurrence. Also, the child tasks which had a recurrence were
copied with the recurrence_id of the initial subtask, which lead the new
subtask to be linked with the recurrence of the initial subtask.

With this commit we copy the children until the 3rd layer. Also,
we hard copy the recurrence of the initial subtask and link this new
recurrence with the new subtask, to make it decoupled from the initial
subtask recurrence. Furthermore, if several initial subtasks has been
created with a same recurrence, only the first subtask is copied.

PR: #77126

task-2522076

X-original-commit: 808a965b4171a386f3987071c19cc27783ba0119
2021-09-28 15:40:16 +02:00
Thibault Libioulle 3b426db10a [REV] project: re-allow recurring sub tasks
With the modification introducted in the PR #62577, create recurring
subtask was no more allowed.

This commits reverts this limitation and adds tests to verify this
behaviour.

PR : #77126

task-2522076

X-original-commit: f6b12588757bd7f2d7802264fc7cd1aaae4c6c57
2021-09-24 20:23:49 +02:00
Thibault Libioulle 1455e34cd5 [FIX] project: remove default group by user
This commit removes the default group by User for the Tasks Analysis
report, which was active once one clicked on "Open Tasks" in the Project
Update Kanban view.

This commit also removes the default group by user in the graph view
(which is induced by the field in the graph arch, through graph view
init function).

Issue :
The graph view of report.project.task.user is not able to render the
project_id>user_id groupby since the number of rows to display is to
high.

After considering improvements client-side (e.g. drop last groupby
when there are too many datasets to render), we concluded that the case
of report.project.task.user is rather isolated. The real issue is that
this 'complex' two-level groupby is forced in the view itself, making
it unusable on larger databases (e.g. next.odoo.com).

On top of that, project_id and user_id are usually dependent dimensions
(users are usually working in the same few projects).

PR: #73299

task-2588087

closes odoo/odoo#77013

X-original-commit: 605b4e109afabaff0876ca92cecfce9a6c615977
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-23 06:03:06 +00:00
Xavier BOL (xbo) 5b51f369aa [IMP] project: change the analytic account name when project one changes
Before this commit, when the user changes the project name, we don't
change the one in analytic account linked even if the analytic account
is only linked to one project.

This commit also changes the name of the analytic account when the
project name changes and the analytic account is linked to only one
project.

task-2638359
closes #76166

X-original-commit: de9fbbd4228a35c4fecef8be42477416cfcbdd8d
2021-09-14 21:24:59 +02:00
Thibault Libioulle 9ed5f1e64d [IMP] project: sort updates by date
With this commit, project updates are sorted depending on their date
rather than the create date.

task-2638359
closes #76166

X-original-commit: b65edac046bb7fea649474d2282e0afa2d6f5703
2021-09-14 21:24:59 +02:00
Thibault Libioulle bf6f91eab9 [IMP] project: add dependent tasks stat button
This commit adds a stat button representing the number of dependent
tasks, the current task is blocking.

This is the inverse relation of "Blocked by".

task-2638359
closes #76166

X-original-commit: d841e4a7e25fd56c49c0cd3b51994a7fda4cbc8b
2021-09-14 21:24:58 +02:00
Xavier BOL (xbo) 0302a262c8 [IMP] project: rename the See more button into Edit project in kanban
Before this commit, we rename the 'Edit' button into 'See more' but we
prefer to directly edit the project when we click on this button
So, it is to have 'Edit' as name and directly enter in the form view of
the project in edit mode.

This commit renames the button into 'Edit'.

task-2638359
closes #76166

X-original-commit: e960b2966bdd16f369df9fbd8e4cf372c37bd37a
2021-09-14 21:24:57 +02:00
Cedric Prieels (cpr) 828d5157a5 [FIX] project{,_mrp}: fix project update stat buttons
We are copying 3 stats buttons from the project
view form (manufacturing orders, work orders and bills of materials)
 and we add them to the project update page.

See task-2638359

closes odoo/odoo#76421

X-original-commit: 4572e710a5e755c0c75c95a6d033e44f0a2799f8
Related: odoo/enterprise#20811
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-14 12:07:39 +00:00
Xavier BOL (xbo) 58195290cc [FIX] project: count all active tasks instead of open tasks in project
Before this commit, the task_count field displayed in the 'Tasks'
stat button shows the number of open tasks, that is all tasks with
either no stage linked or stage not folded or not closed.
The problem is when the user clicks on this stat button (displayed in
project form view or in project update), he sees all active tasks in
the project.

This commit changes the count to display the number of active tasks
instead of the number of open tasks in the project.

task-2633229

closes #76167

X-original-commit: f6ace36d7f61c005f324559d02436f7ff69eb40a
Part-of: odoo/odoo#76263
2021-09-10 13:41:51 +00:00
Nasreddin Boulif (bon) dfc853aaad [FIX] project: Calculate the right task next occurrences dates
Steps to reproduce:

  - Install "Field Service" module
  - Go to settings and activate "Recurring Tasks"
  - Go to Field Service -> All tasks and create new one
  - Set for Planned Date : 10/01/2021 14:00 -> 10/02/2021 14:30
  - Check Recurrent and go to Recurrence tab
  - Select repeat every 1 weeks
  - Select Monday

Issue:

  Wrong date for next occurrences (first occurrence is 09/06 instead
  of 10/04).

Cause:

  Calculation based on today date.

Solution:

  Calculate next occurrences based on planned_start_date if set.

opw-2628777

closes odoo/odoo#76092

X-original-commit: 86060f9426eef6516db6dda7829ae17050f0fcc3
Related: odoo/enterprise#20659
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-09-07 15:50:28 +00:00
Fabien Pinckaers 55b4891d87 [FIX] project: bug when posting a message on two projects
closes odoo/odoo#76053

Signed-off-by: Fabien Pinckaers <fpodoo@users.noreply.github.com>
2021-09-07 06:51:29 +00:00
Thibault Libioulle 28836f48a4 [MOV] project: move the dependent_ids fields to community
This commit moves the project.task dependent_ids field to the community
project module in order to take advantage of this relation for further
development.

closes odoo/odoo#76011

Related: odoo/enterprise#20623
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-06 14:36:08 +00:00
Thibault Libioulle 741663f9de [FIX] project: fix project update default
Prior to this commit, the case where the update status was not set is
not handled in the STATUS COLOR mapping.

This commit associate a lighten dark color to the unset update status.

See PR : #68899
See task-2393768

PR : #70527

task-2458135
2021-09-06 10:41:14 +02:00
Cedric Prieels (cpr) 1ec2b3c0b0 [IMP] project: improve project updates
This commit improves the project updates panel and the data reported
in the update description.

This commit prepares the removal of the project overview feature.

PR : #72736
See odoo/upgrade#2706

task-2545084
2021-09-06 10:41:13 +02:00
Thibault Libioulle dd706ea024 [IMP] (sale_)project,hr_timesheet: add analytic account and tags on task
Previously, all costs allocated to a task were associated, if set, to
the analytic account of their project.

This commit adds a deeper level of granularity, as the user will be able
to override the project analytic account and add analytic tags.
When creating timesheets or creating account move line related to SO
linked to a task, the analytic account of the task is now taken into
account rather than the one defined on the project. If an analytic
account is set on the SO, it remains the default account used.

If a task is related to an SOL and an invoice line is created from this
SOL, the analytic tags of the task are also given to the account move
line.

If different analytic account are linked to a same SOL through the
project using this SOL or the tasks using this SOL, than no default
analytic account is set on the invoice line.

PR : #70527

task-2458135
2021-09-03 12:45:58 +02:00
Kevin Baptiste d9e47e23ef [IMP] project: UX improvements
- Align colors of Project Update bubble's to kanban colors
- Allow Project User to manage Project Updates

TaskID: 2615316
Related: odoo/enterprise#20426
Related: odoo/upgrade#2773
2021-09-01 14:22:38 +02:00
William Braeckman 7563b448da [IMP] project: add personal task stages and multiple assignments
Adds personal stages to tasks.
Users assigned to tasks will be able to have their own pipeline to
handle their tasks independently of the project's pipeline.

The assignee field on Tasks has also been changed to a Many2many to
support multiple assignees on one task.

The same table is used to store those information, essentially a triplet
(task, user, stage), to ensure that:
1) personal stages only apply to tasks to which you are assigned to.
2) synchronizing to make sure that you don't have a personal stage for a
   task on which you are not assigned anymore.

Alongside those changes, some minor changes have also been made:
- Modified the task's tree view.
- Renamed the Tasks menu to 'My Tasks'.
- The default view is now the kanban view for the 'My Tasks' action.
- project_id is not required anymore, tasks with no project are
  considered 'private', those tasks are only visible to those that are
  assigned to it.
- Added tracking of both user_ids and depend_on_ids in the chatter.

Closes odoo/odoo#74087

Task ID: 2398734
2021-09-01 07:17:40 +00:00
William Braeckman b74960f571 [IMP] project: hide dependency change subtype if option is disabled
A recent commit allows mail subtypes to be hidden depending on the
record fields. This allows us to hide the dependency changed subtype if
the option is disabled.

Closes odoo/odoo#75749

Task-2628818

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-31 12:43:54 +00:00
yhu-odoo 45912aaebd [IMP] analytic, project, *: Improve views
Improve the views of analytic.account and project.project.
Add category to analytic.line.

Task-2469742
PR #68708
2021-08-27 16:40:49 +00:00
Xavier BOL (xbo) e9134c71b6 [IMP] project: remove the create and edit in views of collaborators
Before this commit, the project manager could edit the collaborator
records. That is, he could change the shared project or the
collaborator.

This commit allows the user to only see or remove the collaborators for
a shared project. If the user wants to add some new collaborators, he
has to use the project share wizard.

task-2379518

closes #73341
2021-08-26 16:57:23 +02:00
Xavier BOL (xbo) 5d5be956f3 [IMP] project,hr_timesheet: enable project sharing feature when needed
Before this commit, the project sharing feature is enabled by default
when the Project app is installed but the user could never use the
feature and thus we add more access rights to portal user for nothing.

To avoid this, this commit removes by default all additional access
rights given by project sharing feature and adds this access rights only
when a collaborator is added.
If the user removes all collaborators for all projects then we need
to disable the feature. That is, we will remove the access rights and
ir.rule records added.
So, the feature will not really disable but we remove the additionnal
access rights and ir.rule records added with this feature.

task-2379518

closes #73341
2021-08-26 16:57:23 +02:00
Xavier BOL (xbo) a28cc6333a [REV] project: select access rights in project sharing
This reverts commit fc7778f8c512202dc3361d6b87be8c28b299c3c8 because of
a change in the spec.
The access mode are removed and replaced by this access mode for portal
user:
- read: the user goes to the classic portal view
- edit: the user is added as collaborator of the shared project and can
access to project sharing views.

To do this, the portal share is inherited by the project share wizard.
This new wizard can be open to share in readonly and open to share in
edit mode via 2 buttons in the form view of the shared project.
A new stat button is added to form view of project to see the
collaborators of this project. That is, the ones can access to the
project sharing views. The project manager will can remove or also add
new collaborators via the views in this stat button.

task-2379518

closes #73341
2021-08-26 16:57:23 +02:00
Yannick Tivisse 82b522ce3b [IMP] project: protect orm methods
Before this commit, the portal user could use the public orm methods to
get more information than he allowed.

This commit checks in the orm methods if the fields used in those
methods can be accessed by this user.

task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo)andYannick Tivisse 5ea5ddafea [IMP] project: select access rights in project sharing
Before this commit, when the portal user can access to project sharing
views, he can just read. If we just add ir.rule to allow the edition,
the portal could create/edit. We have to allow the project manager to
define the access rights of portal users when he want to share them a
project with the project sharing feature.

This commit adds 3 access modes portal users in project sharing views.
1. **Readonly**: the portal can only see the tasks in the different views.
2. **Comment**: the portal can use the chatter in task form view.
3. **Edit**: the portal user can create and edit tasks.

task-2379518

closes #73341

Co-Authored-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo)andYannick Tivisse a8af1361e5 [IMP] project: limit access to portal user in project sharing
Before this commit, the portal user can read all fields in the
`project.task` model.

This commit checks when the portal user wants to read task record(s) if
this user can see all fields given in parameters. When the portal user
edits or creates a task, we check if this user can edit fields and
create/edit the task based on his access rights and the ir.rules.

task-2379518

closes #73341

Co-Authored-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) 0e659dc4d7 [IMP] hr_timesheet,project: override project sharing views
This commit override the project_sharing views to add fields defined in
`hr_timesheet` module.

task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) e50bc12002 [IMP] project: add Project Sharing feature
Purpose:
=======

This commit adds the project sharing feature. This feature consists to
share the backend views about project.task to portal users.

About the access rights:
- The project manager can share a project with project sharing feature.
  To do this, he need to give access to portal users that we want their access in project sharing views.
  He can choose between 3 differents accesses:
    1. Readonly: the portal with this access right will only have read access to the project
        sharing views of the project shared.
    2. Comment: the portal with this access right will can use the chatter in task form view.
    3. Edit: the portal with this access right will can edit some fields of `project.task` model.

The difference between the classic backend views and the project sharing
views is in the project sharing views, we list the fields that the user
can read/write, so the portal users can see only the fields in
our list.
Moreover, the actions and the contextual menu (actions dropdown) are not
available in the project sharing views and the stat buttons are visible
but the click on these buttons are disabled.

Implementation details:
======================

This commit is realized in many steps:

- create the webclient and routes.
- create own qweb bundle.
- add project sharing views.
- use the session to define the action and active_id
- create public fields for project sharing: in this step, we lists all field
names of the `project.task` model that we want to display for the
portal user. Two lists are created, one for only readable field names
and the other one for the writable field names.
Moreover, two properties are defined in the `project.task` model to use the
both lists.
- use `access_token` and check model in project sharing route: in this
step we check if the model is `project.project` and the `access_token`
is the one set in the project since we have the id of the project in the
params url.
- allow only `GET` method to enter project_sharing routes: the
`/my/project/<int:project_id>/project_sharing` route must only be
called with a `GET` method because this route is only used to have the template
to render the project sharing webclient.

task-2379518

closes #73341
2021-08-26 14:59:32 +02:00
William Braeckman 25f8554426 [IMP] project: add project stages
Adds new optional stages for the project.project model.

Previously projects would stay dormant when they were finished, we can
now define stages for those projects to determine where a stage is in
it's lifecycle.

Also adds some small changes to the project itself, such as adding tags.

Closes odoo/odoo#73648

Task ID: 2581575

Related: odoo/upgrade#2646
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-08-23 07:45:56 +00:00
William Braeckman d8a0912bbf [IMP] project: track dependencies in tasks
Tasks that are blocked by other tasks don't get any other information
from those tasks.
In order to get updates on the state of the blocking tasks we now track
some fields (determined by the `task_dependency_tracking` attribute) in
the parent's chatter.

Task ID: 2601448

closes odoo/odoo#73965

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-18 11:19:38 +00:00
Martin Trigaux c7bac3dee0 [IMP] *: make ir.model.data helper private
No reason to interfact with them directly in RPC
2021-08-10 13:49:04 +02:00
Cedric Prieels (cpr) 6ed20e3489 [IMP] project: improve the UX of the app
Generic UX improvements for the project app.

task-2501760
See odoo/enterprise#18819

closes odoo/odoo#71232

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-07-23 06:45:50 +00:00
Mitali Patel 8a585c0739 [IMP] sale_(project), hr_timesheet: improve task analysis report
Purpose of the commit is to improve the task analysis report
of the project app.

So in this commit, done the below changes:
- removed the # of tasks measure
- added the following measures: Rating Value (/5), Working Hours to Assign, Working Hours to Close
- removed the # from the labels of the following measures: Days to Deadline, Working Days to Assign,Working Days to Close
- renamed 'task title' into 'task'
- added a search on tag_ids and sale_order_id
- added the following filters:
   -My Projects + My Team's Projects
   -My Tasks + My Team's Tasks (rename 'Unassigned' into 'Unassigned Tasks')
   -Starred
   -Tasks Late + Tasks in Overtime
- added the following group bys: task, customer, kanban state, assignment date, creation date, deadline, last stage update

closes odoo/odoo#72587

Taskid: 2508645
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-07-22 09:09:49 +00:00
William Braeckman 1e4dcbbd10 [FIX] project: fix rating_active default value
The default value for `rating_active` on the `project.project` model
wasn't set properly to the settings value.

Closes odoo/odoo#73683

Task ID: 2602636

closes odoo/odoo#73722

X-original-commit: 268daa259c6d36acd0ac9b4402ef87fb4e0ed36c
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
2021-07-14 13:36:07 +00:00
Cedric Prieels (cpr) 0ed38652a4 [IMP] project: improve globally the UX
The UX of the 4 main views (kanban, form, list, portal) of the project app has been globally improved.
In particular, different icons color/style were changed along with several strings, and the order of a few elements was revised to improve readability.

task-2508723
See odoo/enterprise#18387

closes odoo/odoo#71011

Related: odoo/upgrade#2506
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-28 12:58:25 +00:00
Barad Mahendra 27538bca03 [IMP] project,hr(_timesheet)_holidays: usability improvement for project
Purpose of the commit is to improve the usability and onboarding
of the project app.

So in this commit, done the below changes:
 - Rename column "Kanban state" in list view screens
 - Hide column "analytic account" when not needed
 - Do not show "Internal" project

PS: Moved leave_timesheet_project_id into hr_timesheet and rename
it as internal_project_id and we used it in the domain in the
kanban/action to the kanban in order not to have it in the result.

closes odoo/odoo#68857

Taskid: 2451722
Related: odoo/upgrade#2479
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-24 05:18:14 +00:00
bbh-odooandxavierbol 842845bf46 [IMP] project,web: update the translation for some terms
It seems some terms are no translatable so purpose of the task is
to find those terms ans update to make them translatable.

So in this commit, translate the text attribute when the node is field
tag and this node contains widget='url' in its attributes. and
also make the project name as translatable.

closes odoo/odoo#71406

Taskid: 2487710
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: xavierbol <xbo@odoo.com>
2021-06-23 05:02:47 +00:00
Barad Mahendra 29147681a7 [IMP] project: do not display the archived sub-task in list
Currently, when go to project > settings > enable 'sub-tasks'
create a task >> add a sub-task and archive the sub-task
then the archived sub-task is still displayed in the sub-tasks list

so in this commit, removed the active_test context from the field to
hide the archived sub-task. also include the timesheet of archived
task while calculating the subtask_effective_hours and on click
of sub task hour open the timesheet of archived tasks.

PS: revert of the commit: https://github.com/odoo/odoo/commit/7a2cba3c8934064b311da4312ef2fbd07c6329ec
As we would deduct archived tasks from the count and the number of planning hours,
and keep them included in the timesheets.

closes odoo/odoo#71719

Taskid: 2534898
X-original-commit: e527ed80e25f638390fd8c56296e690b1630ec49
Related: odoo/enterprise#18744
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: Mahendra Barad <mba-odoo@users.noreply.github.com>
2021-06-04 06:58:57 +00:00
Thibault Libioulle e48be257e1 [IMP] project: add rightpanel in project update view
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
2021-06-01 12:03:55 +02:00
Thibault Libioulle c92673c10e [IMP] project: add control panel button for project updates
This commit aims to add a button in the control panel to easily display
the current project update status.

This is done by extending ControlPanel Component and template.

We must add a context value `show_project_update` to enable the
button in the breadcrumb and it's done only once; e.g. when we click to
see all project tasks of an active project.

The button redirects to a kanban list view of the project_updates.

The activity rng is modified in order to accept js_class definition.

Following commits will add behaviour to handle those updates and
milestones in the various views. See PR for further information.

PR : #68899

task-2393768
2021-06-01 12:02:57 +02:00
Thibault Libioulle c5cac92280 [IMP] project: add project updates and milestones
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
2021-06-01 12:01:37 +02:00
Xavier BOL (xbo) f79c84e2e9 [IMP] project: display commercial_partner_id in project kanban view
Before this commit, when the partner_id in the project, we display the
partner_id selected in this project in the kanban card of it.

This committ displays the commercial_partner_id rather than the
partner_id in the kanban card of each project in the kanban view to be
consist with task's kanban card.

task-2232042

closes #51471
2021-05-20 13:32:18 +02:00
Yannick TivisseandXavier BOL 29bdb04421 [IMP] project: Improve task's partner_id management
Purpose
=======

During the development of the task #2169100, it appeared that the synchronisation
of a task's partner_id according to its project's partner_id and its parent's
partner_id was not very clear.

A first idea was to simplify the partner_id management: as it could be annoying
for the customer to see all the task's partner_id overriden after project's
partner_id modification, the idea was to just use the parent's parnter_id or the
project's partner_id as default value of the task's partner_id. Then, if the
partner_id of the project or of the parent is changed, there is no more impact
on the task partner_id itself.

The main problem of this solution is that the management of the task's partner_id
is also extended in several others modules like sale_project and sale_timesheet.

You can find below what seems to happen with all these task partners.

Start following rules according to which module is installed.
(for the record: sale_timesheet depends on sale_project which depends on project).

Rules are applied in the order they are written.

Rules labelled "O" only apply when changing the project through the task form view.
Rules labelled "C" apply everywhere.

technical: C=compute, O=onchange

project
C.1 If parent's partner changes and the partner is not set, then set the parent's
    partner
C.2 Else if project's partner changes ant the partner is not set, then set the
    project's partner

sale_project [+ project]
C.1 If the project's sale order line's partner changes and the partner is not set,
    then set the project's sale order line's partner
C.2 Else apply (project.C) rules

sale_timesheet + [sale_project + project]
C.1 Apply (sale_project.C) rules
O.1 If the project is billed "At Project rate" or "At Employee Rate" and the
    partner is not set, then set the project's sale order's partner
    the sale order line's partner

Specification
=============

- If the partner changes, we ignore all current tasks and let them be. We set the
  new partner as default value on all new tasks. In detail, we have done
  this:
    - When the user creates a task give the customer of the default project or the
      task parent as default customer for the task.
    - When the user changes the project and no partner in the task, we take the
      partner of the new project (if this project has a customer).
    - When the user changes the customer of the project, the linked tasks are not
      impacted by this changes, even if some tasks have not a customer yet.
    - When the user changes the customerf of the parent task, the child tasks are
      not impacted by this changes, event if these tasks have not a customer yet.
- remove the onchange rule to remain consistent.

TaskID: 2232042

closes #51471

Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
2021-05-20 13:32:18 +02:00
Thibault Libioulle 64969cfccf [FIX] project: change default stage when changing project
Prior to this commit, the default stage didn't follow the value of the
display project id as the project_id was only updated after the write
call.

This commit makes the project_id to be updated after the display
project id changes.
This allows the default stage to be updated too once the onchange is
done.

Tests
---------------

This commit changes the behavior of a test making the use case more
smooth.
Previously, when a user removed both display project id and parent id
from a subtask, the project id was set to False. Now, if the display
project id is removed, the project id goes back to parent project, and
when the parent is set to False, it doesn't affect the display project.

PR: #50576

task-2522066

closes odoo/odoo#71029

X-original-commit: a908b9e8e6577bb7f8c8769db730c855fcad9504
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-05-19 11:31:18 +00:00