← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/jam-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1

 

jam-openerp has proposed merging lp:~openerp-dev/openobject-addons/jam-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1.

Requested reviews:
  OpenERP Core Team (openerp)


Hello,

    Their is Improvement of Outlook Plugin with this Merge Proposal 
    Kindly Check it.

Thank You. 
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/jam-dev-addons1/+merge/43321
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/jam-dev-addons1.
=== modified file 'outlook/README'
--- outlook/README	2010-11-15 11:50:57 +0000
+++ outlook/README	2010-12-10 05:51:59 +0000
@@ -8,6 +8,7 @@
             http://starship.python.net/crew/mhammond/win32/
     3.If you are using MS Outlook 2007 than you are required to install "Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (CDO 1.21)". It can be downloaded from 
             http://www.microsoft.com/downloads/en/details.aspx?familyid=2714320d-c997-4de1-986f-24f081725d36&displaylang=en
+      and With MS Outlook2003 Install inbuilt Collaboration Data Objects(CDO) while installing Outlook. 
 
 How to install openerp-outlook plug-in?
 ======================================================================================

=== modified file 'outlook/installer.py'
--- outlook/installer.py	2010-11-11 13:55:45 +0000
+++ outlook/installer.py	2010-12-10 05:51:59 +0000
@@ -55,7 +55,8 @@
 Pre-requirements :
     1. Python 2.6+ .
     2. Python for Windows extensions - PyWin32 this module for python must be installed for appropriate version of the Python.
-    3. If you are using MS Outlook 2007 than you are required to install "Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (CDO 1.21)".
+    3. If With MS Outlook 2007 it is required to install externally "Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (CDO 1.21)".
+       and With MS Outlook2003 Install inbuilt Collaboration Data Objects(CDO) while installing Outlook.
 
 How to install openerp-outlook plug-in?
     1. Save the executable plug-in file.

=== modified file 'outlook/plugin/openerp-outlook-addin.exe'
Binary files outlook/plugin/openerp-outlook-addin.exe	2010-12-03 12:11:31 +0000 and outlook/plugin/openerp-outlook-addin.exe	2010-12-10 05:51:59 +0000 differ
=== modified file 'outlook/plugin/openerp-outlook-plugin/addin.py'
--- outlook/plugin/openerp-outlook-plugin/addin.py	2010-12-03 12:11:31 +0000
+++ outlook/plugin/openerp-outlook-plugin/addin.py	2010-12-10 05:51:59 +0000
@@ -151,8 +151,10 @@
         activeExplorer = application.ActiveExplorer()
         if activeExplorer is not None:
             bars = activeExplorer.CommandBars
+            new_bar = bars.Add('Open ERP',0,0,0)
 
             menu_bar = bars.Item("Menu Bar")
+
             tools_menu = menu_bar.Controls(5)
             tools_menu = CastTo(tools_menu, "CommandBarPopup")
 
@@ -171,8 +173,9 @@
             item.Enabled = True
 
             toolbar = bars.Item("Standard")
+            openerp_bar = bars.Item('Open ERP')
 
-            item = toolbar.Controls.Add(Type=constants.msoControlButton, Temporary=True)
+            item = openerp_bar.Controls.Add(Type=constants.msoControlButton, Temporary=True)
             # Hook events for the item
             item = self.toolbarButton = DispatchWithEvents(item, ArchiveEvent)
             item.Caption="Push"
@@ -182,14 +185,14 @@
             # Adding Menu in Menu Bar to the Web Menu of the Outlook
             toolbarweb = bars.Item("Web")
 
-            item = toolbarweb.Controls.Add(Type = constants.msoControlButton, Temporary = True)
+            item = openerp_bar.Controls.Add(Type = constants.msoControlButton, Temporary = True)
             item = self.toolbarButtonOpenPartner = DispatchWithEvents(item, OpenPartner)
             item.Caption = "Partner"
             item.TooltipText = "Click to Open OpenERP Partner Contact Information."
             item.Enabled = True
 
 
-            item = toolbarweb.Controls.Add(Type = constants.msoControlButton, Temporary = True)
+            item = openerp_bar.Controls.Add(Type = constants.msoControlButton, Temporary = True)
             item = self.toolbarButtonOpenDocument = DispatchWithEvents(item, OpenDocument)
             item.Caption = "Document"
             item.TooltipText = "Click to Open Document that has been pushed to server."
@@ -225,10 +228,10 @@
             item.Enabled = True
 
     def OnDisconnection(self, mode, custom):
-        self.item.close()
         mngr = manager.GetManager()
         mngr.config['login'] = False
         mngr.SaveConfig()
+        self.item.close()
         pass
     def OnAddInsUpdate(self, custom):
         pass

=== modified file 'outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py'
--- outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py	2010-11-16 12:24:00 +0000
+++ outlook/plugin/openerp-outlook-plugin/dialogs/dialog_map.py	2010-12-10 05:51:59 +0000
@@ -205,6 +205,8 @@
     NewConn.setitem('_uname', config['uname'])
     NewConn.setitem('_pwd', config['pwd'])
     NewConn.setitem('_login', str(config['login']))
+    NewConn.setitem('_webserver',manager.config['webserver'])
+    NewConn.setitem('_webport',manager.config['webport'])
     return
 
 def setConnAttribs(server, port, manager):
@@ -224,6 +226,8 @@
     NewConn.setitem('_pwd', manager.config['pwd'])
     NewConn.setitem('_login', str(manager.config['login']))
     NewConn.setitem('_obj_list', manager.config['objects'])
+    NewConn.setitem('_webserver',manager.config['webserver'])
+    NewConn.setitem('_webport',manager.config['webport'])
     return
 
 def getConnAttributes(manager):
@@ -235,6 +239,13 @@
     manager.config['uname'] = NewConn.getitem('_uname')
     manager.config['pwd'] = NewConn.getitem('_pwd')
     manager.config['login'] = NewConn.getitem('_login')
+    manager.config['webserver'] = NewConn.getitem('_webserver')
+    manager.config['webport'] = NewConn.getitem('_webport')
+    return
+def setWebConnAttribs(server, port, manager):
+    manager.config = manager.LoadConfig()
+    NewConn.setitem('_webserver',server)
+    NewConn.setitem('_webport',port)
     return
 
 def getMessage(e):
@@ -306,6 +317,7 @@
         if server.strip() == "" or server.strip() == "http:\\\\":
             win32ui.MessageBox("Invalid web Server address.", "OpenERP Connection", flag_excl)
             return
+        setWebConnAttribs(server, port, self.mngr)
         web_server = server
         web_server_port = port
         win32gui.EndDialog(self.window.hwnd, id)
@@ -831,6 +843,7 @@
         win32ui.MessageBox("Contact name or Email id is Missing\nPlease fill those information", "Create Contact", flag_error)
         return
     try:
+        NewConn.CreateContact(str(res))
         if not partner:
             msg="New contact created."
         else:
@@ -848,15 +861,23 @@
     # Set values for url, uname, pwd from config file
     global web_server
     global web_server_port
-    serverBox = txtProcessor.GetControl(txtProcessor.other_ids[2])
-    win32gui.SendMessage(serverBox, win32con.WM_SETTEXT, 0, "http:\\\\"+str(web_server)+":"+str(web_server_port))
     url = NewConn.getitem('_uri')
     tbox = txtProcessor.GetControl()
     win32gui.SendMessage(tbox, win32con.WM_SETTEXT, 0, str(url))
+
     uname = NewConn.getitem('_uname')
     tbox = txtProcessor.GetControl(txtProcessor.other_ids[0])
     win32gui.SendMessage(tbox, win32con.WM_SETTEXT, 0, str(uname))
 
+    passbox = txtProcessor.GetControl(txtProcessor.other_ids[1])
+    pwd = NewConn.getitem('_pwd')
+    win32gui.SendMessage(passbox, win32con.WM_SETTEXT, 0, str(pwd))
+    serverBox = txtProcessor.GetControl(txtProcessor.other_ids[2])
+    web_server = NewConn.getitem('_webserver')
+    web_server_port = NewConn.getitem('_webport')
+    webstr = "http:\\\\"+str(web_server)+":"+str(web_server_port)
+    win32gui.SendMessage(serverBox, win32con.WM_SETTEXT, 0, str(webstr))
+
 def SetDefaultList(listProcessor,*args):
     import win32api
     hwndList = listProcessor.GetControl()
@@ -956,6 +977,9 @@
     txtProcessor.init_done = True
 
 def setCheckList(groupProcessor,*args):
+    b = check()
+    if not b:
+        return
     try:
         hinst = win32gui.dllhandle
         objs = groupProcessor.window.manager.config['objects']
@@ -1382,8 +1406,14 @@
     	txtProcessor.init_done=True
     	return
     try:
-    	linktopartner = "http:\\\\"+web_server+":"+str(web_server_port)+"\\openerp\\form\\view?model=res.partner&id="+str(vals)
-    	win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, linktopartner)
+        linktopartner = "http://"+web_server+":"+str(web_server_port)+"/openerp/form/view?model=res.partner&id="+str(vals)
+
+        win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, str(linktopartner))
+#        import urllib
+#        encode = urllib.urlencode('/openerp/form/view?model=res.partner&id='+str(vals))
+#        weburl = 'http://'+web_server+':'+str(web_server_port)
+#        linktopartner = weburl + "?next=" + encode
+#    	win32gui.SendMessage(partner_link, win32con.WM_SETTEXT, 0, linktopartner)
     except Exception,e:
     	win32ui.MessageBox("Error While Opening Partner.\n"+str(e),"Open Partner", flag_error)
     webbrowser.open_new(linktopartner)

=== modified file 'outlook/plugin/openerp-outlook-plugin/dialogs/resources/openerp_logo.png'
Binary files outlook/plugin/openerp-outlook-plugin/dialogs/resources/openerp_logo.png	2010-11-26 12:53:42 +0000 and outlook/plugin/openerp-outlook-plugin/dialogs/resources/openerp_logo.png	2010-12-10 05:51:59 +0000 differ
=== modified file 'outlook/plugin/openerp-outlook-plugin/manager.py'
--- outlook/plugin/openerp-outlook-plugin/manager.py	2010-11-16 10:27:17 +0000
+++ outlook/plugin/openerp-outlook-plugin/manager.py	2010-12-10 05:51:59 +0000
@@ -140,7 +140,7 @@
     def LoadConfig(self):
         import win32ui
         path = os.path.join(self.data_directory, 'tiny.ini')
-        data = {'server' : 'localhost', 'port' : '8069', 'protocol' : 'http://', 'database' : '', 'objects' : self.default_objects, 'uname':'admin', 'pwd':'a', 'login':False}
+        data = {'server' : 'localhost', 'port' : '8069', 'protocol' : 'http://', 'database' : '', 'objects' : self.default_objects, 'uname':'admin', 'pwd':'a', 'login':False,'webserver':'localhost','webport':'8080'}
         if os.path.exists(path):
             fp = open(path, 'r')
             data = fp.readlines()

=== modified file 'outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py'
--- outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py	2010-11-18 11:22:24 +0000
+++ outlook/plugin/openerp-outlook-plugin/tiny_xmlrpc.py	2010-12-10 05:51:59 +0000
@@ -64,10 +64,12 @@
     _reg_clsid_ = "{C6399AFD-763A-400F-8191-7F9D0503CAE2}"
     _reg_progid_ = "Python.OpenERP.XMLRpcConn"
     _reg_policy_spec_ = "win32com.server.policy.EventHandlerPolicy"
-    def __init__(self,server='localhost',port=8069,uri='http://localhost:8069'):
+    def __init__(self,server='localhost',port=8069,uri='http://localhost:8069',webserver='localhost', webport=8080):
         self._server=server
         self._port=port
         self._uri=uri
+        self._webserver=webserver
+        self._webport=webport
         self._obj_list=[]
         self._dbname=''
         self._uname='admin'
@@ -79,6 +81,7 @@
         self.partner_id_list=None
         self.protocol=None
 
+
     def getitem(self, attrib):
         v=self.__getattribute__(attrib)
         return str(v)


Follow ups