Merge lp:~openerp-dev/openerp-web/6.1-opw-578436-cpa into lp:openerp-web/6.1

Proposed by Chirag Patel (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/6.1-opw-578436-cpa
Merge into: lp:openerp-web/6.1
Diff against target: 13 lines (+4/-0)
1 file modified
addons/web/static/src/js/view_form.js (+4/-0)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/6.1-opw-578436-cpa
Reviewer Review Type Date Requested Status
Xavier (Open ERP) (community) Needs Information
Review via email: mp+121992@code.launchpad.net

Description of the change

Hello,

Fixed reference field doesn't support readonly state.

Demo : Sales > Configuration > Calendar > Event Invitations
1) In Form view.

Observed: when you select any object in this field "Event Ref", m2o field will not readonly.
Expected: m2o field should be readonly because in form view "Event Ref" field set as readonly = "1".

Set the behavior same as GTk client.

Thanks.

To post a comment you must log in.
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Shouldn't the m2o's dom be updated as well so readonly state correctly affects it in all cases?

review: Needs Information

Unmerged revisions

2431. By Chirag Patel (OpenERP)

[FIX] Fixed reference field doesn't support readonly state.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_form.js'
2--- addons/web/static/src/js/view_form.js 2012-08-14 14:53:50 +0000
3+++ addons/web/static/src/js/view_form.js 2012-08-30 06:38:18 +0000
4@@ -3421,6 +3421,10 @@
5 } else {
6 return false;
7 }
8+ },
9+ update_dom: function() {
10+ this._super.apply(this, arguments);
11+ this.m2o.readonly = this.readonly;
12 }
13 });
14