From 0a626f39aed9a6eee9f9e55df24e25d18c4a4cab Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 23 May 2014 09:09:07 +0200 Subject: [PATCH] Add module asterisk_click2dial_project_issue. --- asterisk_click2dial_project_issue/__init__.py | 23 ++++++++++ .../__openerp__.py | 44 +++++++++++++++++++ .../wizard/__init__.py | 23 ++++++++++ .../wizard/open_calling_partner.py | 33 ++++++++++++++ .../wizard/open_calling_partner_view.xml | 24 ++++++++++ 5 files changed, 147 insertions(+) create mode 100644 asterisk_click2dial_project_issue/__init__.py create mode 100644 asterisk_click2dial_project_issue/__openerp__.py create mode 100644 asterisk_click2dial_project_issue/wizard/__init__.py create mode 100644 asterisk_click2dial_project_issue/wizard/open_calling_partner.py create mode 100644 asterisk_click2dial_project_issue/wizard/open_calling_partner_view.xml diff --git a/asterisk_click2dial_project_issue/__init__.py b/asterisk_click2dial_project_issue/__init__.py new file mode 100644 index 0000000..0e6a6f4 --- /dev/null +++ b/asterisk_click2dial_project_issue/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Asterisk Click2Dial Project Issue module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com/) +# @author Alexis de Lattre +# +# 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 . +# +############################################################################## + +from . import wizard diff --git a/asterisk_click2dial_project_issue/__openerp__.py b/asterisk_click2dial_project_issue/__openerp__.py new file mode 100644 index 0000000..12eb8c4 --- /dev/null +++ b/asterisk_click2dial_project_issue/__openerp__.py @@ -0,0 +1,44 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Asterisk click2dial Project Issue module for OpenERP +# Copyright (c) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# 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 . +# +############################################################################## + +{ + "name": "Asterisk Click2dial Project Issue", + "version": "0.1", + "author": "Akretion", + "website": "http://www.akretion.com", + "license" : "AGPL-3", + "category": "Project Management", + "description": """ + This module adds a button "Open Related Issues" on the "Open calling partner" wizard. + + A detailed documentation for the OpenERP-Asterisk connector is available on the Akretion Web site : http://www.akretion.com/open-source-contributions/openerp-asterisk-voip-connector + """, + "depends": [ + 'asterisk_click2dial', + 'project_issue', + ], + "demo": [], + "data": [ + 'wizard/open_calling_partner_view.xml', + ], + "installable": True, +} diff --git a/asterisk_click2dial_project_issue/wizard/__init__.py b/asterisk_click2dial_project_issue/wizard/__init__.py new file mode 100644 index 0000000..d78cc4a --- /dev/null +++ b/asterisk_click2dial_project_issue/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Asterisk Click2Dial Project Issue module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com/) +# @author Alexis de Lattre +# +# 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 . +# +############################################################################## + +from . import open_calling_partner diff --git a/asterisk_click2dial_project_issue/wizard/open_calling_partner.py b/asterisk_click2dial_project_issue/wizard/open_calling_partner.py new file mode 100644 index 0000000..ff82f61 --- /dev/null +++ b/asterisk_click2dial_project_issue/wizard/open_calling_partner.py @@ -0,0 +1,33 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Asterisk Click2dial Project Issue module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com/) +# @author Alexis de Lattre +# +# 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 . +# +############################################################################## + +from openerp.osv import orm + + +class wizard_open_calling_partner(orm.TransientModel): + _inherit = "wizard.open.calling.partner" + + def open_project_issues(self, cr, uid, ids, context=None): + '''Function called by the related button of the wizard''' + return self.open_filtered_object( + cr, uid, ids, self.pool['project.issue'], + try_parent=False, context=context) diff --git a/asterisk_click2dial_project_issue/wizard/open_calling_partner_view.xml b/asterisk_click2dial_project_issue/wizard/open_calling_partner_view.xml new file mode 100644 index 0000000..7a1d3ee --- /dev/null +++ b/asterisk_click2dial_project_issue/wizard/open_calling_partner_view.xml @@ -0,0 +1,24 @@ + + + + + + + + + asterisk_click2dial_project_issue.add_open_project_issues_button + wizard.open.calling.partner + + + +