From 8fb8cd6c90f1d4399fecd6a6bc30534fea7c6172 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Mon, 1 Feb 2016 13:10:03 +0100 Subject: [PATCH] [FIX] pos_discount: discount product Only the products available in the POS must be set in the field 'discount_product_id'. Inspired from 8cd0127af300efd7f33bc45935912d75ca92f8b0 opw:668163 --- addons/pos_discount/discount.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/pos_discount/discount.py b/addons/pos_discount/discount.py index a3b259d734c..427c3194a10 100644 --- a/addons/pos_discount/discount.py +++ b/addons/pos_discount/discount.py @@ -14,7 +14,7 @@ class pos_config(osv.osv): _columns = { 'iface_discount': fields.boolean('Order Discounts', help='Allow the cashier to give discounts on the whole order.'), 'discount_pc': fields.float('Discount Percentage', help='The default discount percentage'), - 'discount_product_id': fields.many2one('product.product','Discount Product', help='The product used to model the discount'), + 'discount_product_id': fields.many2one('product.product', 'Discount Product', domain="[('available_in_pos', '=', True)]", help='The product used to model the discount'), } _defaults = { 'iface_discount': True,