From edcc57d080a1097048f4e7814d8ae77e9b20a301 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Mon, 24 Dec 2007 12:19:18 +0000 Subject: [PATCH] Do not use catalog to compute total price and total quantity, because the expected number of concerned subdocuments is small enough to justify not querying relational index. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18485 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../tests/testERP5BankingCashBalanceRegulation.py | 8 ++++---- .../tests/testERP5BankingCashClassification.py | 8 ++++---- .../ERP5Banking/tests/testERP5BankingCashExchange.py | 8 ++++---- .../tests/testERP5BankingCashInventory.py | 12 ++++++------ .../ERP5Banking/tests/testERP5BankingCashMovement.py | 12 ++++++------ .../ERP5Banking/tests/testERP5BankingCashSorting.py | 8 ++++---- .../tests/testERP5BankingCashToCurrencyPurchase.py | 8 ++++---- .../tests/testERP5BankingCashToCurrencySale.py | 8 ++++---- .../ERP5Banking/tests/testERP5BankingCheckDeposit.py | 6 +++--- .../ERP5Banking/tests/testERP5BankingCheckPayment.py | 6 +++--- .../tests/testERP5BankingClassificationSurvey.py | 8 ++++---- .../tests/testERP5BankingCounterRendering.py | 12 ++++++------ .../tests/testERP5BankingDestructionSurvey.py | 12 ++++++------ .../tests/testERP5BankingInternalMoneyDeposit.py | 4 ++-- .../tests/testERP5BankingInternalMoneyPayment.py | 4 ++-- .../tests/testERP5BankingMonetaryDestruction.py | 12 ++++++------ .../tests/testERP5BankingMonetaryRecall.py | 12 ++++++------ .../tests/testERP5BankingMonetarySurvey.py | 12 ++++++------ .../ERP5Banking/tests/testERP5BankingMoneyDeposit.py | 4 ++-- .../tests/testERP5BankingMoneyDepositRendering.py | 12 ++++++------ .../tests/testERP5BankingUsualCashRendering.py | 12 ++++++------ .../tests/testERP5BankingUsualCashTransfer.py | 12 ++++++------ .../tests/testERP5BankingVaultTransfer.py | 12 ++++++------ 23 files changed, 106 insertions(+), 106 deletions(-) diff --git a/product/ERP5Banking/tests/testERP5BankingCashBalanceRegulation.py b/product/ERP5Banking/tests/testERP5BankingCashBalanceRegulation.py index 825691e914..fd029adb1d 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashBalanceRegulation.py +++ b/product/ERP5Banking/tests/testERP5BankingCashBalanceRegulation.py @@ -401,9 +401,9 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas # Check number of lines self.assertEqual(len(self.cash_balance_regulation.objectValues()), 2) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.cash_balance_regulation.getTotalQuantity(deliveryLineType="Incoming Cash Balance Regulation Line"), 17.0) + self.assertEqual(self.cash_balance_regulation.getTotalQuantity(fast=0, deliveryLineType="Incoming Cash Balance Regulation Line"), 17.0) # Check the total price - self.assertEqual(self.cash_balance_regulation.getTotalPrice(deliveryLineType="Incoming Cash Balance Regulation Line"), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.cash_balance_regulation.getTotalPrice(fast=0, deliveryLineType="Incoming Cash Balance Regulation Line"), 10000 * 5.0 + 200 * 12.0) def stepCreateValidOutgoingLine(self, sequence=None, sequence_list=None, **kwd): @@ -489,9 +489,9 @@ class TestERP5BankingCashBalanceRegulation(TestERP5BankingMixin, ERP5TypeTestCas # Check number of lines (line1 + line2) self.assertEqual(len(self.cash_balance_regulation.objectValues()), 4) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.cash_balance_regulation.getTotalQuantity(deliveryLineType="Outgoing Cash Balance Regulation Line"), 34.0) + self.assertEqual(self.cash_balance_regulation.getTotalQuantity(fast=0, deliveryLineType="Outgoing Cash Balance Regulation Line"), 34.0) # check the total price - self.assertEqual(self.cash_balance_regulation.getTotalPrice(deliveryLineType="Outgoing Cash Balance Regulation Line"), 5000 * 4.0 + 100 * 0.0 + 5000 * 6.0 + 100 * 24.0) + self.assertEqual(self.cash_balance_regulation.getTotalPrice(fast=0, deliveryLineType="Outgoing Cash Balance Regulation Line"), 5000 * 4.0 + 100 * 0.0 + 5000 * 6.0 + 100 * 24.0) diff --git a/product/ERP5Banking/tests/testERP5BankingCashClassification.py b/product/ERP5Banking/tests/testERP5BankingCashClassification.py index 17046997a8..815be0c2d7 100755 --- a/product/ERP5Banking/tests/testERP5BankingCashClassification.py +++ b/product/ERP5Banking/tests/testERP5BankingCashClassification.py @@ -425,9 +425,9 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.cash_sorting.objectValues()), 4) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.cash_sorting.getTotalQuantity(deliveryLineType="Incoming Cash Sorting Line"), 51.0) + self.assertEqual(self.cash_sorting.getTotalQuantity(fast=0, deliveryLineType="Incoming Cash Sorting Line"), 51.0) # Check the total price - self.assertEqual(self.cash_sorting.getTotalPrice(deliveryLineType="Incoming Cash Sorting Line"), 10000 * 5.0 + 100 * 10.0 + 200 * 12.0 + 5000 * 24.0) + self.assertEqual(self.cash_sorting.getTotalPrice(fast=0, deliveryLineType="Incoming Cash Sorting Line"), 10000 * 5.0 + 100 * 10.0 + 200 * 12.0 + 5000 * 24.0) def stepCreateValidOutgoingLineForInternalBanknote(self, sequence=None, sequence_list=None, **kwd): @@ -591,9 +591,9 @@ class TestERP5BankingCashClassification(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.cash_sorting.objectValues()), 8) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.cash_sorting.getTotalQuantity(), (5.0 + 10.0 + 12.0 + 24.0) * 2.0) + self.assertEqual(self.cash_sorting.getTotalQuantity(fast=0), (5.0 + 10.0 + 12.0 + 24.0) * 2.0) # check the total price - self.assertEqual(self.cash_sorting.getTotalPrice(), (10000 * 5.0 + 100 * 10.0 + 200 * 12.0 + 5000 * 24.0) * 2.0) + self.assertEqual(self.cash_sorting.getTotalPrice(fast=0), (10000 * 5.0 + 100 * 10.0 + 200 * 12.0 + 5000 * 24.0) * 2.0) def stepConfirmCashSorting(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingCashExchange.py b/product/ERP5Banking/tests/testERP5BankingCashExchange.py index 6f3c7a9b59..de1329ecb0 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashExchange.py +++ b/product/ERP5Banking/tests/testERP5BankingCashExchange.py @@ -332,9 +332,9 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.cash_exchange.objectValues()), 2) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.cash_exchange.getTotalQuantity(deliveryLineType="Incoming Cash Exchange Line"), 17.0) + self.assertEqual(self.cash_exchange.getTotalQuantity(fast=0, deliveryLineType="Incoming Cash Exchange Line"), 17.0) # Check the total price - self.assertEqual(self.cash_exchange.getTotalPrice(deliveryLineType="Incoming Cash Exchange Line"), 10000 * 3.0 + 10000 * 2.0 + 200 * 5.0 + 200 * 7.0) + self.assertEqual(self.cash_exchange.getTotalPrice(fast=0, deliveryLineType="Incoming Cash Exchange Line"), 10000 * 3.0 + 10000 * 2.0 + 200 * 5.0 + 200 * 7.0) def stepCreateValidOutgoingLine(self, sequence=None, sequence_list=None, **kwd): @@ -427,9 +427,9 @@ class TestERP5BankingCashExchange(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.cash_exchange.objectValues()), 4) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.cash_exchange.getTotalQuantity(deliveryLineType="Outgoing Cash Exchange Line"), 34.0) + self.assertEqual(self.cash_exchange.getTotalQuantity(fast=0, deliveryLineType="Outgoing Cash Exchange Line"), 34.0) # check the total price - self.assertEqual(self.cash_exchange.getTotalPrice(deliveryLineType="Outgoing Cash Exchange Line"), 5000 * 4.0 + 100 * 0.0 + 5000 * 6.0 + 100 * 24.0) + self.assertEqual(self.cash_exchange.getTotalPrice(fast=0, deliveryLineType="Outgoing Cash Exchange Line"), 5000 * 4.0 + 100 * 0.0 + 5000 * 6.0 + 100 * 24.0) diff --git a/product/ERP5Banking/tests/testERP5BankingCashInventory.py b/product/ERP5Banking/tests/testERP5BankingCashInventory.py index 5437bd5688..2921b97453 100755 --- a/product/ERP5Banking/tests/testERP5BankingCashInventory.py +++ b/product/ERP5Banking/tests/testERP5BankingCashInventory.py @@ -256,9 +256,9 @@ class TestERP5BankingInventory(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.cash_inventory.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.cash_inventory.getTotalQuantity(), 5.0) + self.assertEqual(self.cash_inventory.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.cash_inventory.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.cash_inventory.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateInventoryLine2(self, sequence=None, sequence_list=None, **kwd): @@ -313,9 +313,9 @@ class TestERP5BankingInventory(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.cash_inventory.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.cash_inventory.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.cash_inventory.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.cash_inventory.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.cash_inventory.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepCreateInventoryLine3(self, sequence=None, sequence_list=None, **kwd): @@ -372,9 +372,9 @@ class TestERP5BankingInventory(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.cash_inventory.objectValues()), 3) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.cash_inventory.getTotalQuantity(), 5.0 + 12.0 + 24.0) + self.assertEqual(self.cash_inventory.getTotalQuantity(fast=0), 5.0 + 12.0 + 24.0) # check the total price - self.assertEqual(self.cash_inventory.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.cash_inventory.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepCheckInventoryDelivered(self, sequence=None, sequence_list=None, **kw): diff --git a/product/ERP5Banking/tests/testERP5BankingCashMovement.py b/product/ERP5Banking/tests/testERP5BankingCashMovement.py index cfa34d335f..c679ba065c 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashMovement.py +++ b/product/ERP5Banking/tests/testERP5BankingCashMovement.py @@ -304,9 +304,9 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.cash_movement.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.cash_movement.getTotalQuantity(), 5.0) + self.assertEqual(self.cash_movement.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.cash_movement.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.cash_movement.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -363,9 +363,9 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of vault transfer lines (line1 + line2 +invalid_line) self.assertEqual(len(self.cash_movement.objectValues()), 3) # Check quantity, same as checkTotal + banknote of 500: 11 for 1992 and 13 for 2003 - self.assertEqual(self.cash_movement.getTotalQuantity(), 5.0 + 12.0 + 24) + self.assertEqual(self.cash_movement.getTotalQuantity(fast=0), 5.0 + 12.0 + 24) # chect the total price - self.assertEqual(self.cash_movement.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.cash_movement.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepTryStopCashMovementWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -439,9 +439,9 @@ class TestERP5BankingCashMovement(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.cash_movement.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.cash_movement.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.cash_movement.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.cash_movement.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.cash_movement.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepStopCashMovement(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingCashSorting.py b/product/ERP5Banking/tests/testERP5BankingCashSorting.py index 61336e6769..781eda32fe 100755 --- a/product/ERP5Banking/tests/testERP5BankingCashSorting.py +++ b/product/ERP5Banking/tests/testERP5BankingCashSorting.py @@ -328,9 +328,9 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.cash_sorting.objectValues()), 3) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.cash_sorting.getTotalQuantity(deliveryLineType="Incoming Cash Sorting Line"), 41.0) + self.assertEqual(self.cash_sorting.getTotalQuantity(fast=0, deliveryLineType="Incoming Cash Sorting Line"), 41.0) # Check the total price - self.assertEqual(self.cash_sorting.getTotalPrice(deliveryLineType="Incoming Cash Sorting Line"), 10000 * 5.0 + 200 * 12.0 + 5000 * 24.0) + self.assertEqual(self.cash_sorting.getTotalPrice(fast=0, deliveryLineType="Incoming Cash Sorting Line"), 10000 * 5.0 + 200 * 12.0 + 5000 * 24.0) def stepCreateValidOutgoingLineForInternalBanknote(self, sequence=None, sequence_list=None, **kwd): @@ -456,9 +456,9 @@ class TestERP5BankingCashSorting(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.cash_sorting.objectValues()), 6) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.cash_sorting.getTotalQuantity(), (5.0 + 12.0 + 24.0) * 2.0) + self.assertEqual(self.cash_sorting.getTotalQuantity(fast=0), (5.0 + 12.0 + 24.0) * 2.0) # check the total price - self.assertEqual(self.cash_sorting.getTotalPrice(), (10000 * 5.0 + 200 * 12.0 + 5000 * 24.0) * 2.0) + self.assertEqual(self.cash_sorting.getTotalPrice(fast=0), (10000 * 5.0 + 200 * 12.0 + 5000 * 24.0) * 2.0) def stepConfirmCashSorting(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingCashToCurrencyPurchase.py b/product/ERP5Banking/tests/testERP5BankingCashToCurrencyPurchase.py index 92281bf8bf..4a42a7be24 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashToCurrencyPurchase.py +++ b/product/ERP5Banking/tests/testERP5BankingCashToCurrencyPurchase.py @@ -297,9 +297,9 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa # Check number of lines self.assertEqual(len(self.cash_to_currency_purchase.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.cash_to_currency_purchase.getTotalQuantity(deliveryLineType="Incoming Cash To Currency Purchase Line"), 5.0) + self.assertEqual(self.cash_to_currency_purchase.getTotalQuantity(fast=0, deliveryLineType="Incoming Cash To Currency Purchase Line"), 5.0) # Check the total price - self.assertEqual(self.cash_to_currency_purchase.getTotalPrice(deliveryLineType="Incoming Cash To Currency Purchase Line"), 20 * 5.0) + self.assertEqual(self.cash_to_currency_purchase.getTotalPrice(fast=0, deliveryLineType="Incoming Cash To Currency Purchase Line"), 20 * 5.0) def stepCreateValidOutgoingLine(self, sequence=None, sequence_list=None, **kwd): @@ -392,9 +392,9 @@ class TestERP5BankingCashToCurrencyPurchase(TestERP5BankingMixin, ERP5TypeTestCa # Check number of lines (line1 + line2) self.assertEqual(len(self.cash_to_currency_purchase.objectValues()), 3) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.cash_to_currency_purchase.getTotalQuantity(deliveryLineType="Outgoing Cash To Currency Purchase Line"), 130.0) + self.assertEqual(self.cash_to_currency_purchase.getTotalQuantity(fast=0, deliveryLineType="Outgoing Cash To Currency Purchase Line"), 130.0) # check the total price - self.assertEqual(self.cash_to_currency_purchase.getTotalPrice(deliveryLineType="Outgoing Cash To Currency Purchase Line"), 5000 * 4.0 + 100 * 0.0 + 5000 * 6.0 + 100 * 120.0) + self.assertEqual(self.cash_to_currency_purchase.getTotalPrice(fast=0, deliveryLineType="Outgoing Cash To Currency Purchase Line"), 5000 * 4.0 + 100 * 0.0 + 5000 * 6.0 + 100 * 120.0) diff --git a/product/ERP5Banking/tests/testERP5BankingCashToCurrencySale.py b/product/ERP5Banking/tests/testERP5BankingCashToCurrencySale.py index 855d0dc107..b459bcd3cc 100644 --- a/product/ERP5Banking/tests/testERP5BankingCashToCurrencySale.py +++ b/product/ERP5Banking/tests/testERP5BankingCashToCurrencySale.py @@ -292,9 +292,9 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase): """ # Check number of lines self.assertEqual(len(self.cash_to_currency_sale.objectValues()), 2) - self.assertEqual(self.cash_to_currency_sale.getTotalQuantity(deliveryLineType="Incoming Cash To Currency Sale Line"), 210) + self.assertEqual(self.cash_to_currency_sale.getTotalQuantity(fast=0, deliveryLineType="Incoming Cash To Currency Sale Line"), 210) # Check the total price - self.assertEqual(self.cash_to_currency_sale.getTotalPrice(deliveryLineType="Incoming Cash To Currency Sale Line"), 5000 * 4.0 + 100 * 0.0 + 5000 * 6.0 + 100 * 200.0) + self.assertEqual(self.cash_to_currency_sale.getTotalPrice(fast=0, deliveryLineType="Incoming Cash To Currency Sale Line"), 5000 * 4.0 + 100 * 0.0 + 5000 * 6.0 + 100 * 200.0) def stepCreateValidOutgoingLine(self, sequence=None, sequence_list=None, **kwd): @@ -343,9 +343,9 @@ class TestERP5BankingCashToCurrencySale(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.cash_to_currency_sale.objectValues()), 3) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.cash_to_currency_sale.getTotalQuantity(deliveryLineType="Outgoing Cash To Currency Sale Line"), 5.0) + self.assertEqual(self.cash_to_currency_sale.getTotalQuantity(fast=0, deliveryLineType="Outgoing Cash To Currency Sale Line"), 5.0) # check the total price - self.assertEqual(self.cash_to_currency_sale.getTotalPrice(deliveryLineType="Outgoing Cash To Currency Sale Line"), 20 * 5.0) + self.assertEqual(self.cash_to_currency_sale.getTotalPrice(fast=0, deliveryLineType="Outgoing Cash To Currency Sale Line"), 20 * 5.0) def stepDeliverCashToCurrencySale(self, sequence=None, sequence_list=None, **kwd): """ diff --git a/product/ERP5Banking/tests/testERP5BankingCheckDeposit.py b/product/ERP5Banking/tests/testERP5BankingCheckDeposit.py index cc8d3e055b..f567133afb 100755 --- a/product/ERP5Banking/tests/testERP5BankingCheckDeposit.py +++ b/product/ERP5Banking/tests/testERP5BankingCheckDeposit.py @@ -194,7 +194,7 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): resource_value=self.currency_1, external_software_value=None,) self.assertNotEqual(self.check_deposit, None) - self.assertEqual(self.check_deposit.getTotalPrice(), 0.0) + self.assertEqual(self.check_deposit.getTotalPrice(fast=0), 0.0) self.assertEqual(self.check_deposit.getDestinationPayment(), self.bank_account_1.getRelativeUrl()) self.assertEqual(self.check_deposit.getSourceTotalAssetPrice(), 2000.0) # the initial state must be draft @@ -246,7 +246,7 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): """ Send the check deposit document to first validation level """ - self.assertEqual(self.check_deposit.getTotalPrice(portal_type="Check Operation Line"), 2000.0) + self.assertEqual(self.check_deposit.getTotalPrice(fast=0, portal_type="Check Operation Line"), 2000.0) self.workflow_tool.doActionFor(self.check_deposit, 'plan_action', wf_id='check_deposit_workflow') self.assertEqual(self.check_deposit.getSimulationState(), 'planned') self.assertEqual(len(self.check_deposit.contentValues(filter = {'portal_type' : 'Incoming Check Deposit Line'})), 1) @@ -256,7 +256,7 @@ class TestERP5BankingCheckDeposit(TestERP5BankingMixin, ERP5TypeTestCase): """ Send the check deposit document to first validation level """ - self.assertEqual(self.check_deposit.getTotalPrice(portal_type="Check Operation Line"), 2000.0) + self.assertEqual(self.check_deposit.getTotalPrice(fast=0, portal_type="Check Operation Line"), 2000.0) self.assertRaises(ValidationFailed, self.workflow_tool.doActionFor, self.check_deposit, 'plan_action', wf_id='check_deposit_workflow') #self.workflow_tool.doActionFor(self.check_deposit, 'plan_action', wf_id='check_deposit_workflow') self.assertEqual(self.check_deposit.getSimulationState(), 'draft') diff --git a/product/ERP5Banking/tests/testERP5BankingCheckPayment.py b/product/ERP5Banking/tests/testERP5BankingCheckPayment.py index 7f6fb11cb8..203eea8d88 100755 --- a/product/ERP5Banking/tests/testERP5BankingCheckPayment.py +++ b/product/ERP5Banking/tests/testERP5BankingCheckPayment.py @@ -235,7 +235,7 @@ class TestERP5BankingCheckPaymentMixin: # call set source to go into the interaction workflow to update local roles self.check_payment._setSource(self.bi_counter.getRelativeUrl()) self.assertNotEqual(self.check_payment, None) - self.assertEqual(self.check_payment.getTotalPrice(), 0.0) + self.assertEqual(self.check_payment.getTotalPrice(fast=0), 0.0) self.assertEqual(self.check_payment.getDestinationPayment(), self.bank_account_1.getRelativeUrl()) self.assertEqual(self.check_payment.getAggregateFreeText(), self.check_1.getReference()) self.assertEqual(self.check_payment.getSourceTotalAssetPrice(), 20000.0) @@ -395,7 +395,7 @@ class TestERP5BankingCheckPaymentMixin: self.assertEqual(self.check_payment.getSimulationState(), 'confirmed') self.assertEqual(self.check_payment.getSourceTotalAssetPrice(), - - self.check_payment.getTotalPrice(portal_type = 'Banking Operation Line')) + - self.check_payment.getTotalPrice(fast=0, portal_type = 'Banking Operation Line')) def stepCheckConfirmedInventory(self, sequence=None, sequence_list=None, **kwd): """ @@ -442,7 +442,7 @@ class TestERP5BankingCheckPaymentMixin: FIXME: check if the transition fails when a category or property is invalid. """ self.assertEqual(self.check_payment.getSourceTotalAssetPrice(), - self.check_payment.getTotalPrice(portal_type = 'Cash Delivery Cell')) + self.check_payment.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) self.workflow_tool.doActionFor(self.check_payment, 'deliver_action', wf_id='check_payment_workflow') self.assertEqual(self.check_payment.getSimulationState(), 'delivered') diff --git a/product/ERP5Banking/tests/testERP5BankingClassificationSurvey.py b/product/ERP5Banking/tests/testERP5BankingClassificationSurvey.py index 35cf5bd615..8ec4142dff 100755 --- a/product/ERP5Banking/tests/testERP5BankingClassificationSurvey.py +++ b/product/ERP5Banking/tests/testERP5BankingClassificationSurvey.py @@ -301,9 +301,9 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase # Check number of lines self.assertEqual(len(self.classification_survey.objectValues()), 2) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.classification_survey.getTotalQuantity(deliveryLineType="Incoming Classification Survey Line"), 17.0) + self.assertEqual(self.classification_survey.getTotalQuantity(fast=0, deliveryLineType="Incoming Classification Survey Line"), 17.0) # Check the total price - self.assertEqual(self.classification_survey.getTotalPrice(deliveryLineType="Incoming Classification Survey Line"), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.classification_survey.getTotalPrice(fast=0, deliveryLineType="Incoming Classification Survey Line"), 10000 * 5.0 + 200 * 12.0) def stepCreateValidOutgoingLineForInternalBanknote(self, sequence=None, sequence_list=None, **kwd): @@ -399,9 +399,9 @@ class TestERP5BankingClassificationSurvey(TestERP5BankingMixin, ERP5TypeTestCase # Check number of lines (line1 + line2) self.assertEqual(len(self.classification_survey.objectValues()), 4) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.classification_survey.getTotalQuantity(), (5.0 + 12.0) * 2.0) + self.assertEqual(self.classification_survey.getTotalQuantity(fast=0), (5.0 + 12.0) * 2.0) # check the total price - self.assertEqual(self.classification_survey.getTotalPrice(), (10000 * 5.0 + 200 * 12.0) * 2.0) + self.assertEqual(self.classification_survey.getTotalPrice(fast=0), (10000 * 5.0 + 200 * 12.0) * 2.0) def stepConfirmClassificationSurvey(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingCounterRendering.py b/product/ERP5Banking/tests/testERP5BankingCounterRendering.py index c3dd277c65..86b68d6468 100644 --- a/product/ERP5Banking/tests/testERP5BankingCounterRendering.py +++ b/product/ERP5Banking/tests/testERP5BankingCounterRendering.py @@ -285,9 +285,9 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.counter_rendering.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.counter_rendering.getTotalQuantity(), 5.0) + self.assertEqual(self.counter_rendering.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.counter_rendering.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.counter_rendering.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -344,9 +344,9 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of counter rendering lines (line1 + line2 +invalid_line) self.assertEqual(len(self.counter_rendering.objectValues()), 3) # Check quantity, same as checkTotal + banknote of 500: 11 for 1992 and 13 for 2003 - self.assertEqual(self.counter_rendering.getTotalQuantity(), 5.0 + 12.0 + 24) + self.assertEqual(self.counter_rendering.getTotalQuantity(fast=0), 5.0 + 12.0 + 24) # chect the total price - self.assertEqual(self.counter_rendering.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.counter_rendering.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepTryConfirmCounterRenderingWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -387,9 +387,9 @@ class TestERP5BankingCounterRendering(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.counter_rendering.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.counter_rendering.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.counter_rendering.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.counter_rendering.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.counter_rendering.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepConfirmCounterRendering(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py b/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py index 3588abb394..a395b92ad4 100644 --- a/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py +++ b/product/ERP5Banking/tests/testERP5BankingDestructionSurvey.py @@ -244,9 +244,9 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.destruction_survey.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.destruction_survey.getTotalQuantity(), 5.0) + self.assertEqual(self.destruction_survey.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.destruction_survey.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.destruction_survey.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -303,9 +303,9 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of cash transfer lines (line1 + line2 +invalid_line) self.assertEqual(len(self.destruction_survey.objectValues()), 3) # Check quantity, same as checkTotal + banknote of 500: 11 for 1992 and 13 for 2003 - self.assertEqual(self.destruction_survey.getTotalQuantity(), 5.0 + 12.0 + 24) + self.assertEqual(self.destruction_survey.getTotalQuantity(fast=0), 5.0 + 12.0 + 24) # chect the total price - self.assertEqual(self.destruction_survey.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.destruction_survey.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepTryConfirmDestructionSurveyWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -346,9 +346,9 @@ class TestERP5BankingDestructionSurvey(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.destruction_survey.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.destruction_survey.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.destruction_survey.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.destruction_survey.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.destruction_survey.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepConfirmDestructionSurvey(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingInternalMoneyDeposit.py b/product/ERP5Banking/tests/testERP5BankingInternalMoneyDeposit.py index 2540e81521..21efada8c0 100644 --- a/product/ERP5Banking/tests/testERP5BankingInternalMoneyDeposit.py +++ b/product/ERP5Banking/tests/testERP5BankingInternalMoneyDeposit.py @@ -232,12 +232,12 @@ class TestERP5BankingInternalMoneyDeposit(TestERP5BankingMixin, ERP5TypeTestCase def stepDeliverInternalMoneyDeposit(self, sequence=None, sequence_list=None, **kwd): self.assertEqual(self.internal_money_deposit.getSourceTotalAssetPrice(), - self.internal_money_deposit.getTotalPrice(portal_type = 'Cash Delivery Cell')) + self.internal_money_deposit.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) self.workflow_tool.doActionFor(self.internal_money_deposit, 'deliver_action', wf_id='internal_money_deposit_workflow') self.assertEqual(self.internal_money_deposit.getSimulationState(), 'delivered') self.assertEqual(self.internal_money_deposit.getSourceTotalAssetPrice(), 20000.0) - self.assertEqual(20000.0, self.internal_money_deposit.getTotalPrice(portal_type = 'Cash Delivery Cell')) + self.assertEqual(20000.0, self.internal_money_deposit.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) def stepCheckFinalInventory(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingInternalMoneyPayment.py b/product/ERP5Banking/tests/testERP5BankingInternalMoneyPayment.py index 718a56cdf9..58891a4abd 100644 --- a/product/ERP5Banking/tests/testERP5BankingInternalMoneyPayment.py +++ b/product/ERP5Banking/tests/testERP5BankingInternalMoneyPayment.py @@ -232,12 +232,12 @@ class TestERP5BankingInternalMoneyPayment(TestERP5BankingMixin, ERP5TypeTestCase def stepDeliverInternalMoneyPayment(self, sequence=None, sequence_list=None, **kwd): self.assertEqual(self.internal_money_payment.getSourceTotalAssetPrice(), - self.internal_money_payment.getTotalPrice(portal_type = 'Cash Delivery Cell')) + self.internal_money_payment.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) self.workflow_tool.doActionFor(self.internal_money_payment, 'deliver_action', wf_id='internal_money_payment_workflow') self.assertEqual(self.internal_money_payment.getSimulationState(), 'delivered') self.assertEqual(self.internal_money_payment.getSourceTotalAssetPrice(), 20000.0) - self.assertEqual(20000.0, self.internal_money_payment.getTotalPrice(portal_type = 'Cash Delivery Cell')) + self.assertEqual(20000.0, self.internal_money_payment.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) def stepCheckFinalInventory(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py b/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py index 58a1bce857..1c68d473f9 100644 --- a/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetaryDestruction.py @@ -462,9 +462,9 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) # Check number of lines self.assertEqual(len(self.monetary_destruction.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.monetary_destruction.getTotalQuantity(), 5.0) + self.assertEqual(self.monetary_destruction.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.monetary_destruction.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.monetary_destruction.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -561,9 +561,9 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) # Check number of monetary destruction lines (line1 + line2 +invalid_line) self.assertEqual(len(self.monetary_destruction.objectValues()), 3) # Check quantity, same as checkTotal + coin of 200: 5 for 1992 and 7 for 2003 - self.assertEqual(self.monetary_destruction.getTotalQuantity(), 5.0 + 24.0 + 12) + self.assertEqual(self.monetary_destruction.getTotalQuantity(fast=0), 5.0 + 24.0 + 12) # chect the total price - self.assertEqual(self.monetary_destruction.getTotalPrice(), 10000 * 5.0 + 5000 * 24.0 + 200 * 12) + self.assertEqual(self.monetary_destruction.getTotalPrice(fast=0), 10000 * 5.0 + 5000 * 24.0 + 200 * 12) def stepTryPlannedMonetaryDestructionWithBadInventory(self, sequence=None, sequence_list=None, **kwd): """ @@ -609,9 +609,9 @@ class TestERP5BankingMonetaryDestruction(TestERP5BankingMixin, ERP5TypeTestCase) # Check number of lines (line1 + line2) self.assertEqual(len(self.monetary_destruction.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, banknotes : 5 for 1992 and 7 for 2003 - self.assertEqual(self.monetary_destruction.getTotalQuantity(), 5.0 + 24.0) + self.assertEqual(self.monetary_destruction.getTotalQuantity(fast=0), 5.0 + 24.0) # check the total price - self.assertEqual(self.monetary_destruction.getTotalPrice(), 10000 * 5.0 + 5000 * 24.0) + self.assertEqual(self.monetary_destruction.getTotalPrice(fast=0), 10000 * 5.0 + 5000 * 24.0) def stepPlannedMonetaryDestruction(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py b/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py index 8baa6e202f..6a41adeace 100755 --- a/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetaryRecall.py @@ -309,9 +309,9 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.monetary_recall.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.monetary_recall.getTotalQuantity(), 5.0) + self.assertEqual(self.monetary_recall.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.monetary_recall.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.monetary_recall.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -368,9 +368,9 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of monetary recall lines (line1 + line2 +invalid_line) self.assertEqual(len(self.monetary_recall.objectValues()), 3) # Check quantity, same as checkTotal + banknote of 500: 11 for 1992 and 13 for 2003 - self.assertEqual(self.monetary_recall.getTotalQuantity(), 5.0 + 12.0 + 24) + self.assertEqual(self.monetary_recall.getTotalQuantity(fast=0), 5.0 + 12.0 + 24) # chect the total price - self.assertEqual(self.monetary_recall.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.monetary_recall.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepTryConfirmMonetaryRecallWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -412,9 +412,9 @@ class TestERP5BankingMonetaryRecall(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.monetary_recall.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.monetary_recall.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.monetary_recall.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.monetary_recall.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.monetary_recall.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepConfirmMonetaryRecall(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py b/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py index 906a609f88..82595a68ed 100755 --- a/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py +++ b/product/ERP5Banking/tests/testERP5BankingMonetarySurvey.py @@ -257,9 +257,9 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.monetary_survey.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.monetary_survey.getTotalQuantity(), 5.0) + self.assertEqual(self.monetary_survey.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.monetary_survey.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.monetary_survey.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -316,9 +316,9 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of cash transfer lines (line1 + line2 +invalid_line) self.assertEqual(len(self.monetary_survey.objectValues()), 3) # Check quantity, same as checkTotal + banknote of 500: 11 for 1992 and 13 for 2003 - self.assertEqual(self.monetary_survey.getTotalQuantity(), 5.0 + 12.0 + 24) + self.assertEqual(self.monetary_survey.getTotalQuantity(fast=0), 5.0 + 12.0 + 24) # chect the total price - self.assertEqual(self.monetary_survey.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.monetary_survey.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepTryConfirmMonetarySurveyWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -359,9 +359,9 @@ class TestERP5BankingMonetarySurvey(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.monetary_survey.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.monetary_survey.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.monetary_survey.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.monetary_survey.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.monetary_survey.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepConfirmMonetarySurvey(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingMoneyDeposit.py b/product/ERP5Banking/tests/testERP5BankingMoneyDeposit.py index c7453d89e6..ba6f840146 100644 --- a/product/ERP5Banking/tests/testERP5BankingMoneyDeposit.py +++ b/product/ERP5Banking/tests/testERP5BankingMoneyDeposit.py @@ -284,12 +284,12 @@ class TestERP5BankingMoneyDepositMixin: def stepDeliverMoneyDeposit(self, sequence=None, sequence_list=None, **kwd): self.assertEqual(self.money_deposit.getSourceTotalAssetPrice(), - self.money_deposit.getTotalPrice(portal_type = 'Cash Delivery Cell')) + self.money_deposit.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) self.workflow_tool.doActionFor(self.money_deposit, 'deliver_action', wf_id='money_deposit_workflow') self.assertEqual(self.money_deposit.getSimulationState(), 'delivered') self.assertEqual(self.money_deposit.getSourceTotalAssetPrice(), 20000.0) - self.assertEqual(20000.0, self.money_deposit.getTotalPrice(portal_type = 'Cash Delivery Cell')) + self.assertEqual(20000.0, self.money_deposit.getTotalPrice(fast=0, portal_type = 'Cash Delivery Cell')) def stepCheckFinalInventory(self, sequence=None, sequence_list=None, **kwd): """ diff --git a/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py b/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py index 656918663e..846042abe4 100644 --- a/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py +++ b/product/ERP5Banking/tests/testERP5BankingMoneyDepositRendering.py @@ -293,9 +293,9 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas # Check number of lines self.assertEqual(len(self.money_deposit_rendering.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.money_deposit_rendering.getTotalQuantity(), 5.0) + self.assertEqual(self.money_deposit_rendering.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.money_deposit_rendering.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.money_deposit_rendering.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -352,9 +352,9 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas # Check number of money deposit rendering lines (line1 + line2 +invalid_line) self.assertEqual(len(self.money_deposit_rendering.objectValues()), 3) # Check quantity, same as checkTotal + banknote of 500: 11 for 1992 and 13 for 2003 - self.assertEqual(self.money_deposit_rendering.getTotalQuantity(), 5.0 + 12.0 + 24) + self.assertEqual(self.money_deposit_rendering.getTotalQuantity(fast=0), 5.0 + 12.0 + 24) # chect the total price - self.assertEqual(self.money_deposit_rendering.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.money_deposit_rendering.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepTryOrderMoneyDepositRenderingWithBadInventory(self, sequence=None, sequence_list=None, **kwd): """ @@ -393,9 +393,9 @@ class TestERP5BankingMoneyDepositRendering(TestERP5BankingMixin, ERP5TypeTestCas # Check number of lines (line1 + line2) self.assertEqual(len(self.money_deposit_rendering.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.money_deposit_rendering.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.money_deposit_rendering.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.money_deposit_rendering.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.money_deposit_rendering.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepOrderMoneyDepositRendering(self, sequence=None, sequence_list=None, **kwd): """ diff --git a/product/ERP5Banking/tests/testERP5BankingUsualCashRendering.py b/product/ERP5Banking/tests/testERP5BankingUsualCashRendering.py index 29861cd2a0..5af94f6483 100644 --- a/product/ERP5Banking/tests/testERP5BankingUsualCashRendering.py +++ b/product/ERP5Banking/tests/testERP5BankingUsualCashRendering.py @@ -297,9 +297,9 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.usual_cash_rendering.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.usual_cash_rendering.getTotalQuantity(), 5.0) + self.assertEqual(self.usual_cash_rendering.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.usual_cash_rendering.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.usual_cash_rendering.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -356,9 +356,9 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of vault transfer lines (line1 + line2 +invalid_line) self.assertEqual(len(self.usual_cash_rendering.objectValues()), 3) # Check quantity, same as checkTotal + banknote of 500: 11 for 1992 and 13 for 2003 - self.assertEqual(self.usual_cash_rendering.getTotalQuantity(), 5.0 + 12.0 + 24) + self.assertEqual(self.usual_cash_rendering.getTotalQuantity(fast=0), 5.0 + 12.0 + 24) # chect the total price - self.assertEqual(self.usual_cash_rendering.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.usual_cash_rendering.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepTryPlanUsualCashRenderingWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -398,9 +398,9 @@ class TestERP5BankingUsualCashRendering(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.usual_cash_rendering.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.usual_cash_rendering.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.usual_cash_rendering.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.usual_cash_rendering.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.usual_cash_rendering.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepPlanUsualCashRendering(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingUsualCashTransfer.py b/product/ERP5Banking/tests/testERP5BankingUsualCashTransfer.py index b60be9de6e..be07f0add0 100755 --- a/product/ERP5Banking/tests/testERP5BankingUsualCashTransfer.py +++ b/product/ERP5Banking/tests/testERP5BankingUsualCashTransfer.py @@ -285,9 +285,9 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.usual_cash_transfer.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.usual_cash_transfer.getTotalQuantity(), 5.0) + self.assertEqual(self.usual_cash_transfer.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.usual_cash_transfer.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.usual_cash_transfer.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -344,9 +344,9 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of cash transfer lines (line1 + line2 +invalid_line) self.assertEqual(len(self.usual_cash_transfer.objectValues()), 3) # Check quantity, same as checkTotal + banknote of 500: 11 for 1992 and 13 for 2003 - self.assertEqual(self.usual_cash_transfer.getTotalQuantity(), 5.0 + 12.0 + 24) + self.assertEqual(self.usual_cash_transfer.getTotalQuantity(fast=0), 5.0 + 12.0 + 24) # chect the total price - self.assertEqual(self.usual_cash_transfer.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.usual_cash_transfer.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepTryConfirmUsualCashTransferWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -387,9 +387,9 @@ class TestERP5BankingUsualCashTransfer(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.usual_cash_transfer.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.usual_cash_transfer.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.usual_cash_transfer.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.usual_cash_transfer.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.usual_cash_transfer.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepConfirmUsualCashTransfer(self, sequence=None, sequence_list=None, **kwd): diff --git a/product/ERP5Banking/tests/testERP5BankingVaultTransfer.py b/product/ERP5Banking/tests/testERP5BankingVaultTransfer.py index 38683b97cc..ed1be1c029 100644 --- a/product/ERP5Banking/tests/testERP5BankingVaultTransfer.py +++ b/product/ERP5Banking/tests/testERP5BankingVaultTransfer.py @@ -392,9 +392,9 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines self.assertEqual(len(self.vault_transfer.objectValues()), 1) # Check quantity of banknotes (2 for 1992 and 3 for 2003) - self.assertEqual(self.vault_transfer.getTotalQuantity(), 5.0) + self.assertEqual(self.vault_transfer.getTotalQuantity(fast=0), 5.0) # Check the total price - self.assertEqual(self.vault_transfer.getTotalPrice(), 10000 * 5.0) + self.assertEqual(self.vault_transfer.getTotalPrice(fast=0), 10000 * 5.0) def stepCreateValidLine2(self, sequence=None, sequence_list=None, **kwd): @@ -451,9 +451,9 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of vault transfer lines (line1 + line2 +invalid_line) self.assertEqual(len(self.vault_transfer.objectValues()), 3) # Check quantity, same as checkTotal + banknote of 500: 11 for 1992 and 13 for 2003 - self.assertEqual(self.vault_transfer.getTotalQuantity(), 5.0 + 12.0 + 24) + self.assertEqual(self.vault_transfer.getTotalQuantity(fast=0), 5.0 + 12.0 + 24) # chect the total price - self.assertEqual(self.vault_transfer.getTotalPrice(), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) + self.assertEqual(self.vault_transfer.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0 + 5000 * 24) def stepTryConfirmVaultTransferWithBadInventory(self, sequence=None, sequence_list=None, **kwd): @@ -523,9 +523,9 @@ class TestERP5BankingVaultTransfer(TestERP5BankingMixin, ERP5TypeTestCase): # Check number of lines (line1 + line2) self.assertEqual(len(self.vault_transfer.objectValues()), 2) # Check quantity, banknotes : 2 for 1992 and 3 for 2003, coin : 5 for 1992 and 7 for 2003 - self.assertEqual(self.vault_transfer.getTotalQuantity(), 5.0 + 12.0) + self.assertEqual(self.vault_transfer.getTotalQuantity(fast=0), 5.0 + 12.0) # check the total price - self.assertEqual(self.vault_transfer.getTotalPrice(), 10000 * 5.0 + 200 * 12.0) + self.assertEqual(self.vault_transfer.getTotalPrice(fast=0), 10000 * 5.0 + 200 * 12.0) def stepConfirmVaultTransfer(self, sequence=None, sequence_list=None, **kwd): -- 2.30.9