diff --git a/product/ERP5/Document/SupplyLink.py b/product/ERP5/Document/SupplyLink.py index 4f1391b872ab7c2699b3f310fb9e9f78f1a2bc83..c6ee6e0411405ea3234fe94c843afcf6113bd1aa 100755 --- a/product/ERP5/Document/SupplyLink.py +++ b/product/ERP5/Document/SupplyLink.py @@ -61,7 +61,6 @@ class SupplyLink(Path, XMLObject): , PropertySheet.XMLObject , PropertySheet.CategoryCore , PropertySheet.Amount - , PropertySheet.Task , PropertySheet.Arrow , PropertySheet.Movement , PropertySheet.Price @@ -165,8 +164,8 @@ class SupplyLink(Path, XMLObject): return result security.declareProtected(Permissions.AccessContentsInformation, - 'getStartDate') - def getStartDate(self, stop_date): + 'calculateStartDate') + def calculateStartDate(self, stop_date): """ Calculate the start date, depending on the delay. """ diff --git a/product/ERP5/Document/TransformationRule.py b/product/ERP5/Document/TransformationRule.py index aed911d5d79b5c47a486789d4548948468fd12d6..83f1262698e69ec3a5cd79935346eae64f8616c8 100755 --- a/product/ERP5/Document/TransformationRule.py +++ b/product/ERP5/Document/TransformationRule.py @@ -165,7 +165,7 @@ class TransformationRule(Rule): "destination": production, "destination_section": production_section, "deliverable": 1, - 'start_date': current_supply_link.getStartDate(stop_date), + 'start_date': current_supply_link.calculateStartDate(stop_date), 'stop_date': stop_date, 'causality_value': current_supply_link, } @@ -233,7 +233,7 @@ class TransformationRule(Rule): id_count += 1 stop_date = parent_movement.getStartDate() consumed_movement_dict[consumed_mvt_id] = { - 'start_date': current_supply_link.getStartDate(stop_date), + 'start_date': current_supply_link.calculateStartDate(stop_date), 'stop_date': stop_date, "resource": parent_movement.getResource(), # XXX Is the quantity value correct ? @@ -291,7 +291,7 @@ class TransformationRule(Rule): 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), + 'start_date': current_supply_link.calculateStartDate(stop_date), 'stop_date': stop_date, "resource": amount.getResource(), "variation_category_list":\ diff --git a/product/ERP5/Document/TransformationSourcingRule.py b/product/ERP5/Document/TransformationSourcingRule.py index 97ca1a62e88807b5aa7982063375a01f4b50ee43..7c77d8963a9fe51d6874ec71b8d7dab1913dfbfb 100755 --- a/product/ERP5/Document/TransformationSourcingRule.py +++ b/product/ERP5/Document/TransformationSourcingRule.py @@ -229,7 +229,7 @@ class TransformationSourcingRule(Rule): 'quantity': parent_movement.getQuantity(), 'price': parent_movement.getPrice(), 'quantity_unit': parent_movement.getQuantityUnit(), - 'start_date': previous_supply_link.getStartDate(stop_date), + 'start_date': previous_supply_link.calculateStartDate(stop_date), 'stop_date': stop_date, 'deliverable': 1, # Save the value of the current supply link