c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #27257
[Bug 771708] Re: web 6.0: client does not respect readonly=True on field if inside a <group/>
Hello Xavier,
Would you please check this with latest updated code.
For now I am closing this bug.
If you still faced the problem than you can reopen this again with more
information.
Thanks for understanding!
** Changed in: openobject-client-web
Status: Expired => Invalid
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/771708
Title:
web 6.0: client does not respect readonly=True on field if inside a
<group/>
Status in OpenERP Web Client:
Invalid
Bug description:
Versions:
Server: 6.0.2
Client Web: 6.0.2
Steps to reproduce the problem:
When defining a view like this:
<group>
<field name="version" readonly="1"/>
<field name="reference" readonly="1"/>
</group>
- version: is an integer field
- reference: is a char field
The rendered code the the browser is ok, the two field get class with "readonlyfield" set.
But then, when the javascript checks the attrs on the "group" element, it force the readonly attribute to False to *all* elements inside the group, and so remove the "readonlyfield" class on all input element.
See function form_setReadonly() in
addons/openerp/static/javascript/form_state.js
... snip line 277...
if (!type && ($field.hasClass('item-group'))) {
jQuery($field).find(':input')
.toggleClass('readonlyfield', readonly)
.attr({'disabled': readonly, 'readOnly': readonly});
return;
}
...
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client-web/+bug/771708/+subscriptions
References