[IMP] project_messages: Clean

bzr revid: mra@tinyerp.com-20100408053359-tgknc3i1k0qz9x4j
This commit is contained in:
mra (Open ERP) 2010-04-08 11:03:59 +05:30
parent 95b5abcf20
commit ddd055d2a6
2 changed files with 7 additions and 3 deletions

View File

@ -19,6 +19,6 @@
#
##############################################################################
import messages
import project_messages
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -22,7 +22,8 @@ from osv import fields, osv
import netsvc
class messages(osv.osv):
"""Message from one user to another within a project
"""
Message from one user to another within a project
"""
_name = 'project.messages'
logger = netsvc.Logger()
@ -40,7 +41,7 @@ class messages(osv.osv):
'to_id':None,
}
def broadcast(self, cr, uid, project_id, message):
def broadcast(self, cr, uid, project_id, message, context=None):
""" Send a message to all the users of a project.
The sender of the message is the current user.
@ -55,6 +56,7 @@ class messages(osv.osv):
'project_id':project_id,
'message':message
}, context=context)
messages()
class project_with_message(osv.osv):
@ -66,3 +68,5 @@ class project_with_message(osv.osv):
domain="[('to_id','in',[uid,False])]"),
}
project_with_message()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: