如何解决如果条件在 tpv odoo13 中,如何启动弹出窗口
我需要在 odoo pos whit if 条件下启动一个弹出窗口,但不要调用字段 sale_line_warn
检查我的代码。
screen.ProductListWidget = screen.ProductListWidget.include({
click_product_action: function(product) {
var product = self.pos.db.get_product_by_id(this.dataset.productId)
console.log(typeof product)
if (product.sale_line_warn ==='no-message') {
return this._super();
}
else {
self.gui.show_popup('alert',{
title: _t(product.description_sale)
});
if (product.description_sale === 'warning') {
console.log('warning')
self._super();
};
}
}
});
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。