Commit c6e6f23e authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

introduce force_update property that will enable to update existing document...

introduce force_update property that will enable to update existing document even if there are differences.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35430 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7d039c81
......@@ -47,6 +47,8 @@ class CategoryMovementGroup(PropertyMovementGroup):
return property_dict
def test(self, document, property_dict, property_list=None, **kw):
if self.isForceUpdate():
return True, property_dict
if property_list not in (None, []):
target_property_list = [x for x in self.getTestedPropertyList() \
if x in property_list]
......
......@@ -46,6 +46,8 @@ class PropertyMovementGroup(MovementGroup):
return property_dict
def test(self, document, property_dict, property_list=None, **kw):
if self.isForceUpdate():
return True, property_dict
if property_list not in (None, []):
target_property_list = [x for x in self.getTestedPropertyList() \
if x in property_list]
......
......@@ -32,5 +32,9 @@ class MovementGroup:
'type' : 'lines',
'default' : (),
'mode' : 'w' },
{ 'id' : 'force_update',
'description' : 'Update always if enabled',
'type' : 'boolean',
'mode' : 'w' },
)
_categories = ('collect_order_group', 'divergence_scope',)
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