Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openerp-web/6.1-opw-577195-msh into lp:openerp-web/6.1.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-577195-msh/+merge/117180
Hello,
Fixed the issue of button click which is inside one2many list, here when
workflow buttons are clicked record is not reloaded from the database, hence
buttons are not shown properly based on workflow state.
Demo -: Manufacturing -> Manufacturing Order -> Edit any record which is in
"ready to produce" state, activate workorder tab, click on start, pause or
finish button record is not reloaded.
Reason :- The is faced only in one2many list view because when record is
reloaded it will read the record from the cache, hence it will load the same
record, instead the record should be read from the database, hence removed the
cache record object so that the id in read_ids can set into to_get list and
goes to read from the databasse.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-577195-msh/+merge/117180
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/6.1-opw-577195-msh.
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js 2012-07-20 12:48:22 +0000
+++ addons/web/static/src/js/view_form.js 2012-07-29 08:59:18 +0000
@@ -2858,6 +2858,12 @@
this.__return_blur = true;
}
this._super(e);
+ },
+ reload_record: function (record) {
+ var self = this;
+ var cached = _.detect(self.dataset.cache, function(x) {return x.id === record.get('id');});
+ this.dataset.cache.pop(cached);
+ return this._super(record);
}
});
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp