Commit 39c6348a authored by Romain Courteaud's avatar Romain Courteaud

Bug fix: rename the method getStartDate (which is already the name of a

accessor) to calculateStartDate.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5449 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a60c71d7
...@@ -61,7 +61,6 @@ class SupplyLink(Path, XMLObject): ...@@ -61,7 +61,6 @@ class SupplyLink(Path, XMLObject):
, PropertySheet.XMLObject , PropertySheet.XMLObject
, PropertySheet.CategoryCore , PropertySheet.CategoryCore
, PropertySheet.Amount , PropertySheet.Amount
, PropertySheet.Task
, PropertySheet.Arrow , PropertySheet.Arrow
, PropertySheet.Movement , PropertySheet.Movement
, PropertySheet.Price , PropertySheet.Price
...@@ -165,8 +164,8 @@ class SupplyLink(Path, XMLObject): ...@@ -165,8 +164,8 @@ class SupplyLink(Path, XMLObject):
return result return result
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getStartDate') 'calculateStartDate')
def getStartDate(self, stop_date): def calculateStartDate(self, stop_date):
""" """
Calculate the start date, depending on the delay. Calculate the start date, depending on the delay.
""" """
......
...@@ -165,7 +165,7 @@ class TransformationRule(Rule): ...@@ -165,7 +165,7 @@ class TransformationRule(Rule):
"destination": production, "destination": production,
"destination_section": production_section, "destination_section": production_section,
"deliverable": 1, "deliverable": 1,
'start_date': current_supply_link.getStartDate(stop_date), 'start_date': current_supply_link.calculateStartDate(stop_date),
'stop_date': stop_date, 'stop_date': stop_date,
'causality_value': current_supply_link, 'causality_value': current_supply_link,
} }
...@@ -233,7 +233,7 @@ class TransformationRule(Rule): ...@@ -233,7 +233,7 @@ class TransformationRule(Rule):
id_count += 1 id_count += 1
stop_date = parent_movement.getStartDate() stop_date = parent_movement.getStartDate()
consumed_movement_dict[consumed_mvt_id] = { 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, 'stop_date': stop_date,
"resource": parent_movement.getResource(), "resource": parent_movement.getResource(),
# XXX Is the quantity value correct ? # XXX Is the quantity value correct ?
...@@ -291,7 +291,7 @@ class TransformationRule(Rule): ...@@ -291,7 +291,7 @@ class TransformationRule(Rule):
if resource_price is not None: if resource_price is not None:
price = amount.getQuantity() * resource_price price = amount.getQuantity() * resource_price
consumed_movement_dict[consumed_mvt_id] = { 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, 'stop_date': stop_date,
"resource": amount.getResource(), "resource": amount.getResource(),
"variation_category_list":\ "variation_category_list":\
......
...@@ -229,7 +229,7 @@ class TransformationSourcingRule(Rule): ...@@ -229,7 +229,7 @@ class TransformationSourcingRule(Rule):
'quantity': parent_movement.getQuantity(), 'quantity': parent_movement.getQuantity(),
'price': parent_movement.getPrice(), 'price': parent_movement.getPrice(),
'quantity_unit': parent_movement.getQuantityUnit(), '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, 'stop_date': stop_date,
'deliverable': 1, 'deliverable': 1,
# Save the value of the current supply link # Save the value of the current supply link
......
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