[Fix] crm: Link User to Sales Team
lp bug: https://launchpad.net/bugs/710650 fixed bzr revid: sbh@tinyerp.com-20110201112658-5045wvkefu84n7kh
This commit is contained in:
parent
ebd2d8f71a
commit
81f52634b3
|
@ -742,6 +742,13 @@ class users(osv.osv):
|
|||
_columns = {
|
||||
'context_section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
}
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
res = super(users, self).write(cr, uid, ids, vals, context=context)
|
||||
section_obj=self.pool.get('crm.case.section')
|
||||
for user in self.browse(cr, uid, ids, context):
|
||||
if user.context_section_id:
|
||||
section_obj.write(cr, uid, [user.context_section_id.id], {'member_ids':[(4, user.id)]},context)
|
||||
return res
|
||||
users()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue