Commit b99723ca authored by Jérome Perrin's avatar Jérome Perrin

* make dummy delivery member of delivery group

* make getExplanationValue and getDeliveryValue work as expected
* update bt export format


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36013 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent af7b14b1
......@@ -42,9 +42,6 @@ class DummyMovement(Movement):
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
__implements__ = ( interfaces.IVariated, )
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.SimpleItem
......@@ -89,9 +86,17 @@ class DummyMovement(Movement):
raise ValueError
def getDeliveryValue(self):
"""A dummy movement doesn't have a delivery relation, so return self as delivery.
"""In the tests, dummy movements are not always stored in a delivery, here
we try to support both cases.
"""
parent = self.getParentValue()
if hasattr(parent, 'getDeliveryValue'):
# we are in a delivery, make getDeliveryValue and therefore
# getExplanation value work like on real movements.
return parent.getDeliveryValue()
# return self, to have minimum support of getDeliveryValue
return self
def hasCellContent(self):
return False
......@@ -9,40 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_actions</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_aliases</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_roles</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>allowed_content_types</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>base_category_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>document_icon.gif</string> </value>
......@@ -66,13 +36,9 @@
<item>
<key> <string>group_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>hidden_content_type_list</string> </key>
<value>
<tuple/>
<tuple>
<string>delivery</string>
</tuple>
</value>
</item>
<item>
......@@ -81,16 +47,14 @@
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string></string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
<tuple/>
<none/>
</value>
</item>
<item>
......
......@@ -9,40 +9,10 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_actions</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_aliases</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_roles</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>allowed_content_types</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>base_category_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
......@@ -72,12 +42,6 @@
</tuple>
</value>
</item>
<item>
<key> <string>hidden_content_type_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Dummy Movement</string> </value>
......@@ -90,12 +54,6 @@
<key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
......
10
\ No newline at end of file
14
\ No newline at end of file
None
\ No newline at end of file
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