From 60bacdda0a5898ca4b7ae459d5b562a7a3dcc7d0 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sat, 2 Apr 2011 22:57:59 +0200 Subject: [PATCH] [FIX] Avoid a view conflict with the "base_contact" module by adding a priority on the res.partner view. Better handling of check functions when there are several ids. --- asterisk_click2dial/asterisk_click2dial.py | 4 ++-- asterisk_click2dial/res_partner_view.xml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/asterisk_click2dial/asterisk_click2dial.py b/asterisk_click2dial/asterisk_click2dial.py index bd35fd5..466a737 100644 --- a/asterisk_click2dial/asterisk_click2dial.py +++ b/asterisk_click2dial/asterisk_click2dial.py @@ -68,7 +68,7 @@ class asterisk_server(osv.osv): prefix_to_check = self.read(cr, uid, i, [prefix])[prefix] if not prefix_to_check: if can_be_empty: - return True + continue else: return False else: @@ -100,7 +100,7 @@ class asterisk_server(osv.osv): extension_priority_to_check = self.read(cr, uid, i, ['extension_priority'])['extension_priority'] if extension_priority_to_check < 1: return False - return True + return True def _check_port(self, cr, uid, ids): for i in ids: diff --git a/asterisk_click2dial/res_partner_view.xml b/asterisk_click2dial/res_partner_view.xml index 4a359e6..730dcbd 100644 --- a/asterisk_click2dial/res_partner_view.xml +++ b/asterisk_click2dial/res_partner_view.xml @@ -65,6 +65,7 @@ res.partner.inherit.form res.partner form + 15