[IMP]account : improve chatter messge code

bzr revid: mma@tinyerp.com-20121019102750-drm1335ysz42dm4c
This commit is contained in:
Mayur Maheshwari (OpenERP)
2012-10-19 15:57:50 +05:30
parent 35f0c86380
commit e6773ef0d3
+4 -1
View File
@@ -285,7 +285,10 @@ class account_analytic_account(osv.osv):
def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
self.message_post(cr, uid, [obj.id], body=_("Contract <b>created</b>."),
message = _("Contract <b>created</b>.")
if obj.partner_id:
message = _("Contract for <em>%s</em> has been <b>created</b>.") % (obj.partner_id.name)
self.message_post(cr, uid, [obj.id], body=message,
subtype="analytic.mt_account_status", context=context)
account_analytic_account()