diff options
| author | Ujjvala Collins (OpenERP) <uco@tinyerp.com> | 2011-03-01 11:19:08 +0530 |
|---|---|---|
| committer | Ujjvala Collins (OpenERP) <uco@tinyerp.com> | 2011-03-01 11:19:08 +0530 |
| commit | e239f71d04497f1d0cb9de8728a2e6eeec2ee3ff (patch) | |
| tree | 3771c0d48dc7d8ce75724013df9d58084087a4c4 /addons/sync_base/wizard | |
| parent | 05d002a0fa5c29f48fb32d458b23ee1c2d2f1ff9 (diff) | |
| parent | adfb0218850cb0d7df339bf580ab17e731d20aa6 (diff) | |
[MERGE]
bzr revid: uco@tinyerp.com-20110301054908-zzd1f3apatda2y8c
Diffstat (limited to 'addons/sync_base/wizard')
| -rw-r--r-- | addons/sync_base/wizard/__init__.py | 24 | ||||
| -rw-r--r-- | addons/sync_base/wizard/sync_base_view.xml | 40 | ||||
| -rw-r--r-- | addons/sync_base/wizard/synchronize_base.py | 61 |
3 files changed, 0 insertions, 125 deletions
diff --git a/addons/sync_base/wizard/__init__.py b/addons/sync_base/wizard/__init__.py deleted file mode 100644 index 70b742b7f79..00000000000 --- a/addons/sync_base/wizard/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). -# -# 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 synchronize_base - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/sync_base/wizard/sync_base_view.xml b/addons/sync_base/wizard/sync_base_view.xml deleted file mode 100644 index c957993fe67..00000000000 --- a/addons/sync_base/wizard/sync_base_view.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<openerp> - <data> - <record model="ir.ui.view" id="sync_base_import_wizard_view"> - <field name="name">Synchronize contact</field> - <field name="model">synchronize.base.contact.wizard.import</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Import contact from external adress book"> - <field name="tools"/> - <newline /> - <separator string="" colspan="4"/> - <group colspan="4" col="4"> - <group colspan="2"/> - <group colspan="2"> - <button special="cancel" string="_Cancel" icon="gtk-cancel"/> - <button name="action_synchronize" string="_Synchronize" type="object" icon="terp-check"/> - </group> - </group> - </form> - </field> - </record> - - <record model="ir.actions.act_window" id="act_google_contact_import_form"> - <field name="name">Import contacts from remote address book</field> - <field name="type">ir.actions.act_window</field> - <field name="res_model">synchronize.base.contact.wizard.import</field> - <field name="view_type">form</field> - <field name="view_mode">form</field> - <field name="target">new</field> - <field name="view_id" ref="sync_base_import_wizard_view" /> - </record> - - - <menuitem name="Import contacts from remote address book" id="menu_sync_contact" - parent="base.menu_address_book" action="act_google_contact_import_form" - sequence="40" /> - - </data> -</openerp> diff --git a/addons/sync_base/wizard/synchronize_base.py b/addons/sync_base/wizard/synchronize_base.py deleted file mode 100644 index 9077b32398b..00000000000 --- a/addons/sync_base/wizard/synchronize_base.py +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). -# -# 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 fields,osv -from tools.translate import _ - - -class synchronize_base(osv.osv_memory): - _description ='Synchronize base import contact ' - _name = "synchronize.base.contact.wizard.import" - - def _get_tools_name(self, cr, user, context): - """ - @return the list of value of the selection field - should be overwritten by subclasses - """ - return [] - - _columns = { - 'tools': fields.selection(_get_tools_name, 'App to synchronize with'), - } - - - def action_synchronize(self, cr, uid, ids, context=None): - wizard_data = self.browse(cr, uid, ids, context=context) - return self._get_action(cr, uid, wizard_data[0].tools, context=context) - - - def _get_action(self, cr, uid, tools, context=None): - if not tools: - raise osv.except_osv(_("Error !"),_("Select App to synchronize with.")) - return self._get_actions_dic(cr, uid, context=context)[tools] - - def _get_actions_dic(self, cr, uid, context=None): - """ - this method should be overwritten in specialize module - @return the dictonnaries of action - """ - return {'none' : {'type': 'ir.actions.act_window_close' }} - -synchronize_base() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
