[Python-apps-commits] r7885 - in packages/openerp6/trunk (11 files)

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


    Date: Tuesday, November 29, 2011 @ 20:11:58
  Author: xnox-guest
Revision: 7885

web patches

Added:
  packages/openerp6/trunk/debian/patches/02_web/01_tinydict-getstate.patch
    (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate.patch)
  packages/openerp6/trunk/debian/patches/02_web/02_config-changes.patch
    (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/config-changes.patch)
  packages/openerp6/trunk/debian/patches/02_web/03_wsgi-x-location.patch
    (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch)
  packages/openerp6/trunk/debian/patches/02_web/04_fix-popup-namespace.patch
    (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace.patch)
  packages/openerp6/trunk/debian/patches/02_web/05_fix-refresh-loop.patch
    (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch)
Modified:
  packages/openerp6/trunk/debian/	(properties)
Deleted:
  packages/openerp6/trunk/debian/patches/02_web/config-changes.patch
  packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace.patch
  packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch
  packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate.patch
  packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch

Copied: packages/openerp6/trunk/debian/patches/02_web/01_tinydict-getstate.patch (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate.patch)
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/01_tinydict-getstate.patch	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/01_tinydict-getstate.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -0,0 +1,19 @@
+Description: Add missing __getstate__ method to TinyDict
+Author: Maximilian Gass <maximilian.gass at credativ.de>
+Forwarded: no
+
+--- a/web/addons/openerp/utils/utils.py
++++ b/web/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)

Copied: packages/openerp6/trunk/debian/patches/02_web/02_config-changes.patch (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/config-changes.patch)
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/02_config-changes.patch	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/02_config-changes.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -0,0 +1,38 @@
+Description: Change configuration file to fit the WSGI setup
+Author: Maximilian Gass <maximilian.gass at credativ.de>
+Forwarded: no
+
+--- a/web/doc/openerp-web.cfg
++++ b/web/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/web/openerp-web/sessions'

Copied: packages/openerp6/trunk/debian/patches/02_web/03_wsgi-x-location.patch (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch)
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/03_wsgi-x-location.patch	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/03_wsgi-x-location.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -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/web/addons/openerp/controllers/actions.py
++++ b/web/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/web/addons/openerp/static/javascript/openerp/openerp.base.js
++++ b/web/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) {

Copied: packages/openerp6/trunk/debian/patches/02_web/04_fix-popup-namespace.patch (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace.patch)
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/04_fix-popup-namespace.patch	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/04_fix-popup-namespace.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -0,0 +1,11 @@
+--- a/web/addons/openerp/controllers/actions.py
++++ b/web/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['Location'] = url

Copied: packages/openerp6/trunk/debian/patches/02_web/05_fix-refresh-loop.patch (from rev 7884, packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch)
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/05_fix-refresh-loop.patch	                        (rev 0)
+++ packages/openerp6/trunk/debian/patches/02_web/05_fix-refresh-loop.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -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/web/addons/openerp/widgets/form/templates/one2many.mako
++++ b/web/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();

Deleted: packages/openerp6/trunk/debian/patches/02_web/config-changes.patch
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/config-changes.patch	2011-11-29 20:11:50 UTC (rev 7884)
+++ packages/openerp6/trunk/debian/patches/02_web/config-changes.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -1,38 +0,0 @@
-Description: Change configuration file to fit the WSGI setup
-Author: Maximilian Gass <maximilian.gass at credativ.de>
-Forwarded: no
-
---- a/web/doc/openerp-web.cfg
-+++ b/web/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/web/openerp-web/sessions'

Deleted: packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace.patch
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace.patch	2011-11-29 20:11:50 UTC (rev 7884)
+++ packages/openerp6/trunk/debian/patches/02_web/fix-popup-namespace.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -1,11 +0,0 @@
---- a/web/addons/openerp/controllers/actions.py
-+++ b/web/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['Location'] = url

Deleted: packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch	2011-11-29 20:11:50 UTC (rev 7884)
+++ packages/openerp6/trunk/debian/patches/02_web/fix-refresh-loop.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -1,19 +0,0 @@
-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/web/addons/openerp/widgets/form/templates/one2many.mako
-+++ b/web/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();

Deleted: packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate.patch
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate.patch	2011-11-29 20:11:50 UTC (rev 7884)
+++ packages/openerp6/trunk/debian/patches/02_web/tinydict-getstate.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -1,19 +0,0 @@
-Description: Add missing __getstate__ method to TinyDict
-Author: Maximilian Gass <maximilian.gass at credativ.de>
-Forwarded: no
-
---- a/web/addons/openerp/utils/utils.py
-+++ b/web/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)

Deleted: packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch
===================================================================
--- packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch	2011-11-29 20:11:50 UTC (rev 7884)
+++ packages/openerp6/trunk/debian/patches/02_web/wsgi-x-location.patch	2011-11-29 20:11:58 UTC (rev 7885)
@@ -1,49 +0,0 @@
-------------------------------------------------------------
-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/web/addons/openerp/controllers/actions.py
-+++ b/web/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/web/addons/openerp/static/javascript/openerp/openerp.base.js
-+++ b/web/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