Commit e92c4266 authored by Łukasz Nowak's avatar Łukasz Nowak

- added support for Delivery Cell-like portal types

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22441 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7eefdcf6
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
"""Initialise int_index and reference of object\n """Initialise int_index and reference of object\n
It will set reference to int_index, as string.\n It will set reference to int_index, as string.\n
In case if container is same type is its children, reference is generated as\n In case if container is same type is its children, or context is cell,\n
<container_reference>.<children_reference>:\n reference is generated as <container_reference>.<children_index>:\n
1\n 1\n
1.1\n 1.1\n
1.2\n 1.2\n
...@@ -85,7 +85,7 @@ portal_type = context.getPortalType()\n ...@@ -85,7 +85,7 @@ portal_type = context.getPortalType()\n
\n \n
index = len(parent.contentValues(filter={"portal_type": portal_type}))\n index = len(parent.contentValues(filter={"portal_type": portal_type}))\n
\n \n
if parent.getPortalType() == portal_type:\n if parent.getPortalType() == portal_type or portal_type.endswith(\'Cell\'):\n
reference = "%s.%s" % (parent.getReference(), index)\n reference = "%s.%s" % (parent.getReference(), index)\n
else:\n else:\n
reference = str(index)\n reference = str(index)\n
......
368 369
\ No newline at end of file \ 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