产品点击时的 Odoo PoS 功能

Odoo PoS function on product click

有人知道在销售点点击产品时会调用哪个函数吗? 我想实现一些代码,以便在将产品添加到订单时自动包含一些折扣。

提前致谢!

为此,您只需扩展产品列表小部件及其名为 click_product_handler() 的方法。 喜欢跟随。 但在此之前,只需查看 base.

中的那个方法
module.ProductListWidget = module.ProductListWidget.extend({
                init: function(parent, options) {
                this._super(parent,options);
                var self = this;
                this.click_product_handler = function(event){
                << Your Code to add discount >>
                }
}