From f1828623426b11eecbea6faf480d7bfa6bc86f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 5 Dec 2008 11:17:27 +0000 Subject: [PATCH] also create a service, to prove that inventory report ignore them git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24799 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/tests/testTradeReports.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/product/ERP5/tests/testTradeReports.py b/product/ERP5/tests/testTradeReports.py index 58d0a924f7..00b4f9ea02 100644 --- a/product/ERP5/tests/testTradeReports.py +++ b/product/ERP5/tests/testTradeReports.py @@ -121,7 +121,7 @@ class TestTradeReports(ERP5ReportTestCase): reference=unit_id, id=unit_id) - # Create products + # Create resources module = self.portal.product_module if not module.has_key('product_B'): product = module.newContent( @@ -148,7 +148,14 @@ class TestTradeReports(ERP5ReportTestCase): variation_base_category_list=['colour'], colour_list=['colour1', 'colour2'], ) - + if not self.portal.service_module.has_key('service_a'): + self.portal.service_module.newContent( + portal_type='Service', + id='service_a', + title='Service A', + reference='ref sA', + ) + # and all this available to catalog get_transaction().commit() self.tic() @@ -536,6 +543,16 @@ class TestTradeReports(ERP5ReportTestCase): variation_category_list=cell_key) fifth.deliver() + # services are ignored + self._makeOneInventory( + title='Inventory 6', + simulation_state='delivered', + destination_value=self.organisation_module.Organisation_1, + start_date=DateTime(2007, 2, 2), + resource='service_module/service_a', + quantity=11, + ) + get_transaction().commit() self.tic() -- 2.30.9