From 3b984312b6b6178058e00765e6b2e1c7f1ceb3e7 Mon Sep 17 00:00:00 2001 From: "Jonathan Nemry (ACSONE)" Date: Fri, 3 Jul 2015 08:04:45 +0200 Subject: [PATCH] [CHG] some code review: * Use a better test condition * Fix the email address [FIX] * rename the path and web instance just as the module was --- web_readonly_bypass/README.rst | 2 +- web_readonly_bypass/static/src/js/readonly_bypass.js | 6 +++--- web_readonly_bypass/views/readonly_bypass.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web_readonly_bypass/README.rst b/web_readonly_bypass/README.rst index 2ffbc11d..12d8ac17 100644 --- a/web_readonly_bypass/README.rst +++ b/web_readonly_bypass/README.rst @@ -56,7 +56,7 @@ Contributors ------------ * Jonathan Nemry -* Laetitia Gangloff +* Laetitia Gangloff Maintainer ---------- diff --git a/web_readonly_bypass/static/src/js/readonly_bypass.js b/web_readonly_bypass/static/src/js/readonly_bypass.js index d8581f3e..0635c74d 100644 --- a/web_readonly_bypass/static/src/js/readonly_bypass.js +++ b/web_readonly_bypass/static/src/js/readonly_bypass.js @@ -2,7 +2,7 @@ * Allow to bypass readonly fi the value is changed */ -openerp.readonly_bypass = function(instance) { +openerp.web_readonly_bypass = function(instance) { var QWeb = instance.web.qweb, _t = instance.web._t; /** @@ -19,8 +19,8 @@ openerp.readonly_bypass = function(instance) { */ function ignore_readonly(data, options, mode, context){ if (options){ - if (!('filter_out_readonly' in context && context['filter_out_readonly'] == true - && 'readonly_fields' in options && options['readonly_fields'])) { + if ('readonly_fields' in options && options['readonly_fields'] && + !('filter_out_readonly' in context && context['filter_out_readonly'] == true )) { if(mode){ $.each( options.readonly_fields, function( key, value ) { if(value==false){ diff --git a/web_readonly_bypass/views/readonly_bypass.xml b/web_readonly_bypass/views/readonly_bypass.xml index 2bad7ace..8aff08f5 100644 --- a/web_readonly_bypass/views/readonly_bypass.xml +++ b/web_readonly_bypass/views/readonly_bypass.xml @@ -5,8 +5,8 @@ - \ No newline at end of file +