Browse Source

[FIX] avoid a crash when emptying "contact to update"

Fix typo
pull/26/head
Alexis de Lattre 13 years ago
parent
commit
320d8de274
  1. 9
      asterisk_click2dial/asterisk_click2dial.py
  2. 4
      asterisk_click2dial/i18n/asterisk_click2dial.pot
  3. 2
      asterisk_click2dial/i18n/fr.po
  4. 2
      asterisk_click2dial/res_partner_view.xml

9
asterisk_click2dial/asterisk_click2dial.py

@ -644,11 +644,14 @@ class wizard_open_calling_partner(osv.osv_memory):
def onchange_to_update_partner_address(self, cr, uid, ids, to_update_partner_address_id, context=None):
to_update_partner_address = self.pool.get('res.partner.address').browse(cr, uid, to_update_partner_address_id, context=context)
res = {}
res['value'] = {}
res['value'].update({'current_phone': to_update_partner_address.phone,
'current_mobile': to_update_partner_address.mobile})
if to_update_partner_address_id:
to_update_partner_address = self.pool.get('res.partner.address').browse(cr, uid, to_update_partner_address_id, context=context)
res['value'].update({'current_phone': to_update_partner_address.phone,
'current_mobile': to_update_partner_address.mobile})
else:
res['value'].update({'current_phone': False, 'current_mobile': False})
return res
wizard_open_calling_partner()

4
asterisk_click2dial/i18n/asterisk_click2dial.pot

@ -406,8 +406,8 @@ msgstr "Set a user-specific Alert-Info header in SIP request to user's IP Phone
#. module: asterisk_click2dial
#: view:wizard.open.calling.partner:0
msgid "With calling number as mobile"
msgstr "With calling number as mobile"
msgid "with calling number as mobile"
msgstr "with calling number as mobile"
#. module: asterisk_click2dial
#: field:wizard.open.calling.partner,partner_address_id:0

2
asterisk_click2dial/i18n/fr.po

@ -406,7 +406,7 @@ msgstr "Set a user-specific Alert-Info header in SIP request to user's IP Phone
#. module: asterisk_click2dial
#: view:wizard.open.calling.partner:0
msgid "With calling number as mobile"
msgid "with calling number as mobile"
msgstr "avec le numéro appelant comme portable"
#. module: asterisk_click2dial

2
asterisk_click2dial/res_partner_view.xml

@ -108,7 +108,7 @@
<label string="No partner contact found in OpenERP with this number" colspan="8" />
<separator string="Create a new contact" colspan="8" />
<button name="create_partner_address_phone" icon="gtk-new" string="with calling number as phone" type="object" colspan="4"/>
<button name="create_partner_address_mobile" icon="gtk-new" string="With calling number as mobile" type="object" colspan="4"/>
<button name="create_partner_address_mobile" icon="gtk-new" string="with calling number as mobile" type="object" colspan="4"/>
<newline />
<separator string="Update an existing contact" colspan="8" />

Loading…
Cancel
Save