验证错误来自JS文件ODO 10时删除刷新操作

时间:2018-07-07 06:12:19

标签: javascript refresh odoo odoo-10

我在保存按钮上应用了刷新操作。但是我想要条件,当验证错误比页面应该刷新时。那么,我有条件申请吗?

我的代码如下:

FormView.include({
    save: function() {
        if (this.model === 'farewell.calendar.booking'){
        //alert('Message' +this, +this.model);
        //console.log('Message11', this, this.model);
        this.$el.find('.save_sign').click();
        setTimeout(function() {
            //location.reload();
            window.location.reload(1);
           }, 1000);
        }
        return this._super.apply(this, arguments);
    }
});

预先感谢

0 个答案:

没有答案
相关问题