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 +