diff options
| author | Yannick Tivisse (yti) <yti@odoo.com> | 2020-04-28 09:13:36 +0000 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2020-06-02 12:11:57 +0000 |
| commit | dadcec593d8328727b17f218c69fa1bc1433686f (patch) | |
| tree | ad4118a8d96351d5b67725112aa863c6a0096b7f /addons/project/views | |
| parent | 09ac18776f73b00f28d222ff544bb209682a2637 (diff) | |
[IMP] project: Improve global UX (back2basics)
Improve the onboarding of new users and clean a few screens.
Task ID: 2237996
closes odoo/odoo#50284
Related: odoo/enterprise#10536
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: dmonzonis <mod@odoo.com>
Diffstat (limited to 'addons/project/views')
| -rw-r--r-- | addons/project/views/project_assets.xml | 1 | ||||
| -rw-r--r-- | addons/project/views/project_views.xml | 98 | ||||
| -rw-r--r-- | addons/project/views/rating_views.xml | 158 | ||||
| -rw-r--r-- | addons/project/views/res_config_settings_views.xml | 4 |
4 files changed, 203 insertions, 58 deletions
diff --git a/addons/project/views/project_assets.xml b/addons/project/views/project_assets.xml index e6e6dddeea2..60c995c2a41 100644 --- a/addons/project/views/project_assets.xml +++ b/addons/project/views/project_assets.xml @@ -4,6 +4,7 @@ <xpath expr="." position="inside"> <link rel="stylesheet" href="/project/static/src/css/project.css"/> <script type="text/javascript" src="/project/static/src/js/project_kanban.js"></script> + <script type="text/javascript" src="/project/static/src/js/project_rating_reporting.js"></script> <script type="text/javascript" src="/project/static/src/js/project_task_kanban_examples.js"></script> <script type="text/javascript" src="/project/static/src/js/tours/project.js"></script> <link rel="stylesheet" type="text/scss" href="/project/static/src/scss/project_dashboard.scss"/> diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml index 626f50cdc99..1f76002dd82 100644 --- a/addons/project/views/project_views.xml +++ b/addons/project/views/project_views.xml @@ -29,6 +29,7 @@ <separator/> <filter string="Starred" name="starred" domain="[('priority', 'in', [1, 2])]"/> <filter string="Late Tasks" name="late" domain="[('date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"/> + <filter string="Rated tasks" name="rating_task" domain="[('rating_last_value', '!=', 0.0)]" groups="project.group_project_rating"/> <separator/> <filter string="Unread Messages" name="message_needaction" domain="[('message_needaction', '=', True)]"/> <separator/> @@ -41,14 +42,11 @@ domain="[('activity_ids.date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/> <filter invisible="1" string="Future Activities" name="activities_upcoming_all" domain="[('activity_ids.date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/> - <separator/> - <filter string="Rated tasks" name="rating_task" domain="[('rating_last_value', '!=', 0.0)]" groups="project.group_project_rating"/> <group expand="0" string="Group By"> <filter string="Stage" name="stage" context="{'group_by': 'stage_id'}"/> <filter string="Assigned to" name="user" context="{'group_by': 'user_id'}"/> <filter string="Project" name="project" context="{'group_by': 'project_id'}"/> <filter string="Creation Date" name="group_create_date" context="{'group_by': 'create_date'}"/> - <filter string="Company" name="company" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/> </group> </search> </field> @@ -281,11 +279,12 @@ </h1> <div name="options_active"> <div> - <label for="label_tasks" class="oe_inline" string="Name of the tasks :"/> + <label for="label_tasks" class="oe_inline" string="Name of the tasks:"/> <field name="label_tasks" class="oe_inline oe_input_align"/> </div> </div> </div> + <field name="description" placeholder="Describe your project..."/> <notebook> <page name="settings" string="Settings"> <group> @@ -293,6 +292,16 @@ <field name="active" invisible="1"/> <field name="user_id" string="Project Manager" widget="many2one_avatar_user" attrs="{'readonly':[('active','=',False)]}" domain="[('share', '=', False)]"/> <field name="partner_id" string="Customer"/> + <div name="alias_def" colspan="2" attrs="{'invisible': [('alias_domain', '=', False)]}"> + <label for="alias_enabled" class="font-weight-bold" string="Create tasks by sending an email to"/> + <field name="alias_enabled"/> + <span attrs="{'invisible': [('alias_enabled', '=', False)]}"> + <field name="alias_name" class="oe_inline" attrs="{'required': [('alias_enabled', '=', True)]}" /> + @ + <field name="alias_domain" class="oe_inline" readonly="1" /> + </span> + </div> + <field name="alias_contact" class="oe_inline oe_edit_only" string="Accept Emails From" attrs="{'invisible': ['|', ('alias_domain', '=', False), ('alias_enabled', '=', False)]}"/> </group> <group> <field name="analytic_account_id" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]" context="{'default_partner_id': partner_id}" groups="analytic.group_analytic_accounting"/> @@ -345,25 +354,6 @@ </div> </div> </div> - <group name="misc"> - <group string="Time Scheduling"> - <field name="resource_calendar_id"/> - </group> - </group> - </page> - <page name="emails" string="Emails" attrs="{'invisible': [('alias_domain', '=', False)]}"> - <group name="group_alias"> - <label for="alias_name" string="Email Alias"/> - <div name="alias_def"> - <field name="alias_id" class="oe_read_only oe_inline" - string="Email Alias" required="0"/> - <div class="oe_edit_only oe_inline" name="edit_alias" style="display: inline;" > - <field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/> - </div> - </div> - <field name="alias_contact" class="oe_inline oe_edit_only" - string="Accept Emails From"/> - </group> </page> </notebook> <div class="oe_chatter"> @@ -385,6 +375,7 @@ <filter string="My Favorites" name="my_projects" domain="[('favorite_user_ids', 'in', uid)]"/> <separator/> <filter string="Followed" name="followed_by_me" domain="[('message_is_follower', '=', True)]"/> + <filter string="My Projects" name="my_projects" domain="[('user_id', '=', uid)]"/> <separator/> <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/> <group expand="0" string="Group By"> @@ -399,17 +390,16 @@ <field name="name">project.project.tree</field> <field name="model">project.project</field> <field name="arch" type="xml"> - <tree decoration-muted="active == False" string="Projects" delete="0"> + <tree decoration-muted="active == False" string="Projects" delete="0" multi_edit="1"> <field name="sequence" optional="show" widget="handle"/> <field name="message_needaction" invisible="1"/> <field name="active" invisible="1"/> - <field name="name" string="Project Name"/> + <field name="name" string="Name"/> <field name="user_id" optional="show" string="Project Manager" widget="many2one_avatar_user"/> - <field name="partner_id" optional="show" string="Contact"/> + <field name="partner_id" optional="show" string="Customer"/> <field name="analytic_account_id" optional="hide"/> <field name="privacy_visibility" optional="hide"/> <field name="subtask_project_id" optional="hide"/> - <field name="resource_calendar_id" optional="hide"/> <field name="label_tasks" optional="hide"/> <field name="company_id" optional="show" groups="base.group_multi_company"/> </tree> @@ -453,16 +443,19 @@ <field name="arch" type="xml"> <form string="Project"> <group> - <group> - <field name="name" class="o_project_name oe_inline" - string="Project Name" placeholder="e.g. Office Party"/> - <field name="user_id" invisible="1"/> - <label for="alias_name" string="Choose a Project Email" attrs="{'invisible': [('alias_domain', '=', False)]}"/> - <div name="alias_def" attrs="{'invisible': [('alias_domain', '=', False)]}"> - <field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/> - </div> - </group> + <field name="name" class="o_project_name oe_inline" + string="Project Name" placeholder="e.g. Office Party"/> + <field name="user_id" invisible="1"/> </group> + <div name="alias_def" colspan="2" attrs="{'invisible': [('alias_domain', '=', False)]}"> + <label for="alias_enabled" class="oe_inline" string="Create tasks by sending an email to"/> + <field name="alias_enabled"/> + <span attrs="{'invisible': [('alias_enabled', '=', False)]}"> + <field name="alias_name" class="oe_inline" attrs="{'required': [('alias_enabled', '=', True)]}" placeholder="e.g. office-party"/> + @ + <field name="alias_domain" class="oe_inline" readonly="1" /> + </span> + </div> </form> </field> </record> @@ -571,13 +564,6 @@ </field> </record> - <record id="ir_actions_server_project_sample" model="ir.actions.server"> - <field name="name">Project: Activate Sample Project</field> - <field name="model_id" ref="project.model_project_project"/> - <field name="state">code</field> - <field name="code">action = model.activate_sample_project()</field> - </record> - <record id="open_view_project_all" model="ir.actions.act_window"> <field name="name">Projects</field> <field name="res_model">project.project</field> @@ -588,9 +574,9 @@ <field name="target">main</field> <field name="help" type="html"> <p class="o_view_nocontent_smiling_face"> - Create a new project + Create a project </p><p> - Or <a type="action" name="%(project.ir_actions_server_project_sample)d" tabindex="-1">activate a sample project</a> to play with. + Projects regroup tasks on the same topic and each have their own dashboard. </p> </field> </record> @@ -606,10 +592,10 @@ <field name="search_view_id" ref="view_project_project_filter"/> <field name="context">{}</field> <field name="help" type="html"> - <p class="o_view_nocontent_empty_folder"> - Create a new project + <p class="o_view_nocontent_smiling_face"> + Create a project </p><p> - Or <a type="action" name="%(project.ir_actions_server_project_sample)d" tabindex="-1">activate a sample project</a> to play with. + Projects regroup tasks on the same topic and each have their own dashboard. </p> </field> </record> @@ -628,6 +614,9 @@ attrs="{'invisible' : [('user_id', '!=', False)]}"/> <field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" attrs="{'invisible': [('project_id', '=', False)]}"/> </header> + <div class="text-center alert alert-primary" role="alert" attrs="{'invisible': ['|', ('ribbon_message', '=', False), ('ribbon_message', '=', '')]}"> + <field name="ribbon_message"/> + </div> <sheet string="Task"> <div class="oe_button_box" name="button_box"> <button name="action_subtask" type="object" class="oe_stat_button" icon="fa-tasks" @@ -651,7 +640,7 @@ <field name="active" invisible="1"/> <field name="partner_id" class="o_task_customer_field"/> <field name="partner_phone" widget="phone" attrs="{'invisible': [('partner_id', '=', False)]}"/> - <field name="partner_email" string="Email" widget="email" attrs="{'invisible': [('partner_id', '=', False)]}"/> + <field name="partner_email" widget="email" attrs="{'invisible': [('partner_id', '=', False)]}"/> <field name="legend_blocked" invisible="1"/> <field name="legend_normal" invisible="1"/> <field name="legend_done" invisible="1"/> @@ -660,7 +649,7 @@ <field name="project_id" required="1" domain="[('active', '=', True), ('company_id', '=', company_id)]"/> <field name="user_id" class="o_task_user_field" - options='{"no_open": True}' domain="[('share', '=', False)]"/> + domain="[('share', '=', False)]"/> <field name="parent_id" domain="[('parent_id', '=', False)]" @@ -852,8 +841,9 @@ <!-- YTI TODO user_invisible and seq_visible seem to be useless --> <field name="project_id" invisible="context.get('user_invisible', False)" optional="show" readonly="1"/> <field name="partner_id" optional="hide"/> - <field name="parent_id" groups="project.group_subtask_project" optional="show"/> + <field name="parent_id" groups="project.group_subtask_project" optional="hide"/> <field name="user_id" invisible="context.get('user_invisible', False)" optional="show" widget="many2one_avatar_user"/> + <field name="company_id" groups="base.group_multi_company" optional="show"/> <field name="activity_ids" widget="list_activity" optional="show"/> <field name="date_deadline" optional="hide" widget="remaining_days" attrs="{'invisible': [('is_closed', '=', True)]}"/> <field name="stage_id" invisible="context.get('set_visible',False)" optional="show" readonly="1"/> @@ -955,7 +945,7 @@ <record id="action_view_all_task" model="ir.actions.act_window"> <field name="name">Tasks</field> <field name="res_model">project.task</field> - <field name="view_mode">kanban,tree,form,calendar,pivot,graph,activity</field> + <field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity</field> <field name="context">{'search_default_my_tasks': 1, 'all_task': 0}</field> <field name="search_view_id" ref="view_task_search_form"/> <field name="help" type="html"> @@ -979,7 +969,7 @@ <field name="act_window_id" ref="action_view_task"/> </record> - <menuitem name="All Tasks" id="menu_project_management" parent="menu_main_pm" + <menuitem name="Tasks" id="menu_project_management" parent="menu_main_pm" action="action_view_all_task" sequence="2" groups="base.group_no_one,group_project_user"/> <record id="project_task_action_from_partner" model="ir.actions.act_window"> @@ -1040,6 +1030,7 @@ <sheet> <group> <field name="name"/> + <field name="color" widget="color_picker"/> </group> </sheet> </form> @@ -1052,6 +1043,7 @@ <field name="arch" type="xml"> <tree string="Tags" editable="bottom"> <field name="name"/> + <field name="color" widget="color_picker"/> </tree> </field> </record> diff --git a/addons/project/views/rating_views.xml b/addons/project/views/rating_views.xml index 7d7da90fa75..08b133554fc 100644 --- a/addons/project/views/rating_views.xml +++ b/addons/project/views/rating_views.xml @@ -1,5 +1,73 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> + <record id="rating_rating_view_tree_project" model="ir.ui.view"> + <field name="name">rating.rating.tree.project</field> + <field name="model">rating.rating</field> + <field name="inherit_id" ref="rating.rating_rating_view_tree"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <field name="res_name" position="attributes"> + <attribute name="string">Task</attribute> + </field> + <field name="parent_res_name" position="attributes"> + <attribute name="string">Project</attribute> + </field> + <field name="rated_partner_id" position="attributes"> + <attribute name="string">Assigned to</attribute> + </field> + </field> + </record> + + <record id="rating_rating_view_form_project" model="ir.ui.view"> + <field name="name">rating.rating.form.project</field> + <field name="model">rating.rating</field> + <field name="inherit_id" ref="rating.rating_rating_view_form"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <field name="res_name" position="attributes"> + <attribute name="string">Task</attribute> + </field> + <field name="resource_ref" position="attributes"> + <attribute name="string">Task</attribute> + </field> + <field name="parent_ref" position="attributes"> + <attribute name="string">Project</attribute> + </field> + <field name="parent_res_name" position="attributes"> + <attribute name="string">Project</attribute> + </field> + <field name="rated_partner_id" position="attributes"> + <attribute name="string">Assigned to</attribute> + </field> + <div name="rating_image_container" position="replace"> + <field name="rating_text" string="Rating"/> + </div> + </field> + </record> + + <record id="rating_rating_view_pivot" model="ir.ui.view"> + <field name="name">rating.rating.view.pivot.project</field> + <field name="model">rating.rating</field> + <field name="inherit_id" ref="rating.rating_rating_view_pivot"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <xpath expr="//pivot" position="attributes"> + <attribute name="js_class">project_rating_pivot</attribute> + </xpath> + </field> + </record> + + <record id="rating_rating_view_graph" model="ir.ui.view"> + <field name="name">rating.rating.view.graph.project</field> + <field name="model">rating.rating</field> + <field name="inherit_id" ref="rating.rating_rating_view_graph"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <xpath expr="//graph" position="attributes"> + <attribute name="js_class">project_rating_graph</attribute> + </xpath> + </field> + </record> <record id="rating_rating_view_search_project" model="ir.ui.view"> <field name="name">rating.rating.search.project</field> @@ -32,8 +100,36 @@ </field> </record> + <record id="rating_rating_action_view_project_rating_tree" model="ir.actions.act_window.view"> + <field name="sequence" eval="10"/> + <field name="view_mode">tree</field> + <field name="act_window_id" ref="rating_rating_action_view_project_rating"/> + <field name="view_id" ref="rating_rating_view_tree_project"/> + </record> + + <record id="rating_rating_action_view_project_rating_form" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">form</field> + <field name="act_window_id" ref="rating_rating_action_view_project_rating"/> + <field name="view_id" ref="rating_rating_view_form_project"/> + </record> + + <record id="rating_rating_action_view_project_rating_pivot" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">pivot</field> + <field name="act_window_id" ref="rating_rating_action_view_project_rating"/> + <field name="view_id" ref="rating_rating_view_pivot"/> + </record> + + <record id="rating_rating_action_view_project_rating_graph" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">graph</field> + <field name="act_window_id" ref="rating_rating_action_view_project_rating"/> + <field name="view_id" ref="rating_rating_view_graph"/> + </record> + <record id="rating_rating_action_task" model="ir.actions.act_window"> - <field name="name">Customer Ratings</field> + <field name="name">Customer Ratings on Task</field> <field name="res_model">rating.rating</field> <field name="view_mode">kanban,tree,pivot,graph,form</field> <field name="domain">[('res_model', '=', 'project.task'), ('res_id', '=', active_id), ('consumed', '=', True)]</field> @@ -42,11 +138,39 @@ <p class="o_view_nocontent_empty_folder"> No customer ratings yet </p><p> - Customer ratings on tasks. If you have no rating, change your project Settings to activate it. + Let's wait for your customers to manifest themselves. </p> </field> </record> + <record id="rating_rating_action_task_tree" model="ir.actions.act_window.view"> + <field name="sequence" eval="10"/> + <field name="view_mode">tree</field> + <field name="act_window_id" ref="rating_rating_action_task"/> + <field name="view_id" ref="rating_rating_view_tree_project"/> + </record> + + <record id="rating_rating_action_task_form" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">form</field> + <field name="act_window_id" ref="rating_rating_action_task"/> + <field name="view_id" ref="rating_rating_view_form_project"/> + </record> + + <record id="rating_rating_action_task_pivot" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">pivot</field> + <field name="act_window_id" ref="rating_rating_action_task"/> + <field name="view_id" ref="rating_rating_view_pivot"/> + </record> + + <record id="rating_rating_action_task_graph" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">graph</field> + <field name="act_window_id" ref="rating_rating_action_task"/> + <field name="view_id" ref="rating_rating_view_graph"/> + </record> + <record id="rating_rating_action_project_report" model="ir.actions.act_window"> <field name="name">Customer Ratings</field> <field name="res_model">rating.rating</field> @@ -57,10 +181,38 @@ <p class="o_view_nocontent_empty_folder"> No customer ratings yet </p><p> - Customer ratings on tasks. If you have no rating, change your project Settings to activate it. + Let's wait for your customers to manifest themselves. </p> </field> <field name="context">{}</field> </record> + <record id="rating_rating_action_project_report_tree" model="ir.actions.act_window.view"> + <field name="sequence" eval="10"/> + <field name="view_mode">tree</field> + <field name="act_window_id" ref="rating_rating_action_project_report"/> + <field name="view_id" ref="rating_rating_view_tree_project"/> + </record> + + <record id="rating_rating_action_project_report_form" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">form</field> + <field name="act_window_id" ref="rating_rating_action_project_report"/> + <field name="view_id" ref="rating_rating_view_form_project"/> + </record> + + <record id="rating_rating_action_project_report_pivot" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">pivot</field> + <field name="act_window_id" ref="rating_rating_action_project_report"/> + <field name="view_id" ref="rating_rating_view_pivot"/> + </record> + + <record id="rating_rating_action_project_report_graph" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">graph</field> + <field name="act_window_id" ref="rating_rating_action_project_report"/> + <field name="view_id" ref="rating_rating_view_graph"/> + </record> + </odoo> diff --git a/addons/project/views/res_config_settings_views.xml b/addons/project/views/res_config_settings_views.xml index 8346330c8c7..79b8e2a03cb 100644 --- a/addons/project/views/res_config_settings_views.xml +++ b/addons/project/views/res_config_settings_views.xml @@ -59,7 +59,7 @@ <div class="o_setting_right_pane"> <label for="module_project_forecast"/> <div class="text-muted" name="project_forecast_msg"> - Schedule your teams across projects and estimate deadlines more accurately. + Plan resource allocation accross projets and tasks, and estimate deadlines more accurately </div> </div> </div> @@ -70,7 +70,7 @@ <div class="o_setting_right_pane"> <label for="module_hr_timesheet"/> <div class="text-muted"> - Track time spent on tasks. + Track time spent on projects and tasks </div> </div> </div> |
