Commit Graph
368 Commits
Author SHA1 Message Date
Rémy Voet (ryv) b60cf1f977 [REF] _read_group_raw doesn't exists anymore
`_read_group_raw` has been remove in previous commit. Convert all usage.

Part-of: odoo/odoo#110737
2023-04-19 21:58:28 +02:00
Rémy Voet (ryv) 687d0ed285 [IMP] *: change the override of read_group
The new backend version of read_group can simplify the
current overrides of read_group. Do it for each of them and
avoid making extra search (done with __domain) when it is possible.

Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Vincent Larcin 4e3f4f2dbc [REM] project,hr_timesheet: remove task report list view
In a previous task, the task reporting list view was removed from
the interface, but the view is still present in the code.

Since this view is no longer used, this commit removes it.

closes odoo/odoo#118328

Upgrade: https://github.com/odoo/upgrade/pull/4538
Related: odoo/upgrade#4538
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-13 05:07:28 +02:00
Pratik Awasthi 0e2c84592f [FIX] project: fix opening of project from list view
steps:
project > kanban card > task analysis > list view of report

cause:
trying to open a project from the list view

issue:
looking for __count in read_group

fix:
add no_open to project_id in the list view because we can open a project from
kanban card and configuration

task-3111378

closes odoo/odoo#117773

X-original-commit: aa051ccf9566cb0eb74d6357de7f069165349e48
Related: odoo/enterprise#39360
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-06 11:46:57 +02:00
hiroh-odoo 647cf8fe63 [IMP] project: prevent opening form/list view from reporting
Before this commit open the form/list view from reporting views when clicking
on the graph and pivot.

This commit prevents the opening of the form/list view from reporting.

task-3166747

closes odoo/odoo#113362

Related: odoo/enterprise#37402
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 18:58:51 +02:00
Vincent Larcin 20f938bd10 [IMP] project: add fields to burndown chart search view
This commit removes some field from the burndown chart search view that
were previously removed from the task search views.
It also adds a few fields present in the task search views but missing
from the burndown chart.

Enterprise: https://github.com/odoo/enterprise/pull/36804

Task-3142077

closes odoo/odoo#112194

Related: odoo/enterprise#36804
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 18:58:43 +02:00
Rohitkumar (roku) 21f9219dff [IMP] sale_(project),hr_timesheet: generic UX improvement for project
Purpose of this commit to improve generic usage of project app.

So in this commit done the following changes:
  - the sequence field should not be optional for project.task.type list view
  - move the fa-play icon next to the remaining hours widget in kanban view
  - add filter and separator for burndown chart search view
  - transform the 'milestones' stat button into 'x Milestones /n y Reached
  - change the recurrence banner
  - add the placeholder for the label_tasks field 'e.g. Tasks'

task-2947481

closes odoo/odoo#99528

Related: odoo/upgrade#3872
Related: odoo/enterprise#31047
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 15:08:56 +02:00
Xavier Bol (xbo) de7d0b17c5 [IMP] {sale_}project,{hr_,sale_}timesheet: remove display_project_id field
Before this commit, the `display_project_id` field was a bit confusing
for the user to know what is the goal of this field. Also this field is
available when the user wants to import his data into Odoo, if he does not
know the goal of this field then he could be lost to know which field he
should for his data to import (or even export).

This commit removes the display_project_id field and so a task will be
private one if the project and the parent fields are not set. The
project to set to the timesheet will be the one set on the task or the
one set on one of its parent tasks.

task-3230063

X-original-commit: 22eda5a5ddcfcda9fa6597d6fe21eb20f525799f
Part-of: odoo/odoo#115781
2023-03-24 02:23:37 +01:00
Audric Onockx (auon) 859156905c [MOV] project: create a separate file per model (views and models)
In this commit, delete the part of each file
that is not related to its model.

task-3234479

closes odoo/odoo#115694

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-22 14:52:10 +01:00
Bastien (bvdn) 2e78356f82 [IMP] project,*: create new task.state Selection field
Before this PR the task state was fixed by the kanban_state field which was useful when you use the stage of the project as parts of a pipeline,
but not relevant when users are using stages as bucket lists. (specific examples at the end of the specs)

The goal of this PR is to provide users a way to mark their tasks as done with a simple button press,
while keeping the option to label a task as Approved, Canceled or Requesting changes like in the old kanban_state field.

The kanban_state of a task had no impact whatsoever on other tasks of the pipe, we would like to change that and make the task state have an influence on its dependent tasks.

The state will also have influence over the 'recurrent' tasks (to be implemented in Task #3084945)

If you want a better description of those changes with screenshot and colors check specs of:

Task-3084930

PRs:

See odoo/enterprise#35359
See odoo/upgrade#4367

-----------------------------------------

Interaction with blocking tasks:
the closed values which mark the task as closed or finished:
- Done
- Canceled

The Open values when the task isn't finished yet:
- In progress
- Changes Requested
- Approved
- Waiting (which is not selectable)

Where to change the state of a task:
- For kanban and form views: same place as kanban_state (bottom right of kanban card, top right of form view)
- For list view:  left of list (after task priority)
more details about the state widget in state field widgets part

Interaction with existing fields
- is_closed: which was determined by the task.stage_id.fold, now a task is closed when in one of the following stages
 - Done
 - Canceled
a closed task is considered as finished, the time of the closing will be stored in the date_last_stage_update field

- is_blocked: a task is considered blocked if ANY of its blocking task is in one of the blocking states (more details about this in the following part Interaction with blocking tasks):
 - in Progress
 - Changes Requested
 - Approved
 - Waiting

!! important !! is_closed and is_blocked are not mutually exclusive, you can have a task that blocked and is closed at the same time, the reason why will be explained late

date_last_stage_update: this field is updated everytime the task goes into a closing state OR when the task changes stage.
We need to check that the value is updated in each case (using the already available filter)

Interaction with blocking tasks
the state of a task can now be changed by its blocking tasks following the logic:

if ANY of the blocking tasks is NOT closed (so its state is in one of the open values) the task is considered as blocked

- if a task is blocked and NOT closed its state will switch to Waiting
 - the Waiting state will display an unclickable hourglass icon on the task kanban/list views, once in the waiting state you can't change the state of the taskfrom the kanban/list views
 - a blocked task state can be changed through the form view, so you can override the 'block' by choosing a closed state (only done or canceled)
  - once overriden, the task will change to the closed state the user wants, but the task is still blocked so in case where the user comes back to an open state, the task will automatically switch back to the waiting state (according to the state before the block)
- if the blocking task switches to a non-blocking state, the task will not be considered as blocked anymore and its state will switch back to In Progress

Default values
the default value is always in progress

Special cases
when a task is moved from a stage to another one
- if the state was in one of the open states (approved, changes requested, in progress ) the state goes back to In Progress
- if not, the state stays the same
when a task is moved from a project to another one
- the state goes back to In Progress
when a task is duplicated
- if the state was in one of the open states (approved, changes requested, in progress ) the state goes back to In Progress
- if not, the state stays the same

closes odoo/odoo#107593

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-08 21:33:03 +01:00
Hugo Carlier (Huca) 20b8635737 [REF] resource, project: replace the function remove_domain_leaf
The function remove_domain_leaf is currently used for project burdown
chart. Due to an increasing need of such a function in multiple modules
for various functional cases, it has been decided to:
- Move this function in 'resource' that is imported in all the modules
where this function is needed.
- Implement extensive unit test to ensure that it address corner cases.
- Refactor the function to address the corner cases it was not
addressing until now.

The refactored function 'filter_domain_leaf' is used to transform a
given domain to a new domain using only the leaves that verify a given
check (more precisely, the leaves whose first element verify this check). To perform this transformation, the leaves that do not verify
this check are considered as undetermined. All the logical operators
dealing with undetermined leaves are ignored, which means:
- AND(leaf, ?) = leaf
- OR(leaf, ?) = leaf
- AND(? , ?) = ?
- OR(?, ?) = ?
- NOT(?) = ?
If the result of the operation is undetermined, it is returned as an
empty domain ([]).

closes odoo/odoo#105470

Related: odoo/enterprise#33657
Related: odoo/upgrade#4221
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-16 15:43:01 +01:00
Vincent Larcin b77f60b155 [REF] project,*: refactor projects/tasks views and reports
*=hr_timesheet,sale_project,sale_timesheet,spreadsheet_dashboard_hr_timesheet

The main goal of this PR is to minimize code duplication for the search and list views for tasks and projects.

Task search views
-----------------

The most important change was to merge the search views used in the task reports with the "normal" corresponding search view. The reporting search view should now be almost identical to the normal one in both project and fsm.

The `project.task`/`project.task.user` search views are now following this inheritance diagram:
```
    ┌─┐
  ┌─┤1├─┐
  │ └─┘ │
  │     │
 ┌▼┐   ┌▼┐
 │2│ ┌─┤3├─┐
 └─┘ │ └─┘ │
     │     │
    ┌▼┐   ┌▼┐
 ┌──┤4│   │7├──┐
 │  └┬┘   └┬┘  │
 │   │     │   │
┌▼┐ ┌▼┐   ┌▼┐ ┌▼┐
│5│ │6│   │8│ │9│
└─┘ └─┘   └─┘ └─┘
```
1. `view_task_search_form_base`: Base search view containing all the fields/filters common to project, project sharing and fsm
2. `project_sharing_project_task_view_search`: Search view for project sharing.
3. `view_task_search_form_project_fsm_base`: Base search view containing all the fields/filters common to project and fsm (not project sharing).
4. `view_task_search_form_project_base`: Base search view for project only, with fields/filter common to the normal search view and the one used in reporting.
5. `view_task_search_form`: Search view for project.
6. `view_task_project_user_search`: Search view for the project report.
7. `project_task_view_search_fsm_base`: Base search view for fsm only, with fields/filter common to the normal search view and the one used in reporting.
8. `project_task_view_search_fsm`: Search view for fsm.
9. `report_project_task_user_fsm_view_search`: Search view for the project report.

With this organization, we can easily add a field to both fsm and project at once, and even to project sharing at the same time. Since the goal is to keep the reproting search views identical to the normal ones, it'll also add the field to both of them.

Task list views
---------------
Similarly to the search views, the task list views were also refactored to minimize code duplication, following this inheritance diagram:
```
    ┌─┐
  ┌─┤1├─┐
  │ └─┘ │
  │     │
 ┌▼┐   ┌▼┐
 │2│ ┌─┤3├─┐
 └─┘ │ └─┘ │
     │     │
    ┌▼┐   ┌▼┐
    │4│   │5│
    └─┘   └─┘
```
1. `project_task_view_tree_main_base`: Base list view containing all the fields/filters common to project, project sharing and fsm.
2. `project_sharing_project_task_view_tree`: List view for project sharing.
3. `project_task_view_tree_base`: Base list view containing all the fields/filters common to project and fsm (not project sharing).
4. `view_task_tree2`: List view for project
5. `project_task_view_list_fsm`: List view for fsm.

Project views
-----------------
The search and list views for projects in fsm now inherit the ones from project, since our goal moving forward will be to keep those as similar as possible.

Other changes
-----------------
- Merged and removed many filters/fields from the task search views.
- Changed `total_hours_spent` and ` subtask_effective_hours` labels in `project.task` model to avoid changing them manually in many views.
- Renamed `state` into `kanban_state`, `hours_planned` into `planned_hours` and `hours_effective` into `effective_hours` in `report.project.task.user` to make it consistent with `project.task` (so we can keep the same views for both of those models).
- Moved the sale line filed in the "Settings" tab in the project form view (so that the `sale_line_employee_ids` field in "Invoicing" takes the full width).
---

Enterprise: https://github.com/odoo/enterprise/pull/34106
Upgrade: https://github.com/odoo/upgrade/pull/4216

Task-2746370

closes odoo/odoo#106015

Related: odoo/upgrade#4216
Related: odoo/enterprise#34106
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-13 16:27:17 +01:00
Hugo Carlier (Huca) 9bd19eec50 [FIX] project: deal with corner case in domain_remove_leaf
The method domain_remove_leaf is used to remove leaves from a domain
corresponding to given fields. The particular case ['|', leaf_to_remove,
leaf_to_remove] is replaced by [true_leaf] however the check of the
second element of this subdomain was incorrectly done. This fix
addresses this issue.

Fixes https://github.com/odoo/odoo/pull/93225

closes odoo/odoo#108188

X-original-commit: 44578077b16b540a0270ea7257f902a2e917f79c
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-19 09:28:21 +01:00
Adesh Jolhe (adjo) 11ea3fd06e [FIX] {sale_}project,hr_timesheet: translate various messages
Before this commit, some error messages and others messages are
not translated.

This commit uses the translation function to be able to translate
those messages.

task-3006627

closes odoo/odoo#105192

X-original-commit: 85ef44cd66474bf5dcda4d7478d566e462d1a550
Related: odoo/enterprise#33717
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-08 23:14:51 +01:00
niyasraphy fa2e34e1fc [FIX] project: prevent opening the form of report.project.task.user model
closes odoo/odoo#104506

X-original-commit: 910a0bda28c84e96a93430044f841b4f28055b3a
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-04 14:59:15 +01:00
Pratik Awasthi 142b1d45f2 [FIX] project: fix list view of task analysis
Before this Commit, project > reporting > tasks analysis > drill down the
graph/pivot view > list view was editable and allowed creation of new records

After this Commit,  project > reporting > tasks analysis > drill down the
graph/pivot view > list view is not editable and does not allow creating
new records.

task-3000758

X-original-commit: ff2bed424064ef5cf049ae8ad0d47f65d33bf5b9
Part-of: odoo/odoo#102768
2022-10-08 13:30:23 +02:00
Adesh Jolhe (adjo) da868d28e2 [IMP] hr_timesheet,sale_(project): bring generic improvements for project
Purpose of this PR to improve generic usage of project app.

So, in this PR done following changes:
 - In project.project form view :
 - Divided settings into sections
 - In project.update.search.view :
   - Added author, description and status in quick search
 - Added ancestor task in group by and replaced parent task with ancestor task
   in search view
 - In project.task search View:
   - the filter for unread messages should be visible only if the current user
     managing his notifications in Odoo
   - Added  my private task filter
 - In project_task_view_graph
   - Added a default project > stages group.
 - In project.task form view:
  - If stage is_closed added decoration-muted
 - Replace/Add parent task with ancestor task' in group by and quick search
 - analytic-tags set on project should be automatically applied to it's tasks

task-2844212

Part-of: odoo/odoo#93676
2022-09-19 17:16:27 +02:00
Rohitkumar (roku) e849ca6fa7 [IMP] sale_(project),hr_timesheet: generic UX improvement for project
Purpose of this commit to improve generic usage of project app.

So in this commit done the following changes:
 - apply the 'open tasks' filter by default for my task menu
 - the search view set  the one from accounting and not timesheet for
   gross margin stat button
 - add a 'stalling for 30 days+' filter that should return open tasks whose
   last stage update was more than 30 days ago  for project task form view
 - move the 'stage' quicksearch above the 'project' one for burndown chart
 - when archiving a project containing tasks that are recurrent, disable their recurrence instead of
   raising an error
 - format some field in timesheets notebook in project sharing
 - display the 'rating email template' field by default for task stages

task-2899490

closes odoo/odoo#95636

Related: odoo/enterprise#29270
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-06 12:01:26 +02:00
Laurent Stukkens (LTU) b653c5f647 [IMP] project: add measure and filters to burndown chart
This commit's purpose is to improve the user experience when using the
burdown chart as well as preventing fetching all the data in order to
prevent long loading time on big databases.

This commit adds `Allocated Hours` (`planned_hours` field) in the chart
measures as well as default filters in order to restrict the data to
the tasks which stage have been modified this year or the previous
one, or which current stage is not `closed`. This commit also hides the
`stage_id` field from the one that are available in the group by as this
report requires it to be set (and thus we need to prevent the user from
removing it).

task-2941625

closes odoo/odoo#97321

Related: odoo/documentation#2551
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-22 18:03:13 +02:00
hiroh-odoo 543f36d9e4 [IMP] project: add ancestor_id field in task analysis report
This commit add a ancestor_id field in task analysis report.

task-2824000

closes odoo/odoo#91023

Related: odoo/enterprise#27166
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-08-08 10:50:33 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
Laurent Stukkens (LTU)andYannick Tivisse ac7cd0e874 [IMP] project: improve burndown chart performance
Purpose of this commit
======================

The Burndown Chart report was very slow on big databases as it was not
possible for Postgresql to optimize the query as it was based on a view
that was using several generate series.

This commit aims to improve the performance by injecting the constraints
at a lower level than it was in the past, lowering the amount of data
processed in the higher level of the query.

/!\ Important note
------------------

Overwriting the `read_group_raw` is really not a good practice and should
be avoided in most case. If you fall on this implementation by grepping
the source code, please be advised that this is not the right way of doing
things.

Implementation details
----------------------

- The report is now run by generating the `SQL` that is executed by the
  `read_group_raw`. This allows inserting `SQL` constraints at a lower
  level and simnifically improves performance. As there is no other way
  to do it, the code is unfortunately a modified copy of the actual
  `read_group_raw`.
- The pivot view has been removed as it had no meaning and was creating
  confusing data.
- The `Group By` menu has been limited to `stage_id` and `date` as bringing
  more data trough the different `GROUP BY` statements up to the higher level
  is costly. Further more, additional `Group By` did not bring added value
  as the Chart was less readable.
- The JS code has been adapted in order to force a group by both `stage_id`
  and `date` so that the date displayed is always making sense.
- The sort ascending and descending options have been removed as creating
  confusing data.
- The compare with previous period has also been removed as the chart only
  really make sense when seen chronologically.
- A lot of tests have been added in order to ensure that changes that would
  be harmful for the report will trigger test fails.

task-2845729

Co-authored-by: Yannick Tivisse <yti@odoo.com>
2022-07-20 15:57:32 +02:00
Goffin Simon 24c05db8b8 [FIX] project: Deadline not reset when task is closed
Steps to reproduce the bug:

- Let's consider a project P with 2 stages S1 and S2 where S2 is a closing stage
- Create a task T in P and set T in S1 with a deadline in the past
- Pass T to S2

Bug:

T was still appearing when selecting the filter Late tasks

opw:2900663

closes odoo/odoo#96308

X-original-commit: a88611e634ca74478308c274e43ea0de0d4716b2
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-07-20 10:59:04 +02:00
Xavier BOL (xbo) d128a7683b [IMP] project: add 'Late Milestone' filter in tasks
Before this commit, the milestone is displayed in red in project update
when its deadline is in the past. To display the tasks containing a late
milestone, a filter need to be added.

This commit adds this filter to display the tasks containing a milestone
with a deadline in the past. This filter is also added in the `Tasks
Analysis` and the `Burndown Chart` reports.

task-2829542
2022-05-31 10:29:08 +02:00
Hubert Van de Walle (huvw) 516b539237 [FIX] project: Burndown Chart date_group_by selection is empty
Steps to follow

  - Go to project
  - Click on the 3 littles dots on a card
  - Go to Burndown Chart
  - Add a custom filter on the date_group_by field
  -> this.fields[condition.field].selection[0]

Cause of the issue

  The date_group_by field selection should be declared as a list, not a
  tuple

opw-2819936

closes odoo/odoo#91397

X-original-commit: e3254a882199f229e4a8b4f38ce7f7529fd8da46
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-05-16 10:09:49 +02:00
Kartik Chavda c0da9d934c [IMP] (sale_,)project,hr_timesheet: improve generic ux of project
Purpose of this commit to improve generic usage of project
app.

So, in this commit done following changes:

- add 'my department' filter in project search view.
- add 'my department's tasks' and 'my department's projects filter
  in task search view.
- add quick search, filter and groupby in task analysis report search view
  to make task analysis report search view same as task's search view.
- improve portal template of my/tasks page.
- project.task form view > timesheets: display the employee avatar
  on mobile.
- make 'Task: Rating Request' template auto_delete false.
- settings: make following features disabled by default: sub-tasks,
  task dependencies, recurring tasks.
- project.update kanban list: align the stat buttons with the kanban
  list cards.
- add sample data to the project stages > list view.
- project.task quickcreate: enable the creation of new users on the
  fly.
- move tags quick search below project.
- add title to show  project full name on hover of project name in kanban
  view of project.
- copy user_ids for task in recurrence.
- improve UI visibility of planned_hours and subtask_planned_hours field in
  timesheet page of task form view.
- improve project sharing wizard and project.collaborator tree
  view.
- add grid,kanban,pivot and graph views to 'hours spent on
  sub-tasks' button's action.

closes: #83482
task-2742725

Related: odoo/enterprise#23788
Related: odoo/upgrade#3480
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-03 17:53:45 +02:00
abderraouf e9f21c9583 [FIX] project : average rating is wrong in tasks analysis
Before this commit:
- Join between task and rating is made on parent_res_id
- Displayed value is the sum of tasks average_rating
- No Unit test to cover this case
- Measure displayed when customer rating setting is not active
- [Demo data] Each task is rated one time so average_rating and last_rating are the same

After this commit:
- Join is made on res_id which is the task_id
- Displayed value is the avg of tasks average_rating
- Unit test added to cover mesaures calculation
- Measure dusplayed only when setting active
- New demo record added to let average_rating be different from last_rating

closes odoo/odoo#89764

X-original-commit: 3a5d816ef26a164fc38965154e38b45e33f9a81e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-04-27 07:52:21 +02:00
Cedric Prieels (cpr) 75c4468b9a [IMP] project: rename starred field and other generic improvements
- The starred field was renamed as priority.
- The assigned date is now set back to False when the user is unassigned from the task
- An action helper was added to the collaborators view
- The year mode was added to the calendar view of tasks

task-2802506

closes odoo/odoo#87139

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-25 14:42:04 +02:00
Vincent Larcin b893695bf9 [IMP] project: merge identical measures in burndown chart
In a project burndown chart, we currently have two measures, "Count" and "# of tasks".
Those measures are identical, but the default "Count" one is less explicit.

We only want to keep "# of tasks", but rather than discarding the default measure,
we could rename it and remove the other one.

This commit removes the "# of tasks" measure, and renames the default "Count"
into "# of tasks".

Task-2734458

closes odoo/odoo#86110

Related: odoo/upgrade#3357
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-04-20 10:32:57 +02:00
Cedric PrieelsandPriyanka Kakadiya aa24c3a757 [IMP] *: improve report security
* hr_timesheet_{attendance}, project, rating, sale_timesheet

- removed the 'admin' group on the reporting menu items so that 'users' can
  access these menus.
- 'timesheet / attendance' menu should only show if user has access for both
  the attendance and timesheet.
- Project/User should access 'Task Analysis' report And Added rule for user.
- customer ratings: only show ratings which has access of their project/task.
- ratings: user should not able to edit ratings.

task-2467564

closes odoo/odoo#82634

Related: odoo/enterprise#23439
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
2022-03-16 16:07:00 +01:00
Thibault Libioulle e315087850 [REM] project: remove invisible field in graph
This commit removes dead field, as invisible fields are unused in the
graph views.

See also #77013

Part-of: odoo/odoo#77024
2022-03-10 18:19:51 +00:00
eb1bd132af [IMP] project,hr_timesheet: store is_closed and add an index
Before this commit, when the user searches all the open tasks (the tasks
without a stage set or the tasks are in a stage where `fold` is False),
this search could be slow when a huge number of active tasks is in db
and most of that tasks is in a stage folded.

This commit stores the `is_closed` field to avoid doing a join into the
stage table to know if the stage linked to the stage is folded or not.
Because `is_closed` is a related of `stage_id.fold` and so we will avoid
doing a sql join to know if the task is a open one or not. To further
increase this search, an index is added too.

Closes #85513

closes odoo/odoo#85968

Related: odoo/enterprise#24828
Related: odoo/enterprise#25055
X-original-commit: cf8bb93
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
2022-03-07 20:23:15 +00:00
abderraouf f87d0d5226 [IMP] project : Add project Tree view, improve some wordings and hide uom conversion when default and selected are the same
Before this commit, In the product form, when the selected uom is Hours and as Hours is the default uom, we display this conversion (1.0 Hours = 1.0 Hours) which is useless
Before this commit, Kanban is the only view available for projects. With this view, we can't select a batch of projects and display optional fields
Before this commit, Some wordings didn't have a significant meaning.

This commit hides uom conversion when selected and default uom are the same.
This commit adds the projects tree view.
This commit improves some wordings according to what was mentionned in the task.

task-2724965

closes odoo/odoo#82135

Related: odoo/enterprise#23206
Related: odoo/upgrade#3207
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-28 20:23:53 +00:00
Thibault Delavallée 83d2affbe9 [MOV][FIX] rating: move rating values, thresholds and converters into a single file
Purpose is to try to have a single entry point when dealing with rating
values. Also fix incoherency introduced with odoo/odoo@32ba417549 where grades
are not coherent in all computation. This new computation seems better as
bad is now limited to <= 1 everywhere.

Task-2728564

Part-of: odoo/odoo#82792
2022-02-22 19:47:52 +00:00
Vincent LarcinandPriyanka Kakadiya 41116c81cd [IMP] project, sale_{project, timesheet}: improve user experience
This commit introduces some user experience improvements:

    - Always display sale_line_id field whether partner_id is set or not.
    - Don't restrict sale orders to the partner_id's one
    - Set partner_id to the one of the SOL if partner_id is False
    - Remove create option for fields 'user_ids'
    - Display the kanban state in the kanban view even in fsm

Task 2585357

closes odoo/odoo#73531

Related: odoo/upgrade#3211
Related: odoo/enterprise#19812
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
2022-02-17 10:08:43 +00:00
Kartik Chavda fae6762bfc [FIX] project: fix task analysis report base on set project
Purpose of this commit is to show only task that
has project_id set in 'Task Analysis' menu.

So, in this commit select only those tasks that has
project_id set in 'Task Anamysis' menu's query.

task-2722863

closes odoo/odoo#82565

Closes: #82442
X-original-commit: d8f3a0c4722d299f73892403b4ef5800913ea2a8
Related: odoo/enterprise#23409
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-12 10:17:53 +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
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
Prakash Prajapati e67ea6afb1 [FIX] project: disable opening form view from list view
Deleting record from tasks analysis report tree view has been stopped.

Issue:
If the record is opened from the list view, auto-generated from view is opened,
so the list view is restricted.

Closes #76465

task-2645891

closes odoo/odoo#77094

X-original-commit: e9ad8994c2836fcec41565c40e36784bd6152943
Related: odoo/enterprise#21136
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-24 12:34:57 +00:00
Prakash Prajapati 4217e58a89 [FIX] project: rename the 'assigned to' into 'assignees'
Closes #76465

task-2645891

X-original-commit: 493a185b83eafef40beac9c6c3f51d4c16c64d50
Part-of: odoo/odoo#77094
2021-09-24 12:34:56 +00:00
Priyanka Kakadiya 6a6f2f83d1 [FIX] project: show current project stages for burndown chart
Currently when move the task from one project(A) to another project(B)
and open the burndown chart of second project(B) it shows the stages
of first project(A). which is wrong.

so in this commit, include the tracking values of the current project
only, do not include the tracking value of the older projects.

Task-2616736

closes odoo/odoo#76964

X-original-commit: 9a6624f5f743677a233489932840e3a739330452
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-09-24 11:08:40 +00: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
Mitali Patel b55f81aa30 [FIX] project: fix seprators in Task analysis report's filter
Purpose of this commit is to add the separators before and
after the 'unassigned tasks' filter on Task analysis report.

Taskid: 2645909
Closes: odoo#76555
X-original-commit: 388b58cd86d3fdc71c1d5e27a471febae9bd8dd5
Part-of: odoo/odoo#77006
2021-09-22 20:39:12 +00:00
Laurent Stukkens (LTU) 4ed77405e4 [FIX] project: change user_id into user_ids in various view and reports
The `user_id` field was replaced in odoo/odoo#74087 by `user_ids`.
The field change was forgotten in various reports and the a wizard.

This commit fixes those.

task-2638359
closes #76166

X-original-commit: f584485f0c69eda002491ca9b63bc3d228e95001
2021-09-14 21:25:00 +02:00
Mathieu Duckerts-Antoine 7545913020 [REF] *: graph archs cleaning
We clean various graph archs taking into consideration that:
 - the default type of a graph is "bar".
 - a bar chart is by default stacked.
 - the field attributes type="row" and type="col" does not make sense for
   a graph view (since its implementation was separated from the pivot
   implementation a long time ago))
 - the boolean attributes should now take 1 or 0 as value (but the other
   values are accepted for retrocompatibility).

Part-of: odoo/odoo#76065
2021-09-07 15:50:14 +00:00
d1e227b07b [IMP] web,*: new PivotView component
Part-of: odoo/odoo#73311
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-09-07 10:04:38 +00: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
Anjali 7c5bfb42d4 [IMP] various: add list views for some important reporting models
Currently, there are many useful pivot views on reporting models but most
of them lacks the dedicated list view. Dedicated list views will allow users
to see useful information when one directly drill down to the records from
the pivot table in odoo spreadsheet [1].

With this commit

  1. we remove 'disabled_linking' attribute from the very important pivot
     and graph views (see the full list on task pad);
  2. we added dedicated list views for the following reporting models

    - account.invoice.report
    - fleet.vehicle.cost.report
    - hr.timesheet.attendance.report
    - purchase.report
    - project.profitability.report
    - report.membership
    - report.pos.order
    - report.project.task.user
    - sale.report

Task-2547881

[1] See task-2506116

closes odoo/odoo#72394

Related: odoo/enterprise#19122
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-29 09:33:56 +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