[IMP]: add the onchange_categ_id to all crm cases
bzr revid: sbh@tinyerp.com-20100113103148-7ljsennudeajlvj4
This commit is contained in:
+1
-7
@@ -256,8 +256,6 @@ class crm_case(osv.osv):
|
||||
'date_action_last': fields.datetime('Last Action', readonly=1),
|
||||
'date_action_next': fields.datetime('Next Action', readonly=1),
|
||||
'company_id': fields.many2one('res.company','Company'),
|
||||
# 'case_id': fields.many2one('crm.case', 'Related Case'),
|
||||
# 'child_ids': fields.one2many('crm.case', 'case_id', 'Events'),
|
||||
}
|
||||
def _get_default_partner_address(self, cr, uid, context):
|
||||
if not context.get('portal',False):
|
||||
@@ -654,11 +652,7 @@ class crm_case(osv.osv):
|
||||
data['email_from'] = self.pool.get('res.partner.address').browse(cr, uid, addr['contact']).email
|
||||
return {'value':data}
|
||||
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.case.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
|
||||
|
||||
def onchange_partner_address_id(self, cr, uid, ids, part, email=False):
|
||||
|
||||
@@ -108,6 +108,11 @@ class crm_claim(osv.osv):
|
||||
_defaults = {
|
||||
'priority': lambda *a: AVAILABLE_PRIORITIES[2][0],
|
||||
}
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.claim.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
crm_claim()
|
||||
|
||||
|
||||
@@ -117,5 +117,11 @@ class crm_fundraising(osv.osv):
|
||||
_defaults = {
|
||||
'priority': lambda *a: AVAILABLE_PRIORITIES[2][0],
|
||||
}
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.fundraising.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
|
||||
crm_fundraising()
|
||||
|
||||
@@ -80,7 +80,12 @@ class crm_helpdesk(osv.osv):
|
||||
'categ_id': fields.many2one('crm.helpdesk.categ', 'Category', domain="[('section_id','=',section_id)]"),
|
||||
'duration': fields.float('Duration'),
|
||||
}
|
||||
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.helpdesk.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
crm_helpdesk()
|
||||
|
||||
|
||||
|
||||
@@ -115,5 +115,10 @@ class crm_lead(osv.osv):
|
||||
|
||||
'opportunity_id': fields.many2one ('crm.opportunity', 'Opportunity'),
|
||||
}
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.lead.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
crm_lead()
|
||||
|
||||
@@ -107,5 +107,11 @@ class crm_opportunity(osv.osv):
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'phonecall_id':fields.many2one ('crm.phonecall', 'Phonecall'),
|
||||
}
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.opportunity.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
crm_opportunity()
|
||||
|
||||
|
||||
@@ -89,5 +89,10 @@ class crm_job(osv.osv):
|
||||
|
||||
|
||||
}
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.categ.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
crm_job()
|
||||
|
||||
Reference in New Issue
Block a user