Commit fb0e33cf authored by Vincent Pelletier's avatar Vincent Pelletier

Use start date to guess the year for which the reference will be computed,...

Use start date to guess the year for which the reference will be computed, this allows testing reference generation for non-current year (start_date is verified to be the same as now in regular use).
Remove an unneeded date cast in catalog parameters.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25003 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 15d1e56a
......@@ -120,10 +120,10 @@ if listbox is not None:\n
\n
\n
# Set a reference\n
first_day_of_year = DateTime(now.year(), 1, 1)\n
first_day_of_year = DateTime(start_date.year(), 1, 1)\n
counter_date_list = [x.getObject() for x in context.portal_catalog(\n
portal_type=\'Counter Date\',site_uid=site_uid,\n
start_date={\'type\': \'date\', \'query\': first_day_of_year, \'range\': \'nlt\'},\n
start_date={\'query\': first_day_of_year, \'range\': \'nlt\'},\n
sort_on=[(\'start_date\',\'descending\')],limit=1,\n
simulation_state=(\'open\',\'closed\'))]\n
previous_reference = None\n
......
476
\ No newline at end of file
478
\ 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