[FIX] empty user_id on crm.case was crashing if trying to use the button 'send partner & historize'

bzr revid: qdp@tinyerp.com-20090324115822-re803osm71qa1cie
This commit is contained in:
qdp
2009-03-24 12:58:22 +01:00
parent 90b7d40249
commit eec9466f6b
+3
View File
@@ -649,6 +649,9 @@ class crm_case(osv.osv):
if not case.email_from:
raise osv.except_osv(_('Error!'),
_('You must put a Partner eMail to use this action!'))
if not case.user_id:
raise osv.except_osv(_('Error!'),
_('You must define a responsible user for this case in order to use this action!'))
if not case.description:
raise osv.except_osv(_('Error!'),
_('Can not send mail with empty body,you should have description in the body'))