summaryrefslogtreecommitdiff
path: root/addons/stock/static/src/js/basic_model.js
blob: 6a5653c6314852d59d90c9f34f77e63caa271288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
odoo.define('stock.BasicModel', function (require) {
"use strict";

var BasicModel = require('web.BasicModel');
var localStorage = require('web.local_storage');

BasicModel.include({

    _invalidateCache: function (dataPoint) {
        this._super.apply(this, arguments);
        if (dataPoint.model === 'stock.warehouse' && !localStorage.getItem('running_tour')) {
            this.do_action('reload_context');
        }
    }
});
});