Commit 29f4194b authored by Łukasz Nowak's avatar Łukasz Nowak

Add exactly one month.

parent fc9dfc05
......@@ -57,7 +57,7 @@ if params is None:\n
kw = {}\n
\n
from DateTime import DateTime\n
from Products.ERP5Type.DateUtils import getClosestDate, addToDate\n
from Products.ERP5Type.DateUtils import getNumberOfDayInMonth\n
\n
last_active_process = context.getLastActiveProcess()\n
if last_active_process is not None and params.get(\'full\', False):\n
......@@ -67,8 +67,8 @@ if last_active_process is not None and params.get(\'full\', False):\n
# register active process in order to have "windows" of last indexed objects\n
context.newActiveProcess()\n
\n
\n
params.setdefault(\'stop_date\', addToDate(getClosestDate(target_date=DateTime(), precision=\'month\', before=1), month=1))\n
now = DateTime()\n
params.setdefault(\'stop_date\', now + getNumberOfDayInMonth(now))\n
\n
context.getPortalObject().portal_catalog.searchAndActivate(\n
method_id=\'Person_storeOpenOrderJournal\',\n
......
632
\ No newline at end of file
633
\ 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