[Fix] report_crm:Fix the problem of group by in fundrising report
bzr revid: sbh@tinyerp.com-20100304073014-3xv4ksfd7lncp803
This commit is contained in:
@@ -53,7 +53,10 @@ class crm_fundraising(osv.osv):
|
||||
|
||||
_defaults = {
|
||||
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
|
||||
'probability':lambda *a:0.0,
|
||||
'probability':lambda *a:0.0,
|
||||
'planned_cost':lambda *a:0.0,
|
||||
'planned_revenue':lambda *a:0.0,
|
||||
|
||||
}
|
||||
|
||||
crm_fundraising()
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<field name="user_id" />
|
||||
<label string="Resolution: " align="1.0"/>
|
||||
<group colspan="1" col="3">
|
||||
<field name="stage_id" select="1" nolabel="1"/>
|
||||
<field name="stage_id" select="1" nolabel="1" on_change="onchange_stage_id(stage_id)" domain="[('object_id.model', '=', 'crm.project.bug')]"/>
|
||||
<button icon="gtk-go-back" string="" name="stage_previous" type="object"/>
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
|
||||
@@ -88,6 +88,14 @@ class crm_project_bug(osv.osv):
|
||||
def convert_to_bug(self, cr, uid, ids, context=None):
|
||||
return self._convert(cr, uid, ids, 'bug_categ', context=context)
|
||||
|
||||
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
|
||||
if not stage_id:
|
||||
return {'value':{}}
|
||||
stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
|
||||
if not stage.on_change:
|
||||
return {'value':{}}
|
||||
return {'value':{'probability':stage.probability}}
|
||||
|
||||
_defaults = {
|
||||
'project_id':_get_project,
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<field name="inherit_id" ref="report_crm.view_crm_case_filter"/>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="state" position="before">
|
||||
<field name="user_id" position="before">
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user