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.
23 lines
776 B
23 lines
776 B
# -*- coding: utf-8 -*-
|
|
# Copyright 2012-2018 Akretion France
|
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from odoo import api, models, _
|
|
|
|
|
|
class PhoneCommon(models.AbstractModel):
|
|
_inherit = 'phone.common'
|
|
|
|
@api.model
|
|
def click2dial(self, erp_number):
|
|
res = super(PhoneCommon, self).click2dial(erp_number)
|
|
if (
|
|
self.env.user.context_propose_creation_crm_call and
|
|
self.env.context.get('click2dial_model')
|
|
in ('res.partner', 'crm.lead')):
|
|
res.update({
|
|
'action_name': _('Create Call in CRM'),
|
|
'action_model': 'wizard.create.crm.phonecall',
|
|
})
|
|
return res
|