Commit d123bf92 authored by Nicolas Delaby's avatar Nicolas Delaby

Call generateId from portal_ids itself to compute reference.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41796 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cca933ad
......@@ -56,6 +56,7 @@ through web sites.\n
Reference will be probably generated with dedicated tool\n
in near future\n
"""\n
portal = context.getPortalObject()\n
type_definition = context.getTypeInfo()\n
\n
short_portal_type = type_definition.getShortTitle()\n
......@@ -64,7 +65,7 @@ if not short_portal_type:\n
\n
id_group = (\'reference\', short_portal_type)\n
default = 1\n
new_id = context.generateNewId(id_group=id_group, default=default)\n
new_id = portal.portal_ids.generateNewId(id_group=id_group, default=default)\n
reference = \'%s-%s\' % (short_portal_type, new_id)\n
\n
# Set preferred text format and reference\n
......
514
\ No newline at end of file
515
\ 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