openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #06886
lp:~openerp-dev/openobject-addons/trunk-import-outlook-pst-backlog-1-sgo into lp:~openerp-dev/openobject-addons/trunk-import-outlook-pst
Sanjay Gohel (Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-import-outlook-pst-backlog-1-sgo into lp:~openerp-dev/openobject-addons/trunk-import-outlook-pst.
Requested reviews:
Atul Patel(OpenERP) (atp-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-import-outlook-pst-backlog-1-sgo/+merge/61252
hello,
Create import_outlook_pst wizard read and extract pst file.
thanks..
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-import-outlook-pst-backlog-1-sgo/+merge/61252
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-import-outlook-pst.
=== added directory 'import_outlook_pst'
=== added file 'import_outlook_pst/__init__.py'
--- import_outlook_pst/__init__.py 1970-01-01 00:00:00 +0000
+++ import_outlook_pst/__init__.py 2011-05-17 13:37:40 +0000
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 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 import_outlook_pst
+import outlook_pst_contact_field_mapping
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'import_outlook_pst/__openerp__.py'
--- import_outlook_pst/__openerp__.py 1970-01-01 00:00:00 +0000
+++ import_outlook_pst/__openerp__.py 2011-05-17 13:37:40 +0000
@@ -0,0 +1,37 @@
+# -*- 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/>.
+#
+##############################################################################
+
+{
+ 'name': 'Outlook Personal Storage table(Pst).',
+ 'version': '1.0',
+ 'category': 'Generic Modules',
+ 'description': """This Module Import Contacts Data from Outlook PST into OpenERP Module.""",
+ 'author': 'OpenERP SA',
+ 'website': 'http://www.openerp.com',
+ 'depends': ['base'],
+ 'init_xml': [],
+ 'update_xml': ['import_outlook_pst_view.xml'],
+ 'demo_xml': [],
+ 'test': [],
+ 'installable': True,
+ 'active': False,
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== added file 'import_outlook_pst/import_outlook_pst.py'
--- import_outlook_pst/import_outlook_pst.py 1970-01-01 00:00:00 +0000
+++ import_outlook_pst/import_outlook_pst.py 2011-05-17 13:37:40 +0000
@@ -0,0 +1,60 @@
+# -*- 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
+import base64
+import subprocess
+import mailbox
+import os, os.path,stat
+import vobject
+import tempfile
+import outlook_pst_contact_field_mapping
+import random
+from operator import itemgetter
+
+class import_outlook_pst(osv.osv):
+ """Import Outlook Pst"""
+
+ _name = "import.outlook.pst"
+ _description = __doc__
+ _columns ={
+ 'file': fields.binary('Upload pst File',filters='*.pst'),
+ }
+
+
+ def import_pst_contact(self, cr, uid, ids, context=None):
+
+
+ for current in self.browse(cr, uid, ids):
+ parent_directory = tempfile.mkdtemp(prefix='outlook_', suffix='_pst')
+ outputdirectory = os.path.join(parent_directory, 'Mail_pst')
+ os.mkdir(outputdirectory)
+ test = base64.decodestring(current.file)
+ att_folder_path = os.path.abspath(os.path.dirname("%temp%\\"))
+ att_path = os.path.join(att_folder_path,'test.pst')
+ f = open(att_path, "w")
+ f.write(test)
+ f.close()
+ subprocess.call(['readpst', '-o', outputdirectory, '-r', att_path])
+ val = {}
+ directories = [outputdirectory]
+ return {}
+
+import_outlook_pst()
=== added file 'import_outlook_pst/import_outlook_pst_view.xml'
--- import_outlook_pst/import_outlook_pst_view.xml 1970-01-01 00:00:00 +0000
+++ import_outlook_pst/import_outlook_pst_view.xml 2011-05-17 13:37:40 +0000
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<openerp>
+ <data>
+ <record model="ir.ui.view" id="view_import_outlook_pst_form">
+ <field name="name">import.outlook.pst.form</field>
+ <field name="model">import.outlook.pst</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Import Outlook Pst">
+ <group colspan="4" width="750">
+ <separator string="Upload Your File:" colspan="4"/>
+ <field name="file"/>
+ <separator string="" colspan="4" />
+ <group colspan="4" >
+ <label string="" colspan="2"/>
+ <button icon="gtk-cancel" special="cancel" string="_Cancel"/>
+ <button name="import_pst_contact" string="Import"
+ type="object" icon="terp-camera_test"/>
+ </group>
+ </group>
+ </form>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="action_import_outlook_pst">
+ <field name="name">Import Outlook Pst wizard </field>
+ <field name="res_model">import.outlook.pst</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="view_import_outlook_pst_form"/>
+ <field name="target">new</field>
+ </record>
+
+ <menuitem name="Outlook_PST" id="menu_outlook_pst" parent="base.menu_base_partner"/>
+ <menuitem name="Import Personal Folders Contact" id="menu_pst_contact" parent="menu_outlook_pst" action="action_import_outlook_pst" icon="STOCK_EXECUTE"/>
+
+ </data>
+</openerp>
+
+
\ No newline at end of file
Follow ups