Commit 41eb5fdd authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

it is better to specify matching property list in rule document, instead of rule class.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32455 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 84723ac1
......@@ -426,10 +426,7 @@ class Rule(Predicate, XMLObject):
return (add_list, modify_dict, delete_list)
def _getCompensatedMovementList(self, applied_rule,
matching_property_list=(
'resource',
'variation_category_list',
'variation_property_dict',), **kw):
matching_property_list=None, **kw):
"""
Compute the difference between prevision and existing movements
......@@ -439,8 +436,7 @@ class Rule(Predicate, XMLObject):
using MovementGroups
"""
if self._isBPM():
return self._getCompensatedMovementListBPM(applied_rule,
matching_property_list=matching_property_list, **kw)
return self._getCompensatedMovementListBPM(applied_rule, **kw)
add_list = [] # list of movements to be added
modify_dict = {} # dict of movements to be modified
delete_list = [] # list of movements to be deleted
......@@ -453,6 +449,13 @@ class Rule(Predicate, XMLObject):
+ deletable_movement_list
non_matched_list = movement_list[:] # list of remaining movements
if matching_property_list is None:
matching_property_list = self.getMatchingPropertyList()
if len(matching_property_list) == 0:
matching_property_list = ('resource',
'variation_category_list',
'variation_property_dict',)
for prevision in prevision_list:
p_matched_list = []
for movement in non_matched_list:
......
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