Browse Source
asterisk_click2dial_crm :
asterisk_click2dial_crm :
- when you do a click2dial, it now triggers a wizard that proposes to create a CRM phone call (instead of directly creating the CRM phone call) - Add option on res_users for users who don't want to trigger the wizard when they do a click2dial - Add FR translation - update module description and module category asterisk_click2dial : - update module categorypull/26/head
Alexis de Lattre
13 years ago
12 changed files with 367 additions and 90 deletions
-
2asterisk_click2dial/__openerp__.py
-
4asterisk_click2dial/asterisk_click2dial.py
-
11asterisk_click2dial_crm/__init__.py
-
45asterisk_click2dial_crm/__openerp__.py
-
73asterisk_click2dial_crm/asterisk_click2dial_crm.py
-
78asterisk_click2dial_crm/i18n/asterisk_click2dial_crm.pot
-
78asterisk_click2dial_crm/i18n/fr.po
-
24asterisk_click2dial_crm/res_users_view.xml
-
23asterisk_click2dial_crm/wizard/__init__.py
-
76asterisk_click2dial_crm/wizard/create_crm_phonecall.py
-
37asterisk_click2dial_crm/wizard/create_crm_phonecall_view.xml
-
6asterisk_click2dial_crm/wizard/open_calling_partner_view.xml
@ -0,0 +1,73 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Asterisk click2dial CRM module for OpenERP |
|||
# Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. |
|||
# Copyright (c) 2012 Akretion (http://www.akretion.com) |
|||
# @author: Jesús Martín <jmartin@zikzakmedia.com> |
|||
# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
from osv import osv, fields |
|||
# Lib to translate error messages |
|||
from tools.translate import _ |
|||
|
|||
class res_partner_address(osv.osv): |
|||
_inherit = "res.partner.address" |
|||
|
|||
def dial(self, cr, uid, ids, phone_field='phone', context=None): |
|||
''' |
|||
This method open the phone call history when the phone click2dial |
|||
button of asterisk_click2dial module is pressed |
|||
:return the phone call history view of the partner |
|||
''' |
|||
if context is None: |
|||
context = {} |
|||
super(res_partner_address, self).dial(cr, uid, ids, phone_field=phone_field, context=context) |
|||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context) |
|||
context['partner_address_id'] = ids[0] |
|||
action_start_wizard = { |
|||
'name': 'Create phone call in CRM', |
|||
'type': 'ir.actions.act_window', |
|||
'res_model': 'wizard.create.crm.phonecall', |
|||
'view_type': 'form', |
|||
'view_mode': 'form', |
|||
'nodestroy': True, |
|||
'target': 'new', |
|||
'context': context, |
|||
} |
|||
if user.propose_creation_crm_phonecall: |
|||
return action_start_wizard |
|||
else: |
|||
return True |
|||
|
|||
res_partner_address() |
|||
|
|||
|
|||
class res_users(osv.osv): |
|||
_inherit = "res.users" |
|||
|
|||
_columns = { |
|||
'propose_creation_crm_phonecall': fields.boolean('Propose to create a call in CRM after a click2dial'), |
|||
} |
|||
|
|||
_defaults = { |
|||
'propose_creation_crm_phonecall': True, |
|||
} |
|||
|
|||
res_users() |
|||
|
@ -0,0 +1,78 @@ |
|||
# Translation of OpenERP Server. |
|||
# This file contains the translation of the following modules: |
|||
# * asterisk_click2dial_crm |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: OpenERP Server 6.1\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2012-06-02 23:47+0000\n" |
|||
"PO-Revision-Date: 2012-06-02 23:47+0000\n" |
|||
"Last-Translator: <>\n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: model:ir.actions.act_window,name:asterisk_click2dial_crm.action_create_crm_phonecall |
|||
msgid "Create CRM phonecall" |
|||
msgstr "Créer un appel dans la CRM" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: code:addons/asterisk_click2dial_crm/wizard/create_crm_phonecall.py:45 |
|||
#, python-format |
|||
msgid "Call with" |
|||
msgstr "Conversation avec" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: view:wizard.open.calling.partner:0 |
|||
msgid "Create call in CRM" |
|||
msgstr "Créer un appel dans la CRM" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: view:wizard.create.crm.phonecall:0 |
|||
msgid "CRM phone call" |
|||
msgstr "Appel dans la CRM" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: view:wizard.create.crm.phonecall:0 |
|||
msgid "No" |
|||
msgstr "Non" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: model:ir.model,name:asterisk_click2dial_crm.model_wizard_open_calling_partner |
|||
msgid "wizard.open.calling.partner" |
|||
msgstr "wizard.open.calling.partner" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: model:ir.model,name:asterisk_click2dial_crm.model_wizard_create_crm_phonecall |
|||
msgid "wizard.create.crm.phonecall" |
|||
msgstr "wizard.create.crm.phonecall" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: field:res.users,propose_creation_crm_phonecall:0 |
|||
msgid "Propose to create a call in CRM after a click2dial" |
|||
msgstr "Propose de créer un appel dans la CRM après un click2dial" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: view:wizard.create.crm.phonecall:0 |
|||
msgid "Create a phone call in the CRM ?" |
|||
msgstr "Créer un appel téléphonique dans la CRM ?" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: model:ir.model,name:asterisk_click2dial_crm.model_res_users |
|||
msgid "res.users" |
|||
msgstr "res.users" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: view:wizard.create.crm.phonecall:0 |
|||
msgid "Yes" |
|||
msgstr "Oui" |
|||
|
|||
#. module: asterisk_click2dial_crm |
|||
#: model:ir.model,name:asterisk_click2dial_crm.model_res_partner_address |
|||
msgid "Partner Addresses" |
|||
msgstr "Carnet d'adresses" |
|||
|
@ -0,0 +1,24 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- |
|||
Copyright (C) 2012 Akretion (http://www.akretion.com/) |
|||
@author: Alexis de Lattre <alexis.delattre@akretion.com> |
|||
The licence is in the file __openerp__.py |
|||
--> |
|||
|
|||
<openerp> |
|||
<data> |
|||
|
|||
<!-- Add option on user form view --> |
|||
<record id="asterisk_crm_option_view" model="ir.ui.view"> |
|||
<field name="name">asterisk.crm.option.view</field> |
|||
<field name="model">res.users</field> |
|||
<field name="inherit_id" ref="asterisk_click2dial.asterisk_res_users_internal_number"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="variable" position="after"> |
|||
<field name="propose_creation_crm_phonecall"/> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
@ -0,0 +1,23 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Asterisk click2dial CRM module for OpenERP |
|||
# Copyright (c) 2012 Akretion (http://www.akretion.com/) |
|||
# @author: Alexis de Lattre <alexis.delattre@akretion.com> |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Affero General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Affero General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Affero General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
import create_crm_phonecall |
@ -0,0 +1,37 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- |
|||
Copyright (C) 2012 Akretion (http://www.akretion.com) |
|||
@author: Alexis de Lattre <alexis.delattre@akretion.com> |
|||
The licence is in the file __openerp__.py |
|||
--> |
|||
|
|||
<openerp> |
|||
<data> |
|||
|
|||
<!-- Add button on the "Get partner from incoming phone call view" --> |
|||
<record id="create_crm_phonecall_view" model="ir.ui.view"> |
|||
<field name="name">create_crm_phonecall.view</field> |
|||
<field name="model">wizard.create.crm.phonecall</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="CRM phone call"> |
|||
<label string="Create a phone call in the CRM ?" colspan="2"/> |
|||
<newline /> |
|||
<button name="button_create_outgoing_phonecall" icon="gtk-new" string="Yes" type="object"/> |
|||
<button special="cancel" icon="gtk-cancel" string="No" /> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
|
|||
<record id="action_create_crm_phonecall" model="ir.actions.act_window"> |
|||
<field name="name">Create CRM phonecall</field> |
|||
<field name="res_model">wizard.create.crm.phonecall</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">new</field> |
|||
</record> |
|||
|
|||
|
|||
</data> |
|||
</openerp> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue