From eec9466f6b25c1e9f22c2dbaa7ad76782c45b44f Mon Sep 17 00:00:00 2001 From: qdp Date: Tue, 24 Mar 2009 12:58:22 +0100 Subject: [PATCH] [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 --- addons/crm/crm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 177e109aafe..fd1b27ba6bc 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -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'))