diff --git a/README.md b/README.md index 835357c..ac449c9 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,6 @@ addon | version | summary [base_phone_popup](base_phone_popup/) | 9.0.1.0.0 | Pop-up the related form view to the user on incoming calls [crm_phone](crm_phone/) | 9.0.1.0.0 | Validate phone numbers in CRM [event_phone](event_phone/) | 9.0.1.0.0 | Validate phone numbers in Events -[freeswitch_click2dial](freeswitch_click2dial/) | 9.0.1.0.0 | FreeSWITCH-Odoo telephony connector (click2dial) [hr_phone](hr_phone/) | 9.0.1.0.0 | Validate phone numbers in HR [hr_recruitment_phone](hr_recruitment_phone/) | 9.0.1.0.0 | Validate phone numbers in HR Recruitment diff --git a/asterisk_logcall/README.rst b/asterisk_logcall/README.rst index 5d060fb..8b59c6e 100644 --- a/asterisk_logcall/README.rst +++ b/asterisk_logcall/README.rst @@ -1,6 +1,81 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================= Asterisk Phone Log-call -========================= +======================= This bridge adds an option to the Asterisk IPBX servers for the URL to pull down call recordings. It also adds an option for time jitter compensation for use when automatically merging call records. + +Installation +============ + +To install this module, you need to simply click install. + +Configuration +============= + +To configure this module, you need to go to the configuration page for the +Asterisk IPBX server in question, within Odoo, make sure to edit the ucp_url +field to be a url template for call recordings. + +The following macros are allowed: +{odoo_type} (inbound, outbound) +{odoo_src} (source phone number) +{odoo_dst} (destination number) +{odoo_duration} (length of call) +{odoo_start} (start time of call in seconds since epoch) +{odoo_filename} (file name on server) +{odoo_uniqueid} (Asterisk UUID of call) + +Make sure to set time jitter compensation which is the number of seconds to +subtract from new call start and add to new call end, for call merging, to +compensate for system/database load and time drift between Asterisk server +and Odoo/Odoo database server(s). 5 seconds is likely a good start. Above 10 +seconds you get into the realm where you may have distinct calls confused. +20 - 30 seconds begins to guarantee this. It is best to keep this low and use +a method to keep time synced. + +Known issues / Roadmap +====================== + +None at this time. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Trever L. Adams + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/asterisk_logcall/__openerp__.py b/asterisk_logcall/__openerp__.py index ccb6dca..cdc559a 100644 --- a/asterisk_logcall/__openerp__.py +++ b/asterisk_logcall/__openerp__.py @@ -1,29 +1,10 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Phone Log-call module for Odoo/OpenERP -# Copyright (C) 2016 credativ Ltd (). -# Copyright (C) 2016 Trever L. Adams -# -# 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 . -# -############################################################################## - +# (c) 2016 Trever L. Adams +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Asterisk Phone Log-call', - 'version': '9.0.0.1.0', + 'version': '9.0.1.0.0', 'category': 'Phone', 'license': 'AGPL-3', 'summary': 'Necessary bridge between log-call and Asterisk Click2dial', diff --git a/asterisk_logcall/models/__init__.py b/asterisk_logcall/models/__init__.py index 2d568e0..45a22fb 100644 --- a/asterisk_logcall/models/__init__.py +++ b/asterisk_logcall/models/__init__.py @@ -1,2 +1 @@ from . import asterisk_server - diff --git a/asterisk_logcall/models/asterisk_server.py b/asterisk_logcall/models/asterisk_server.py index cce2a4f..f511688 100644 --- a/asterisk_logcall/models/asterisk_server.py +++ b/asterisk_logcall/models/asterisk_server.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Phone Log-call module for Odoo/OpenERP -# Copyright (C) 2016 credativ Ltd (). -# Copyright (C) 2016 Trever L. Adams -# -# 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 . -# -############################################################################## +# (c) 2016 credativ ltd. +# (c) 2016 Trever L. Adams +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api import logging @@ -37,7 +20,7 @@ class AsteriskServer(models.Model): "(source phone number}, {odoo_dst} (destination number), " "{odoo_duration} (length of call), {odoo_start} (start time of call " "in seconds since epoch), {odoo_filename} (file name on server), " - "{odoo_uniqueid} (FreeSWITCH UUID of call).") + "{odoo_uniqueid} (Asterisk UUID of call).") server_jitter_correction = fields.Integer( string='Time jitter compensation', required=True, help='Number of seconds to subtract from new call start and add to ' diff --git a/crm_voip_logcall/README.rst b/crm_voip_logcall/README.rst index 8581503..c6cc7ca 100644 --- a/crm_voip_logcall/README.rst +++ b/crm_voip_logcall/README.rst @@ -1,4 +1,80 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======================= CRM VoIP Phone Log-call ======================= -This bridge pulls in a configuration option for use by logcall. This enables linking to call recordings in the logcall functionality. +This bridge in a configuration option for use by logcall. This enables linking +to call recordings in the logcall functionality. + +Installation +============ + +To install this module, you need to simply click install. + +Configuration +============= + +To configure this module, you need to go to the configuration page for the +CRM Voip module, within Odoo, make sure to edit the ucp_url field to be a url +template for call recordings. + +The following macros are allowed: +{odoo_type} (inbound, outbound) +{odoo_src} (source phone number) +{odoo_dst} (destination number) +{odoo_duration} (length of call) +{odoo_start} (start time of call in seconds since epoch) +{odoo_filename} (file name on server) +{odoo_uniqueid} (Asterisk UUID of call) + +Make sure to set time jitter compensation which is the number of seconds to +subtract from new call start and add to new call end, for call merging, to +compensate for system/database load and time drift between Asterisk server +and Odoo/Odoo database server(s). 5 seconds is likely a good start. Above 10 +seconds you get into the realm where you may have distinct calls confused. +20 - 30 seconds begins to guarantee this. It is best to keep this low and use +a method to keep time synced. + +Known issues / Roadmap +====================== + +None at this time. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Trever L. Adams + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/crm_voip_logcall/__openerp__.py b/crm_voip_logcall/__openerp__.py index a87920e..da60c94 100644 --- a/crm_voip_logcall/__openerp__.py +++ b/crm_voip_logcall/__openerp__.py @@ -1,29 +1,12 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Phone Log-call module for Odoo/OpenERP -# Copyright (C) 2016 credativ Ltd (). -# Copyright (C) 2016 Trever L. Adams -# -# 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 . -# -############################################################################## +# (c) 2016 credativ Ltd (). +# (c) 2016 Trever L. Adams +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'CRM Voip Phone Log-call', - 'version': '9.0.0.1.0', + 'version': '9.0.1.0.0', 'category': 'Phone', 'license': 'AGPL-3', 'summary': 'Necessary bridge between log-call and CRM VoIP module', diff --git a/crm_voip_logcall/models/crm_voip_logcall.py b/crm_voip_logcall/models/crm_voip_logcall.py index f470542..2a3af3b 100644 --- a/crm_voip_logcall/models/crm_voip_logcall.py +++ b/crm_voip_logcall/models/crm_voip_logcall.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Phone Log-call module for Odoo/OpenERP -# Copyright (C) 2016 credativ Ltd (). -# Copyright (C) 2016 Trever L. Adams -# -# 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 . -# -############################################################################## +# (c) 2016 credativ Ltd (). +# (c) 2016 Trever L. Adams +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, api import logging diff --git a/freeswitch_click2dial/freeswitch_click2dial.py b/freeswitch_click2dial/freeswitch_click2dial.py index fb3bcfa..d332292 100644 --- a/freeswitch_click2dial/freeswitch_click2dial.py +++ b/freeswitch_click2dial/freeswitch_click2dial.py @@ -173,12 +173,7 @@ class FreeSWITCHServer(models.Model): try: is_fq_res = user.resource.rfind('@') if is_fq_res > 0: -<<<<<<< d8cf9efb5fd18748d1901978041bb8f34ee1717b resource = user.resource[0:is_fq_res] -======= - resource = user.resource[0:is_fq_res+1] - _logger.error("is_fq_res: %d, resource is %s\n", is_fq_res, resource) ->>>>>>> Thank you to Alexandr Usov and Stanislav Sinyagin for testing and ideas. else: resource = user.resource request = "channels like /" + re.sub(r'/', r':', resource) + \ diff --git a/freeswitch_logcall/README.rst b/freeswitch_logcall/README.rst index 2d7cf78..ff78c4e 100644 --- a/freeswitch_logcall/README.rst +++ b/freeswitch_logcall/README.rst @@ -1,6 +1,81 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +========================= FreeSWITCH Phone Log-call ========================= This bridge adds an option to the FreeSWITCH servers for the URL to pull down call recordings. It also adds an option for time jitter compensation for use when automatically merging call records. + +Installation +============ + +To install this module, you need to simply click install. + +Configuration +============= + +To configure this module, you need to go to the configuration page for the +FreeSWITCH server in question, within Odoo, make sure to edit the ucp_url +field to be a url template for call recordings. + +The following macros are allowed: +{odoo_type} (inbound, outbound) +{odoo_src} (source phone number) +{odoo_dst} (destination number) +{odoo_duration} (length of call) +{odoo_start} (start time of call in seconds since epoch) +{odoo_filename} (file name on server) +{odoo_uniqueid} (FreeSWITCH UUID of call) + +Make sure to set time jitter compensation which is the number of seconds to +subtract from new call start and add to new call end, for call merging, to +compensate for system/database load and time drift between FreeSWITCH server +and Odoo/Odoo database server(s). 5 seconds is likely a good start. Above 10 +seconds you get into the realm where you may have distinct calls confused. +20 - 30 seconds begins to guarantee this. It is best to keep this low and use +a method to keep time synced. + +Known issues / Roadmap +====================== + +None at this time. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Trever L. Adams + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/freeswitch_logcall/__openerp__.py b/freeswitch_logcall/__openerp__.py index 4dc1fb3..2f99ca3 100644 --- a/freeswitch_logcall/__openerp__.py +++ b/freeswitch_logcall/__openerp__.py @@ -1,29 +1,12 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Phone Log-call module for Odoo/OpenERP -# Copyright (C) 2016 credativ Ltd (). -# Copyright (C) 2016 Trever L. Adams -# -# 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 . -# -############################################################################## +# (c) 2016 credativ Ltd (). +# (c) 2016 Trever L. Adams +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'FreeSwitch Phone Log-call', - 'version': '9.0.0.1.0', + 'version': '9.0.1.0.0', 'category': 'Phone', 'license': 'AGPL-3', 'summary': 'Necessary bridge between log-call and FreeSWITCH Click2dial', diff --git a/freeswitch_logcall/models/freeswitch_server.py b/freeswitch_logcall/models/freeswitch_server.py index 8a6dfa6..b4b9064 100644 --- a/freeswitch_logcall/models/freeswitch_server.py +++ b/freeswitch_logcall/models/freeswitch_server.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Phone Log-call module for Odoo/OpenERP -# Copyright (C) 2016 credativ Ltd (). -# Copyright (C) 2016 Trever L. Adams -# -# 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 . -# -############################################################################## +# (c) 2016 credativ Ltd (). +# (c) 2016 Trever L. Adams +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api import logging diff --git a/hr_recruitment_phone_log/README.rst b/hr_recruitment_phone_log/README.rst index 3c59a9c..16e600f 100644 --- a/hr_recruitment_phone_log/README.rst +++ b/hr_recruitment_phone_log/README.rst @@ -2,11 +2,11 @@ :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 -========================== -Show phonecalls on partner -========================== +=============================== +Show phonecalls on HR Applicant +=============================== -This module restores the phonecall list on the partner view. +This module restores the phonecall list on the hr applicant view. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot @@ -27,6 +27,7 @@ Contributors ------------ * Ondřej Kuzník +* Trever L. Adams Maintainer ---------- @@ -42,3 +43,9 @@ mission is to support the collaborative development of Odoo features and promote its widespread use. To contribute to this module, please visit https://odoo-community.org. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/hr_recruitment_phone_log/__openerp__.py b/hr_recruitment_phone_log/__openerp__.py index f7edf54..8949571 100644 --- a/hr_recruitment_phone_log/__openerp__.py +++ b/hr_recruitment_phone_log/__openerp__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # (c) 2016 credativ ltd. - Ondřej Kuzník +# (c) 2016 Trever L. Adams # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { diff --git a/hr_recruitment_phone_log/models/recruitment.py b/hr_recruitment_phone_log/models/recruitment.py index 1d11500..e3eb728 100644 --- a/hr_recruitment_phone_log/models/recruitment.py +++ b/hr_recruitment_phone_log/models/recruitment.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +# (c) 2016 Trever L. Adams # (c) 2016 credativ ltd. - Ondřej Kuzník # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html @@ -15,7 +16,8 @@ class CrmPhonecall(models.Model): class HrApplicant(models.Model): _inherit = 'hr.applicant' - phonecall_ids = fields.One2many('crm.phonecall', 'hr_applicant_id', string='Phone Calls') + phonecall_ids = fields.One2many('crm.phonecall', 'hr_applicant_id', + string='Phone Calls') phonecall_count = fields.Integer( compute='_count_phonecalls', string='Number of Phonecalls', readonly=True) diff --git a/logcall/README.rst b/logcall/README.rst index b64a513..17e93f6 100644 --- a/logcall/README.rst +++ b/logcall/README.rst @@ -1,5 +1,10 @@ -Phone Log-call -================= +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +======== +Log-call +======== When a call has completed within Asterisk, FreeSWITCH or similar a callback can be added in a hangup handler to call a script @@ -16,3 +21,94 @@ and end of the new call plus jitter. It keep the data making the call the longest. It will keep the original attachment, ignoring a new one. It will append the new call description to the old making sure that the old ends with a new line. + +Installation +============ + +To install this module, you need to simply click install. + +Configuration +============= + +To configure this module, you need to go to the configuration page for the +FreeSWITCH server in question, within Odoo, make sure to edit the ucp_url +field to be a url template for call recordings. + +The following macros are allowed: +{odoo_type} (inbound, outbound) +{odoo_src} (source phone number} +{odoo_dst} (destination number) +{odoo_duration} (length of call) +{odoo_start} (start time of call in seconds since epoch) +{odoo_filename} (file name on server) +{odoo_uniqueid} (FreeSWITCH UUID of call) + +Make sure to set time jitter compensation which is the number of seconds to +subtract from new call start and add to new call end, for call merging, to +compensate for system/database load and time drift between FreeSWITCH server +and Odoo/Odoo database server(s). 5 seconds is likely a good start. Above 10 +seconds you get into the realm where you may have distinct calls confused. +20 - 30 seconds begins to guarantee this. It is best to keep this low and use +a method to keep time synced. + +Usage +===== + +To use this module, you will need to use one of the scripts in logcall/scripts +which is appropriate for your server. You will also need Asterisk Logcall, +FreeSWITCH Logcall, or something similar to provide ucp_url and +server_jitter_compensation. Configure those. + +Note: the scripts, properly used, will work in most situations. Adjust for your +local conditions. Please, contribute useful changes. + +For users who wish to enable automatic call logging, they will need to set the +"Automatically Log Incoming Calls" preference. + +The user that will be handling to call backs should have "Phone System +Integration and Logging" checked. It probably should be the same user you use +for caller pop-up and Caller ID notification from other modules in +connector-telephony. It should have no other permissions or group memberships +besides what is set by those mentioned here. + +Known issues / Roadmap +====================== + +None at this time. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Trever L. Adams +* Ondřej Kuzník + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/logcall/__openerp__.py b/logcall/__openerp__.py index 49dffcc..1bd5394 100644 --- a/logcall/__openerp__.py +++ b/logcall/__openerp__.py @@ -1,29 +1,12 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Phone Log-call module for Odoo/OpenERP -# Copyright (C) 2016 credativ Ltd (). -# Copyright (C) 2016 Trever L. Adams -# -# 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 . -# -############################################################################## +# (c) 2016 credativ ltd. - Ondřej Kuzník +# (c) 2016 Trever L. Adams +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Phone Log-call', - 'version': '9.0.0.1.0', + 'version': '9.0.1.0.0', 'category': 'Phone', 'license': 'AGPL-3', 'summary': 'Allow a call to be logged in Odoo', diff --git a/logcall/models/__init__.py b/logcall/models/__init__.py index ec48f5f..a7ea5d1 100644 --- a/logcall/models/__init__.py +++ b/logcall/models/__init__.py @@ -1,2 +1 @@ from . import crm_phonecall - diff --git a/logcall/models/crm_phonecall.py b/logcall/models/crm_phonecall.py index 1793445..b69f25f 100644 --- a/logcall/models/crm_phonecall.py +++ b/logcall/models/crm_phonecall.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Phone Log-call module for Odoo/OpenERP -# Copyright (C) 2016 credativ Ltd (). -# Copyright (C) 2016 Trever L. Adams -# -# 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 . -# -############################################################################## +# (c) 2016 credativ ltd. - Ondřej Kuzník +# (c) 2016 Trever L. Adams +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api, _ from datetime import datetime, timedelta @@ -148,7 +131,7 @@ class PhoneCommon(models.AbstractModel): if phonecalls[0]['description']: if phonecalls[0]['description'].find(odoo_description) != -1: odoo_description = phonecalls[0]['description'] + '\n' + \ - odoo_description + odoo_description else: odoo_description = phonecalls[0]['description'] if phonecalls[0]['recording_id']: diff --git a/logcall/scripts/asterisk_logcall.py b/logcall/scripts/asterisk_logcall.py index dfd4378..d37e1f4 100755 --- a/logcall/scripts/asterisk_logcall.py +++ b/logcall/scripts/asterisk_logcall.py @@ -1,20 +1,9 @@ #! /usr/bin/python # -*- encoding: utf-8 -*- -# Copyright (C) 2010-2015 Alexis de Lattre -# Copyright (C) 2016 credativ Ltd (). -# -# 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 . +# (c) 2010-2015 Alexis de Lattre +# (c) 2016 credativ Ltd (). +# (c) 2016 Trever L. Adams +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html """ Log a call and recording within Asterisk @@ -95,6 +84,7 @@ options = [ 'help': "Password of the OpenERP user. Default = 'demo'"}, ] + def stdout_write(string): '''Wrapper on sys.stdout.write''' sys.stdout.write(string.encode(sys.stdout.encoding or 'utf-8', 'replace')) @@ -112,6 +102,7 @@ def stderr_write(string): sys.stdout.flush() return True + def main(options, arguments): # AGI passes parameters to the script on standard input @@ -162,8 +153,11 @@ def main(options, arguments): odoo = odoorpc.ODOO(options.server, proto, options.port) odoo.login(options.database, options.username, options.password) res = odoo.execute( - 'phone.common', 'log_call_and_recording', odoo_type, odoo_src, odoo_dst, odoo_duration, odoo_start, odoo_filename, odoo_uniqueid, odoo_description) - stdout_write('VERBOSE "Called method %s, returned %s"\n' % (method, res)) + 'phone.common', 'log_call_and_recording', odoo_type, odoo_src, + odoo_dst, odoo_duration, odoo_start, odoo_filename, + odoo_uniqueid, odoo_description) + stdout_write('VERBOSE "Called method %s, returned %s"\n' % + (method, res)) except: stdout_write( 'VERBOSE "Could not connect to OpenERP in JSON-RPC"\n') @@ -180,8 +174,11 @@ def main(options, arguments): try: res = sock.execute( options.database, options.userid, options.password, - 'phone.common', 'log_call_and_recording', odoo_type, odoo_src, odoo_dst, odoo_duration, odoo_start, odoo_filename, odoo_uniqueid, odoo_description) - stdout_write('VERBOSE "Called method %s, returned %s"\n' % (method, res)) + 'phone.common', 'log_call_and_recording', odoo_type, odoo_src, + odoo_dst, odoo_duration, odoo_start, odoo_filename, + odoo_uniqueid, odoo_description) + stdout_write('VERBOSE "Called method %s, returned %s"\n' % + (method, res)) except: stdout_write('VERBOSE "Could not connect to OpenERP in XML-RPC"\n') @@ -189,8 +186,8 @@ def main(options, arguments): if __name__ == '__main__': usage = "Usage: asterisk_logcall.py [options] login1 login2 login3 ..." - epilog = "Script written by Craig Gowing based on work by Alexis de Lattre. " - "Published under the GNU AGPL licence." + epilog = "Script written by Craig Gowing based on work by Alexis de " + "Lattre. Published under the GNU AGPL licence." description = "This is an AGI script that sends a query to OpenERP. " parser = OptionParser(usage=usage, epilog=epilog, description=description) for option in options: diff --git a/logcall/scripts/fusionpbx_get_recording.pl b/logcall/scripts/fusionpbx_get_recording.pl index 9256d02..cc86ed1 100644 --- a/logcall/scripts/fusionpbx_get_recording.pl +++ b/logcall/scripts/fusionpbx_get_recording.pl @@ -66,7 +66,7 @@ else { print "Connection: close\n"; print "Content-Type: text/html\n\n"; print "

Error

\n"; - print "The file ".$args{"file"}." does not exists in the server
\n"; - print "Please contact to the administrator for more info.\n\n"; + print "The file ".$args{"file"}." does not exist on the server
\n"; + print "Please contact the administrator for more info.\n\n"; } diff --git a/logcall/security/ir.model.access.csv b/logcall/security/ir.model.access.csv index 829632d..0f76195 100644 --- a/logcall/security/ir.model.access.csv +++ b/logcall/security/ir.model.access.csv @@ -5,4 +5,4 @@ phone_system_integration_ir_attachment_create,Create access on ir.attachment for phone_system_integration_mail.message_create,Create access on mail.message for phone system integration and call logging,mail.model_mail_message,group_phone_system_integration,1,1,1,0 phone_system_integration_mail.message_create,Create access on mail.followers for phone system integration and call logging,mail.model_mail_followers,group_phone_system_integration,1,1,1,0 phone_system_integration_res_partner_write,Write access on res.partner for phone system integration and call logging,base.model_res_partner,group_phone_system_integration,1,1,0,0 -phone_system_integration_crm_lead_write,Write access on crm.lead for phone system integration and call logging,sale_crm.model_crm_lead,group_phone_system_integration,1,1,0,0 +phone_system_integration_crm_lead_write,Write access on crm.lead for phone system integration and call logging,crm.model_crm_lead,group_phone_system_integration,1,1,0,0 diff --git a/logcall/views/crm_phonecall_view.xml b/logcall/views/crm_phonecall_view.xml index 5c28471..2758f8c 100644 --- a/logcall/views/crm_phonecall_view.xml +++ b/logcall/views/crm_phonecall_view.xml @@ -33,6 +33,7 @@ crm.phonecall.search crm.phonecall +