[FIX]: Fix id and None project_id problem

bzr revid: atp@tinyerp.com-20120925023502-s114b6811pxm84kg
This commit is contained in:
Atul Patel (OpenERP) 2012-09-25 08:05:02 +05:30
parent 55315e418a
commit f8df69e807
2 changed files with 4 additions and 3 deletions

View File

@ -383,8 +383,9 @@ class project_issue(base_stage, osv.osv):
obj_id = super(project_issue, self).create(cr, uid, vals, context=context)
project_obj = self.pool.get("project.project")
project_id = self.browse(cr, uid, obj_id, context=context).project_id
followers = [follower.id for follower in project_id.message_follower_ids if project_id.message_follower_ids]
self.message_subscribe(cr, uid, [obj_id], followers, context=context)
if project_id:
followers = [follower.id for follower in project_id.message_follower_ids]
self.message_subscribe(cr, uid, [obj_id], followers, context=context)
self.create_send_note(cr, uid, [obj_id], context=context)
return obj_id

View File

@ -35,7 +35,7 @@ class sale_order(osv.osv):
section_id = self.browse(cr, uid, order, context=context).section_id
if section_id:
followers = [follow.id for follow in section_id.message_follower_ids]
self.message_subscribe(cr, uid, [order.id], followers, context=context)
self.message_subscribe(cr, uid, [order], followers, context=context)
return order
sale_order()