[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
This commit is contained in:
Jonathan Nemry (ACSONE)
2015-07-03 08:04:45 +02:00
parent 3260cd269d
commit 3b984312b6
3 changed files with 6 additions and 6 deletions

View File

@@ -56,7 +56,7 @@ Contributors
------------
* Jonathan Nemry <jonathan.nemry@acsone.eu>
* Laetitia Gangloff <laetitia.gangloff.eu>
* Laetitia Gangloff <laetitia.gangloff@acsone.eu>
Maintainer
----------

View File

@@ -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){

View File

@@ -5,8 +5,8 @@
<data>
<template id="assets_backend" name="readonly_bypass" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/readonly_bypass/static/src/js/readonly_bypass.js"></script>
<script type="text/javascript" src="/web_readonly_bypass/static/src/js/readonly_bypass.js"></script>
</xpath>
</template>
</data>
</openerp>
</openerp>