Commit e17b06bf authored by Jérome Perrin's avatar Jérome Perrin

don't test the rule, it's an heavy computation, and rather useless


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20613 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fbb51462
...@@ -105,13 +105,3 @@ class TaxRule(DeliveryRule): ...@@ -105,13 +105,3 @@ class TaxRule(DeliveryRule):
# Pass to base class # Pass to base class
Rule.expand(self, applied_rule, force=force, **kw) Rule.expand(self, applied_rule, force=force, **kw)
def test(self, context, *args, **kw):
"""Test if this rule can be applied.
We return false immediatly if the rule won't create any simulation
movement, to prevent creating an empty applied rule.
"""
if not (context.DeliveryMovement_getCorrespondingTaxLineList()):
return False
return DeliveryRule.test(self, context, *args, **kw)
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