Commit 94f43ee3 authored by Łukasz Nowak's avatar Łukasz Nowak

Drop build_before support.

It is *excepted* to have all subscription Sale Packing Lists to be built in
one shot.
parent 5299c2e2
......@@ -320,25 +320,11 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.ERP5Type.DateUtils import getClosestDate\n
from DateTime import DateTime\n
\n
# support build_before\n
build_before = kw.pop(\'build_before\', None)\n
if build_before is None:\n
build_before = getClosestDate(target_date=DateTime(), precision=\'month\', before=0)\n
kw[\'movement.start_date\'] = \'< %s\' % build_before\n
\n
if src__==0:\n
<value> <string>if src__==0:\n
return context.portal_catalog(**kw)\n
\n
else:\n
return context.portal_catalog(src__=1, **kw)\n
]]></string> </value>
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
......
339
\ No newline at end of file
340
\ No newline at end of file
......@@ -51,19 +51,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
\n
build_before = None\n
if params is not None:\n
build_before = params.get(\'build_before\', None)\n
kw = {\'build_before\':build_before}\n
else:\n
kw = {}\n
\n
for business_process in [\n
portal.business_process_module.vifib_sale_business_process,\n
portal.business_process_module.vifib_purchase_business_process]:\n
for link in business_process.contentValues(portal_type="Business Link"):\n
link.build(**kw)\n
link.build()\n
</string> </value>
</item>
<item>
......
486
\ No newline at end of file
487
\ 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