readonly in m2o widget let me change value.

Bug #941981 reported by William Beltrán
8
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

Amit Parik (amit-parik)
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
Amit Parik (amit-parik)
summary: - readonly in o2m widget let me change value.
+ readonly in m2o widget let me change value.
description: updated
Revision history for this message
William Beltrán (wigebeno) wrote :

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");
                };
  bindings[self.cm_id + "_create"] = function() {
                    self._search_create_popup("form");
                };

To this:
bindings[self.cm_id + "_search"] = function() {
      if (!self.readonly) {
   self._search_create_popup("search");
      }
                };
bindings[self.cm_id + "_create"] = function() {
      if (!self.readonly) {
   self._search_create_popup("form");
      }
                };

Works good for me.

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

Can you check if you can reproduce in trunk ?
We think it's fixed but did not tested:)

Changed in openerp-web:
status: Confirmed → Incomplete
Revision history for this message
Antony Lesuisse (OpenERP) (al-openerp) wrote :

It's fixed in trunk as m2o are displayed as simple links.

Changed in openerp-web:
status: Incomplete → Fix Released
Revision history for this message
Nicolas Vanhoren (OpenERP) (niv-openerp) wrote :

Thanks a lot for reporting this bug and contributing to OpenERP. We have double-checked this issue and we can confirm that it does not affect the latest development version of OpenERP (trunk), but only a stable version.
The official OpenERP bug management policy states that bugs reported on stable branches follow a much stricter qualification process, to limit the risk of regressions on these production-grade versions.
These are exclusively handled by the OpenERP Entreprise Team, and should be reported via the OpenERP Enterprise (OPW) maintenance service.
You can find more details about all of this in the FAQ of our Bug Management Policy documentation:
   http://bit.ly/openerp-bugs-faq (FAQ #2)

Thank you for your contributions and for your understanding!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.