~unifield-team/unifield-web/jfb-utp-732-727

« back to all changes in this revision

Viewing changes to addons/openerp/static/javascript/form.js

  • Committer: jf
  • Date: 2013-08-06 15:55:59 UTC
  • Revision ID: jfb@tempo-consulting.fr-20130806155559-jltviztia3unrray
[IMP] m2m search view: keep selected items between page navigation

Show diffs side-by-side

added added

removed removed

Lines of Context:
238
238
    var $src = jQuery(src);
239
239
    var action = $src.attr('action');
240
240
    var relation = $src.attr('relation');
 
241
    if (relation) {
 
242
        var lv = ListView(relation);
 
243
        var sel = lv.$getSelectedItems().map(function () {
 
244
                return parseInt(this.value, 10);
 
245
            }).get()
 
246
        lv.set_previously_selected(sel);
 
247
    }
241
248
    return relation ? new ListView(relation).go(action) : submit_form(action ? action : 'find');
242
249
}
243
250