From 93743404e7240d1209b65e74b63fd1395d65fd08 Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Tue, 13 Jan 2009 17:06:16 +0100 Subject: [PATCH] Fix product domain on order point (issue745) --- order_point.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/order_point.py b/order_point.py index f49df9ce5b..ff3c3ad7ca 100644 --- a/order_point.py +++ b/order_point.py @@ -15,7 +15,9 @@ class OrderPoint(OSV): product = fields.Many2One( 'product.product', 'Product', required=True, select=1, - domain=[('type', '=', 'stockable')]) + domain="type == 'purchase' "\ + "and [('type', '=', 'stockable'), ('purchasable', '=', True)] "\ + "or [('type', '=', 'stockable')]") warehouse_location = fields.Many2One( 'stock.location', 'Warehouse Location', select=1, domain="[('type', '=', 'warehouse')]",