Commit b43b9a60 authored by Vincent Pelletier's avatar Vincent Pelletier

Use creation date to generate the reference. This makes sure it is generated...

Use creation date to generate the reference. This makes sure it is generated even if stop (or start) date is not available on the document. This also solve the potential issue of discrepancy between the source data (start or stop date) and the outcome (reference), since creation date is never editable.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14738 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b4315f1c
...@@ -77,7 +77,7 @@ N_ = context.Base_translateString\n ...@@ -77,7 +77,7 @@ N_ = context.Base_translateString\n
\n \n
# if it\'s not defined, try to generate it\n # if it\'s not defined, try to generate it\n
if reference in (None, \'\') or not str(reference).startswith(application_id):\n if reference in (None, \'\') or not str(reference).startswith(application_id):\n
date = context.getStopDate()\n date = context.getCreationDate()\n
if date in (None, \'\'):\n if date in (None, \'\'):\n
message = N_("No date defined")\n message = N_("No date defined")\n
return message\n return message\n
......
266 269
\ 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