diff --git a/bt5/erp5_archive/SkinTemplateItem/portal_skins/erp5_archive/Archive_test.xml b/bt5/erp5_archive/SkinTemplateItem/portal_skins/erp5_archive/Archive_test.xml index fd717b5457b38615c58352f37e22912c3fe1288d..f78b370e6cd2ef5dd1025df672e323ea6b4ddc40 100644 --- a/bt5/erp5_archive/SkinTemplateItem/portal_skins/erp5_archive/Archive_test.xml +++ b/bt5/erp5_archive/SkinTemplateItem/portal_skins/erp5_archive/Archive_test.xml @@ -56,7 +56,6 @@ <value> <string encoding="cdata"><![CDATA[ non_reflected_portal_type = []\n -item_type_list = context.getPortalItemTypeList()\n item_container_type_list = []\n \n log = 0\n @@ -67,7 +66,7 @@ if log:\n \n # items and their container go in all catalog\n ptype = context.getPortalType()\n -if ptype in item_type_list:\n +if context.isItemType():\n return True\n if ptype in item_container_type_list:\n return True\n @@ -82,6 +81,18 @@ if getattr(context, \'getExplanationValue\', None) is not None:\n in item_container_type_list:\n return True\n \n +# Except those we don\'t want\n +if ptype not in non_reflected_portal_type:\n + # Object not delivery or movement goes in all archive\n + if not(context.providesIMovement() or context.isDelivery()):\n + if log:\n + context.log(" - document is not Movement/Delivery", "")\n + return True\n +else:\n + result = result and True\n + if log:\n + context.log(" - result after reflected", "%s" %result)\n +\n # Check Date\n if getattr(context, \'getStopDate\', None) is not None:\n max_stop_date = predicate.getStopDateRangeMax()\n @@ -95,16 +106,6 @@ if getattr(context, \'getStopDate\', None) is not None:\n if log:\n context.log("result after date", result)\n \n -# Except those we don\'t want\n -if ptype not in non_reflected_portal_type:\n - # Object not delivery or movement goes in all archive\n - result = result or (not(getattr(context, \'isMovement\', 0) or getattr(context, \'isDelivery\', 0)))\n - if log:\n - context.log(" - result after isMovement/Delivery", "%s" %result)\n -else:\n - result = result and True\n - if log:\n - context.log(" - result after reflected", "%s" %result)\n \n # XXX must manage specific case like Applied Rule, where do we want them to go ?\n return result\n @@ -148,13 +149,12 @@ return result\n <tuple> <string>predicate</string> <string>non_reflected_portal_type</string> - <string>_getattr_</string> - <string>context</string> - <string>item_type_list</string> <string>item_container_type_list</string> <string>log</string> <string>True</string> <string>result</string> + <string>_getattr_</string> + <string>context</string> <string>ptype</string> <string>getattr</string> <string>None</string> diff --git a/bt5/erp5_archive/bt/revision b/bt5/erp5_archive/bt/revision index eb13855b7d70b04d6f04877df2cafe05de51a051..e3f1e9b791c84fce95fe992dc246e9e2286c84ed 100644 --- a/bt5/erp5_archive/bt/revision +++ b/bt5/erp5_archive/bt/revision @@ -1 +1 @@ -79 \ No newline at end of file +80 \ No newline at end of file