diff --git a/product/ERP5/Document/TransformationRule.py b/product/ERP5/Document/TransformationRule.py index deff206b3706a08a7c18400e94c762b8fe6e8e92..11adc9a0f66aeddb4bdfef5c6f30735608eba794 100755 --- a/product/ERP5/Document/TransformationRule.py +++ b/product/ERP5/Document/TransformationRule.py @@ -284,6 +284,10 @@ class TransformationRule(Rule): for amount in amount_list: consumed_mvt_id = "%s_%s" % ("cr", amount.getId()) stop_date = parent_movement.getStartDate() + resource_price = amount.getResourcePrice() + price = None + if resource_price is not None: + price = amount.getQuantity() * resource_price consumed_movement_dict[consumed_mvt_id] = { 'start_date': current_supply_link.getStartDate(stop_date), 'stop_date': stop_date, @@ -293,6 +297,7 @@ class TransformationRule(Rule): "variation_property_dict": \ amount.getVariationPropertyDict(), "quantity": amount.getQuantity() * parent_movement.getQuantity(), + "price": price, "quantity_unit": amount.getQuantityUnit(), "destination_list": (), "destination_section_list": (),