From fdb68b03a55e552329ca8e79372d15ead9b9f18a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 16 Mar 2012 12:42:01 +0100 Subject: [PATCH] New product types: Goods, Assets and Service review260001 --- forecast.py | 6 +++++- tests/test_stock_forecast.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/forecast.py b/forecast.py index e684f63c25..f0bd6482ca 100644 --- a/forecast.py +++ b/forecast.py @@ -228,7 +228,11 @@ class ForecastLine(ModelSQL, ModelView): _rec_name = 'product' product = fields.Many2One('product.product', 'Product', required=True, - domain=[('type', '=', 'stockable')], on_change=['product']) + domain=[ + ('type', '=', 'goods'), + ('consumable', '=', False), + ], + on_change=['product']) uom = fields.Many2One('product.uom', 'UOM', required=True, domain=[ ('category', '=', diff --git a/tests/test_stock_forecast.py b/tests/test_stock_forecast.py index 9217e2e951..9ed8b9c428 100644 --- a/tests/test_stock_forecast.py +++ b/tests/test_stock_forecast.py @@ -71,7 +71,7 @@ class StockForecastTestCase(unittest.TestCase): unit_id, = self.uom.search([('name', '=', 'Unit')]) product_id = self.product.create({ 'name': 'Test create_moves', - 'type': 'stockable', + 'type': 'goods', 'category': category_id, 'cost_price_method': 'fixed', 'default_uom': unit_id,