Commit 75e87940 authored by Jérome Perrin's avatar Jérome Perrin

- Use GAP reference or ID (it's bad to use ID)

- when using 'account_reference' as account number method, fallback to GAP
reference or ID of no reference defined on the account.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24856 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 30e6d07b
......@@ -62,7 +62,9 @@ preference_tool = context.getPortalObject().portal_preferences\n
number_method = preference_tool.getPreferredAccountNumberMethod()\n
\n
if number_method == \'account_reference\':\n
return context.getReference(\'\')\n
reference = context.getReference()\n
if reference:\n
return reference\n
\n
# elif number_method == \'gap_id\':\n
else:\n
......@@ -72,7 +74,7 @@ else:\n
\n
for gap in context.getGapValueList() : \n
if current_gap in gap.getPath() : \n
return gap.getId()\n
return gap.getReference() or gap.getId()\n
return \'\'\n
</string> </value>
</item>
......@@ -114,6 +116,7 @@ else:\n
<string>context</string>
<string>preference_tool</string>
<string>number_method</string>
<string>reference</string>
<string>current_gap</string>
<string>_getiter_</string>
<string>gap</string>
......
826
\ No newline at end of file
827
\ 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