Commit edcc57d0 authored by Vincent Pelletier's avatar Vincent Pelletier

Do not use catalog to compute total price and total quantity, because the...

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
parent 976ebe96
......@@ -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)
......
......@@ -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):
......
......@@ -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)
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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)
......
......@@ -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):
"""
......
......@@ -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')
......
......@@ -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')
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
"""
......
......@@ -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):
"""
......
......@@ -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):
......
......@@ -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):
......
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment