Commit ab600d4b authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

follow the change in r33163.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33208 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4733aeec
...@@ -196,7 +196,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -196,7 +196,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
Create some predicates in the Invoice Transaction Rule Create some predicates in the Invoice Transaction Rule
""" """
invoice_transaction_rule = getattr(self.getRuleTool(), invoice_transaction_rule = getattr(self.getRuleTool(),
'default_invoice_transaction_rule') 'default_invoice_transaction_simulation_rule')
if invoice_transaction_rule.getValidationState() == 'validated': if invoice_transaction_rule.getValidationState() == 'validated':
invoice_transaction_rule.invalidate() invoice_transaction_rule.invalidate()
transaction.commit() transaction.commit()
...@@ -1134,7 +1134,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1134,7 +1134,7 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
# ...but only invoice_transaction_rule is interesting # ...but only invoice_transaction_rule is interesting
applied_rule = [applied_rule for applied_rule in applied_rule_list if applied_rule = [applied_rule for applied_rule in applied_rule_list if
applied_rule.getSpecialiseValue().getPortalType() == applied_rule.getSpecialiseValue().getPortalType() ==
'Invoice Transaction Rule'][0] 'Invoice Transaction Simulation Rule'][0]
self.assertEquals( applied_rule.getPortalType(), self.assertEquals( applied_rule.getPortalType(),
self.applied_rule_portal_type) self.applied_rule_portal_type)
self.assertEquals( applied_rule.getSpecialise(), self.assertEquals( applied_rule.getSpecialise(),
......
...@@ -188,7 +188,7 @@ class TestConversionInSimulation(AccountingTestCase,ERP5TypeTestCase): ...@@ -188,7 +188,7 @@ class TestConversionInSimulation(AccountingTestCase,ERP5TypeTestCase):
account.setAccountType(account_type) account.setAccountType(account_type)
portal.portal_workflow.doActionFor(account, 'validate_action') 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': if invoice_rule.getValidationState() == 'validated':
invoice_rule.invalidate() invoice_rule.invalidate()
invoice_rule.deleteContent(list(invoice_rule.objectIds())) invoice_rule.deleteContent(list(invoice_rule.objectIds()))
......
...@@ -223,7 +223,7 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -223,7 +223,7 @@ class TestInvoiceMixin(TestPackingListMixin,
trade_phase='default/payment', trade_phase='default/payment',
source='account_module/bank', source='account_module/bank',
destination='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') rule.setTradePhase('default/payment')
def login(self): def login(self):
...@@ -255,7 +255,7 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -255,7 +255,7 @@ class TestInvoiceMixin(TestPackingListMixin,
account.setAccountType(account_type) account.setAccountType(account_type)
portal.portal_workflow.doActionFor(account, 'validate_action') 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': if invoice_rule.getValidationState() == 'validated':
invoice_rule.invalidate() invoice_rule.invalidate()
invoice_rule.deleteContent(list(invoice_rule.objectIds())) invoice_rule.deleteContent(list(invoice_rule.objectIds()))
...@@ -341,7 +341,7 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -341,7 +341,7 @@ class TestInvoiceMixin(TestPackingListMixin,
for order_rule in order_rule_list : for order_rule in order_rule_list :
for order_simulation_movement in order_rule.objectValues() : for order_simulation_movement in order_rule.objectValues() :
temp_invoicing_rule_list = [ar for ar in order_simulation_movement.objectValues()[0].objectValues()[0].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) self.assertEquals(len(temp_invoicing_rule_list), 1)
invoicing_rule_list.extend(temp_invoicing_rule_list) invoicing_rule_list.extend(temp_invoicing_rule_list)
sequence.edit(invoicing_rule_list=invoicing_rule_list) sequence.edit(invoicing_rule_list=invoicing_rule_list)
...@@ -358,7 +358,7 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -358,7 +358,7 @@ class TestInvoiceMixin(TestPackingListMixin,
invoice_transaction_rule_list.extend([applied_rule for applied_rule invoice_transaction_rule_list.extend([applied_rule for applied_rule
in simulation_movement.objectValues() if applied_rule \ in simulation_movement.objectValues() if applied_rule \
.getSpecialiseValue().getPortalType() .getSpecialiseValue().getPortalType()
== 'Invoice Transaction Rule']) == 'Invoice Transaction Simulation Rule'])
resource_list = sequence.get('resource_list') resource_list = sequence.get('resource_list')
self.assertEquals(simulation_movement.getPortalType(), self.assertEquals(simulation_movement.getPortalType(),
'Simulation Movement') 'Simulation Movement')
...@@ -1263,28 +1263,28 @@ class TestInvoiceMixin(TestPackingListMixin, ...@@ -1263,28 +1263,28 @@ class TestInvoiceMixin(TestPackingListMixin,
applied_rule_set.add(sm.getRootAppliedRule()) applied_rule_set.add(sm.getRootAppliedRule())
rule_dict = { rule_dict = {
'Order Rule': { 'Order Root Simulation Rule': {
'movement_type_list': ['Sale Order Line', 'Sale Order Cell'], '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'], '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(), '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': { 'Trade Model Simulation Rule': {
'next_rule_list': ['Invoice Transaction Rule'], 'next_rule_list': ['Invoice Transaction Simulation Rule'],
}, },
'Invoice Rule': { 'Invoice Simulation Rule': {
'movement_type_list': invoice.getPortalInvoiceMovementTypeList() \ 'movement_type_list': invoice.getPortalInvoiceMovementTypeList() \
+ invoice.getPortalAccountingMovementTypeList(), + invoice.getPortalAccountingMovementTypeList(),
'next_rule_list': ['Invoice Transaction Rule', 'Payment Simulation Rule', 'next_rule_list': ['Invoice Transaction Simulation Rule', 'Payment Simulation Rule',
'Trade Model Rule'], 'Trade Model Simulation Rule'],
}, },
'Invoice Transaction Rule': { 'Invoice Transaction Simulation Rule': {
'parent_movement_type_list': invoice.getPortalInvoiceMovementTypeList(), 'parent_movement_type_list': invoice.getPortalInvoiceMovementTypeList(),
'movement_type_list': invoice.getPortalAccountingMovementTypeList(), 'movement_type_list': invoice.getPortalAccountingMovementTypeList(),
'next_rule_list': ['Payment Simulation Rule'], 'next_rule_list': ['Payment Simulation Rule'],
......
...@@ -207,7 +207,7 @@ class TestInvoiceVAT(ERP5TypeTestCase): ...@@ -207,7 +207,7 @@ class TestInvoiceVAT(ERP5TypeTestCase):
income account 1 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()]) itr.manage_delObjects([x for x in itr.objectIds()])
pred = itr.newContent(portal_type='Predicate') pred = itr.newContent(portal_type='Predicate')
pred.setStringIndex('product') pred.setStringIndex('product')
......
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