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): ...@@ -42,9 +42,6 @@ class DummyMovement(Movement):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative interfaces
__implements__ = ( interfaces.IVariated, )
# Declarative properties # Declarative properties
property_sheets = ( PropertySheet.Base property_sheets = ( PropertySheet.Base
, PropertySheet.SimpleItem , PropertySheet.SimpleItem
...@@ -89,9 +86,17 @@ class DummyMovement(Movement): ...@@ -89,9 +86,17 @@ class DummyMovement(Movement):
raise ValueError raise ValueError
def getDeliveryValue(self): 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 return self
def hasCellContent(self): def hasCellContent(self):
return False return False
...@@ -9,40 +9,10 @@ ...@@ -9,40 +9,10 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <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> <item>
<key> <string>acquire_local_roles</string> </key> <key> <string>acquire_local_roles</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </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> <item>
<key> <string>content_icon</string> </key> <key> <string>content_icon</string> </key>
<value> <string>document_icon.gif</string> </value> <value> <string>document_icon.gif</string> </value>
...@@ -66,13 +36,9 @@ ...@@ -66,13 +36,9 @@
<item> <item>
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<tuple/> <tuple>
</value> <string>delivery</string>
</item> </tuple>
<item>
<key> <string>hidden_content_type_list</string> </key>
<value>
<tuple/>
</value> </value>
</item> </item>
<item> <item>
...@@ -81,16 +47,14 @@ ...@@ -81,16 +47,14 @@
</item> </item>
<item> <item>
<key> <string>init_script</string> </key> <key> <string>init_script</string> </key>
<value> <string></string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>permission</string> </key> <key> <string>permission</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>property_sheet_list</string> </key>
<value> <value>
<tuple/> <none/>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -9,40 +9,10 @@ ...@@ -9,40 +9,10 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <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> <item>
<key> <string>acquire_local_roles</string> </key> <key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value> <value> <int>1</int> </value>
</item> </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> <item>
<key> <string>content_icon</string> </key> <key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value> <value> <string>folder_icon.gif</string> </value>
...@@ -72,12 +42,6 @@ ...@@ -72,12 +42,6 @@
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>hidden_content_type_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>Dummy Movement</string> </value> <value> <string>Dummy Movement</string> </value>
...@@ -90,12 +54,6 @@ ...@@ -90,12 +54,6 @@
<key> <string>permission</string> </key> <key> <string>permission</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>property_sheet_list</string> </key>
<value>
<tuple/>
</value>
</item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
......
10 14
\ No newline at end of file \ 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