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

Arrow categories types

See merge request !1665
parents 93a0f39f 1e4be3b4
Pipeline #23546 failed with stage
...@@ -52,7 +52,9 @@ ...@@ -52,7 +52,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -53,7 +53,9 @@ ...@@ -53,7 +53,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -27,6 +27,14 @@ ...@@ -27,6 +27,14 @@
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple>
<string>source_arrow</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <value>
......
...@@ -28,6 +28,14 @@ ...@@ -28,6 +28,14 @@
</tuple> </tuple>
</value> </value>
</item> </item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple>
<string>source_arrow</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <value>
......
...@@ -114,22 +114,7 @@ class TradeModelPath(Path): ...@@ -114,22 +114,7 @@ class TradeModelPath(Path):
Returns all categories which are used to define the source Returns all categories which are used to define the source
of this Arrow of this Arrow
""" """
# Naive implementation - we must use category groups instead - XXX return self.getPortalObject().getPortalSourceArrowBaseCategoryList()
return ('source',
'source_account',
'source_administration',
#'source_advice',
'source_carrier',
'source_decision',
'source_function',
'source_funding',
'source_payment',
'source_project',
'source_referral',
'source_section',
'source_trade',
#'source_transport'
)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getDestinationArrowBaseCategoryList') 'getDestinationArrowBaseCategoryList')
...@@ -138,22 +123,7 @@ class TradeModelPath(Path): ...@@ -138,22 +123,7 @@ class TradeModelPath(Path):
Returns all categories which are used to define the destination Returns all categories which are used to define the destination
of this Arrow of this Arrow
""" """
# Naive implementation - we must use category groups instead - XXX-JPS review this later return self.getPortalObject().getPortalDestinationArrowBaseCategoryList()
return ('destination',
'destination_account',
'destination_administration',
#'destination_advice',
#'destination_carrier',
'destination_decision',
'destination_function',
'destination_funding',
'destination_payment',
'destination_project',
'destination_referral',
'destination_section',
'destination_trade',
#'destination_transport'
)
# XXX-JPS UNkonwn ? # XXX-JPS UNkonwn ?
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
......
...@@ -938,6 +938,22 @@ class ERP5Site(ResponseHeaderGenerator, FolderMixIn, PortalObjectBase, CacheCook ...@@ -938,6 +938,22 @@ class ERP5Site(ResponseHeaderGenerator, FolderMixIn, PortalObjectBase, CacheCook
""" """
return self._getPortalGroupedCategoryList('sub_variation') return self._getPortalGroupedCategoryList('sub_variation')
security.declareProtected(Permissions.AccessContentsInformation,
'getPortalSourceArrowBaseCategoryList')
def getPortalSourceArrowBaseCategoryList(self):
"""
Return source arrow base categories.
"""
return self._getPortalGroupedCategoryList('source_arrow')
security.declareProtected(Permissions.AccessContentsInformation,
'getPortalDestinationArrowBaseCategoryList')
def getPortalDestinationArrowBaseCategoryList(self):
"""
Return destination arrow base categories.
"""
return self._getPortalGroupedCategoryList('destination_arrow')
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getPortalVariationTypeList') 'getPortalVariationTypeList')
def getPortalVariationTypeList(self): def getPortalVariationTypeList(self):
......
...@@ -68,7 +68,9 @@ ...@@ -68,7 +68,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -52,7 +52,9 @@ ...@@ -52,7 +52,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -70,7 +70,9 @@ ...@@ -70,7 +70,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -118,7 +118,9 @@ ...@@ -118,7 +118,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -119,7 +119,9 @@ ...@@ -119,7 +119,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -71,7 +71,9 @@ ...@@ -71,7 +71,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -68,7 +68,9 @@ ...@@ -68,7 +68,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -71,7 +71,9 @@ ...@@ -71,7 +71,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>destination_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -115,7 +115,9 @@ ...@@ -115,7 +115,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -53,7 +53,9 @@ ...@@ -53,7 +53,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -70,7 +70,9 @@ ...@@ -70,7 +70,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -118,7 +118,9 @@ ...@@ -118,7 +118,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -119,7 +119,9 @@ ...@@ -119,7 +119,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -118,7 +118,9 @@ ...@@ -118,7 +118,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -68,7 +68,9 @@ ...@@ -68,7 +68,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -72,7 +72,9 @@ ...@@ -72,7 +72,9 @@
<item> <item>
<key> <string>category_type</string> </key> <key> <string>category_type</string> </key>
<value> <value>
<tuple/> <tuple>
<string>source_arrow</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<key> <string>delegated_list</string> </key> <key> <string>delegated_list</string> </key>
<value> <value>
<list> <list>
<string>title</string>
<string>items</string> <string>items</string>
<string>size</string> <string>size</string>
<string>title</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -113,6 +113,14 @@ ...@@ -113,6 +113,14 @@
<string>sub_variation</string> <string>sub_variation</string>
<string>sub_variation</string> <string>sub_variation</string>
</tuple> </tuple>
<tuple>
<string>Source Arrow</string>
<string>source_arrow</string>
</tuple>
<tuple>
<string>Destination Arrow</string>
<string>destination_arrow</string>
</tuple>
</list> </list>
</value> </value>
</item> </item>
......
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