~openerp-dev/openobject-client-web/6.0-opw-587800-2-cpa

« back to all changes in this revision

Viewing changes to addons/openerp/static/javascript/form_state.js

  • Committer: Xavier ALT
  • Date: 2012-10-09 08:53:34 UTC
  • mfrom: (4878.1.1 6.0-opw-57667-xal)
  • Revision ID: xal@openerp.com-20121009085334-lm6rym2maa3l0817
[MERGE] OPW 57667: form view: button should be clickable on state + attrs (not forced to readonly if view is non-editable)

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
    switch (attr) {
244
244
        case 'readonly':
245
245
            var editable = openobject.dom.get(prefix + '_terp_editable');
246
 
            if (editable && (editable.value == 0 || editable.value == 'False')) {
 
246
            if (widget.tagName != 'BUTTON' && editable && (editable.value == 0 || editable.value == 'False')) {
247
247
                // We are in 'non-editable' mode, so we force readonly = True
248
248
                // whatever readonly attrs result
249
249
                result = true;