You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
592 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright (C) 2014-2018 Akretion France
  3. # @author: Alexis de Lattre <alexis.delattre@akretion.com>
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. from odoo import http
  6. class BasePhoneController(http.Controller):
  7. @http.route('/base_phone/click2dial', type='json', auth='user')
  8. def click2dial(self, phone_number, click2dial_model, click2dial_id):
  9. res = http.request.env['phone.common'].with_context(
  10. click2dial_model=click2dial_model,
  11. click2dial_id=click2dial_id).click2dial(phone_number)
  12. return res