mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[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:
@@ -56,7 +56,7 @@ Contributors
|
||||
------------
|
||||
|
||||
* Jonathan Nemry <jonathan.nemry@acsone.eu>
|
||||
* Laetitia Gangloff <laetitia.gangloff.eu>
|
||||
* Laetitia Gangloff <laetitia.gangloff@acsone.eu>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user