Skip to content

Commit

Permalink
[FIX] --dev mode crashes on read_template ormcache invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
amigrave committed Aug 14, 2014
1 parent 7210200 commit e7ac9c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions openerp/addons/base/ir/ir_ui_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,9 +905,10 @@ def postprocess_and_fields(self, cr, user, model, node, view_id, context=None):
#------------------------------------------------------
# QWeb template views
#------------------------------------------------------
@tools.conditional(
not config['dev_mode'],
tools.ormcache_context(accepted_keys=('lang','inherit_branding', 'editable', 'translatable')))
read_template_cache = dict(accepted_keys=('lang','inherit_branding', 'editable', 'translatable'))
if config['dev_mode']:
read_template_cache['size'] = 0
@tools.ormcache_context(**read_template_cache)
def read_template(self, cr, uid, xml_id, context=None):
if isinstance(xml_id, (int, long)):
view_id = xml_id
Expand Down

0 comments on commit e7ac9c4

Please sign in to comment.