Commit 786c2947 authored by Jérome Perrin's avatar Jérome Perrin

Check delivery is not None before calling a getProperty on it



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7180 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2825d6b3
...@@ -141,6 +141,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -141,6 +141,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
while resource is None and \ while resource is None and \
simulation_movement != portal_simulation : simulation_movement != portal_simulation :
delivery = simulation_movement.getDeliveryValue() delivery = simulation_movement.getDeliveryValue()
if delivery is not None:
resource = delivery.getProperty('price_currency', None) resource = delivery.getProperty('price_currency', None)
if simulation_movement.getParentValue().getParentValue() \ if simulation_movement.getParentValue().getParentValue() \
== portal_simulation : == portal_simulation :
......
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