← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-client-web/trunk-bug-739365-jra into lp:openobject-client-web

 

Jiten (OpenERP) has proposed merging lp:~openerp-dev/openobject-client-web/trunk-bug-739365-jra into lp:openobject-client-web.

Requested reviews:
  OpenERP SA's Web Client R&D (openerp-dev-web)
Related bugs:
  Bug #739365 in OpenERP Web Client: "[Trunk] cannot create a new record for o2m widget = selection (default environment 'development' does not set)"
  https://bugs.launchpad.net/openobject-client-web/+bug/739365

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/trunk-bug-739365-jra/+merge/57141

Selection widget does not work properly due to default cherrypy environment 'development' does not set.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/trunk-bug-739365-jra/+merge/57141
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-client-web/trunk-bug-739365-jra.
=== modified file 'addons/openerp/controllers/templates/header.mako'
--- addons/openerp/controllers/templates/header.mako	2011-02-17 17:46:51 +0000
+++ addons/openerp/controllers/templates/header.mako	2011-04-11 11:03:21 +0000
@@ -76,7 +76,7 @@
                     </ul>
                 </li>
 
-                % if cp.config('server.environment') == 'production':
+                % if cp.config('environment') == 'production':
                     <li id="clear_cache"><a href="${py.url('/openerp/pref/clear_cache')}"
                                             class="clear_cache" target="_top">${_("Clear Cache")}</a>
                         <ul>

=== modified file 'addons/openerp/controllers/templates/index.mako'
--- addons/openerp/controllers/templates/index.mako	2011-03-03 06:18:05 +0000
+++ addons/openerp/controllers/templates/index.mako	2011-04-11 11:03:21 +0000
@@ -224,7 +224,7 @@
             % endif
             <tr>
                 <td id="footer_section" colspan="3">
-                    % if cp.config('server.environment') == 'development':
+                    % if cp.config('environment') == 'development':
                         <div class="footer-a">
                             <p class="one">
                                 <span>${rpc.get_session().protocol}://${_("%(user)s", user=rpc.get_session().loginname)}@${rpc.get_session().host}:${rpc.get_session().port}</span>

=== modified file 'addons/openerp/utils/cache.py'
--- addons/openerp/utils/cache.py	2011-02-10 16:09:23 +0000
+++ addons/openerp/utils/cache.py	2011-04-11 11:03:21 +0000
@@ -37,7 +37,7 @@
     def memoize_wrapper(func):
 
         # Don't use cache for development environment
-        if not force and cherrypy.config.get('server.environment') == 'development':
+        if not force and cherrypy.config.get('environment') == 'development':
             return func
 
         func_name = "%s.%s.%s" % (func.__module__, func.func_code.co_firstlineno, func.func_name)

=== modified file 'openobject/__init__.py'
--- openobject/__init__.py	2011-03-11 09:58:11 +0000
+++ openobject/__init__.py	2011-04-11 11:03:21 +0000
@@ -167,6 +167,10 @@
     else:
         configuration = config
 
+    _environ = cherrypy.config.setdefault('environment', 'development')
+    if _environ != 'development':
+        BASE_GLOBAL['environment'] = _environ
+
     config_dict = as_dict(configuration)
 
     cherrypy.config.update(


Follow ups