Daniel Watkins has proposed merging
lp:~daniel-thewatkins/openobject-client-web/proto61-fix-simplified-interface
into lp:~openerp-dev/openobject-client-web/trunk-proto61.
Requested reviews:
Antony Lesuisse (al-openerp)
For more details, see:
https://code.launchpad.net/~daniel-thewatkins/openobject-client-web/proto61-fix-simplified-interface/+merge/57771
This is a fix for the bug that we found at the Community Days earlier. I'm not
100% sure that it's the best solution (my JS-fu and lack of codebase knowledge
preclude that), but it makes sense to me.
--
https://code.launchpad.net/~daniel-thewatkins/openobject-client-web/proto61-fix-simplified-interface/+merge/57771
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/trunk-proto61.
=== modified file 'addons/base/static/src/js/form.js'
--- addons/base/static/src/js/form.js 2011-04-13 11:45:06 +0000
+++ addons/base/static/src/js/form.js 2011-04-14 20:52:28 +0000
@@ -81,9 +81,12 @@
this.datarecord = record;
for (var f in this.fields) {
var field = this.fields[f];
- field.set_value(this.datarecord[f] || false);
- field.validate();
- field.touched = false;
+ if (!field.invisible) {
+ // If a field is invisible, there is no rendered widget on which to set the values
+ field.set_value(this.datarecord[f] || false);
+ field.validate();
+ field.touched = false;
+ }
}
if (!record.id) {
// New record: Second pass in order to trigger the onchanges
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help : https://help.launchpad.net/ListHelp