[IMP] improves the task analysis reporting view by adding measures to the pivot table (num paid) and changes the view in dashboard project (addon project)

bzr revid: ged@openerp.com-20140129152440-ibi9ity10onbi3st
This commit is contained in:
Gery Debongnie 2014-01-29 16:24:40 +01:00
parent 8dba681c69
commit 906f28109c
3 changed files with 11 additions and 15 deletions

View File

@ -6,10 +6,11 @@
<field name="name">project.task.history.cumulative.graph</field>
<field name="model">project.task.history.cumulative</field>
<field name="arch" type="xml">
<graph string="Project Tasks" type="pivot" stacked="True">
<graph string="Project Tasks" type="bar" stacked="True">
<field name="date" type="row"/>
<field name="type_id" type="row"/>
<field name="planned_hours" type="measure"/>
<field name="remaining_hours" type="measure"/>
</graph>
</field>
</record>

View File

@ -29,8 +29,6 @@ class report_project_task_user(osv.osv):
_auto = False
_columns = {
'name': fields.char('Task Summary', size=128, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'year': fields.char('Year', size=64, required=False, readonly=True),
'user_id': fields.many2one('res.users', 'Assigned To', readonly=True),
'date_start': fields.date('Assignation Date', readonly=True),
'no_of_days': fields.integer('# of Days', size=128, readonly=True),
@ -52,7 +50,6 @@ class report_project_task_user(osv.osv):
'nbr': fields.integer('# of tasks', readonly=True),
'priority': fields.selection([('4', 'Very Low'), ('3', 'Low'), ('2', 'Medium'), ('1', 'Urgent'), ('0', 'Very urgent')],
string='Priority', readonly=True),
'month':fields.selection(fields.date.MONTHS, 'Month', readonly=True),
'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')],'Status', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'partner_id': fields.many2one('res.partner', 'Contact', readonly=True),
@ -67,9 +64,6 @@ class report_project_task_user(osv.osv):
SELECT
(select 1 ) AS nbr,
t.id as id,
to_char(date_start, 'YYYY') as year,
to_char(date_start, 'MM') as month,
to_char(date_start, 'YYYY-MM-DD') as day,
date_trunc('day',t.date_start) as date_start,
date_trunc('day',t.date_end) as date_end,
date_trunc('day',t.date_last_stage_update) as date_last_stage_update,
@ -102,9 +96,6 @@ class report_project_task_user(osv.osv):
total_hours,
planned_hours,
hours_delay,
year,
month,
day,
create_date,
write_date,
date_start,

View File

@ -11,8 +11,12 @@
<field name="model">report.project.task.user</field>
<field name="arch" type="xml">
<graph string="Tasks Analysis" type="pivot">
<field name="name" type="row"/>
<field name="project_id" type="row"/>
<field name="nbr" type="measure"/>
<field name="no_of_days" type="measure"/>
<field name="total_hours" type="measure"/>
<field name="hours_planned" type="measure"/>
<field name="remaining_hours" type="measure"/>
</graph>
</field>
</record>
@ -44,9 +48,9 @@
<filter string="Contact" context="{'group_by':'partner_id'}" />
<filter string="Assigned to" name="User" context="{'group_by':'user_id'}" />
<filter string="Company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Day" context="{'group_by':'day'}" help="Creation Date"/>
<filter string="Month" context="{'group_by':'month'}" help="Creation Date"/>
<filter string="Year" context="{'group_by':'year'}" help="Creation Date"/>
<filter string="Assignation date (day)" context="{'group_by':'date_start:day'}" help="Creation Date"/>
<filter string="Assignation date (month)" context="{'group_by':'date_start:month'}" help="Creation Date"/>
<filter string="Assignation date (year)" context="{'group_by':'date_start:year'}" help="Creation Date"/>
<filter string="Last Stage Update" context="{'group_by':'date_last_stage_update'}" help="Last Stage Update"/>
</group>
</search>
@ -59,7 +63,7 @@
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="search_view_id" ref="view_task_project_user_search"/>
<field name="context">{'search_default_year':1,'search_default_project':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'group_by_no_leaf':1,'group_by':[]}</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>