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