[MERGE] project: Smoothen the onboarding
Purpose ======= Onboarding is still not smooth for new users
This commit is contained in:
@@ -117,11 +117,6 @@
|
||||
<field name="partner_id" position="after">
|
||||
<field name="allow_timesheets" invisible="1"/>
|
||||
</field>
|
||||
<xpath expr="//div[hasclass('o_kanban_manage_reports')]/div[last()]" position="after">
|
||||
<div attrs="{'invisible': [('allow_timesheets', '=', False)]}" groups="hr_timesheet.group_hr_timesheet_user">
|
||||
<a name="%(act_hr_timesheet_line_by_project)d" type="action">Timesheets</a>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_project_kanban_boxes')]" position="inside">
|
||||
<a t-if="record.allow_timesheets.raw_value" class="o_project_kanban_box" name="%(act_hr_timesheet_line_by_project)d" type="action" groups="hr_timesheet.group_hr_timesheet_user">
|
||||
<div>
|
||||
|
||||
@@ -336,19 +336,19 @@ class Project(models.Model):
|
||||
favorite_projects.write({'favorite_user_ids': [(3, self.env.uid)]})
|
||||
|
||||
@api.multi
|
||||
def close_dialog(self):
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
@api.multi
|
||||
def edit_dialog(self):
|
||||
form_view = self.env.ref('project.edit_project')
|
||||
def open_tasks(self):
|
||||
ctx = dict(self._context)
|
||||
ctx.update({'search_default_project_id': self.id})
|
||||
kanban_view_id = self.env.ref('project.view_task_kanban')
|
||||
return {
|
||||
'name': _('Project'),
|
||||
'res_model': 'project.project',
|
||||
'res_id': self.id,
|
||||
'views': [(form_view.id, 'form'),],
|
||||
'name': _('Tasks'),
|
||||
'res_model': 'project.task',
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'inline'
|
||||
'view_id': kanban_view_id.id,
|
||||
'views': [(kanban_view_id.id, 'kanban'), (False, 'form')],
|
||||
'view_mode': 'kanban,tree,form',
|
||||
'view_type': 'form',
|
||||
'context': ctx
|
||||
}
|
||||
|
||||
|
||||
@@ -398,11 +398,7 @@ class Task(models.Model):
|
||||
('normal', 'Grey'),
|
||||
('done', 'Green'),
|
||||
('blocked', 'Red')], string='Kanban State',
|
||||
copy=False, default='normal', required=True,
|
||||
help="A task's kanban state indicates special situations affecting it:\n"
|
||||
" * Grey is the default situation\n"
|
||||
" * Red indicates something is preventing the progress of this task\n"
|
||||
" * Green indicates the task is ready to be pulled to the next stage")
|
||||
copy=False, default='normal', required=True)
|
||||
kanban_state_label = fields.Char(compute='_compute_kanban_state_label', string='Kanban State', track_visibility='onchange')
|
||||
create_date = fields.Datetime(index=True)
|
||||
write_date = fields.Datetime(index=True) #not displayed in the view but it might be useful with base_automation module (and it needs to be defined first for that)
|
||||
|
||||
@@ -92,20 +92,4 @@
|
||||
<field name="help">This report allows you to analyse the performance of your projects and users. You can analyse the quantities of tasks, the hours spent compared to the planned hours, the average number of days to open or close a task, etc.</field>
|
||||
</record>
|
||||
|
||||
<record id="action_project_task_user_tree_filtered" model="ir.actions.act_window">
|
||||
<field name="name">Tasks Analysis</field>
|
||||
<field name="res_model">report.project.task.user</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,pivot</field>
|
||||
<field name="search_view_id" ref="view_task_project_user_search"/>
|
||||
<field name="context">{
|
||||
'group_by_no_leaf':1,
|
||||
'group_by':[],
|
||||
'search_default_project_id': [active_id],
|
||||
'default_project_id': active_id,
|
||||
}
|
||||
</field>
|
||||
<field name="help">This report allows you to analyse the performance of your projects and users. You can analyse the quantities of tasks, the hours spent compared to the planned hours, the average number of days to open or close a task, etc.</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -24,14 +24,13 @@ tour.register('project_tour', {
|
||||
position: 'right',
|
||||
run: function (actions) {
|
||||
actions.auto();
|
||||
actions.auto(".modal:visible .btn.btn-primary");
|
||||
},
|
||||
}, {
|
||||
trigger: '.o_project_kanban .o_kanban_record:first-child',
|
||||
content: _t('Click on the card to <b>go to your project</b> and start organizing tasks.'),
|
||||
trigger: '.o_open_tasks',
|
||||
content: _t('This will create new project and redirect us to its tasks.'),
|
||||
position: 'right',
|
||||
run: function (actions) {
|
||||
actions.auto(this.$anchor.find(".o_project_kanban_box:first"));
|
||||
actions.auto(".modal:visible .btn.btn-primary");
|
||||
},
|
||||
}, {
|
||||
trigger: ".o_kanban_project_tasks .o_column_quick_create",
|
||||
@@ -39,15 +38,31 @@ tour.register('project_tour', {
|
||||
position: "right"
|
||||
}, {
|
||||
trigger: ".o-kanban-button-new",
|
||||
extra_trigger: '.o_kanban_project_tasks .o_kanban_group:eq(2)',
|
||||
extra_trigger: '.o_kanban_project_tasks',
|
||||
content: _t("Now that the project is set up, <b>create a few tasks</b>."),
|
||||
position: "right"
|
||||
}, {
|
||||
trigger: ".o_kanban_group:first-child .o_kanban_record:last-child",
|
||||
trigger: '.o-kanban-button-new',
|
||||
extra_trigger: '.o_kanban_project_tasks',
|
||||
content: _t("<b>Drag & drop tasks</b> between columns as you work on them."),
|
||||
position: "right",
|
||||
run: "drag_and_drop .o_kanban_group:eq(2) ",
|
||||
content: _t('Let\'s create your first task.'),
|
||||
position: 'right',
|
||||
width: 200,
|
||||
}, {
|
||||
trigger: 'input.o_task_name',
|
||||
content: _t('Choose a <b>task name</b>. (e.g. Website Design, Purchase Goods etc.)'),
|
||||
position: 'right',
|
||||
run: function (actions) {
|
||||
actions.auto();
|
||||
},
|
||||
}, {
|
||||
trigger: '.o_form_button_save',
|
||||
content: _t("<p>Once your task is ready, you can save it.</p>"),
|
||||
position: 'bottom',
|
||||
}, {
|
||||
trigger: ".breadcrumb li:not(.active):last",
|
||||
extra_trigger: '.o_form_project_tasks.o_form_readonly',
|
||||
content: _t("Use the breadcrumbs to <b>go back to your tasks pipeline</b>."),
|
||||
position: "bottom"
|
||||
}, {
|
||||
trigger: ".o_kanban_record .o_priority_star",
|
||||
extra_trigger: '.o_kanban_project_tasks',
|
||||
|
||||
@@ -244,25 +244,21 @@
|
||||
<field name="model">project.project</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Project">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" class="o_project_name oe_inline"
|
||||
string="Project Name" placeholder="e.g. Office Party"/>
|
||||
<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>
|
||||
<field name="user_id" invisible="1"/>
|
||||
</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>
|
||||
<footer>
|
||||
<button string="Create" name="close_dialog" type="object" class="btn-primary"/>
|
||||
<button string="Create & Edit" name="edit_dialog" type="object" class="btn-primary"/>
|
||||
<button string="Discard" class="btn-default" special="cancel"/>
|
||||
</footer>
|
||||
|
||||
</sheet>
|
||||
</group>
|
||||
<footer>
|
||||
<button string="Create" name="open_tasks" type="object" class="btn-primary o_open_tasks"/>
|
||||
<button string="Discard" class="btn-default" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -310,10 +306,7 @@
|
||||
<div class="o_kanban_card_manage_pane" groups="project.group_project_manager">
|
||||
<div class="o_kanban_card_manage_section o_kanban_manage_reports">
|
||||
<div>
|
||||
<a type="edit">Settings</a>
|
||||
</div>
|
||||
<div>
|
||||
<a name="%(project.action_project_task_user_tree_filtered)d" type="action">Tasks</a>
|
||||
<a type="edit">Edit</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="o_project_kanban_colorpicker">
|
||||
@@ -418,7 +411,7 @@
|
||||
<div class="oe_title">
|
||||
<h1 class="o_row">
|
||||
<field name="priority" widget="priority"/>
|
||||
<field name="name" placeholder="Task Title..."/>
|
||||
<field name="name" class="o_task_name" placeholder="Task Title..."/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
|
||||
@@ -162,13 +162,6 @@
|
||||
</b>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_kanban_card_manage_section')]" position="inside">
|
||||
<div t-if="record.rating_status.raw_value != 'no'">
|
||||
<a name="action_view_all_rating" type="object">
|
||||
Customer Ratings
|
||||
</a>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
a, a:hover {
|
||||
color: initial;
|
||||
}
|
||||
ul > li > p {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
.o_readonly {
|
||||
min-height: 1em;
|
||||
@@ -19,6 +22,9 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
ul > li > p {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.oe_form_field_html iframe {
|
||||
|
||||
Reference in New Issue
Block a user