diff --git a/asterisk_click2dial/asterisk_click2dial.py b/asterisk_click2dial/asterisk_click2dial.py index 334cfb1..ba95b43 100644 --- a/asterisk_click2dial/asterisk_click2dial.py +++ b/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() diff --git a/asterisk_click2dial/i18n/asterisk_click2dial.pot b/asterisk_click2dial/i18n/asterisk_click2dial.pot index 6c9c9c9..bbec3fb 100644 --- a/asterisk_click2dial/i18n/asterisk_click2dial.pot +++ b/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 diff --git a/asterisk_click2dial/i18n/fr.po b/asterisk_click2dial/i18n/fr.po index 360aa8e..c50bfd2 100644 --- a/asterisk_click2dial/i18n/fr.po +++ b/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 diff --git a/asterisk_click2dial/res_partner_view.xml b/asterisk_click2dial/res_partner_view.xml index 4aadd16..e8702cb 100644 --- a/asterisk_click2dial/res_partner_view.xml +++ b/asterisk_click2dial/res_partner_view.xml @@ -108,7 +108,7 @@