readonly in m2o widget let me change value.
Bug #941981 reported by
William Beltrán
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP R&D Web Team |
Bug Description
Hi,
I have a many2one field in a form view whit readonly set as True, the fieds i blocked but when i click in the folder in the rigth part of the widget i have tree options: (open, new and search) and it seems to be blocked also but i can click on the search option and it let me select another record and change it in the form.
I am usign 6.1. on
Ubuntu 11.10.
Regards
affects: | openobject-server → openerp-web |
Changed in openerp-web: | |
assignee: | nobody → OpenERP R&D Web Team (openerp-dev-web) |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in openerp-web: | |
milestone: | none → 6.1 |
summary: |
- readonly in o2m widget let me change value. + readonly in m2o widget let me change value. |
description: | updated |
To post a comment you must log in.
To fix this issue i change the file view_form.js in web module we/statis/ src/js/ view_form. js
I changed some lines from line 1915 to line 1920 from this:
bindings[ self.cm_ id + "_search"] = function() {
self. _search_ create_ popup(" search" ); self.cm_ id + "_create"] = function() {
self. _search_ create_ popup(" form");
};
bindings[
};
To this: _search_ create_ popup(" search" ); _search_ create_ popup(" form");
bindings[self.cm_id + "_search"] = function() {
if (!self.readonly) {
self.
}
};
bindings[self.cm_id + "_create"] = function() {
if (!self.readonly) {
self.
}
};
Works good for me.