[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>
This commit is contained in:
@@ -724,6 +724,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="quick_create_project_form" model="ir.ui.view">
|
||||
<field name="name">project.form.quick_create</field>
|
||||
<field name="model">project.project</field>
|
||||
<field name="priority">1000</field>
|
||||
<field name="arch" type="xml">
|
||||
<form class="o_form_project_project">
|
||||
<group>
|
||||
<field name="name" string="Project Title" placeholder="e.g. Office Party"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="project_view_kanban" model="ir.ui.view">
|
||||
<field name="name">project.project.kanban</field>
|
||||
<field name="model">project.project</field>
|
||||
@@ -812,6 +825,7 @@
|
||||
js_class="project_project_kanban"
|
||||
on_create="project.open_create_project"
|
||||
action="action_view_tasks" type="object"
|
||||
quick_create_view="project.quick_create_project_form"
|
||||
sample="1"
|
||||
default_order="is_favorite desc, sequence, name, id"
|
||||
>
|
||||
@@ -1595,7 +1609,7 @@
|
||||
<field name="date_deadline"/>
|
||||
<field name="tag_ids" widget="many2many_tags" attrs="{'invisible': [('tag_ids', '=', [])]}"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="kanban_state"/>
|
||||
<field name="kanban_state" widget="state_selection"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -28,6 +28,7 @@ have real delivered quantities in sales orders.
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/sale_timesheet_portal_templates.xml',
|
||||
'views/project_sharing_views.xml',
|
||||
'views/project_portal_templates.xml',
|
||||
'report/report_timesheet_templates.xml',
|
||||
'wizard/project_create_sale_order_views.xml',
|
||||
'wizard/project_create_invoice_views.xml',
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="portal_timesheet_table_inherit" inherit_id="hr_timesheet.portal_timesheet_table">
|
||||
<xpath expr="//thead/tr/th[@t-if='is_uom_day']" position="before">
|
||||
<t t-set="display_sol" t-value="False"/>
|
||||
<t t-foreach="timesheets" t-as="timesheet">
|
||||
<t t-if="timesheet.so_line != task.sale_line_id">
|
||||
<t t-set="display_sol" t-value="True"/>
|
||||
</t>
|
||||
</t>
|
||||
<th t-if="display_sol">Sales Order Item</th>
|
||||
</xpath>
|
||||
<xpath expr="//tr/td[t[@t-esc='timesheet.name']]" position="after">
|
||||
<td t-if="display_sol">
|
||||
<t t-if="timesheet.so_line.order_id.access_url and so_accessible"><a t-att-href="'%s' % timesheet.so_line.order_id.access_url"><t t-out="timesheet.so_line.display_name"/></a></t>
|
||||
<t t-else=""><t t-out="timesheet.so_line.display_name"/></t>
|
||||
</td>
|
||||
</xpath>
|
||||
<xpath expr="//tfoot/tr/th[@colspan='3']" position="replace">
|
||||
<t t-if="display_sol"><th colspan="4"></th></t>
|
||||
<t t-else=""><th colspan="3"></th></t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
@@ -108,7 +108,7 @@
|
||||
<xpath expr="//div[@name='portal_my_task_second_column']" position="inside">
|
||||
<t t-if="task.project_id.allow_billable">
|
||||
<div t-if="task.sale_order_id"><strong>Sales Order:</strong>
|
||||
<span t-if="so_accessible"><a t-attf-href="/my/orders/{{ task.sale_order_id.id }}" t-field="task.sale_order_id"></a></span>
|
||||
<span t-if="so_accessible"><a t-attf-href="{{ task.sale_order_id.access_url }}" t-field="task.sale_order_id"></a></span>
|
||||
<span t-else="" t-field="task.sale_order_id"></span>
|
||||
</div>
|
||||
<div t-if="invoices_accessible"><strong>Invoices:</strong>
|
||||
|
||||
Reference in New Issue
Block a user