[Python-apps-commits] r7880 - in packages/openerp6/trunk (8 files)

xnox-guest at users.alioth.debian.org xnox-guest at users.alioth.debian.org
Tue Nov 29 20:11:32 UTC 2011


    Date: Tuesday, November 29, 2011 @ 20:11:30
  Author: xnox-guest
Revision: 7880

web patches

Added:
  packages/openerp6/trunk/debian/patches/02_web/
  packages/openerp6/trunk/debian/patches/02_web/config-changes
  packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace
  packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch
  packages/openerp6/trunk/debian/patches/02_web/series
  packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate
  packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch
Modified:
  packages/openerp6/trunk/debian/	(properties)

Added: packages/openerp6/trunk/debian/patches/02_web/config-changes
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/config-changes	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/config-changes	2011-11-29 20:11:30 UTC (rev 7880)
@@ -0,0 +1,38 @@
+Description: Change configuration file to fit the WSGI setup
+Author: Maximilian Gass <maximilian.gass at credativ.de>
+Forwarded: no
+
+--- a/doc/openerp-web.cfg
++++ b/doc/openerp-web.cfg
+@@ -1,13 +1,6 @@
+ [global]
+ server.environment = "development"
+ 
+-# Some server parameters that you may want to tweak
+-server.socket_host = "0.0.0.0"
+-server.socket_port = 8080
+-
+-# Sets the number of threads the server uses
+-server.thread_pool = 10
+-
+ tools.sessions.on = True
+ tools.sessions.persistent = False
+ 
+@@ -60,6 +53,9 @@
+ openerp.server.protocol = 'socket'
+ openerp.server.timeout = 450
+ 
++# Do not spam the Apache error.log with access logs
++log.screen = False
++
+ # Web client settings
+ [openerp-web]
+ # filter dblists based on url pattern?
+@@ -75,3 +71,7 @@
+ 
+ # will be applied on company logo
+ company.url = ''
++
++[/]
++tools.sessions.storage_type = 'file'
++tools.sessions.storage_path = '/var/lib/openerp-web/sessions'

Added: packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace	2011-11-29 20:11:30 UTC (rev 7880)
@@ -0,0 +1,11 @@
+--- a/addons/openerp/controllers/actions.py
++++ b/addons/openerp/controllers/actions.py
+@@ -366,7 +366,7 @@
+            urllib.urlencode({'payload': compressed_payload}))
+ 
+     if open_new_tab:
+-        url = '/?' + urllib.urlencode({'next': url})
++        url = '/openerp/?' + urllib.urlencode({'next': url})
+         
+     cherrypy.response.headers['X-Target'] = action['target']
+     cherrypy.response.headers['X-Location'] = url

Added: packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch	2011-11-29 20:11:30 UTC (rev 7880)
@@ -0,0 +1,19 @@
+Description: [FIX] Prevent one2many field from causing infinite save - validate error loop
+Origin: commit, revision id: craig.gowing at credativ.co.uk-20111122135916-87vawy1ixha25mi0
+Author: Craig Gowing (credativ) <craig.gowing at credativ.co.uk>
+Bug: https://launchpad.net/bugs/884755
+Last-Update: 2011-11-22
+X-Bzr-Revision-Id: craig.gowing at credativ.co.uk-20111122135916-87vawy1ixha25mi0
+
+=== modified file 'addons/openerp/widgets/form/templates/one2many.mako'
+--- a/addons/openerp/widgets/form/templates/one2many.mako
++++ b/addons/openerp/widgets/form/templates/one2many.mako
+@@ -66,7 +66,7 @@
+         % endif
+     </tr>
+     % if screen.editable and not readonly and view_type == 'tree':
+-        % if name == source and not edition:
++        % if name == source and parent_id and not edition:
+             <script type="text/javascript">
+                 jQuery(document).ready(function() {
+                     new One2Many('${name}', jQuery('table.one2many[id=_o2m_${name}]').attr('detail')).create();

Added: packages/openerp6/trunk/debian/patches/02_web/series
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/series	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/series	2011-11-29 20:11:30 UTC (rev 7880)
@@ -0,0 +1,5 @@
+tinydict-getstate
+config-changes
+wsgi-x-location.patch
+fix-popup-namespace
+fix-refresh-loop.patch

Added: packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate	2011-11-29 20:11:30 UTC (rev 7880)
@@ -0,0 +1,19 @@
+Description: Add missing __getstate__ method to TinyDict
+Author: Maximilian Gass <maximilian.gass at credativ.de>
+Forwarded: no
+
+--- a/addons/openerp/utils/utils.py
++++ b/addons/openerp/utils/utils.py
+@@ -132,6 +132,12 @@
+         nm = '_terp_%s' % name
+         return self.get(nm, self.get(name, None))
+ 
++    # if __getaddr__ and __setaddr__ are defined, one also needs to
++    # define __getstate__, otherwise pickle will fail. pickle is used
++    # by the file backend of CherryPy's session storage
++    def __getstate__(self):
++        return self.__dict__
++
+     def __setitem__(self, name, value):
+         value = self._eval(value)
+         super(TinyDict, self).__setitem__(name, value)

Added: packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch	2011-11-29 20:11:30 UTC (rev 7880)
@@ -0,0 +1,49 @@
+------------------------------------------------------------
+revno: 4517
+committer: Tristan Hill <tristan.hill at credativ.co.uk>
+branch nick: web
+timestamp: Sun 2011-02-20 18:03:10 +0000
+message:
+  [FIX] avoid using the Location header which clashes with modwsgi
+diff:
+=== modified file 'addons/openerp/controllers/actions.py'
+--- a/addons/openerp/controllers/actions.py
++++ b/addons/openerp/controllers/actions.py
+@@ -369,7 +369,7 @@
+         url = '/?' + urllib.urlencode({'next': url})
+         
+     cherrypy.response.headers['X-Target'] = action['target']
+-    cherrypy.response.headers['Location'] = url
++    cherrypy.response.headers['X-Location'] = url
+     return """<script type="text/javascript">
+         window.top.openAction('%s', '%s');
+     </script>
+@@ -507,7 +507,7 @@
+ @tools.expose(template="/openerp/controllers/templates/report.mako")
+ def report_link(report_name, **kw):
+     cherrypy.response.headers['X-Target'] = 'download'
+-    cherrypy.response.headers['Location'] = tools.url(
++    cherrypy.response.headers['X-Location'] = tools.url(
+             '/openerp/report', report_name=report_name, **kw)
+     return dict(name=report_name, data=kw)
+     
+--- a/addons/openerp/static/javascript/openerp/openerp.base.js
++++ b/addons/openerp/static/javascript/openerp/openerp.base.js
+@@ -75,7 +75,7 @@
+                 break;
+             case 401: // Redirect to login, probably
+                 window.location.assign(
+-                        xhr.getResponseHeader('Location'));
++                        xhr.getResponseHeader('X-Location'));
+                 break;
+             default:
+                 if(window.console) {
+@@ -122,7 +122,7 @@
+             } else {
+                 _openAction = openAction;
+             }
+-            _openAction(xhr.getResponseHeader('Location'), target, active_id);
++            _openAction(xhr.getResponseHeader('X-Location'), target, active_id);
+             return;
+         }
+         if(url) {




More information about the Python-apps-commits mailing list