[IMP]: crm: Changing status by "Action Rule" should reflect on the communication history

bzr revid: rpa@tinyerp.com-20100917055454-w572pighksn9upku
This commit is contained in:
rpa (Open ERP) 2010-09-17 11:24:54 +05:30
parent b8ec8c25c0
commit cb7dda3218
1 changed files with 5 additions and 1 deletions

View File

@ -121,7 +121,11 @@ this if you want the rule to send an email to the partner."),
write['email_cc'] = obj.email_cc+','+obj.act_email_cc
else:
write['email_cc'] = obj.act_email_cc
# Put state change by rule in communication history
if hasattr(obj, 'state') and action.act_state:
model_obj._history(cr, uid, [obj], _(action.act_state))
model_obj.write(cr, uid, [obj.id], write, context)
emails = []