Commit 7bd250cc authored by Fabien Morin's avatar Fabien Morin

remove causality property. All can be done with reference.

Removing causality link from movement should make catalog a bit faster.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27690 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0f3c4c54
...@@ -232,14 +232,13 @@ class TradeCondition(Path, Transformation, XMLMatrix): ...@@ -232,14 +232,13 @@ class TradeCondition(Path, Transformation, XMLMatrix):
movement_list=movement_list, movement_list=movement_list,
current_aggregated_amount_list=result, current_aggregated_amount_list=result,
**kw) **kw)
if model_line.getCreateLine():
# remove movement that should not be created
result.extend(model_line_result) result.extend(model_line_result)
if len(result) != len(movement_list): if len(result) != len(movement_list):
# something was added # something was added
need_to_run = 1 need_to_run = 1
movement_list = result movement_list = result
# remove movement that should not be created
result = [movement for movement in result if movement.getCausalityValue().getCreateLine()]
return result return result
security.declareProtected( Permissions.AccessContentsInformation, 'getCell') security.declareProtected( Permissions.AccessContentsInformation, 'getCell')
......
...@@ -179,7 +179,6 @@ class TradeModelLine(Predicate, XMLMatrix, Amount): ...@@ -179,7 +179,6 @@ class TradeModelLine(Predicate, XMLMatrix, Amount):
} }
common_params = { common_params = {
'causality': self.getRelativeUrl(),
'resource': self.getResource(), 'resource': self.getResource(),
'reference': self.getReference(), 'reference': self.getReference(),
'base_application_list': base_application_list, 'base_application_list': base_application_list,
......
...@@ -98,9 +98,6 @@ class TradeModelRule(TransformationRule): ...@@ -98,9 +98,6 @@ class TradeModelRule(TransformationRule):
else: else:
movement_dict['start_date'] = movement.getStartDate() movement_dict['start_date'] = movement.getStartDate()
movement_dict['stop_date'] = movement.getStopDate() movement_dict['stop_date'] = movement.getStopDate()
movement_dict['causality_value'] = business_path
return movement_dict return movement_dict
def _getStaticPropertyDict(self, context_movement): def _getStaticPropertyDict(self, context_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