Commit 115677d6 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use getMappedProperty to obtain corrected quantities.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37275 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4e1cdcf4
...@@ -66,7 +66,7 @@ class QuantityDivergenceTester(PropertyDivergenceTester): ...@@ -66,7 +66,7 @@ class QuantityDivergenceTester(PropertyDivergenceTester):
delivery = simulation_movement.getDeliveryValue() delivery = simulation_movement.getDeliveryValue()
d_quantity = delivery.getQuantity() d_quantity = delivery.getQuantity()
quantity = simulation_movement.getCorrectedQuantity() quantity = simulation_movement.getMappedProperty('corrected_quantity')
extra_parameters = dict() extra_parameters = dict()
if abs(quantity - d_quantity) < 1: if abs(quantity - d_quantity) < 1:
...@@ -112,7 +112,7 @@ class QuantityDivergenceTester(PropertyDivergenceTester): ...@@ -112,7 +112,7 @@ class QuantityDivergenceTester(PropertyDivergenceTester):
# A delivery quantity of 0 is an exceptional case that we cannot really # A delivery quantity of 0 is an exceptional case that we cannot really
# handle with the current approach of delivery ratio. # handle with the current approach of delivery ratio.
d_quantity = delivery.getQuantity() d_quantity = delivery.getQuantity()
quantity = sum([m.getCorrectedQuantity() for m in quantity = sum([m.getMappedProperty('corrected_quantity') for m in
delivery.getDeliveryRelatedValueList( delivery.getDeliveryRelatedValueList(
portal_type='Simulation Movement')]) portal_type='Simulation Movement')])
......
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