Commit 7451c633 authored by Aurel's avatar Aurel

sometime, only site is defined on document, so also retrieve these operations...

sometime, only site is defined on document, so also retrieve these operations when listing remaining one
add new simulation state to be taken into account for remaining operations

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16535 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 63c5706d
......@@ -71,15 +71,19 @@ if simulation_state is None:\n
simulation_state = [\'confirmed\']\n
kwd_source = {\'default_source_uid\' : site_uid,\'simulation_state\' : simulation_state}\n
kwd_destination = {\'default_destination_uid\' : site_uid,\'simulation_state\' : simulation_state}\n
kwd_site = {\'default_site_uid\' : site_uid,\'simulation_state\' : simulation_state}\n
if date is not None:\n
kwd_source[\'delivery.start_date\']=date\n
kwd_destination[\'delivery.start_date\']=date\n
kwd_site[\'delivery.start_date\']=date\n
if portal_type is not None:\n
kwd_source[\'portal_type\'] = portal_type\n
kwd_destination[\'portal_type\'] = portal_type\n
kwd_site[\'portal_type\'] = portal_type\n
# as destination\n
operation_list = list(context.portal_catalog(**kwd_source)) + \\\n
list(context.portal_catalog(**kwd_destination))\n
list(context.portal_catalog(**kwd_destination)) + \\\n
list(context.portal_catalog(**kwd_site))\n
operation_list_object = [x.getObject() for x in operation_list]\n
\n
return operation_list_object\n
......@@ -138,6 +142,7 @@ return operation_list_object\n
<string>None</string>
<string>kwd_source</string>
<string>kwd_destination</string>
<string>kwd_site</string>
<string>_write_</string>
<string>list</string>
<string>_apply_</string>
......
......@@ -72,7 +72,7 @@ site_url = site.getRelativeUrl()\n
operation_list = []\n
exception_portal_type_list = [\'Paper Money Deposit\']\n
if site_uid is not None:\n
not_closed_state_list = (\'ordered\',\'planned\',\'confirmed\',\'started\',\'stopped\')\n
not_closed_state_list = (\'ordered\',\'planned\',\'confirmed\',\'started\',\'stopped\', \'ready\', \'deposited\', \'received\')\n
portal_type_list = [x for x in context.getPortalDeliveryTypeList()\n
if x not in exception_portal_type_list]\n
document_list = context.Baobab_getRemainingOperationList(\n
......
357
\ No newline at end of file
358
\ 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