@ -483,12 +484,15 @@ class wizard_open_calling_partner(osv.osv_memory):
_description="Open calling partner"
_description="Open calling partner"
_columns={
_columns={
'calling_number':fields.char('Calling number',size=30,readonly=True,help="Phone number of calling party that has been obtained from Asterisk."),
'partner_address_id':fields.many2one('res.partner.address','Contact name',readonly=True,help="Partner contact related to the calling number"),
'partner_id':fields.many2one('res.partner','Partner',readonly=True,help="Partner related to the calling number"),
# I can't set any field to readonly, because otherwize it would call
# default_get (and thus connect to Asterisk) a second time when the user
# clicks on one of the buttons
'calling_number':fields.char('Calling number',size=30,help="Phone number of calling party that has been obtained from Asterisk."),
'partner_address_id':fields.many2one('res.partner.address','Contact name',help="Partner contact related to the calling number. If there is none and you want to update an existing partner"),
'partner_id':fields.many2one('res.partner','Partner',help="Partner related to the calling number."),
'to_update_partner_address_id':fields.many2one('res.partner.address','Contact to update',help="Partner contact on which the phone or mobile number will be written"),
'to_update_partner_address_id':fields.many2one('res.partner.address','Contact to update',help="Partner contact on which the phone or mobile number will be written"),
@ -513,6 +517,7 @@ class wizard_open_calling_partner(osv.osv_memory):
else:
else:
res['partner_id']=False
res['partner_id']=False
res['partner_address_id']=False
res['partner_address_id']=False
res['to_update_partner_address_id']=False
else:
else:
_logger.debug("Could not get the calling number from Asterisk.")
_logger.debug("Could not get the calling number from Asterisk.")
raiseosv.except_osv(_('Error :'),_("Could not get the calling number from Asterisk. Are you currently on the phone ? If yes, check your setup and look at the OpenERP debug logs."))
raiseosv.except_osv(_('Error :'),_("Could not get the calling number from Asterisk. Are you currently on the phone ? If yes, check your setup and look at the OpenERP debug logs."))