From d008e6485abe3f8a1b238baf957c4e024ec1c66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 18 Aug 2008 13:21:17 +0200 Subject: [PATCH] Add domain on product for purchase line --- purchase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/purchase.py b/purchase.py index 1958c684a3..70d09ab4da 100644 --- a/purchase.py +++ b/purchase.py @@ -543,6 +543,7 @@ class PurchaseLine(OSV): 'invisible': "type != 'line'", }, domain="[('category', '=', (product, 'product'))]") product = fields.Many2One('product.product', 'Product', + domain=[('purchasable', '=', True)], states={ 'invisible': "type != 'line'", }, on_change=['product', 'unit', 'quantity', 'description',