Commit 5a8af852 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

support both legacy Invoice Rule and new Invoice Root Simulation Rule.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32981 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9ec5674a
...@@ -61,6 +61,7 @@ if parent.getPortalType() != \'Applied Rule\':\n ...@@ -61,6 +61,7 @@ if parent.getPortalType() != \'Applied Rule\':\n
\n \n
parent_rule = parent.getSpecialiseValue()\n parent_rule = parent.getSpecialiseValue()\n
if parent_rule.getPortalType() not in (\'Invoice Rule\',\n if parent_rule.getPortalType() not in (\'Invoice Rule\',\n
\'Invoice Root Simulation Rule\',\n
\'Invoicing Rule\',\n \'Invoicing Rule\',\n
\'Trade Model Rule\',\n \'Trade Model Rule\',\n
\'Tax Rule\'):\n \'Tax Rule\'):\n
......
...@@ -61,6 +61,7 @@ if parent.getPortalType() != \'Applied Rule\':\n ...@@ -61,6 +61,7 @@ if parent.getPortalType() != \'Applied Rule\':\n
\n \n
parent_rule = parent.getSpecialiseValue()\n parent_rule = parent.getSpecialiseValue()\n
if parent_rule.getPortalType() not in (\'Invoice Rule\',\n if parent_rule.getPortalType() not in (\'Invoice Rule\',\n
\'Invoice Root Simulation Rule\',\n
\'Invoicing Rule\'):\n \'Invoicing Rule\'):\n
return False\n return False\n
\n \n
......
336 337
\ No newline at end of file \ No newline at end of file
...@@ -1077,8 +1077,8 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1077,8 +1077,8 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
applied_rule = applied_rule_list[0] applied_rule = applied_rule_list[0]
self.assertEqual( applied_rule.getPortalType(), self.assertEqual( applied_rule.getPortalType(),
self.applied_rule_portal_type) self.applied_rule_portal_type)
self.assertEqual( applied_rule.getSpecialise(), self.assertEqual( applied_rule.getSpecialiseReference(),
'portal_rules/default_invoice_rule') 'default_invoice_rule')
self.assertEqual( applied_rule.getCausality(), self.assertEqual( applied_rule.getCausality(),
invoice.getRelativeUrl()) invoice.getRelativeUrl())
...@@ -1455,8 +1455,8 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase): ...@@ -1455,8 +1455,8 @@ class TestAccountingRules(TestAccountingRulesMixin, ERP5TypeTestCase):
applied_rule = applied_rule_list[0] applied_rule = applied_rule_list[0]
self.assertEquals( self.assertEquals(
'portal_rules/default_invoice_rule', 'default_invoice_rule',
applied_rule.getSpecialise() applied_rule.getSpecialiseReference()
) )
self.assertEquals( self.assertEquals(
......
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