[IMP]:Improved project,scrum,project_issue
bzr revid: apa@tinyerp.com-20100406132259-32wy0oiam6ylv1ef
This commit is contained in:
@@ -38,9 +38,10 @@ This module implements a dashboard for project member that includes:
|
||||
'project_planning',
|
||||
'hr_timesheet_sheet',
|
||||
'project_issue',
|
||||
'resource'
|
||||
'resource',
|
||||
'scrum'
|
||||
],
|
||||
'update_xml': ['board_project_view.xml', 'board_project_manager_view.xml'],
|
||||
'update_xml': ['board_project_view.xml', 'board_project_manager_view.xml','board_project_issue_view.xml','board_scrum_view.xml'],
|
||||
'demo_xml': ['board_project_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="action_view_current_project_issue_tree" model="ir.actions.act_window">
|
||||
<field name="name">Project issues</field>
|
||||
<field name="res_model">project.issue</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('create_date', '>=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '<=', time.strftime('%Y-%m-%d 23:59:59'))]</field>
|
||||
<field name="view_id" ref="project_issue.project_issue_tree_view"/>
|
||||
</record>
|
||||
|
||||
<record id="board_project_issue_form" model="ir.ui.view">
|
||||
<field name="name">board.project.issue.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Project Issue Board">
|
||||
<vpaned>
|
||||
<child1>
|
||||
<action colspan="4" height="220" name="%(action_view_current_project_issue_tree)d" string="Current Project Issues" width="510"/>
|
||||
</child1>
|
||||
<child2>
|
||||
<action colspan="4" height="220" name="%(project.action_task_by_days_graph)d" string="Project Task By Days" width="510"/>
|
||||
</child2>
|
||||
</vpaned>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="open_board_project_issue" model="ir.actions.act_window">
|
||||
<field name="name">Project Issue Dashboard</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_project_issue_form"/>
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_deshboard_project_issue"
|
||||
name="Project Issue Dashboard" parent="next_id_86"
|
||||
icon="terp-graph" action="open_board_project_issue"/>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -47,6 +47,14 @@
|
||||
<field name="domain">[('user_id','=',uid),('state','=','open')]</field>
|
||||
<field name="view_id" ref="view_task_tree"/>
|
||||
</record>
|
||||
<record id="action_view_pending_task_tree" model="ir.actions.act_window">
|
||||
<field name="name">My Pending Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('user_id','=',uid),('state','=','pending')]</field>
|
||||
<field name="view_id" ref="view_task_tree"/>
|
||||
</record>
|
||||
<record id="action_view_task_tree_deadline" model="ir.actions.act_window">
|
||||
<field name="name">My Task's Deadlines</field>
|
||||
<field name="res_model">project.task</field>
|
||||
@@ -91,13 +99,12 @@
|
||||
<form string="My Board">
|
||||
<hpaned>
|
||||
<child1>
|
||||
<action colspan="4" height="220" name="%(action_view_task_tree)d" string="My Open Tasks" width="510"/>
|
||||
<action colspan="4" name="%(project_issue.project_issue_categ_act0)d" string="Issues"/>
|
||||
|
||||
</child1>
|
||||
<action colspan="4" name="%(action_view_task_tree)d" string="My Open Tasks" width="510"/>
|
||||
<action colspan="4" name="%(action_view_pending_task_tree)d" string="My Pending Tasks" width="510"/>
|
||||
</child1>
|
||||
<child2>
|
||||
<action colspan="4" height="150" name="%(action_view_project_member_tree)d" string="Project(s) Members"/>
|
||||
<action colspan="4" name="%(action_view_project_editable_messages_tree)d" string="Messages"/>
|
||||
<action colspan="4" name="%(project.action_project_vs_remaining_hours_graph)d" string="Remaining Hours Per Project" />
|
||||
<action colspan="4" name="%(project.action_task_by_days_vs_planned_hours_graph)d" string="Planned Hours Per Day" />
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="action_sprint_all_dashboard_tree" model="ir.actions.act_window">
|
||||
<field name="name">Sprints List</field>
|
||||
<field name="res_model">scrum.sprint</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="scrum.view_scrum_sprint_tree"/>
|
||||
</record>
|
||||
<record id="board_project_scrum_form" model="ir.ui.view">
|
||||
<field name="name">board.project.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="My Board">
|
||||
<hpaned>
|
||||
<child1>
|
||||
<action colspan="4" height="220" name="%(action_sprint_all_dashboard_tree)d" string="Sprints List" width="510"/>
|
||||
</child1>
|
||||
</hpaned>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="open_board_project_scrum" model="ir.actions.act_window">
|
||||
<field name="name">Project Dashboard</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_project_scrum_form"/>
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_deshboard_scurm"
|
||||
name="Scurm Dashboard" parent="next_id_86"
|
||||
icon="terp-graph" action="open_board_project_scrum"/>
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!--<wizard id="wizard_close_task" menu="False" model="project.task" name="project.task.close" string="Close Task"/>-->
|
||||
<wizard id="wizard_close_task" menu="False" model="project.task" name="project.task.close" string="Close Task"/>
|
||||
<wizard id="wizard_delegate_task" menu="False" model="project.task" name="project.task.delegate" string="Delegate Task"/>
|
||||
<!--<wizard
|
||||
id="wizard_duplicate_template"
|
||||
|
||||
@@ -19,5 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
import project_report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -80,5 +80,87 @@ class report_project_task_user(osv.osv):
|
||||
""")
|
||||
report_project_task_user()
|
||||
|
||||
#This class is generated for project deshboard purpose
|
||||
class project_vs_remaining_hours(osv.osv):
|
||||
_name = "project.vs.remaining.hours"
|
||||
_description = " Project vs Remaining hours"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'project': fields.char('Project', size=128, required=True),
|
||||
'remaining_hours': fields.float('Remaining Hours', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Close'),('template', 'Template')], 'State', required=True,readonly=True)
|
||||
}
|
||||
_order = 'project desc'
|
||||
def init(self, cr):
|
||||
tools.sql.drop_view_if_exists(cr, 'project_vs_remaining_hours')
|
||||
cr.execute("""
|
||||
create or replace view project_vs_remaining_hours as (
|
||||
select
|
||||
min(pt.id) as id,
|
||||
a.name as project,
|
||||
sum(pt.remaining_hours) as remaining_hours,
|
||||
a.state
|
||||
from
|
||||
project_task as pt,
|
||||
project_project as p,
|
||||
account_analytic_account as a
|
||||
where
|
||||
pt.project_id=p.id and
|
||||
p.category_id = a.id
|
||||
group by
|
||||
a.name,a.state
|
||||
)
|
||||
""")
|
||||
project_vs_remaining_hours()
|
||||
|
||||
class task_by_days(osv.osv):
|
||||
_name = "task.by.days"
|
||||
_description = "Task By Days"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'day': fields.char('Day', size=128, required=True),
|
||||
'total_task': fields.float('Total tasks', readonly=True)
|
||||
}
|
||||
_order = 'day desc'
|
||||
def init(self, cr):
|
||||
tools.sql.drop_view_if_exists(cr, 'task_by_days')
|
||||
cr.execute("""
|
||||
create or replace view task_by_days as (
|
||||
select
|
||||
min(pt.id) as id,
|
||||
to_char(pt.create_date, 'YYYY-MM-DD') as day,
|
||||
count(*) as total_task
|
||||
from
|
||||
project_task as pt
|
||||
group by
|
||||
to_char(pt.create_date, 'YYYY-MM-DD')
|
||||
)
|
||||
""")
|
||||
task_by_days()
|
||||
|
||||
class task_by_days_vs_planned_hours(osv.osv):
|
||||
_name = "task.by.days.vs.planned.hours"
|
||||
_description = "Task By Days vs Planned Hours"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'day': fields.char('Day', size=128, required=True),
|
||||
'planned_hour': fields.float('Planned Hours', readonly=True)
|
||||
}
|
||||
_order = 'day desc'
|
||||
def init(self, cr):
|
||||
tools.sql.drop_view_if_exists(cr, 'task_by_days_vs_planned_hours')
|
||||
cr.execute("""
|
||||
create or replace view task_by_days_vs_planned_hours as (
|
||||
select
|
||||
min(pt.id) as id,
|
||||
to_char(pt.create_date, 'YYYY-MM-DD') as day,
|
||||
sum(planned_hours) as planned_hour
|
||||
from
|
||||
project_task as pt
|
||||
group by
|
||||
to_char(pt.create_date, 'YYYY-MM-DD')
|
||||
)
|
||||
""")
|
||||
task_by_days_vs_planned_hours()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -67,5 +67,103 @@
|
||||
</record>
|
||||
<menuitem action="action_project_task_user_tree" id="menu_project_task_user_tree" parent="base.menu_project_report"/>
|
||||
|
||||
<!-- Views and action for project dashboard -->
|
||||
<record id="view_project_vs_remaining_hours_tree" model="ir.ui.view">
|
||||
<field name="name">project.vs.remaining.hour.tree</field>
|
||||
<field name="model">project.vs.remaining.hours</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Project and remaining hours" colors="pink:state=='draft';blue:state=='pending';black:state=='open';red:state=='cancelled';grey:state=='close';yellow:state=='template'">
|
||||
<field name="project"/>
|
||||
<field name="remaining_hours"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_project_vs_remaining_hours_graph" model="ir.ui.view">
|
||||
<field name="name">project.vs.remaining.hour.graph</field>
|
||||
<field name="model">project.vs.remaining.hours</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Project vs remaining hours" type="bar">
|
||||
<field name="project"/>
|
||||
<field name="remaining_hours" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_project_vs_remaining_hours_graph" model="ir.actions.act_window">
|
||||
<field name="name">Project and remaining hours</field>
|
||||
<field name="res_model">project.vs.remaining.hours</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="view_id" ref="view_project_vs_remaining_hours_graph"/>
|
||||
</record>
|
||||
<!-- Views and action for project issue dashboard -->
|
||||
<record id="view_task_by_days_tree" model="ir.ui.view">
|
||||
<field name="name">task.by.days.tree</field>
|
||||
<field name="model">task.by.days</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Task By Days" >
|
||||
<field name="day"/>
|
||||
<field name="total_task"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_task_by_days_graph" model="ir.ui.view">
|
||||
<field name="name">task.by.days.graph</field>
|
||||
<field name="model">task.by.days</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Task By Days" type="bar">
|
||||
<field name="day"/>
|
||||
<field name="total_task" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_task_by_days_graph" model="ir.actions.act_window">
|
||||
<field name="name">Task By Days</field>
|
||||
<field name="res_model">task.by.days</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="view_id" ref="view_task_by_days_graph"/>
|
||||
</record>
|
||||
|
||||
<!-- Views and action for project dashboard -->
|
||||
<record id="view_task_by_days_vs_planned_hours_tree" model="ir.ui.view">
|
||||
<field name="name">task.by.days.vs.planned.hours.tree</field>
|
||||
<field name="model">task.by.days.vs.planned.hours</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Task By Days vs Planned Hours" >
|
||||
<field name="day"/>
|
||||
<field name="planned_hour"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_task_by_days_vs_planned_hours_graph" model="ir.ui.view">
|
||||
<field name="name">task.by.days.vs.planned.hours.graph</field>
|
||||
<field name="model">task.by.days.vs.planned.hours</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Task By Days vs Planned Hours" type="bar">
|
||||
<field name="day"/>
|
||||
<field name="planned_hour" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_task_by_days_vs_planned_hours_graph" model="ir.actions.act_window">
|
||||
<field name="name">Task By Days vs Planned Hours</field>
|
||||
<field name="res_model">task.by.days.vs.planned.hours</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="view_id" ref="view_task_by_days_vs_planned_hours_graph"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -35,7 +35,7 @@ class project_issue_report(osv.osv):
|
||||
c.priority as priority,
|
||||
c.project_id as project_id,
|
||||
c.type_id as type_id,
|
||||
count(*) as nbr,
|
||||
count(*) as nbr,
|
||||
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
|
||||
from
|
||||
project_issue c
|
||||
@@ -49,4 +49,5 @@ class project_issue_report(osv.osv):
|
||||
project_issue_report()
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -117,5 +117,7 @@
|
||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
|
||||
<menuitem id="base.menu_project_report" name="Reporting" parent="base.menu_main_pm" sequence="50"/>
|
||||
<menuitem action="action_project_issue_report" id="menu_project_issue_report_tree" parent="base.menu_project_report"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user