[FIX]: crm: Consider only email communication history in max_history of action rule

bzr revid: rpa@tinyerp.com-20100907092321-k4u26gmvit9cozab
This commit is contained in:
rpa (Open ERP)
2010-09-07 14:53:21 +05:30
parent 06f0a3ec17
commit ac41c6912b
+2 -1
View File
@@ -96,7 +96,8 @@ this if you want the rule to send an email to the partner."),
res_count = True
if action.trg_max_history:
res_count = False
if len(obj.message_ids) >= action.trg_max_history:
history_ids = filter(lambda x: x.history, obj.message_ids)
if len(history_ids) <= action.trg_max_history:
res_count = True
ok = ok and res_count
return ok