diff --git a/product/ERP5/tests/testAccountingRules.py b/product/ERP5/tests/testAccountingRules.py index 59bdfc3379a6cb459ff1573adc19760fd370793c..f4cb0c658c53e5af42b8090ed254c8d08b4bccad 100644 --- a/product/ERP5/tests/testAccountingRules.py +++ b/product/ERP5/tests/testAccountingRules.py @@ -196,7 +196,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): Create some predicates in the Invoice Transaction Rule """ invoice_transaction_rule = getattr(self.getRuleTool(), - 'default_invoice_transaction_rule') + 'default_invoice_transaction_simulation_rule') if invoice_transaction_rule.getValidationState() == 'validated': invoice_transaction_rule.invalidate() transaction.commit() @@ -1134,7 +1134,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): # ...but only invoice_transaction_rule is interesting applied_rule = [applied_rule for applied_rule in applied_rule_list if applied_rule.getSpecialiseValue().getPortalType() == - 'Invoice Transaction Rule'][0] + 'Invoice Transaction Simulation Rule'][0] self.assertEquals( applied_rule.getPortalType(), self.applied_rule_portal_type) self.assertEquals( applied_rule.getSpecialise(), diff --git a/product/ERP5/tests/testConversionInSimulation.py b/product/ERP5/tests/testConversionInSimulation.py index 778c27da0373d3d2e5868124a7812750871a1574..9abd6ed9c002ccc70494aa68472437468e73d6a7 100644 --- a/product/ERP5/tests/testConversionInSimulation.py +++ b/product/ERP5/tests/testConversionInSimulation.py @@ -188,7 +188,7 @@ class TestConversionInSimulation(AccountingTestCase,ERP5TypeTestCase): account.setAccountType(account_type) portal.portal_workflow.doActionFor(account, 'validate_action') - invoice_rule = portal.portal_rules.default_invoice_transaction_rule + invoice_rule = portal.portal_rules.default_invoice_transaction_simulation_rule if invoice_rule.getValidationState() == 'validated': invoice_rule.invalidate() invoice_rule.deleteContent(list(invoice_rule.objectIds())) diff --git a/product/ERP5/tests/testInvoice.py b/product/ERP5/tests/testInvoice.py index b2e8f0930e048204c11ff7bf757517ae39fe3eb3..6c0180b57a809be487db6d63457fcedc641cf5e6 100644 --- a/product/ERP5/tests/testInvoice.py +++ b/product/ERP5/tests/testInvoice.py @@ -223,7 +223,7 @@ class TestInvoiceMixin(TestPackingListMixin, trade_phase='default/payment', source='account_module/bank', destination='account_module/bank') - rule = self.portal.portal_rules.default_payment_rule + rule = self.portal.portal_rules.default_payment_simulation_rule rule.setTradePhase('default/payment') def login(self): @@ -255,7 +255,7 @@ class TestInvoiceMixin(TestPackingListMixin, account.setAccountType(account_type) portal.portal_workflow.doActionFor(account, 'validate_action') - invoice_rule = portal.portal_rules.default_invoice_transaction_rule + invoice_rule = portal.portal_rules.default_invoice_transaction_simulation_rule if invoice_rule.getValidationState() == 'validated': invoice_rule.invalidate() invoice_rule.deleteContent(list(invoice_rule.objectIds())) @@ -341,7 +341,7 @@ class TestInvoiceMixin(TestPackingListMixin, for order_rule in order_rule_list : for order_simulation_movement in order_rule.objectValues() : temp_invoicing_rule_list = [ar for ar in order_simulation_movement.objectValues()[0].objectValues()[0].objectValues() - if ar.getSpecialiseValue().getPortalType() == 'Invoicing Rule'] + if ar.getSpecialiseValue().getPortalType() == 'Invoice Simulation Rule'] self.assertEquals(len(temp_invoicing_rule_list), 1) invoicing_rule_list.extend(temp_invoicing_rule_list) sequence.edit(invoicing_rule_list=invoicing_rule_list) @@ -358,7 +358,7 @@ class TestInvoiceMixin(TestPackingListMixin, invoice_transaction_rule_list.extend([applied_rule for applied_rule in simulation_movement.objectValues() if applied_rule \ .getSpecialiseValue().getPortalType() - == 'Invoice Transaction Rule']) + == 'Invoice Transaction Simulation Rule']) resource_list = sequence.get('resource_list') self.assertEquals(simulation_movement.getPortalType(), 'Simulation Movement') @@ -1263,28 +1263,28 @@ class TestInvoiceMixin(TestPackingListMixin, applied_rule_set.add(sm.getRootAppliedRule()) rule_dict = { - 'Order Rule': { + 'Order Root Simulation Rule': { 'movement_type_list': ['Sale Order Line', 'Sale Order Cell'], - 'next_rule_list': ['Delivering Rule', ], + 'next_rule_list': ['Delivery Simulation Rule', ], }, - 'Delivering Rule': { + 'Delivery Simulation Rule': { 'movement_type_list': ['Sale Packing List Line', 'Sale Packing List Cell'], - 'next_rule_list': ['Invoicing Rule', ], + 'next_rule_list': ['Invoice Simulation Rule', ], }, - 'Invoicing Rule': { + 'Invoice Simulation Rule': { 'movement_type_list': invoice.getPortalInvoiceMovementTypeList(), - 'next_rule_list': ['Invoice Transaction Rule', 'Trade Model Rule'], + 'next_rule_list': ['Invoice Transaction Simulation Rule', 'Trade Model Simulation Rule'], }, - 'Trade Model Rule': { - 'next_rule_list': ['Invoice Transaction Rule'], + 'Trade Model Simulation Rule': { + 'next_rule_list': ['Invoice Transaction Simulation Rule'], }, - 'Invoice Rule': { + 'Invoice Simulation Rule': { 'movement_type_list': invoice.getPortalInvoiceMovementTypeList() \ + invoice.getPortalAccountingMovementTypeList(), - 'next_rule_list': ['Invoice Transaction Rule', 'Payment Simulation Rule', - 'Trade Model Rule'], + 'next_rule_list': ['Invoice Transaction Simulation Rule', 'Payment Simulation Rule', + 'Trade Model Simulation Rule'], }, - 'Invoice Transaction Rule': { + 'Invoice Transaction Simulation Rule': { 'parent_movement_type_list': invoice.getPortalInvoiceMovementTypeList(), 'movement_type_list': invoice.getPortalAccountingMovementTypeList(), 'next_rule_list': ['Payment Simulation Rule'], diff --git a/product/ERP5/tests/testInvoiceVAT.py b/product/ERP5/tests/testInvoiceVAT.py index 72a8edf137b56c4ba8b66bb60f5731e0383d0423..c065d9ac9591d8212f866915994b9587c119d8e7 100644 --- a/product/ERP5/tests/testInvoiceVAT.py +++ b/product/ERP5/tests/testInvoiceVAT.py @@ -207,7 +207,7 @@ class TestInvoiceVAT(ERP5TypeTestCase): income account 1 """ - itr = self.getPortal().portal_rules.default_invoice_transaction_rule + itr = self.getPortal().portal_rules.default_invoice_transaction_simulation_rule itr.manage_delObjects([x for x in itr.objectIds()]) pred = itr.newContent(portal_type='Predicate') pred.setStringIndex('product')