Browse Source

[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.
6.0
Alexis de Lattre 14 years ago
parent
commit
60bacdda0a
  1. 4
      asterisk_click2dial/asterisk_click2dial.py
  2. 1
      asterisk_click2dial/res_partner_view.xml

4
asterisk_click2dial/asterisk_click2dial.py

@ -68,7 +68,7 @@ class asterisk_server(osv.osv):
prefix_to_check = self.read(cr, uid, i, [prefix])[prefix] prefix_to_check = self.read(cr, uid, i, [prefix])[prefix]
if not prefix_to_check: if not prefix_to_check:
if can_be_empty: if can_be_empty:
return True
continue
else: else:
return False return False
else: else:
@ -100,7 +100,7 @@ class asterisk_server(osv.osv):
extension_priority_to_check = self.read(cr, uid, i, ['extension_priority'])['extension_priority'] extension_priority_to_check = self.read(cr, uid, i, ['extension_priority'])['extension_priority']
if extension_priority_to_check < 1: if extension_priority_to_check < 1:
return False return False
return True
return True
def _check_port(self, cr, uid, ids): def _check_port(self, cr, uid, ids):
for i in ids: for i in ids:

1
asterisk_click2dial/res_partner_view.xml

@ -65,6 +65,7 @@
<field name="name">res.partner.inherit.form</field> <field name="name">res.partner.inherit.form</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="type">form</field> <field name="type">form</field>
<field name="priority">15</field>
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>

Loading…
Cancel
Save