Commit Graph
701 Commits
Author SHA1 Message Date
FrancoisGeandmcm-odoo 70619d0e6a [IMP] *: display properties in list view
This commit adds the possibility to display a properties field in a list
view.

How it works:
When a properties field is present in the arch of a list view, it will
not be displayed directly. It will display its properties as an optional
column. Now, we will find at the end of the dropdown of the optional
columns a section by record parent of the properties field. The proposed
sections will be the properties linked to the parent record of which at
least one record referring to it has been encountered during the
navigation in this list view.
(A parent record is the record storing the properties definition).

Limitation:
Multi-editing is not applicable on properties fields as you cannot edit
one property without modifying all the others.

closes odoo/odoo#112005

Taskid: 3105039
Related: odoo/enterprise#37004
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: mcm-odoo <mcm@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
2023-03-03 13:10:42 +01:00
Bruno BoiandMathieu Duckerts-Antoine d19037e141 [IMP] web,*: better classes handling in view archs
**Before this commit**
- The optional "class" attribute set on the root node of a view arch
  is ignored, except for the kanban view which has a custom
  way of using it.
- The optional "js_class" attribute set on the root node of a view arch
  does not have any impact on the class names passed to its controller.

**After this commit**
The content of the optional attribute "class" set on the root node of an
arch like in

<list class="o_custom_class">
    ...
</list>

as well as an additionnal class derived [1] from the value of the
"js_class" attribute set on the root node of an arch like in

<list js_class="extended_list">
    ...
</list>

will both be found in the prop "className" of any view controller.

[1] a js_class value of "xyz" yields to the class "o_xyz_view"

**Note on this commit**
The kanban view was already appending the root node class attribute
to its renderer element. This is no longer the case and some styling
rules has been adapted.

closes odoo/odoo#113014

Related: odoo/enterprise#37265
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2023-03-01 17:01:03 +01:00
Bruno Boi af00a92b3e [REM] *: remove unused class 'oe_background_grey'
This class is a ghost from the past.
Last related style has been found in da86f505a

Part-of: odoo/odoo#113014
2023-03-01 17:01:02 +01:00
Panagiotis Kyriakou 80e9dc746a [IMP] project: change the way we work with subtasks
This commit changes some of the way that users will
work with subtasks in the project app.
Initially, it changes subtasks from a many2many to
a one2many field.
We also add the ability for subtasks to be viewed
straight from the kanban view by drawing a list of
them inside of the kanban box of the parent task.

task-3085016

closes odoo/odoo#112279

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-01 17:00:56 +01:00
Abderraouf Ghrissi (abgh) a424cf481c [IMP] project: delete useless fields
In this commit:
- project tasks kanban view: if partner_is_company, we display partner_id
else commercial_partner_id -> this information is useless so we decided to
display partner_id in both cases.
- manager_id is not used in any view -> drop the field
- when creating a task by mail, email_from is set to the sender email then will
be changed depending on partner_id and parent_id, the field name is not significant
as it change and no more contain the original email sender, it's also a duplicated
information that can be got from partner / parent -> delete the field and create
a new partner if no one already exist with the same email.
- when project.analytic_account_id is changed, only tasks that have the same old
analytic_account_id will follow the name value -> we decided to change the behavior
and apply the new value for all tasks.
- project_analytic_account_id not used in any view and in only place in python
-> delete field
- project.project: partner_email, partner_phone are not used in any view ->
delete field
- project.task: partner_email not used -> delete field
- ancestor_id is no more used in any view or python reference as it's a complicated
field to understand by users -> remove ancestor_id from project.task and remove also
ancestor_task_id that is related it to it in timesheet context and replace it with
parent_task_id which is more simpler to understand by users.

task-3103701

closes odoo/odoo#110101

Related: odoo/enterprise#37246
Related: odoo/upgrade#4269
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-02-23 18:28:45 +01:00
Vincent Larcin 73d9dd38da [FIX] project: remove stage group by in all tasks list view
This commit removes the default `stage_id` group in the
'All Tasks' list view, as it is causing performance issues

closes odoo/odoo#113435

X-original-commit: 759d7b1a30841535de57c19954eff3507dd61eff
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
2023-02-22 21:37:38 +01:00
Aaron Bohy b1035c97c5 [REF] project: remove unused "color_field" option
This option is only used by x2many fields (typically m2m_tags),
and has no effect on selection fields.

Part-of: odoo/odoo#112518
2023-02-14 17:09:29 +01:00
Audric Onockx (auon) aa250d3245 [IMP] project: improve and create task template for recurrence
The goal of this task is to ease the deletion/archiving of recurrent
tasks by giving the user the option to either continue
or stop the recurrence. The two main use-cases are:

\- You have a recurring task for a weekly meeting.
Next week, the user will be on time off. You are thus deleting the task.
However, you would still like tasks generated for the following meetings
and to keep track of the previous meetings.

\- You have a recurring task for a weekly meeting with an employee
that has just been fired. You are thus deleting the task and
you won't need this recurrence anymore.
(You may or may not want to keep track of the previous meetings.)

The main issue we are currently facing is that we need a task that acts
as a template for the recurrence to continue. This means that a user
cannot delete all of his tasks without breaking their recurrence.

Consequently, we will be using a "task template" for each recurrence,
which will only serve technical purposes and be invisible to the users.
When the recurrence is stopped, the task template is deleted.
This simplifies the technical and functional implementation as the user
won't be able to modify the template themselves.

\- Added task templates to recurrences in the data.
\- Deleted "all tasks" option form recurence update and changed "this
and following tasks" to "this and future tasks". Most of the time, the
user is going to update the most recent task, and it doesn't make
any functional sense to update past ones.
\- Same options for delete and archive.
\- No recurrent subtasks allowed anymore.
\- `date_deadline` is copied. We compute it by adding the delta between
the create date and the `date_deadline` of the template to the next
recurrence date.
\- Added filter to several view not to display task templates.

task-2937565

closes odoo/odoo#98088

Related: odoo/upgrade#4232
Related: odoo/enterprise#30416
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-02-14 17:08:49 +01:00
Vincent Larcin cc3c90cdc3 [FIX] project: remove default filter in My Tasks action
Since https://github.com/odoo/odoo/pull/106015, the action `project.action_view_my_task` contains a domain
to filter on the current user's tasks. The default filter that was previously used
to achieve the same purpose is therefore no longer necessary, but was forgotten because of
another bug that removed it when `project_sale` is installed.

This commit removes this filter.

X-original-commit: b908425f886beeee5959313c3b92b546635ee110
Part-of: odoo/odoo#111789
2023-02-03 07:07:14 +01:00
Kartik Chavda c59ec25c87 [IMP] mail,project: hide label of many2many user avatar for activity
This commit hides name of user from many2many avatar user of
activity view similar as kanban view so it'll display many2many
tags properly in activity view.

task-3132890

closes odoo/odoo#109855

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-02-03 05:08:51 +01:00
Xavier BOL (xbo) eb32a545c3 [FIX] project: add default project in search more of parent task field
Before this commit, when the user wants to edit the parent task and
clicks on Search more button, the search view has no project by default
however, the default project to display in the search view could be the
one set on the task.

This commit adds a default project in the search view and this project
will be the one set on the task in which the user wants to set a parent
task.

closes odoo/odoo#111125

X-original-commit: 8c3a4e7dff719b8f47ed289aabb4405a401655a4
Related: odoo/enterprise#36348
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-27 23:17:44 +01:00
Vincent Larcin b185582e65 [FIX] project: readd project in some tasks list views
Since odoo#106015, the "Project" field is missing from the list view
opened when clicking on "Add a line" in the "Sub-tasks" or "Blocked By"
tabs in the task form view.

This commit readds this field.

X-original-commit: 925a57a41c335f76a0f2c354b3bb2999e0d970bf
Part-of: odoo/odoo#111125
2023-01-27 23:17:44 +01:00
Xavier BOL (xbo) b921ee49ae [FIX] project: fix unexpected behavior due to refactor on views
Before this commit, the default group by on task list view in Field
Service app is stage as it is the case in Project app, this behavior is
not wanted, the list view in Field Service app should have no group by
by default. Also, the default group by in My tasks should be personal
stages and no default group by should be in the list view of All Tasks
menu. Finally, the parent task has been removed in the main list view
instead of displaying in debug mode.

This commit fixes the list view in Field Service to avoid having any group
by by default and also changes the default group by `My Tasks` and `All
tasks` menu. It also adds the parent task field in the main list view
of task and that field will be displayed if the "Sub-tasks" feature and
the debug mode is enabled.

X-original-commit: e8aa2177d5640e9c366fa685651de1b85416705c
Part-of: odoo/odoo#111125
2023-01-27 23:17:44 +01:00
Jorge Pinna Puissant a9d3cc036f [IMP] *: use the new setting tag on the form view.
*: hr_timesheet, point_of_sale, pos_epson_printer, project,
    sale_project, sale_timesheet

closes odoo/odoo#110432

Related: odoo/enterprise#36050
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-25 08:18:01 +01:00
Kartik Chavda 0b82e906c9 [IMP] project,hr_timesheet: improve layout of project simplified view
Before this commit project simplified view was not pretty because
of some alignment between different section/fields and width of
name field is not as expected.

This commit fix layout of project simplified view to make UX
better.

task-3102445

closes odoo/odoo#108151

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-24 19:11:49 +01:00
Hugo Carlier (Huca) 911a47f9aa [IMP] project, sale_timesheet: improve UX
- Display 'project title' label and add placeholder on the quickcreate
in project.project kanban view

- Project.task calendar view popover : The literal value of the status
is replaced by a colored dot representing it.

- project.task portal form view : The SOL field is displayed in the list
of timesheets entries if some of those entries have a different SOL as
the one set for the task. The SOL name is made clickable and redirect
to the sale order portal view if the user has access to it.

closes odoo/odoo#103434

Task: 3024151
Related: odoo/enterprise#32860
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-23 20:26:53 +01:00
Rohitkumar (roku) bf1c60847b [IMP] rating,project,sale_timesheet: improve the UX for project
Purpose of this commit to improve generic usage of project app.
So in this commit done the following changes:
 - Project tags should be vertically centered
 - Rename share readonly for project.project form view
 - add demo data while add tasks in a folded stage to the sub-tasks and blocked
   by notebooks
 - add demo data for archived tasks to the archived project
 - change the name of the 'rating page done' webpage to 'Thanks for your Feedback'
 - use the avatar widget for the employee

task-2976074

closes odoo/odoo#105904

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-23 16:01:18 +01:00
FrancoisGe 8d41ccf119 [REF] *: relative width of a field is no longer supported in list views
Since the conversion of the list view to owl, the relative field size
has not been reimplemented. We have decided not to support it anymore.
So we will remove all its uses.

The relative width consists in adding a width attribute with a
value. This value corresponds to the weight of the field, the higher
it is, the more space the field will take. This size is only used when
the list is empty.

Example of this:
<tree>
    <field ... width="2">
    <field ... width="1">
</tree>

The first field will take 2x more space than the first one when the list
is empty.

closes odoo/odoo#110382

Related: odoo/documentation#3375
Related: odoo/enterprise#36020
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-23 11:19:59 +01:00
Audric Onockx (auon) 4d081e38a2 [IMP] project: view improvements and project stage deletion wizard
\- https://nimb.ws/NMRdKb project.project list view:
display favorite projects first

\- https://nimb.ws/I8nTwK project.task list view:
partners should be displayed in the same order as in the form view

\- https://watch.screencastify.com/v/ebhfsyP7GtMKSbrVwHlq
project.project kanban view: raise the same error when deleting
a project stage as when deleting a task stage: https://nimb.ws/NQaU3W

\- https://nimb.ws/3h7WGu 'my tasks' kanban view:
hide the 'see examples' button

task-2957863

closes odoo/odoo#98660

Related: odoo/enterprise#30662
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-23 11:19:48 +01:00
Thibault Delavallée 1a1acabd7b [REF] mail: cleanup mono/multi record composer behavior
RATIONALE

Improve usage of composer in comment or email mode: support batch-posting in
comment, support more configuration from templates, improve global model.

SPECIFICATIONS

Support a real res_ids field on mail.compose.message model. Instead of relying
on active_ids from context, store it once for all at composer level and use
it in code. Active_ids usage is still done at default_get level, using it to
populate the field.

Improve usage of domain, renamed to res_domain to match other document related
fields naming. Add support of a res_domain_user_id field allowing to set the
user from which the domain should be evaluated.

Composer now runs on a list of IDs. Mass mail mode and comment mode are now
distinct from running on a singleton or on more records. Rendered or raw
mode is not triggered by

  * mass mailing mode: always display raw mode, whatever the number of records;
  * comment mode: display rendered mode when having a single record (like the
    previous comment mode). Display raw mode when having either no records
    either at least two records.

Task-3035101 (Mail: Support batch-posting from composer)

Part-of: odoo/odoo#99482
2023-01-17 20:58:39 +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
Kartik Chavda 743704c54e [IMP] project: group task list view by default
This commit adds default groupBy for task list view
to represent data properly menu vise.
- add default groupBy stage for tasks from project action.
- add default groupBy personal stage for `My Task` menu.
- add default groupBy project for `All Tasks` menu.

task-3084850

closes odoo/odoo#109281

Related: odoo/documentation#3311
Related: odoo/enterprise#35504
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-10 15:43:10 +01:00
Kartik Chavda 6b22e54f1a [IMP] {sale_,}project: hide customer and sol field for private task
Before this commit when user creates a private task user
still able to customer and sol field which no use for
private task.

This commit hide customer and sol field for private task
and reset customer field when user make non private task
to private task.

task-3084850

Part-of: odoo/odoo#109281
2023-01-10 15:43:10 +01:00
Hugo Carlier (Huca) 2e29170852 [IMP] {hr,sale}_timesheet,{sale_}project: modify task sharing form view
The form view of project.task in project sharing is modified to be
similar to the classical form view of tasks (in backend). A
priorititization is added to the views of project.task for project
sharing used in the following modules:
- project
- sale_project
- hr_timesheet
- sale_timesheet

task-3119935

closes odoo/odoo#109067

Related: odoo/enterprise#35421
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-09 16:38:57 +01:00
Bastien (bvdn) 8bac2f8136 [FIX] project: decrease task title width
This commit will reduce the width used by the task name in form view to 75% of the
space available, except when in mobile view where it'll take full width.
The title doesn't need to take the whole space but only about 3/4 of it in form view

Side note: this may need to change once the mark-as-done 2 task is merged
because a new wider widget will replace the kanban_state widget

closes odoo/odoo#109258

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-05 23:45:52 +01:00
Jorge Pinna Puissant 5b68871097 [IMP] * : kanban, unify dropdown definition in archs
This commit separate the templates, one for the card and another one for
the menu (the ellipsis dropdown).

The new template, called 'kanban-menu', will only contain the dropdown.
Note that, this behaviour is the same as the one used for the kanban
tooltips.

closes odoo/odoo#107589

Task-id: 3096776
Related: odoo/documentation#3284
Related: odoo/enterprise#34962
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-05 15:37:04 +01:00
Rohitkumar (roku) 30f4b615d3 [FIX] project: stat button content align
Before this commit, the content of the stat button not aligned.

So this commit fixes by the stat button's content is aligned to the left and vertically centered.

task-3054386

closes odoo/odoo#108504

X-original-commit: e87284cebe64cc1f5bf31198ca221f14cffdc671
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-22 09:38:07 +01:00
Barad Mahendra 7702087180 [FIX] project: truncate the alias name in project kanban
Currently, when alias name is too long then it was going to
display in the new line and ui is broken in the project kanban card.

So in this commit, if alias_name is too long then truncate the
text and display the ellipsis for name in project kanban card.

task-3052597

X-original-commit: fb111d1f828a4e7580afe758e5c6dbfc9d16a51d
Part-of: odoo/odoo#108440
2022-12-21 19:34:55 +01:00
damr 9c5d7adf3d [IMP] project: add default personnal stage to user
Currently, when a db is loaded without demo data, or that a user has no
task assigned and no personnal stage, the view 'My tasks' is empty. The
purpose of this commit is to assign default personnal stage to a user in
these case to ease the understanding of new user of what the view can be
used for.

This commit :
- add default personnal stage to user the first time he clicks on the
'My tasks' menu if the user has no personnal stage and no task are assigned
to him.

task-3047496

closes odoo/odoo#105940

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-15 13:40:40 +01:00
Bastien (bvdn) 65893b50fa [IMP] project: change stage_display string in 'My/All Tasks' list view
Small fixup for already merged PR: 103318
stage_display column should have 'Stage' as a header, not 'Stage Display'
added the stage_display field to 'All Tasks' list view

Task-3024152

closes odoo/odoo#107407

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-08 18:00:18 +01:00
Hugo Carlier (Huca) 52c53a0210 [IMP] hr_timesheet, project: Modify timesheet info display in project.task form view
- project.task form view:
    - move the tag_ids field below the user_ids one
    - move the 'allocated hours' field above the 'deadline' one
        - remove the 'progress' field and indicate (x%) next to
        'allocated hours' instead
        - the final output should look something like
    - 10:00 (incl. 05:00 on Subtasks) (50%)
    - the timesheets o2m takes the whole width of the notebook

task-3046210

closes odoo/odoo#104677

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-02 19:49:57 +01:00
Jorge Pinna PuissantandMichael Mattiello (mcm) c7c2959449 [IMP] web, *: simplification and standardization of the settings arch
The aim of this commit is to simplify and standardize the settings archs.

To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.

The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.

```xml
    <app string="CRM" name="crm">
    ...
    </app>
```

- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
        logo is created using the `name` parameter :
        `/{name}/static/description/icon.png`.

The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.

```xml
    <block title="Title of group Bar">
    ...
    </block>
```

- `title` *optional* : The title of the block of settings (the old h2),
        you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
        (the old h3), you can perform research on its text.

The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.

```xml
    <setting string="this is bar">
        <field name="bar"/>
        ...More elements
    </setting>
```

- `type` *optional* : By default, a setting is visually separated on two
        panels (left and right), and is used to edit a given field. By
        defining `type='header'`, a special kind of setting is rendered
        instead. This setting is used to modify the scope of the other
        settings. For example, on the website application, this setting
        is used to indicate to which website the other settings apply.
        The header setting is visually represented as a yellow banner on
        the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
        not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
        displayed just below the setting label (with classname
        `text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
        icon is displayed next to the setting label to explicit that
        this setting is company-specific.
- `documentation` *optional* :  If this attribute is set, an icon is
        added next to the setting label, this icon is a link to the
        documentation. Note that you can use relative or absolute path.
        The relative path is relative to
        `https://www.odoo.com/documentation/server_version`, so it's not
        necessary to hard-code the server version on the arch anymore.

closes odoo/odoo#106425

Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
2022-12-02 14:40:25 +01:00
Hugo Carlier (Huca) fb13d7c99e [IMP] project, hr_timesheet: improve UX
- Description:
    - project: Apply default filters when selecting a 'blocked by'
    task in task form (project.task form view > blocked by notebook >
    add a line > apply a default filter on the current project and on
    open tasks)
    - project, hr_timesheet: uniformize remaining hours display in
    kanban view for tasks and projects (project.project kanban view:
    add a frame around remaining hours. The color of the frame follows
    the same rules as the one used in project.task kanban view)

task-3034806

closes odoo/odoo#104250

Related: odoo/enterprise#33309
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-28 14:50:50 +01:00
Rohitkumar (roku) f7f3d9610b [IMP] sale_(project): improve the UX for project app
Purpose of this commit to improve generic usage of project app.

So in this commit done the following changes:
 - switch the id and the priority fields from place for task list view
 - add a 'view sales order' button that should open the form view of the SO
   linked to the SOL set on the milestone for milestone list view
 - add a 'sales order' stat button that should open the form view of the SO
   linked to the SOL set on the milestone for milestone form view
 - add a 'done' option; represent it in purple in status field
 - if there is only 1 assignee, display its name on the card instead of
   1 assignee for project sharing kanban view
 - add an 'all tasks' menu on the right of the 'my tasks' one

task-2917086

closes odoo/odoo#97669

Related: odoo/upgrade#3893
Related: odoo/enterprise#30195
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-25 17:55:56 +01:00
Denis Ledoux 141852dc66 [IMP] mail: hide Unread messages filter for email notification users
The goal of this revision is to add a group
`mail.group_mail_notification_type_inbox` which is granted
automatically when the user `notification_type` is set to `Inbox`
to be able to easily hide the filter `Unread messages` when
the user uses the `Email` notification type,
by simply adding `groups="mail.group_mail_notification_type_inbox"`
on the filter rather than overriding `_get_view` in every model.

The code overriding `_get_view` of `project.task`
to hide the filter "Unread messages" replaced
in this revision initially comes from
odoo/odoo@da868d28e2

> - In project.task search View:
>   - the filter for unread messages should be visible only if the current user
>     managing his notifications in Odoo

The above revision was part of the task 2844212

closes odoo/odoo#104328

Related: odoo/enterprise#33338
Related: odoo/upgrade#3996
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-11-24 12:26:01 +01:00
Rohitkumar (roku) 095efcd65c [IMP] project,sale,hr(_timesheet): improve the UX for project
Purpose of this commit to improve generic usage of project app.

So in this commit done following changes:
 - rename 'total hours' into 'total hours spent' (or 'total days spent' if the
   timesheet encoding  unit is in days) for project.task
 - timesheets (billed on timesheets) section > group the graph view by
   invoice > employee
 - add default action project update > profitability> timesheets
   (billed on timesheets) section > group the grid view by
   invoice > employee (display sections)
 - add default  the 'timesheet costs' measure in pivot view
 - display 'hours remaining' in red if the number is negative for project.task
   form view
 - display the 'week' scale by default in the grid view

task-2819458

closes odoo/odoo#90270

Related: odoo/enterprise#26795
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-23 15:13:50 +01:00
Manisha Tulsiyani 2e513973d7 [IMP] (sale_)project,timesheet: improve the UX for project app
Purpose of the commit is to do the generic improvements for project app.

So in this commit did the following changes:
 - add the 'creation date', 'last stage update', 'SOL', 'my deadline' fields in
   project task list view.
 - add the 'my deadline', 'next activity' fields in project list view.
 - crop the label of the stage after x characters in task portal form view.
 - remove the 'collaborators' stat button from project update right-side panel.
 - renamed sold->sales, services->sales order items, effective->delivered,
   remove the totals, include non-service SOLs, increase the size of the SOL
   column

task-2928100

closes odoo/odoo#97870

Related: odoo/enterprise#30268
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-17 10:57:07 +01:00
Prakash Prajapati e2b52e6358 [FIX] project: hide "Milestone" action button in project kanban card
Before this commit, when the Milestones feature is globally enabled
in the project app, the "Milestones" action button displayed in the
dropdown of the kanban card are always visible even if the project
has the feature disabled in its settings.

This commit changes the visibility of that action button to also
take into account the settings of each project.

task-3033041

X-original-commit: 05485bbd192c2316267d38934544d7f08ff4e9e8
Part-of: odoo/odoo#105709
2022-11-14 18:17:52 +01:00
Bastien (bvdn) 0a23462728 [IMP] project: improve user experience
This commit introduces the following improvements:

- In `My Tasks` list view: the personal stage is displayed instead of the stage for private tasks
- When copying a stage, the new stage name is appended with `(copy)`
- A default filter 'open task' is added in the subtask notebook search
- A default filter on the project is set on the search of the `parent_id` task field

task-3024152

closes odoo/odoo#103318

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-14 18:17:44 +01:00
Audric Onockx (auon) 76b513917b [IMP] web,project: add and modify commands in the palette
\- Add 'Move to next stage'
Generic, we think it is a useful tool to have anywhere.

\- Change the 'Set priority...' command
to 'Set priority as Low/High' :
Only 1 command will be available with the 'not current' priority.
Specific, because it is used on selection fields,
which means there could be more than 2 options.

\- Transform the 'Set kanban state...' command into three commands
Generic. 2 commands will be available.
One for each 'not current' kanban state.

task-2857447

closes odoo/odoo#91821

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-14 17:17:47 +01:00
Jensi Chovatiya 8499a1556e [FIX] project: fix the traceback when opening task from milestone
Why traceback occurred:
   When we open the task from the milestone dialog, the milestone dialog does not close,
but the component gets destroyed. And when we manually close the milestone dialog,
it tries to load the props. so the traceback occurred.

In this commit:
When the task is opened from the milestone dialog, the milestone dialog will be closed, and
before loading the pros checked whether the component is mounted or not.

Steps:
- Install the project app
- Active Milestones in  setting
- Open the  Project Updates
- Open any Milestones
- Click on the  task stat button

task-3010877

closes odoo/odoo#105027

X-original-commit: 3f08ff262e2943f870e906e06ec90807f581183c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-06 20:54:56 +01:00
Xavier BOL (xbo) 363403aea9 [FIX] project: change the default order used in project list/kanban view
Before this commit, the default order used in the project list/kanban
view is only `sequence` but if all projects have the same sequence.

This commit changes the default order to sort by `sequence`, `name` and
`id` as it is defined in the python model.

closes odoo/odoo#104986

X-original-commit: 25efb87f960380dac8093e018a3766bd5041cd0f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-05 16:13:42 +01:00
Xavier BOL (xbo) 8873581323 [FIX] project: add default project when user wants to add subtask
Before this commit, the f3974bea4b adds
the project as filter in the search view when the user wants to add a
subtask on a task in the form view. This feature has been broken due to
a change on the search view. The main search has no longer the
display_project_id field, only the one inherited the main one has that
field. (commit da868d28e2)

This commit changes the search view to use to correctly have the project
of the parent task as default project when the user wants to search a
subtask to add on the task displayed in the form view.

closes odoo/odoo#104878

X-original-commit: 4e1ee0f9ae6f39154a528fec2c16943df807ab7f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:57:05 +01:00
std-odoo afe9497341 [FIX] project: hide the "View In Kanban" properties option
Purpose
=======
We don't use the properties field in the tasks kanban view.
Because of this, we want to hide the option "View In Kanban" in
the properties definition.

Task-3012780

X-original-commit: 63fa07d38e51b261780cadb674ab035f8b15f58e
Part-of: odoo/odoo#104252
2022-11-02 12:37:04 +01:00
Pratik Awasthi a95a848e06 [FIX] hr_timesheet: fix traceback on task search in portal view
Before this commit, when the portal user is in `/my/tasks` route
and he remove the groupby and search a certain task name and no
task is found with his search, a traceback is occurred saying `task`
is not found to be able to evaluate the following lines:
```xml
                <t t-set="timesheet_ids" t-value="task.sudo().timesheet_ids"/>
                <t t-set="is_uom_day" t-value="timesheet_ids._is_timesheet_encode_uom_day()"/>```
in the portal template.

This commit fixes the issue by changing the xpath to be sure the task
variable is defined before evaluating task.sudo().timesheet_ids.
Moreover, this commit checks if there is any task in tasks before
displaying tbody to avoid having any scrollbar for nothing.

task-2987387

X-original-commit: 9d0b770aebaf3c9c08352bf11fb9fdf2a36f1523
Part-of: odoo/odoo#104259
2022-10-28 00:50:40 +02:00
Xavier BOL (xbo) f830656f0e [REV] project: fix alignment issue project sharing
Since the form view has no longer a readonly mode, the task name could
be cropped since its size has been reduced in a previous commit to keep
the same size in edit mode in 15.3 (before the OWL conversion and the
always edit feature). This behavior is no longer expected and the size
should be the one in readonly mode to use the available spaces between
the task name and the kanban state.

It is for this reason, this commit reverts
74a069226294044fa8901aed6b02bc25c4e11b21.

closes odoo/odoo#104118

X-original-commit: 677c8b1bc60fe0736ce45e8c041a03e65fc6413c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-26 01:58:41 +02:00
luvi 88c8999ec7 [FIX] project: fix task title width
This commit adds the w-100 classname to the div containing
the field used for the name of the task. It was no longer
using all available space.

After this commit, the title takes the full width available.

closes odoo/odoo#104103

X-original-commit: 482a597527a227c45afa4e0d85b0bcdcb8866a5b
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-25 21:20:48 +02:00
Damien Bouvy 5a79a2857f [FIX] (various): adapt to grid form views
closes odoo/odoo#102993

X-original-commit: c5a9d95ee13d0ed1d261e803d15d1f17cedfaab6
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-25 16:11:59 +02:00
Thomas Lefebvre (thle) 6104af8881 [FIX] project: activities clock filter
Steps to reproduce:
    - go to Project app;
    - select a project and create an activity and make it late;
    - edit another project and create an activity for today;
    - edit yet another project and create a future activity;
    - click on the activity clock in the main menu bar (there are one late activity, one today and one in the future);
    - click on "late".

Issue:
    All three projects with activities are shown.

Cause:
    There is no filter provided for this purpose.

Solution:
    Add a filter on activities according to the deadline.

opw-3002778

closes odoo/odoo#103526

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-25 13:03:15 +02:00
Pratik Awasthi 26c0641c09 [FIX] project: fix alignment issue project sharing
Before this commit, project sharing form view: the name field was long.

After this commit, name field will be aligned.

task-3010685

closes odoo/odoo#103978

X-original-commit: 74a069226294044fa8901aed6b02bc25c4e11b21
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-25 11:07:15 +02:00