[FIX]: Fix override write() method for sales team
bzr revid: atp@tinyerp.com-20120926160233-1vvmf21nspprr4qp
This commit is contained in:
parent
740863c6aa
commit
ae0d1d99a3
|
@ -788,7 +788,10 @@ class crm_lead(base_stage, format_address, osv.osv):
|
||||||
stage = self.pool.get('crm.case.stage').browse(cr, uid, vals['stage_id'], context=context)
|
stage = self.pool.get('crm.case.stage').browse(cr, uid, vals['stage_id'], context=context)
|
||||||
if stage.on_change:
|
if stage.on_change:
|
||||||
vals['probability'] = stage.probability
|
vals['probability'] = stage.probability
|
||||||
return super(crm_lead,self).write(cr, uid, ids, vals, context)
|
for lead in self.browse(cr, uid, ids, context=context):
|
||||||
|
if lead.section_id:
|
||||||
|
vals.update({'message_follower_ids': [(4, follow.id) for follow in lead.section_id.message_follower_ids]})
|
||||||
|
return super(crm_lead,self).write(cr, uid, ids, vals, context)
|
||||||
|
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
# Mail Gateway
|
# Mail Gateway
|
||||||
|
|
|
@ -38,6 +38,12 @@ class sale_order(osv.osv):
|
||||||
self.message_subscribe(cr, uid, [order], followers, context=context)
|
self.message_subscribe(cr, uid, [order], followers, context=context)
|
||||||
return order
|
return order
|
||||||
|
|
||||||
|
def write(self, cr, uid, ids, vals, context=None):
|
||||||
|
for order in self.browse(cr, uid, ids, context=context):
|
||||||
|
if order.section_id:
|
||||||
|
vals.update({'message_follower_ids': [(4, follow.id) for follow in order.section_id.message_follower_ids]})
|
||||||
|
return super(sale_order, self).write(cr, uid, ids, vals, context=context)
|
||||||
|
|
||||||
sale_order()
|
sale_order()
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
Loading…
Reference in New Issue