2016-06-01 2 views
1

판매 시점에서 제품을 클릭 할 때 어떤 기능이 호출되는지 아이디어를 가지고 있습니까? 제품을 주문에 추가하면 일부 할인을 자동으로 포함하는 코드를 구현하고 싶습니다.제품에 대한 Odoo PoS 기능

미리 감사드립니다.

답변

1

이 경우 ProductListWidget을 확장하면 click_product_handler()라는 메서드가됩니다. 은 다음과 같습니다. 하지만 그 전에는 기본으로 해당 메소드를 살펴보십시오.

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 >> 
       } 
}