From 8e58b5191a3f5203dd655bf90e507195c07cdd2b Mon Sep 17 00:00:00 2001 From: "Sbh (OpenERP)" Date: Wed, 9 Feb 2011 16:15:55 +0530 Subject: [PATCH 001/230] [ADD] Add google_conact module bzr revid: sbh@tinyerp.com-20110209104555-l3txskncpjnfxvyc --- addons/goolge_contact/__init__.py | 24 +++++++++ addons/goolge_contact/__openerp__.py | 40 +++++++++++++++ addons/goolge_contact/google_contact.py | 32 ++++++++++++ addons/goolge_contact/google_contact_view.xml | 50 +++++++++++++++++++ addons/goolge_contact/test.py | 40 +++++++++++++++ 5 files changed, 186 insertions(+) create mode 100644 addons/goolge_contact/__init__.py create mode 100644 addons/goolge_contact/__openerp__.py create mode 100644 addons/goolge_contact/google_contact.py create mode 100644 addons/goolge_contact/google_contact_view.xml create mode 100644 addons/goolge_contact/test.py diff --git a/addons/goolge_contact/__init__.py b/addons/goolge_contact/__init__.py new file mode 100644 index 00000000000..ab21f4a289b --- /dev/null +++ b/addons/goolge_contact/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + +import google_contact +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/goolge_contact/__openerp__.py b/addons/goolge_contact/__openerp__.py new file mode 100644 index 00000000000..645362a0729 --- /dev/null +++ b/addons/goolge_contact/__openerp__.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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': 'Google Contact', + 'version': '1.0', + 'category': 'Generic Modules/Others', + 'description': """The module adds google contact in partner address""", + 'author': 'OpenERP SA', + 'website': 'http://www.openerp.com', + 'depends': ['base'], + 'init_xml': [], + 'update_xml': [ + # 'google_contact_view.xml' + ], + 'demo_xml': [], + 'installable': True, + 'active': False, + 'certificate': '', +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/goolge_contact/google_contact.py b/addons/goolge_contact/google_contact.py new file mode 100644 index 00000000000..0612398321b --- /dev/null +++ b/addons/goolge_contact/google_contact.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 osv import fields,osv,orm + +try: + import gdata + from gdata import contacts + import gdata.contacts.service +except ImportError: + raise osv.except_osv(_('Google Contacts Import Error!'), _('Please install gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list')) + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/goolge_contact/google_contact_view.xml b/addons/goolge_contact/google_contact_view.xml new file mode 100644 index 00000000000..09ed4a9346f --- /dev/null +++ b/addons/goolge_contact/google_contact_view.xml @@ -0,0 +1,50 @@ + + + + + + google.contact.form + google.contact + form + +
+ + + + + + +