[FIX]crm: several calls to _get_id for external id 'categ_phone2' which were not...
[odoo/odoo.git] / addons / crm / crm_phonecall.py
index 0d7004e..22582f3 100644 (file)
@@ -111,9 +111,11 @@ class crm_phonecall(base_state, osv.osv):
         model_data = self.pool.get('ir.model.data')
         phonecall_dict = {}
         if not categ_id:
-            res_id = model_data._get_id(cr, uid, 'crm', 'categ_phone2')
-            if res_id:
+            try:
+                res_id = model_data._get_id(cr, uid, 'crm', 'categ_phone2')
                 categ_id = model_data.browse(cr, uid, res_id, context=context).res_id
+            except ValueError:
+                pass
         for call in self.browse(cr, uid, ids, context=context):
             if not section_id:
                 section_id = call.section_id and call.section_id.id or False