diff --git a/product/ERP5/Document/Predicate.py b/product/ERP5/Document/Predicate.py index fef2fc8970958662d28b4e7e3d7c320d9cbe8373..a57633735ba09bd0e48b65241c5792c06db11270 100644 --- a/product/ERP5/Document/Predicate.py +++ b/product/ERP5/Document/Predicate.py @@ -558,3 +558,36 @@ class Predicate(XMLObject, Folder): TO BE IMPLEMENTED using portal_catalog(**kw) """ pass + + security.declareProtected(Permissions.AccessContentsInformation, + 'getMembershipCriterionCategoryList') + def getMembershipCriterionCategoryList(self, filter=None, **kw): + """ + If filter is specified, return category only or document only + in membership_criterion_category values. + """ + all_list = self._baseGetMembershipCriterionCategoryList() + if filter in ('category', 'document'): + portal_categories = self.getPortalObject().portal_categories + result_dict = {'category':[], 'document':[]} + for x in all_list: + try: + if portal_categories.restrictedTraverse(x).getPortalType() == \ + 'Category': + result_dict['category'].append(x) + else: + result_dict['document'].append(x) + except KeyError: + result_dict['document'].append(x) + return result_dict[filter] + else: + return all_list + + security.declareProtected(Permissions.ModifyPortalContent, + 'setMembershipCriterionDocumentList' ) + def setMembershipCriterionDocumentList(self, document_list): + """ + Appends to membership_criterion_category values. + """ + return self.setMembershipCriterionCategoryList( + (self.getMembershipCriterionCategoryList() + document_list)) diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.xml index 3f1d67b8164375a60c5fcd10cf1f8c873321d528..532a42b38bd4bcf59e5d31b6b5ae175846cb6326 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_getMembershipCriterionCategoryList.xml @@ -68,10 +68,10 @@ for item in mixed_list:\n base_category = ctool[item]\n item_list = base_category.getCategoryChildCompactLogicalPathItemList(base=1)[:]\n if item_list == [[\'\', \'\']]:\n - for fallback_category in base_category.getFallbackBaseCategoryList():\n - fallback_category = ctool.restrictedTraverse(fallback_category, None)\n + for fallback_category_id in base_category.getFallbackBaseCategoryList():\n + fallback_category = ctool.restrictedTraverse(fallback_category_id, None)\n if fallback_category is not None and fallback_category.objectIds():\n - item_list.extend([(\'%s/%s\' % (item, x[0]), \'%s/%s\' % (item, x[1])) \\\n + item_list.extend([(\'%s/%s\' % (fallback_category_id, x[0]), \'%s/%s\' % (item, x[1])) \\\n for x in fallback_category.getCategoryChildCompactLogicalPathItemList(base=1) if x[0]])\n break\n \n @@ -126,8 +126,9 @@ return category_list\n <string>_getitem_</string> <string>base_category</string> <string>item_list</string> - <string>fallback_category</string> + <string>fallback_category_id</string> <string>None</string> + <string>fallback_category</string> <string>append</string> <string>$append0</string> <string>x</string> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_hashCategoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_hashCategoryList.xml new file mode 100644 index 0000000000000000000000000000000000000000..970d5a263640c476280df39ab8d12e4662f336b9 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_hashCategoryList.xml @@ -0,0 +1,175 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>"""\n + This script is used in parallel list fields in Predicate_view\n +"""\n +# Initialise result\n +sub_field_list = []\n +\n +# use MultiListField\n +default_sub_field_property_dict.update({\'field_type\':\'MultiListField\'})\n +\n +z = 0\n +category_list = context.getMembershipCriterionBaseCategoryList()\n +category_list += [i for i in context.getMultimembershipCriterionBaseCategoryList() \\\n + if i not in category_list]\n +\n +for category in category_list:\n + new_dict = default_sub_field_property_dict.copy()\n + new_dict[\'value\'] = [x for x in value_list if x.startswith(\'%s/\' % category)]\n + if z == 0:\n + new_dict[\'title\'] = \'%s (%s)\' % (default_sub_field_property_dict[\'title\'], category)\n + else:\n + new_dict[\'title\'] = \'(%s)\' % category\n + new_dict[\'item_list\'] = [[\'\', \'\']] + [x for x in item_list if x[1].startswith(\'%s/\' % category)]\n + new_dict[\'key\'] = str(z)\n + if len(new_dict[\'item_list\']) == 1:\n + continue\n + z += 1\n + sub_field_list.append(new_dict)\n +\n +request = context.REQUEST\n +\n +return sub_field_list\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>item_list, value_list, default_sub_field_property_dict={}, is_right_display=0</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>4</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>item_list</string> + <string>value_list</string> + <string>default_sub_field_property_dict</string> + <string>is_right_display</string> + <string>sub_field_list</string> + <string>_getattr_</string> + <string>z</string> + <string>context</string> + <string>category_list</string> + <string>_inplacevar_</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>i</string> + <string>category</string> + <string>new_dict</string> + <string>x</string> + <string>_write_</string> + <string>_getitem_</string> + <string>str</string> + <string>len</string> + <string>request</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <dictionary/> + <int>0</int> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Predicate_hashCategoryList</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_validateMembershipCriterionDocument.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_validateMembershipCriterionDocument.xml new file mode 100644 index 0000000000000000000000000000000000000000..dd3ca4f1e7849399a5a542b3358bd26e5ab1d76a --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_validateMembershipCriterionDocument.xml @@ -0,0 +1,145 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>category_list = context.getMembershipCriterionBaseCategoryList()\n +category_list += [i for i in context.getMultimembershipCriterionBaseCategoryList() \\\n + if i not in category_list]\n +portal_categories = context.getPortalObject().portal_categories\n +\n +for item in item_list:\n + base_category, relative_url = item.split(\'/\', 1)\n + if base_category not in category_list or \\\n + portal_categories.restrictedTraverse(relative_url, None) is None:\n + return 0\n +return 1\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>item_list, request</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>2</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>item_list</string> + <string>request</string> + <string>_getattr_</string> + <string>context</string> + <string>category_list</string> + <string>_inplacevar_</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>i</string> + <string>portal_categories</string> + <string>item</string> + <string>base_category</string> + <string>relative_url</string> + <string>None</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Predicate_validateMembershipCriterionDocument</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view.xml index d53755f49150c5688373ab16f15ccdc691933c8f..a55c43e5f1c7f1f25f9fb97892c5e62dfb2d7d0f 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view.xml @@ -91,6 +91,7 @@ <value> <list> <string>my_membership_criterion_category_list</string> + <string>my_membership_criterion_document_list</string> </list> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_category_list.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_category_list.xml index 07a607125ce9e371ac32635fc97d4aa365896be7..6fcb64556ead08c719edfbe436d925258d26b900 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_category_list.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_category_list.xml @@ -3,7 +3,7 @@ <record id="1" aka="AAAAAAAAAAE="> <pickle> <tuple> - <global name="MultiListField" module="Products.Formulator.StandardFields"/> + <global name="ParallelListField" module="Products.ERP5Form.ParallelListField"/> <tuple/> </tuple> </pickle> @@ -72,6 +72,14 @@ <key> <string>extra_item</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hash_script_id</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <string></string> </value> @@ -117,7 +125,9 @@ </item> <item> <key> <string>default</string> </key> - <value> <string></string> </value> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> </item> <item> <key> <string>description</string> </key> @@ -143,6 +153,14 @@ <key> <string>extra_item</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>first_item</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hash_script_id</string> </key> + <value> <string></string> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <string></string> </value> @@ -150,7 +168,7 @@ <item> <key> <string>items</string> </key> <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> </value> </item> <item> @@ -218,6 +236,14 @@ <key> <string>extra_item</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>first_item</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>hash_script_id</string> </key> + <value> <string>Predicate_hashCategoryList</string> </value> + </item> <item> <key> <string>hidden</string> </key> <value> <int>0</int> </value> @@ -234,11 +260,11 @@ </item> <item> <key> <string>size</string> </key> - <value> <int>10</int> </value> + <value> <int>5</int> </value> </item> <item> <key> <string>title</string> </key> - <value> <string>Membership Values</string> </value> + <value> <string>Membership Criterion Categories</string> </value> </item> <item> <key> <string>unicode</string> </key> @@ -259,6 +285,22 @@ </pickle> </record> <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python:here.getMembershipCriterionCategoryList(filter=\'category\')</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> <pickle> <tuple> <global name="TALESMethod" module="Products.Formulator.TALESField"/> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_document_list.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_document_list.xml new file mode 100644 index 0000000000000000000000000000000000000000..c32fba3717c36a11478ee96da900b15b0aaa922e --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Predicate_view/my_membership_criterion_document_list.xml @@ -0,0 +1,337 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="LinesField" module="Products.Formulator.StandardFields"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>my_membership_criterion_document_list</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>You specify an invalid base category or a non-existing document.</string> </value> + </item> + <item> + <key> <string>line_too_long</string> </key> + <value> <string>A line was too long.</string> </value> + </item> + <item> + <key> <string>required_not_found</string> </key> + <value> <string>Input is required but no input given.</string> </value> + </item> + <item> + <key> <string>too_long</string> </key> + <value> <string>You entered too many characters.</string> </value> + </item> + <item> + <key> <string>too_many_lines</string> </key> + <value> <string>You entered too many lines.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>height</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_length</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>view_separator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>height</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_length</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>view_separator</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>alternate_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>css_class</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>default</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>editable</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>enabled</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>external_validator</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>extra</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>height</string> </key> + <value> <int>5</int> </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>max_length</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_linelength</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>max_lines</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>required</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Membership Criterion Documents</string> </value> + </item> + <item> + <key> <string>unicode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>view_separator</string> </key> + <value> <string encoding="cdata"><![CDATA[ + +<br /> + +]]></string> </value> + </item> + <item> + <key> <string>whitespace_preserve</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>width</string> </key> + <value> <int>40</int> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python:here.getMembershipCriterionCategoryList(filter=\'document\')</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="Method" module="Products.Formulator.MethodField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>method_name</string> </key> + <value> <string>Predicate_validateMembershipCriterionDocument</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 825e329dcc0411feae1ccc1843d29422c7bd24f3..59be0e4979c5f92d0ff57609287556d95e7c71dd 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -1169 \ No newline at end of file +1170 \ No newline at end of file diff --git a/product/ERP5/tests/testPredicate.py b/product/ERP5/tests/testPredicate.py index 6f9889a1fda1fcdeee0ca025b553731467e1157d..0e984dba022ff902cf2ad9172bdfeeaa0125d227 100644 --- a/product/ERP5/tests/testPredicate.py +++ b/product/ERP5/tests/testPredicate.py @@ -413,7 +413,7 @@ class TestPredicates(TestPredicateMixIn): # note that the id of the actual base category is displayed in the first # item too, for making it clear in the UI that it's the content of a # category used for another base category. - self.failUnless(('source_region/europe/western_europe', + self.failUnless(('region/europe/western_europe', 'source_region/region/europe/western_europe') in [tuple(x) for x in pred.Predicate_getMembershipCriterionCategoryList()], pred.Predicate_getMembershipCriterionCategoryList(),)