Commit 636633d6 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

treat as the property is None if parent delivery is missing.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35318 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b0bb5e92
......@@ -68,8 +68,7 @@ class ParentDeliveryPropertyMovementGroup(PropertyMovementGroup):
def _getParentDelivery(self, movement):
# try to find local payment conditions from the upper level delivery
rule = movement.getParentValue()
movement = rule.getParentValue()
delivery = movement.getDeliveryValue()
delivery = None
while delivery is None and not(rule.isRootAppliedRule()):
rule = movement.getParentValue()
movement = rule.getParentValue()
......@@ -77,6 +76,8 @@ class ParentDeliveryPropertyMovementGroup(PropertyMovementGroup):
return delivery
def _getProperty(self, document, property_id):
if document is None:
return None
# XXX here we don't use Base.getProperty() but try to call accessor
# directly to make acquired property
# (eg. payment_condition_efficiency) working.
......
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