[IMP] project: generic UX improvement for project configuration

Purpose of the task is to do a generic UX improvement in project

Specification:
--------------

1) Stages(project.task.type)

* List view:
  - move the 'folded in kanban' field to the right of the project_ids one
  - remove the description field from the list view
  - make the list view editable in batch
* Form view
  - rename 'stage name' into 'name'
  - move the sequence field below the 'rating email template' one
  - change the copy of the tooltips to: "At each stage, employees can
block tasks or mark them as ready for the next step. You can customize
here the labels for each state."
  - the tags should be colored according to the project's color
  - reduce the space in between the icons and the name of the states
  - add some space in between the legend_done field and the description
  - when creating a new mail template, set 'project.task' as model_id
of the template
* move the 'Stages' menu into below the 'Projects' one
* add the project_ids field to the kanban view
* search: rename 'Tasks Stages' into 'Name'

2) Tags(project.tags):

- configuration > tags menu: change the helper to: "Tags are perfect
for categorizing your tasks."
- add an optional list view -> only the color field should be optional
and displayed by default
- new tags should be created at the top of the list

- Also removed some of the unused(deprecated) css which are not applied
anywhere in the project.

closes odoo/odoo#69636

Taskid: 2508642
Related: odoo/enterprise#17865
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
This commit is contained in:
Barad Mahendra
2021-04-28 08:53:48 +00:00
parent 6c7dd7501a
commit f93e054050
4 changed files with 46 additions and 80 deletions
+1 -1
View File
@@ -148,7 +148,7 @@
<div class="o_kanban_content">
<strong>
<h4 class="o_kanban_record_title"><field name="name"/></h4>
<div class="oe_kanban_project_list o_kanban_record_subtitle">
<div class="o_kanban_record_subtitle">
<a type="action" name="%(goals_from_challenge_act)d" style="margin-right: 10px" tabindex="-1">
<span t-if="record.line_ids.raw_value.length gt 1"><t t-esc="record.line_ids.raw_value.length"/> Goals</span>
<span t-if="record.line_ids.raw_value.length lt 2"><t t-esc="record.line_ids.raw_value.length"/> Goal</span>
+1 -1
View File
@@ -23,7 +23,7 @@ class ProjectTaskType(models.Model):
return [default_project_id] if default_project_id else None
active = fields.Boolean('Active', default=True)
name = fields.Char(string='Stage Name', required=True, translate=True)
name = fields.Char(string='Name', required=True, translate=True)
description = fields.Text(translate=True)
sequence = fields.Integer(default=1)
project_ids = fields.Many2many('project.project', 'project_task_type_rel', 'type_id', 'project_id', string='Projects',
-41
View File
@@ -1,44 +1,3 @@
.oe_kanban_project_avatars img {
width: 30px;
border-radius: 2px;
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.oe_form_gantt_avatars:after {
font-family: "mnmliconsRegular" !important;
font-size: 21px;
font-weight: 300 !important;
content: "y";
top: 3px;
position: relative;
}
.openerp .oe_kanban_view .oe_kanban_project {
width: 250px;
min-height: 160px !important;
cursor: default;
}
.openerp .oe_percent strong:after {
content: "%";
}
.openerp .oe_margin_top_8 {
margin-top: 8px;
}
.openerp .oe_kanban_project .oe_kanban_project_list .col-lg-6 a{
margin-left: 5px;
}
/* Kanban status as label in project stage form view */
.openerp label.oe_project_kanban_legend {
min-width: inherit !important;
margin-top: 6px;
margin-right: 8px;
}
.o_form_project_tasks.o_form_editable .oe_title {
max-width: initial;
}
+44 -37
View File
@@ -77,7 +77,7 @@
<field name="model">project.task.type</field>
<field name="arch" type="xml">
<search string="Tasks Stages">
<field name="name" string="Tasks Stages"/>
<field name="name" string="Name"/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
</search>
</field>
@@ -94,8 +94,9 @@
<group>
<group>
<field name="name"/>
<field name="mail_template_id"/>
<field name="rating_template_id" groups="project.group_project_rating"/>
<field name="mail_template_id" context="{'default_model': 'project.task'}"/>
<field name="rating_template_id" groups="project.group_project_rating" context="{'default_model': 'project.task'}"/>
<field name="sequence" groups="base.group_no_one"/>
<div class="alert alert-warning" role="alert" colspan='2' attrs="{'invisible': ['|', ('rating_template_id','=', False), ('disabled_rating_warning', '=', False)]}">
<i class="fa fa-warning" title="Customer disabled on projects"/><b> Customer Ratings</b> are disabled on the following project(s) : <br/>
<field name="disabled_rating_warning" class="mb-0" />
@@ -105,33 +106,39 @@
<group>
<field name="fold"/>
<field name="is_closed" groups="base.group_no_one"/>
<field name="project_ids" widget="many2many_tags" groups="base.group_no_one"/>
<field name="sequence" groups="base.group_no_one"/>
<field name="project_ids" widget="many2many_tags" options="{'color_field': 'color'}" groups="base.group_no_one"/>
</group>
</group>
<group string="Stage Description and Tooltips">
<p class="text-muted" colspan="2">
At each stage employees can block or make task/issue ready for next stage.
You can define here labels that will be displayed for the state instead
of the default labels.
</p>
<label for="legend_normal" string=" " class="o_status oe_project_kanban_legend"
title="Task in progress. Click to block or set as done."
aria-label="Task in progress. Click to block or set as done." role="img"/>
<field name="legend_normal" nolabel="1"/>
<label for="legend_blocked" string=" " class="o_status o_status_red oe_project_kanban_legend"
title="Task is blocked. Click to unblock or set as done."
aria-label="Task is blocked. Click to unblock or set as done." role="img"/>
<field name="legend_blocked" nolabel="1"/>
<label for="legend_done" string=" " class="o_status o_status_green oe_project_kanban_legend"
title="This step is done. Click to block or set in progress."
aria-label="This step is done. Click to block or set in progress." role="img"/>
<field name="legend_done" nolabel="1"/>
<group>
<p class="text-muted" colspan="2">
At each stage, employees can block tasks or mark them as ready for the next step.
You can customize here the labels for each state.
</p>
<div class="row ml-1" colspan="2">
<label for="legend_normal" string=" " class="o_status mt4"
title="Task in progress. Click to block or set as done."
aria-label="Task in progress. Click to block or set as done." role="img"/>
<field name="legend_normal" class="col-11 pl-0" nolabel="1"/>
</div>
<div class="row ml-1" colspan="2">
<label for="legend_blocked" string=" " class="o_status o_status_red mt4"
title="Task is blocked. Click to unblock or set as done."
aria-label="Task is blocked. Click to unblock or set as done." role="img"/>
<field name="legend_blocked" class="col-11 pl-0" nolabel="1"/>
</div>
<div class="row ml-1" colspan="2">
<label for="legend_done" string=" " class="o_status o_status_green mt4"
title="This step is done. Click to block or set in progress."
aria-label="This step is done. Click to block or set in progress." role="img"/>
<field name="legend_done" class="col-11 pl-0" nolabel="1"/>
</div>
<p class="text-muted" colspan="2">
You can also add a description to help your coworkers understand the meaning and purpose of the stage.
</p>
<field name="description" placeholder="Add a description..." nolabel="1" colspan="2"/>
<p class="text-muted mt-2" colspan="2">
You can also add a description to help your coworkers understand the meaning and purpose of the stage.
</p>
<field name="description" placeholder="Add a description..." nolabel="1" colspan="2"/>
</group>
</group>
</sheet>
</form>
@@ -142,14 +149,13 @@
<field name="name">project.task.type.tree</field>
<field name="model">project.task.type</field>
<field name="arch" type="xml">
<tree string="Task Stage" delete="0" sample="1">
<tree string="Task Stage" delete="0" sample="1" multi_edit="1">
<field name="sequence" widget="handle" optional="show"/>
<field name="name"/>
<field name="fold" optional="show"/>
<field name="mail_template_id" optional="show"/>
<field name="rating_template_id" optional="show"/>
<field name="description" optional="hide"/>
<field name="mail_template_id" optional="hide"/>
<field name="rating_template_id" optional="hide" groups="project.group_project_rating"/>
<field name="project_ids" optional="show" widget="many2many_tags" options="{'color_field': 'color'}" />
<field name="fold" optional="show"/>
</tree>
</field>
</record>
@@ -170,6 +176,7 @@
<strong><t t-esc="record.name.value"/></strong>
</div>
</div>
<field name="project_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
<t t-if="record.description.value">
<hr class="mt8 mb8"/>
<t t-esc="record.description.value"/>
@@ -241,7 +248,7 @@
name="%(act_project_project_2_project_task_all)d" icon="fa-tasks">
<field string="Tasks In Progress" name="task_count" widget="statinfo" options="{'label_field': 'label_tasks'}"/>
</button>
<button name="action_view_all_rating" type="object" attrs="{'invisible': ['|', ('rating_active', '=', False), ('rating_percentage_satisfaction', '=', -1)]}" class="oe_stat_button oe_percent oe_read_only" icon="fa-smile-o" groups="project.group_project_rating">
<button name="action_view_all_rating" type="object" attrs="{'invisible': ['|', ('rating_active', '=', False), ('rating_percentage_satisfaction', '=', -1)]}" class="oe_stat_button oe_read_only" icon="fa-smile-o" groups="project.group_project_rating">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value">
<field name="rating_percentage_satisfaction" nolabel="1"/>
@@ -1133,10 +1140,10 @@
<!-- Menu item for project -->
<menuitem id="menu_tasks_config" name="GTD" parent="menu_project_config" sequence="2"/>
<menuitem action="open_task_type_form" id="menu_project_config_project" name="Stages" parent="menu_project_config" sequence="3" groups="base.group_no_one"/>
<menuitem action="open_task_type_form" id="menu_project_config_project" name="Stages" parent="menu_project_config" sequence="10" groups="base.group_no_one"/>
<menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_main_pm" sequence="1"/>
<menuitem action="open_view_project_all_config" id="menu_projects_config" name="Projects" parent="menu_project_config" sequence="10"/>
<menuitem action="open_view_project_all_config" id="menu_projects_config" name="Projects" parent="menu_project_config" sequence="5"/>
<!-- User Form -->
<record id="act_res_users_2_project_task_opened" model="ir.actions.act_window">
@@ -1179,9 +1186,9 @@
<field name="name">Tags</field>
<field name="model">project.tags</field>
<field name="arch" type="xml">
<tree string="Tags" editable="bottom" sample="1">
<tree string="Tags" editable="top" sample="1">
<field name="name"/>
<field name="color" widget="color_picker"/>
<field name="color" widget="color_picker" optional="show"/>
</tree>
</field>
</record>
@@ -1194,7 +1201,7 @@
No tags found. Let's create one!
</p>
<p>
Tags are perfect to categorize your tasks.
Tags are perfect for categorizing your tasks.
</p>
</field>
</record>