~therp-nl/ocb-web/7.0_lp1340813

« back to all changes in this revision

Viewing changes to addons/web/static/src/js/view_list.js

  • Committer: trp-bzr-bot
  • Author(s): Denis Ledoux
  • Date: 2014-03-26 12:35:13 UTC
  • mfrom: (3745.2.420 web-7)
  • Revision ID: dle@openerp.com-20140326123513-038gugjxkfqtqatj
[REVERT] 4164 revid:dle@openerp.com-20140326113036-g9yv3jj6yetwxvg8: this fix actually works in saas-3, but not in 7.0, as search_read method is not part of the orm

Show diffs side-by-side

added added

removed removed

Lines of Context:
528
528
    },
529
529
    reload_record: function (record) {
530
530
        var self = this;
531
 
        // Use of search_read instead of read to check if we can still read the record (security rules)
532
 
        return this.dataset.call('search_read', [
533
 
            [['id', '=', record.get('id')]],
 
531
        return this.dataset.read_ids(
 
532
            [record.get('id')],
534
533
            _.pluck(_(this.columns).filter(function (r) {
535
534
                    return r.tag === 'field';
536
 
                }), 'name')]
 
535
                }), 'name')
537
536
        ).done(function (records) {
538
 
            var values = _.isEmpty(records) ? undefined : records[0];
 
537
            var values = records[0];
539
538
            if (!values) {
540
539
                self.records.remove(record);
541
540
                return;