[IMP]: Improve SQL report of project_issue module.
bzr revid: rch_open_erp-20100414050110-8qikh6jqxkpqos3r
This commit is contained in:
@@ -7,8 +7,8 @@ class project_issue_report(osv.osv):
|
||||
_auto = False
|
||||
_inherit = "crm.case.report"
|
||||
_columns = {
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue.report')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue.report')]"),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"),
|
||||
'nbr': fields.integer('# of Issues', readonly=True),
|
||||
'delay_close': fields.char('Delay to close', size=20, readonly=True),
|
||||
'company_id' : fields.many2one('res.company', 'Company'),
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
<field name="company_id" />
|
||||
<field name="nbr" string="#Project Issue"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="stage_id" invisible="1" />
|
||||
<field name="categ_id" />
|
||||
<field name="date_closed" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -51,13 +51,12 @@
|
||||
<xpath expr='//search[@string="Search"]/group[1]/filter[@string="This Month"]' position='replace'>
|
||||
<filter string="This Month" icon="terp-sale" domain="[('month','=',time.strftime('%%m'))]" />
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[1]/filter[@string="Cancel"]' position='after'>
|
||||
<xpath expr='//search[@string="Search"]/group[1]/filter[@string="Done"]' position='replace'>
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[1]/filter[@string="Cancel"]' position='replace'>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Closed Today" icon="terp-sale" domain="[('date_closed','=',time.strftime('%%Y/%%m/%%d'))]" />
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[1]/field[3]' position='after'>
|
||||
<field name="project_id" widget="selection"/>
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]' position='before'>
|
||||
<newline/>
|
||||
<group expand="1" string="Extended options..." colspan="10" col="12">
|
||||
@@ -76,7 +75,30 @@
|
||||
<filter icon="terp-sale"
|
||||
string="Lowest"
|
||||
domain="[('priority','=','5')]"/>
|
||||
<field name="date_closed" string="Date Closed"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="project_id" widget="selection"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]" />
|
||||
<newline/>
|
||||
<filter icon="terp-sale"
|
||||
string="Draft"
|
||||
domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Open"
|
||||
domain="[('state','=','open')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Cancelled"
|
||||
domain="[('state','=','cancel')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Closed"
|
||||
domain="[('state','=','done')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
<newline/>
|
||||
<field name="date_closed" string="Date Closed"/>
|
||||
</group>
|
||||
<newline/>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user