|
@ -120,7 +120,7 @@ class asterisk_server(osv.osv): |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def reformat_number(self, cr, uid, ids, erp_number, ast_server, context): |
|
|
|
|
|
|
|
|
def reformat_number(self, cr, uid, ids, erp_number, ast_server, context=None): |
|
|
''' |
|
|
''' |
|
|
This function is dedicated to the transformation of the number |
|
|
This function is dedicated to the transformation of the number |
|
|
available in OpenERP to the number that Asterisk should dial. |
|
|
available in OpenERP to the number that Asterisk should dial. |
|
@ -284,17 +284,17 @@ class res_partner_address(osv.osv): |
|
|
_name = "res.partner.address" |
|
|
_name = "res.partner.address" |
|
|
_inherit = "res.partner.address" |
|
|
_inherit = "res.partner.address" |
|
|
|
|
|
|
|
|
def action_dial_phone(self, cr, uid, ids, context): |
|
|
|
|
|
|
|
|
def action_dial_phone(self, cr, uid, ids, context=None): |
|
|
'''Function called by the button 'Dial' next to the 'phone' field |
|
|
'''Function called by the button 'Dial' next to the 'phone' field |
|
|
in the partner address view''' |
|
|
in the partner address view''' |
|
|
erp_number = self.read(cr, uid, ids, ['phone'], context=context)[0]['phone'] |
|
|
erp_number = self.read(cr, uid, ids, ['phone'], context=context)[0]['phone'] |
|
|
self.pool.get('asterisk.server').dial(cr, uid, ids, erp_number, context) |
|
|
|
|
|
|
|
|
self.pool.get('asterisk.server').dial(cr, uid, ids, erp_number, context=context) |
|
|
|
|
|
|
|
|
def action_dial_mobile(self, cr, uid, ids, context): |
|
|
|
|
|
|
|
|
def action_dial_mobile(self, cr, uid, ids, context=None): |
|
|
'''Function called by the button 'Dial' next to the 'mobile' field |
|
|
'''Function called by the button 'Dial' next to the 'mobile' field |
|
|
in the partner address view''' |
|
|
in the partner address view''' |
|
|
erp_number = self.read(cr, uid, ids, ['mobile'], context=context)[0]['mobile'] |
|
|
erp_number = self.read(cr, uid, ids, ['mobile'], context=context)[0]['mobile'] |
|
|
self.pool.get('asterisk.server').dial(cr, uid, ids, erp_number, context) |
|
|
|
|
|
|
|
|
self.pool.get('asterisk.server').dial(cr, uid, ids, erp_number, context=context) |
|
|
|
|
|
|
|
|
def get_name_from_phone_number(self, cr, uid, number, context=None): |
|
|
def get_name_from_phone_number(self, cr, uid, number, context=None): |
|
|
'''Function to get name from phone number. Usefull for use from Asterisk |
|
|
'''Function to get name from phone number. Usefull for use from Asterisk |
|
|