[IMP] Add model name instead of document with Created in chatter.

bzr revid: bth@tinyerp.com-20130207051120-1abjmfuukjfyac7z
This commit is contained in:
Bhumi Thakkar (Open ERP) 2013-02-07 10:41:20 +05:30
parent 61f80302a4
commit 14a0d1b092
1 changed files with 2 additions and 1 deletions

View File

@ -35,6 +35,7 @@ from openerp import SUPERUSER_ID
from openerp.addons.mail.mail_message import decode
from openerp.osv import fields, osv
from openerp.tools.safe_eval import safe_eval as eval
from openerp.tools.translate import _
_logger = logging.getLogger(__name__)
@ -247,7 +248,7 @@ class mail_thread(osv.AbstractModel):
# automatic logging unless asked not to (mainly for various testing purpose)
if not context.get('mail_create_nolog'):
self.message_post(cr, uid, thread_id, body='Document created', context=context)
self.message_post(cr, uid, thread_id, body=_('%s created') % (self._description), context=context)
return thread_id
def write(self, cr, uid, ids, values, context=None):