From 0705b7bad719a3e87758346cd02b1bb1575faa5a Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Wed, 10 Nov 2010 17:43:19 +0530 Subject: [PATCH] [FIX]: stock: Production lots should not be created for product which is of type=service lp bug: https://launchpad.net/bugs/641110 fixed bzr revid: rpa@tinyerp.com-20101110121319-ai7zni54lkfw6f29 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index e6737ae31bb..4a63a8bd5f5 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1353,7 +1353,7 @@ class stock_production_lot(osv.osv): 'name': fields.char('Serial Number', size=64, required=True, help="Unique serial number, will be displayed as: PREFIX/SERIAL [INT_REF]"), 'ref': fields.char('Internal Reference', size=256, help="Internal reference number in case it differs from the manufacturer's serial number"), 'prefix': fields.char('Prefix', size=64, help="Optional prefix to prepend when displaying this serial number: PREFIX/SERIAL [INT_REF]"), - 'product_id': fields.many2one('product.product', 'Product', required=True), + 'product_id': fields.many2one('product.product', 'Product', required=True, domain=[('type', '<>', 'service')]), 'date': fields.datetime('Creation Date', required=True), 'stock_available': fields.function(_get_stock, fnct_search=_stock_search, method=True, type="float", string="Available", select=True, help="Current quantity of products with this Production Lot Number available in company warehouses",