From 0ba40a9aa5b787df788ea5fc26754a0b92a7f293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 19 Mar 2016 09:05:42 +0100 Subject: [PATCH] Replace category by categories on Template issue5320 review23791002 --- tests/scenario_stock_reporting.rst | 7 ------- tests/scenario_stock_shipment_out.rst | 7 ------- tests/test_stock.py | 15 --------------- 3 files changed, 29 deletions(-) diff --git a/tests/scenario_stock_reporting.rst b/tests/scenario_stock_reporting.rst index ec4b37c837..5fe92ef42c 100644 --- a/tests/scenario_stock_reporting.rst +++ b/tests/scenario_stock_reporting.rst @@ -43,12 +43,6 @@ Create customer & supplier:: >>> supplier = Party(name='Supplier') >>> supplier.save() -Create category:: - - >>> ProductCategory = Model.get('product.category') - >>> category = ProductCategory(name='Category') - >>> category.save() - Create product:: >>> ProductUom = Model.get('product.uom') @@ -58,7 +52,6 @@ Create product:: >>> product = Product() >>> template = ProductTemplate() >>> template.name = 'Product' - >>> template.category = category >>> template.default_uom = unit >>> template.type = 'goods' >>> template.list_price = Decimal('20') diff --git a/tests/scenario_stock_shipment_out.rst b/tests/scenario_stock_shipment_out.rst index 75657ba593..4480ab3db6 100644 --- a/tests/scenario_stock_shipment_out.rst +++ b/tests/scenario_stock_shipment_out.rst @@ -41,12 +41,6 @@ Create customer:: >>> customer = Party(name='Customer') >>> customer.save() -Create category:: - - >>> ProductCategory = Model.get('product.category') - >>> category = ProductCategory(name='Category') - >>> category.save() - Create product:: >>> ProductUom = Model.get('product.uom') @@ -56,7 +50,6 @@ Create product:: >>> product = Product() >>> template = ProductTemplate() >>> template.name = 'Product' - >>> template.category = category >>> template.default_uom = unit >>> template.type = 'goods' >>> template.list_price = Decimal('20') diff --git a/tests/test_stock.py b/tests/test_stock.py index c61f2f3d7b..f5fb259a64 100644 --- a/tests/test_stock.py +++ b/tests/test_stock.py @@ -28,16 +28,12 @@ class StockTestCase(ModuleTestCase): def test_move_internal_quantity(self): 'Test Move.internal_quantity' pool = Pool() - Category = pool.get('product.category') Uom = pool.get('product.uom') Template = pool.get('product.template') Product = pool.get('product.product') Location = pool.get('stock.location') Move = pool.get('stock.move') - category, = Category.create([{ - 'name': 'Test Move.internal_quantity', - }]) kg, = Uom.search([('name', '=', 'Kilogram')]) g, = Uom.search([('name', '=', 'Gram')]) template, = Template.create([{ @@ -45,7 +41,6 @@ class StockTestCase(ModuleTestCase): 'type': 'goods', 'list_price': Decimal(1), 'cost_price': Decimal(0), - 'category': category.id, 'cost_price_method': 'fixed', 'default_uom': kg.id, }]) @@ -89,7 +84,6 @@ class StockTestCase(ModuleTestCase): def test_products_by_location(self): 'Test products_by_location' pool = Pool() - Category = pool.get('product.category') Uom = pool.get('product.uom') Template = pool.get('product.template') Product = pool.get('product.product') @@ -98,9 +92,6 @@ class StockTestCase(ModuleTestCase): Period = pool.get('stock.period') transaction = Transaction() - category, = Category.create([{ - 'name': 'Test products_by_location', - }]) kg, = Uom.search([('name', '=', 'Kilogram')]) g, = Uom.search([('name', '=', 'Gram')]) template, = Template.create([{ @@ -108,7 +99,6 @@ class StockTestCase(ModuleTestCase): 'type': 'goods', 'list_price': Decimal(0), 'cost_price': Decimal(0), - 'category': category.id, 'cost_price_method': 'fixed', 'default_uom': kg.id, }]) @@ -450,7 +440,6 @@ class StockTestCase(ModuleTestCase): def test_period(self): 'Test period' pool = Pool() - Category = pool.get('product.category') Uom = pool.get('product.uom') Template = pool.get('product.template') Product = pool.get('product.product') @@ -459,14 +448,10 @@ class StockTestCase(ModuleTestCase): Period = pool.get('stock.period') transaction = Transaction() - category, = Category.create([{ - 'name': 'Test period', - }]) unit, = Uom.search([('name', '=', 'Unit')]) template, = Template.create([{ 'name': 'Test period', 'type': 'goods', - 'category': category.id, 'cost_price_method': 'fixed', 'default_uom': unit.id, 'list_price': Decimal(0),