Browse Source

Make click2dial work in real life

pull/109/head
Alexis de Lattre 8 years ago
parent
commit
1ffbec0dec
  1. 10
      base_phone/controllers/main.py

10
base_phone/controllers/main.py

@ -23,11 +23,9 @@ from odoo import http
class BasePhoneController(http.Controller):
@http.route('/base_phone/click2dial', type='json', auth='none')
@http.route('/base_phone/click2dial', type='json', auth='user')
def click2dial(self, phone_number, click2dial_model, click2dial_id):
res = http.request.env['phone.common'].click2dial(
phone_number, {
'click2dial_model': click2dial_model,
'click2dial_id': click2dial_id,
})
res = http.request.env['phone.common'].with_context(
click2dial_model=click2dial_model,
click2dial_id=click2dial_id).click2dial(phone_number)
return res
Loading…
Cancel
Save