Commit 9828ce35 authored by Lucas Carvalho's avatar Lucas Carvalho Committed by Julien Muchembled

New implementation of shadir.org and shacache.org

parent 9a2730fe
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_list</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DataSetModule_viewDataSetList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>1.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>View</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/DataSet_view</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Nexedi SA and Contributors. All Rights Reserved.
# Fabien Morin <fabien@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Resource import Resource
class DataSet(Resource):
"""
"""
meta_type = 'ERP5 Data Set'
portal_type = 'Data Set'
add_permission = Permissions.AddPortalContent
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
# Declarative properties
property_sheets = ( PropertySheet.TextDocument,
PropertySheet.Document,
PropertySheet.Version,
PropertySheet.Url,
PropertySheet.Data,
PropertySheet.Task,
PropertySheet.TranslatableDescription,
PropertySheet.DataSet,
)
# content_type property is also a method from PortalFolder, so we need a
# valid type by default.
content_type = ''
<module>
<category_list>
<category>business_application/data_publica</category>
</category_list>
<id>data_set_module</id>
<permission_list>
<permission type='tuple'>
<name>Access Transient Objects</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access contents information</name>
<role>Anonymous</role>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Access session data</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal content</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Add portal folders</name>
<role>Assignor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Change local roles</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Copy or Move</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Delete objects</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>List folder contents</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Modify portal content</name>
<role>Assignor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View History</name>
<role>Assignee</role>
<role>Assignor</role>
<role>Associate</role>
<role>Auditor</role>
<role>Author</role>
<role>Manager</role>
</permission>
</permission_list>
<portal_type>Data Set Module</portal_type>
<title>Data Sets</title>
</module>
\ No newline at end of file
<allowed_content_type_list>
<portal_type id="Data Set">
<item>Purchase Supply Line</item>
<item>Sale Supply Line</item>
</portal_type>
<portal_type id="Data Set Module">
<item>Data Set</item>
</portal_type>
</allowed_content_type_list>
\ No newline at end of file
<base_category_list>
<portal_type id="Data Set Module">
<item>business_application</item>
</portal_type>
</base_category_list>
\ No newline at end of file
<hidden_content_type_list>
<portal_type id="Data Set">
<item>Purchase Supply Line</item>
<item>Sale Supply Line</item>
</portal_type>
</hidden_content_type_list>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value> <string>folder_icon.gif</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>\n
A Folder is a subclass of Base but not of XMLObject.\n
Folders are not considered as documents and are therefore\n
not synchronisable.\n
\n
ERP5 folders are implemented as CMFBTreeFolder objects\n
and can store up to a million documents on a standard\n
computer.\n
ERP5 folders will eventually use in the near future the\n
AdaptableStorage implementation in order to reach performances\n
of 10 or 100 millions of documents in a single folder.\n
\n
ERP5 folders include an automatic id generation feature\n
which allows user not to define an id when they create\n
a new document in a folder.\n
\n
ERP5 folders use the ZSQLCatalog to search for objects\n
or display content. This requires a method called\n
*z_search_folder* to be put inside the ZSQLCatalog object\n
of the ERP5 portal.\n
\n
An ERP5 Binder document class will eventually be defined\n
in order to implement a binder of documents which can itself\n
be categorized.\n
</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addFolder</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>module</string>
</tuple>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string>document_icon.gif</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Data Set Module</string> </value>
</item>
<item>
<key> <string>immediate_view</string> </key>
<value> <string>Folder_view</string> </value>
</item>
<item>
<key> <string>meta_type</string> </key>
<value> <string>ERP5 Folder</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Type</string> </value>
</item>
<item>
<key> <string>product</string> </key>
<value> <string>ERP5Type</string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>Folder</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_ui</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Type" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_property_domain_dict</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>short_title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>content_icon</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>ERP5 default document. Supports synchronisation and XML.</string> </value>
</item>
<item>
<key> <string>factory</string> </key>
<value> <string>addDataSet</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<tuple>
<string>product</string>
</tuple>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string>document_icon.gif</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Data Set</string> </value>
</item>
<item>
<key> <string>immediate_view</string> </key>
<value> <string>XMLObject_view</string> </value>
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string>Document_setStartDate</string> </value>
</item>
<item>
<key> <string>meta_type</string> </key>
<value> <string>ERP5 XML Object</string> </value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Type</string> </value>
</item>
<item>
<key> <string>product</string> </key>
<value> <string>ERP5Type</string> </value>
</item>
<item>
<key> <string>searchable_text_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>searchable_text_property_id</string> </key>
<value>
<tuple>
<string>title</string>
<string>description</string>
<string>subject_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>DataSet</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>content_translation</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>description</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>erp5_content</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>short_title</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>domain_name</string> </key>
<value> <string>content_translation</string> </value>
</item>
<item>
<key> <string>property_name</string> </key>
<value> <string>title</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<workflow_chain>
<chain>
<type>Data Set</type>
<workflow>document_publication_workflow, edit_workflow</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataSet</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>5</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>activity_category</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>mime_type_category</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>publication_section_category</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Acquired Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>mode</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>alt_accessor_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/content</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_acquired_property_id</string> </key>
<value>
<tuple>
<string>source_uid</string>
<string>source_title</string>
<string>source_value_list</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_portal_type</string> </key>
<value> <string>python: (\'Purchase Supply Line\',)</string> </value>
</item>
<item>
<key> <string>content_translation_acquired_property_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>purchase_supply_line_property</string> </value>
</item>
<item>
<key> <string>mode</string> </key>
<value> <string>w</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Acquired Property</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value> <string>default_psl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>region_category</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Acquired Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>mode</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>alt_accessor_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/content</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_acquired_property_id</string> </key>
<value>
<tuple>
<string>base_price</string>
<string>id</string>
<string>priced_quantity</string>
<string>price_currency</string>
<string>price_currency_title</string>
<string>source</string>
<string>destination</string>
<string>source_title</string>
<string>destination_title</string>
<string>source_value</string>
<string>destination_value</string>
<string>quantity_step</string>
<string>priced_quantity</string>
<string>start_date</string>
<string>stop_date</string>
<string>start_date_range_max</string>
<string>start_date_range_min</string>
<string>comment</string>
<string>source_reference</string>
<string>destination_reference</string>
<string>p_variation_base_category_list</string>
<string>source_account</string>
<string>min_delay</string>
<string>max_delay</string>
<string>min_flow</string>
<string>max_flow</string>
<string>min_stock</string>
<string>max_stock</string>
<string>aggregate</string>
<string>aggregate_value</string>
<string>aggregate_value_list</string>
<string>aggregate_title</string>
<string>aggregate_uid</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_portal_type</string> </key>
<value> <string>python: (\'Sale Supply Line\',)</string> </value>
</item>
<item>
<key> <string>content_translation_acquired_property_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>sale_supply_line_property</string> </value>
</item>
<item>
<key> <string>mode</string> </key>
<value> <string>w</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Acquired Property</string> </value>
</item>
<item>
<key> <string>storage_id</string> </key>
<value> <string>default_ssl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Property Sheet" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>TranslatableDescription</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Property Sheet</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>mode</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/text</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>description_property</string> </value>
</item>
<item>
<key> <string>mode</string> </key>
<value> <string>w</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
<item>
<key> <string>property_default</string> </key>
<value> <string>python: \'\'</string> </value>
</item>
<item>
<key> <string>translatable</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_data_set</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_doSelect</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataSetModule_viewDataSetList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>DataSetModule_viewDataSetList</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Data Sets</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>columns</string>
<string>css_class</string>
<string>domain_root_list</string>
<string>domain_tree</string>
<string>portal_types</string>
<string>search_columns</string>
<string>selection_name</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>region_title</string>
<string>Region</string>
</tuple>
<tuple>
<string>activity_title</string>
<string>Activity</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Date</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>hidden_label</string> </value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
<list>
<tuple>
<string>update_frequency</string>
<string>Update Frequency</string>
</tuple>
<tuple>
<string>activity</string>
<string>Activity</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>domain_tree</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>Data Set</string>
<string>Data Set</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
<list>
<tuple>
<string>Data Set</string>
<string>Data Set</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>search_columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>region_title</string>
<string>Region</string>
</tuple>
<tuple>
<string>activity_title</string>
<string>Activity</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Date</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>data_set_module_selection</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Data Sets</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5Form" module="Products.ERP5Form.Form"/>
</pickle>
<pickle>
<dictionary>
<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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string>multipart/form-data</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left (Document Reference)</string>
<string>right (Publication Information)</string>
<string>center</string>
<string>bottom (Preview)</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom (Preview)</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_url_string</string>
<string>my_description</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left (Document Reference)</string> </key>
<value>
<list>
<string>my_title</string>
<string>my_reference</string>
<string>my_content_type</string>
<string>my_update_frequency</string>
<string>my_default_purchase_supply_line_source_title</string>
<string>my_default_sale_supply_line_aggregate_title</string>
</list>
</value>
</item>
<item>
<key> <string>right (Publication Information)</string> </key>
<value>
<list>
<string>my_activity_list</string>
<string>my_region_list</string>
<string>my_subject_list</string>
<string>my_translated_validation_state_title</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>DataSet_view</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>DataSet_view</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Data Set</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_activity_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_function_list</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Document_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Activities</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>description</string>
<string>display_width</string>
<string>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_content_type</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>description</string> </key>
<value> <string>Mime type of the file, defined which kind of document it is</string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Format</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="RelationStringField" module="Products.ERP5Form.RelationField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_default_purchase_supply_line_source_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>line_too_long</string> </key>
<value> <string>A line was too long.</string> </value>
</item>
<item>
<key> <string>relation_result_ambiguous</string> </key>
<value> <string>Select appropriate document in the list.</string> </value>
</item>
<item>
<key> <string>relation_result_empty</string> </key>
<value> <string>No such document was found.</string> </value>
</item>
<item>
<key> <string>relation_result_too_long</string> </key>
<value> <string>Too many documents were found.</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>allow_creation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>allow_jump</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>base_category</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>catalog_index</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>container_getter_id</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>jump_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</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>parameter_list</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_setter_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>allow_creation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>allow_jump</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>base_category</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>catalog_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>container_getter_id</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</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>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>jump_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</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>parameter_list</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_setter_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>allow_creation</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>allow_jump</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>base_category</string> </key>
<value> <string>(tales)</string> </value>
</item>
<item>
<key> <string>catalog_index</string> </key>
<value> <string>(tales)</string> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_portal_type</string>
<string>Type</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>container_getter_id</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </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> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<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>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>jump_method</string> </key>
<value> <string>Base_jumpToRelatedDocument</string> </value>
</item>
<item>
<key> <string>list_method</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>parameter_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>Person</string>
<string>Person</string>
</tuple>
<tuple>
<string>Organisation</string>
<string>Organisation</string>
</tuple>
<tuple>
<string>Project</string>
<string>Project</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>relation_form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_setter_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Editor</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_method</string> </key>
<value> <string>Base_validateRelation</string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.Base_getFieldParameterDict()[\'base_category\']</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.Base_getFieldParameterDict()[\'catalog_index\']</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: preferences.getPreference(\'preferred_string_field_width\', 30)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="RelationStringField" module="Products.ERP5Form.RelationField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_default_sale_supply_line_aggregate_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>line_too_long</string> </key>
<value> <string>A line was too long.</string> </value>
</item>
<item>
<key> <string>relation_result_ambiguous</string> </key>
<value> <string>Select appropriate document in the list.</string> </value>
</item>
<item>
<key> <string>relation_result_empty</string> </key>
<value> <string>No such document was found.</string> </value>
</item>
<item>
<key> <string>relation_result_too_long</string> </key>
<value> <string>Too many documents were found.</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>allow_creation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>allow_jump</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>base_category</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>catalog_index</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>container_getter_id</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>jump_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</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>parameter_list</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_setter_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>allow_creation</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>allow_jump</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>base_category</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>catalog_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>container_getter_id</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</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>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>jump_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>list_method</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>parameter_list</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_setter_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_method</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>allow_creation</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>allow_jump</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>base_category</string> </key>
<value> <string>(tales)</string> </value>
</item>
<item>
<key> <string>catalog_index</string> </key>
<value> <string>(tales)</string> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>container_getter_id</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </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> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<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>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>jump_method</string> </key>
<value> <string>Base_jumpToRelatedDocument</string> </value>
</item>
<item>
<key> <string>list_method</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>parameter_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value>
<list>
<tuple>
<string>Software Licence</string>
<string>Software Licence</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>proxy_listbox_ids</string> </key>
<value>
<list>
<tuple>
<string>SoftwareLicenceModule_viewSoftwareLicenceList/listbox</string>
<string>Software Licences</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>relation_form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>relation_setter_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Software Licence</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_method</string> </key>
<value> <string>Base_validateRelation</string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.Base_getFieldParameterDict()[\'base_category\']</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.Base_getFieldParameterDict()[\'catalog_index\']</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: preferences.getPreference(\'preferred_string_field_width\', 30)</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>width</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Document_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>width</string> </key>
<value> <int>55</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_reference</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_reference</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Document_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_region_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_function_list</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Document_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Regions</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_subject_list</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_subject_list</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Document_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Document_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>css_class</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_translated_validation_state_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_translated_validation_state_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Document_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: \'status %s\' % context.getValidationState()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>size</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_update_frequency</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_category</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Frequency Update</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StringField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_url_string</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</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>Too much input was given.</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</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> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</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>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</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> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>55</int> </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> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </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>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>URL</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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 encoding="cdata"><![CDATA[
document = context\n
from DateTime import DateTime\n
current_date = DateTime()\n
if document.getStartDate() is None or document.getStartDate() > current_date:\n
document.setStartDate(current_date)\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Document_setStartDate</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
01-06-2011 Lucas
* Added the reference column on data set module listbox.
* Added the reference field to be consistent with DMS.
24-05-2011 Lucas
* Added business template properties.
24-05-2011 Lucas
* Initial Import.
\ No newline at end of file
Nexedi 2011
\ No newline at end of file
erp5_dms
erp5_pdm
\ No newline at end of file
Provide the generic content to use Data Set portal type.
\ No newline at end of file
Proprietary
\ No newline at end of file
7
\ No newline at end of file
Data Set Module | view
Data Set | view
\ No newline at end of file
DataSet
\ No newline at end of file
data_set_module
\ No newline at end of file
Data Set Module | Data Set
Data Set | Purchase Supply Line
Data Set | Sale Supply Line
\ No newline at end of file
Data Set Module | business_application
\ No newline at end of file
Data Set | Purchase Supply Line
Data Set | Sale Supply Line
\ No newline at end of file
Data Set
Data Set Module
\ No newline at end of file
Data Set | document_publication_workflow
Data Set | edit_workflow
\ No newline at end of file
DataSet
TranslatableDescription
\ No newline at end of file
erp5_data_set
\ No newline at end of file
erp5_data_set
\ No newline at end of file
5.4.7
\ No newline at end of file
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 20011 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import hashlib
def WebSection_getDocumentValue(self, key, portal=None, language=None,\
validation_state=None, **kw):
"""
API SHACACHE
- POST /<key>
+ parameters required:
* data: it is the file content
The key is the file name.
- GET /<key>
The key is the sha512sum.
Return raw content.
Raise HTTP error (404) if key does not exist
"""
if portal is None:
portal = self.getPortalObject()
# Return the document, if the document exists.
if validation_state is None:
validation_state = ('released', 'released_alive', 'published',
'published_alive', 'shared', 'shared_alive',
'public', 'validated')
kw['portal_type'] = portal.getPortalDocumentTypeList()
kw['validation_state'] = validation_state
kw['reference'] = key
document_list = self.getDocumentValueList(limit=1, **kw)
if len(document_list):
return document_list[0]
return None
def WebSection_setObject(self, id, ob, **kw):
"""
Add any change of the file uploaded.
"""
ob.publishAlive()
ob.setContentType('application/octet-stream')
ob.setFilename(id)
sha512sum = hashlib.sha512()
self.REQUEST._file.seek(0)
while True:
d = self.REQUEST._file.read(sha512sum.block_size)
if not d:
break
sha512sum.update(d)
reference = sha512sum.hexdigest()
if reference != id:
raise ValueError('The content does not match with sha512sum provided.')
ob.setReference(reference)
return ob
def WebSection_putFactory(self, name, typ, body):
"""
XXX
"""
portal = self.getPortalObject()
group = ('networkcache',)
new_id = str(portal.portal_ids.generateNewId(id_group=group))
registry = portal.portal_contribution_registry
portal_type = registry.findPortalTypeName(filename=name,
content_type=typ)
if portal_type is None:
return None
# The code bellow is inspired from ERP5Type.Core.Folder.newContent
pt = self._getTypesTool()
myType = pt.getTypeInfo(self)
if myType is not None and not myType.allowType( portal_type ) and \
'portal_contributions' not in self.getPhysicalPath():
raise ValueError('Disallowed subobject type: %s' % portal_type)
container = portal.getDefaultModule(portal_type)
pt.constructContent(type_name=portal_type,
container=container,
id=new_id)
document = container._getOb(new_id)
return document
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>erp5_web_download_theme</skin_folder>
<skin_selection>SHACACHE</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_web_shacache</skin_folder>
<skin_selection>SHACACHE</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_web_shacache_core</skin_folder>
<skin_selection>View,SHACACHE</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_xhtml_style</skin_folder>
<skin_selection>SHACACHE</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>36.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_web_shacache</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>WebSection_setObject</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>ShaCache</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_setObject</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>WebSection_getDocumentValue</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>ShaCache</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_getDocumentValue</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_web_shacache_core</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>WebSection_putFactory</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>ShaCache</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_putFactory</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import hashlib
class ShaCacheMixin(object):
"""
ShaCache - Mixin Class
"""
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ('erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_jquery',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion',
'erp5_web',
'erp5_dms',
'erp5_web_download_theme',
'erp5_web_shacache',)
def afterSetUp(self):
"""
Initialize the ERP5 site.
"""
self.login()
self.portal = self.getPortal()
module = self.portal.web_site_module
shacache = getattr(module, 'shacache', None)
if shacache is None:
shacache = module.newContent(portal_type='Web Site',
id='shacache',
title='SHA Cache Server',
skin_selection_name='SHACACHE')
isTransitionPossible = self.portal.portal_workflow.isTransitionPossible
if isTransitionPossible(shacache, 'publish'):
shacache.publish()
self.stepTic()
self.shacache = shacache
self.data = 'Random Content. %s' % self.portal.Base_generateRandomString()
self.key = hashlib.sha512(self.data).hexdigest()
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import transaction
from StringIO import StringIO
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from ShaCacheMixin import ShaCacheMixin
class TestShaCache(ShaCacheMixin, ERP5TypeTestCase):
"""
ShaCache - HTTP File Cache server
"""
def getTitle(self):
"""
Return the title of the current test set.
"""
return "SHACACHE - HTTP File Cache Server"
def beforeTearDown(self):
"""
Clear everything for next test.
"""
for module in ('document_module',):
folder = self.portal[module]
folder.manage_delObjects(list(folder.objectIds()))
transaction.commit()
self.tic()
def postFile(self, key=None):
"""
Post the file
"""
if key is None:
key = self.key
try:
data_file = StringIO()
data_file.write(self.data)
data_file.seek(0)
self.portal.changeSkin('SHACACHE')
self.shacache.REQUEST.set('method', 'POST')
self.shacache.REQUEST.set('Content-Type', 'application/json')
self.shacache.REQUEST._file = data_file
self.shacache.WebSection_getDocumentValue(key)
self.stepTic()
finally:
data_file.close()
def getFile(self, key=None):
"""
Get the file calling the Python Script.
It simulates the real usage.
"""
if key is None:
key = self.key
self.portal.changeSkin('SHACACHE')
self.shacache.REQUEST.set('method', 'GET')
return self.shacache.WebSection_getDocumentValue(key)
def test_post_file(self):
"""
Check if the posted file has all the properties defined.
"""
self.postFile()
self.assertEquals(1, len(self.portal.document_module))
document = self.portal.document_module.contentValues()[0]
self.assertEquals(self.key, document.getTitle())
self.assertEquals(self.key, document.getReference())
self.assertEquals(self.data, document.getData())
self.assertEquals('application/octet-stream', document.getContentType())
def test_get_file(self):
"""
Check if the file returned is the correct.
"""
self.test_post_file()
self.assertEquals(1, len(self.portal.document_module))
document = self.getFile()
self.assertNotEquals(None, document)
self.assertEquals(self.data, document.getData())
2011-05-25 Lucas
* Depends of erp5_data_set business template.
2011-05-23 Lucas
* Initial import.
\ No newline at end of file
Nexedi 2011
\ No newline at end of file
erp5_web_download_theme
\ No newline at end of file
Proprietary
\ No newline at end of file
rafael
lucas
\ No newline at end of file
35
\ No newline at end of file
ShaCache
\ No newline at end of file
erp5_web_download_theme | SHACACHE
erp5_web_shacache | SHACACHE
erp5_web_shacache_core | SHACACHE
erp5_web_shacache_core | View
erp5_xhtml_style | SHACACHE
\ No newline at end of file
erp5_web_shacache
erp5_web_shacache_core
\ No newline at end of file
testShaCache
ShaCacheMixin
\ No newline at end of file
erp5_web_shacache
\ No newline at end of file
5.4.7
\ No newline at end of file
##############################################################################
#
# Copyright (c) 20011 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import hashlib
import json
import validictory
from Products.ERP5Type.Document import newTempFile
def WebSection_getDocumentValue(self, key, portal=None, language=None,\
validation_state=None, **kw):
"""
API SHADIR
- POST /<key>
+ parameters required:
* file: the name of the file
* urlmd5: mdsum of orginal url
* sha512: the hash (sha512) of the file content
+ parameters not required:
* valid-until: the date which the file must be expired
* architecture: computer architecture
Used to add information on shadir server.
- GET /<key>
Return list of information for a given key
Raise HTTP error (404) if key does not exist
"""
if portal is None:
portal = self.getPortalObject()
data_set = portal.portal_catalog.getResultValue(portal_type='Data Set',
reference=key)
# Return the SIGNATURE file, if the document exists.
if data_set is not None:
document_list = [json.loads(document.getData()) \
for document in data_set.getFollowUpRelatedValueList()]
temp_file = newTempFile(self, '%s.txt' % key)
temp_file.setData(json.dumps(document_list))
temp_file.setContentType('application/json')
return temp_file.getObject()
return None
def WebSection_setObject(self, id, ob, **kw):
"""
Make any change related to the file uploaded.
"""
portal = self.getPortalObject()
data = self.REQUEST.get('BODY')
schema = self.WebSite_getJSONSchema()
structure = json.loads(data)
validictory.validate(structure, schema)
property_dict = structure[0]
file_name = property_dict.get('file', None)
ob.setFilename(file_name)
expiration_date = property_dict.get('expiration_date', None)
if expiration_date is not None:
ob.setExpirationDate(expiration_date)
ob.publishAlive()
ob.setContentType('application/json')
data_set = portal.portal_catalog.getResultValue(portal_type='Data Set',
reference=id)
if data_set is None:
data_set = portal.data_set_module.newContent(portal_type='Data Set',
reference=id)
data_set.publish()
ob.setFollowUp(data_set.getRelativeUrl())
reference = hashlib.sha512(data).hexdigest()
ob.setReference(reference)
return ob
<registered_skin_selection>
<skin_folder_selection>
<skin_folder>erp5_web_download_theme</skin_folder>
<skin_selection>SHADIR</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_web_shacache_core</skin_folder>
<skin_selection>SHADIR</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_web_shadir</skin_folder>
<skin_selection>SHADIR</skin_selection>
</skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_xhtml_style</skin_folder>
<skin_selection>SHADIR</skin_selection>
</skin_folder_selection>
</registered_skin_selection>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>36.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_web_shadir</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>WebSection_setObject</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>ShaDir</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_setObject</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_function</string> </key>
<value> <string>WebSection_getDocumentValue</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>ShaDir</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSection_getDocumentValue</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</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>return {\n
\'type\': \'array\',\n
\'items\': [\n
{\'type\': \'object\',\n
\'properties\':{\n
\'file\':{\n
\'type\': \'string\',\n
\'required\': True,\n
},\n
\'urlmd5\': {\n
\'type\': \'string\',\n
\'required\': True,\n
},\n
\'sha512\': {\n
\'type\': \'string\',\n
\'required\': True,\n
},\n
\'creation_date\': {\n
\'type\': \'string\',\n
\'required\': False,\n
},\n
\'expiration_date\': {\n
\'type\': \'string\',\n
\'required\': False,\n
},\n
\'distribution\': {\n
\'type\': \'string\',\n
\'required\': False,\n
},\n
\'architecture\': {\n
\'type\': \'string\',\n
\'required\': False,\n
},\n
}\n
},\n
{\'type\': \'string\',\n
\'blank\': True},\n
]\n
}\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getJSONSchema</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import hashlib
import json
import platform
from DateTime import DateTime
class ShaDirMixin(object):
"""
ShaDir - Mixin Class
"""
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ('erp5_full_text_myisam_catalog',
'erp5_base',
'erp5_jquery',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion',
'erp5_web',
'erp5_dms',
'erp5_pdm',
'erp5_data_set',
'erp5_web_download_theme',
'erp5_web_shacache',
'erp5_web_shadir',)
def afterSetUp(self):
"""
Initialize the ERP5 site.
"""
self.login()
self.portal = self.getPortal()
self.key = self.portal.Base_generateRandomString()
self.file_name = 'file.txt'
self.urlmd5 = hashlib.md5(self.key).hexdigest()
self.file_content = 'This is the content.'
self.file_sha512sum = hashlib.sha512(self.file_content).hexdigest()
self.distribution = 'pypi'
self.creation_date = DateTime()
self.expiration_date = self.creation_date + 30
libc_version = '%s %s' % (platform.libc_ver()[0], platform.libc_ver()[1])
self.architecture = '%s %s' % (platform.machine(), libc_version)
self.data_list = [{'file': self.file_name,
'urlmd5': self.urlmd5,
'sha512': self.file_sha512sum,
'creation_date': str(self.creation_date),
'expiration_date': str(self.expiration_date),
'distribution': self.distribution,
'architecture': self.architecture},
"User SIGNATURE goes here."]
self.data = json.dumps(self.data_list)
self.sha512sum = hashlib.sha512(self.data).hexdigest()
module = self.portal.web_site_module
shadir = getattr(module, 'shadir', None)
if shadir is None:
shadir = module.newContent(portal_type='Web Site',
id='shadir',
title='SHA Dir Server',
skin_selection_name='SHADIR')
isTransitionPossible = self.portal.portal_workflow.isTransitionPossible
if isTransitionPossible(shadir, 'publish'):
shadir.publish()
self.stepTic()
self.shadir = shadir
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import json
import transaction
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from StringIO import StringIO
from ShaDirMixin import ShaDirMixin
class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
"""
ShaDir - HTTP Information Cache server
"""
def getTitle(self):
"""
Return the title of the current test set.
"""
return "SHADIR - HTTP Information Cache Server"
def postInformation(self, key=None):
"""
Post the information calling the Python Script.
It simulates the real usage.
"""
if key is None:
key = self.key
try:
data_file = StringIO()
data_file.write(self.data)
data_file.seek(0)
self.portal.changeSkin('SHADIR')
self.shadir.REQUEST.set('method', 'POST')
self.shadir.REQUEST.set('Content-Type', 'application/json')
self.shadir.REQUEST._file = data_file
self.shadir.WebSection_getDocumentValue(key)
self.stepTic()
finally:
data_file.close()
def getInformation(self, key=None):
"""
Get the information calling the Python Script.
It simulates the real usage.
"""
if key is None:
key = self.key
self.portal.changeSkin('SHADIR')
self.shadir.REQUEST.set('method', 'GET')
return self.shadir.WebSection_getDocumentValue(key)
def beforeTearDown(self):
"""
Clear everything for next test.
"""
for module in ('data_set_module',
'document_module',):
folder = self.portal[module]
folder.manage_delObjects(list(folder.objectIds()))
transaction.commit()
self.tic()
def test_post_information(self):
"""
Check if posting information is working.
"""
self.postInformation()
# Asserting Data Set
data_set = self.portal.data_set_module.contentValues()[0]
self.assertEquals(self.key, data_set.getReference())
self.assertEquals('Published', data_set.getValidationStateTitle())
# Asserting Document
document = self.portal.document_module.contentValues()[0]
self.assertEquals(self.sha512sum, document.getTitle())
self.assertEquals(self.sha512sum, document.getReference())
self.assertEquals(self.data, document.getData())
self.assertEquals(data_set, document.getFollowUpValue())
self.assertEquals(self.expiration_date, document.getExpirationDate())
self.assertEquals('application/json', document.getContentType())
def test_get_information(self):
"""
check if return the temp document with text content.
"""
self.postInformation()
document = self.getInformation()
self.assertNotEquals(None, document)
data = document.getData()
information_list = json.loads(data)
self.assertEquals(1, len(information_list))
self.assertEquals(json.dumps(information_list[0]), self.data)
def test_post_information_more_than_once(self):
"""
Check if posting information is working.
"""
self.assertEquals(0, len(self.portal.data_set_module))
self.assertEquals(0, len(self.portal.document_module))
for x in xrange(10):
self.postInformation()
self.assertEquals(1, len(self.portal.data_set_module))
data_set = self.portal.data_set_module.contentValues()[0]
self.assertEquals(self.key, data_set.getReference())
self.assertEquals('Published', data_set.getValidationStateTitle())
self.assertEquals(10, len(self.portal.document_module))
def test_get_information_for_single_data_set(self):
"""
check if return the temp document with text content.
"""
self.postInformation()
document = self.getInformation()
self.assertNotEquals(None, document)
data = document.getData()
information_list = json.loads(data)
self.assertEquals(1, len(information_list))
self.assertEquals(json.dumps(information_list[0]), self.data)
def test_get_information_from_different_data_set(self):
"""
POST information to /information and to /information2
It must create two Data Set and two Text documents.
When the user retrieve the content of a given key,
it must return only the Text document related to the key.
This relation is controlled by Data Set object.
"""
self.assertEquals(0, len(self.portal.data_set_module))
self.assertEquals(0, len(self.portal.document_module))
self.postInformation()
self.assertEquals(1, len(self.portal.data_set_module))
self.assertEquals(1, len(self.portal.document_module))
self.postInformation(key='information2')
self.assertEquals(2, len(self.portal.data_set_module))
self.assertEquals(2, len(self.portal.document_module))
document = self.getInformation()
self.assertEquals(1, len(json.loads(document.getData())))
document2 = self.getInformation('information2')
self.assertEquals(1, len(json.loads(document2.getData())))
self.postInformation()
self.assertEquals(2, len(self.portal.data_set_module))
self.assertEquals(3, len(self.portal.document_module))
document3 = self.getInformation()
self.assertEquals(2, len(json.loads(document3.getData())))
2011-05-26 Lucas
* Removed _setSuperSecurityManager, security must be defined.
2011-05-26 Lucas
* Added basic tests for shadir implementation.
2011-05-26 Lucas
* SHADIR must handle POST from any client supporting application/json content type.
For each POST method for an unknown PATH it must create a Data Set (if does not exists), store the DATA in DMS, and set the follow up relation from such document to the Data Set.
2011-05-25 Lucas
* Depends of erp5_data_set business template.
2011-05-24 Lucas
* Initial import.
\ No newline at end of file
Nexedi 2011
\ No newline at end of file
erp5_data_set
erp5_web_download_theme
erp5_web_shacache
\ No newline at end of file
Proprietary
\ No newline at end of file
rafael
lucas
\ No newline at end of file
42
\ No newline at end of file
ShaDir
\ No newline at end of file
erp5_web_download_theme | SHADIR
erp5_web_shacache_core | SHADIR
erp5_web_shadir | SHADIR
erp5_xhtml_style | SHADIR
\ No newline at end of file
erp5_web_shadir
\ No newline at end of file
ShaDirMixin
testShaDir
\ No newline at end of file
erp5_web_shadir
\ No newline at end of file
5.4.7
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='shadir'>
<item>Author</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='shacache'>
<item>Author</item>
</role>
<role id='shadir'>
<item>Author</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='shacache'>
<item>Author</item>
</role>
<role id='zope'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='shacache'>
<item>Author</item>
</role>
<role id='shadir'>
<item>Author</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>shacache</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value> <string>ShaCache</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>SHACACHE</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Category" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>group/shadir</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>shadir</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>short_title</string> </key>
<value> <string>ShaDir</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>SHADIR</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<type_roles>
<role id='Author'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Author role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
<role id='Author'>
<property id='title'>Any From ShaDir Group</property>
<property id='description'>Any user which has a valid assignment where the group is shadir must have Author role.</property>
<multi_property id='category'>group/shadir</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Author'>
<property id='title'>Any From ShaDir Group</property>
<property id='description'>Any user which has a valid assignment where the group is shadir must have Author role.</property>
<multi_property id='category'>group/shadir</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Any From ShaDir Group</property>
<property id='description'>Any user which has a valid assignment where the group is shadir must have Auditor role.</property>
<multi_property id='category'>group/shadir</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Any From Shadir Group</property>
<property id='description'>Any user which has a valid assignment where the group is shadir* must have Auditor role.</property>
<multi_property id='category'>group/shadir</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Author'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Author role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
<role id='Author'>
<property id='title'>Any From ShaDir Group</property>
<property id='description'>Any user which has a valid assignment where the group is shadir must have Author role.</property>
<multi_property id='category'>group/shadir</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Auditor role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Auditor role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Author'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Author role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Auditor role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Auditor role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Auditor role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Auditor role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
</type_roles>
\ No newline at end of file
<type_roles>
<role id='Auditor'>
<property id='title'>Any From ShaCache Group</property>
<property id='description'>Any user which has a valid assignment where the group is shacache must have Auditor role.</property>
<multi_property id='category'>group/shacache</multi_property>
</role>
<role id='Auditor'>
<property id='title'>Any From ShaDir Group</property>
<property id='description'>Any user which has a valid assignment where the group is shadir must have Author role.</property>
<multi_property id='category'>group/shadir</multi_property>
</role>
</type_roles>
\ No newline at end of file
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from AccessControl.SecurityManagement import newSecurityManager
class ShaSecurityMixin(object):
"""
ShaSecurity - Mixin Class
"""
def afterSetUp(self):
"""
Initialize the ERP5 site.
"""
self.lucas_user = 'lucas'
self.createUser(self.lucas_user, self.lucas_user)
self.toto_user = 'toto'
self.createUser(self.toto_user, self.toto_user)
def createUser(self, reference, password):
"""
Create a user with basic information
"""
person = self.portal.portal_catalog.getResultValue(portal_type='Person',
reference=reference)
if person is None:
person = self.portal.person_module.newContent(portal_type='Person')
person.edit(first_name=reference,
reference=reference,
password=password)
self.stepTic()
assignment = person.newContent(portal_type='Assignment')
assignment.edit(start_date='10/10/2000',
stop_date='10/10/2100',
group=self.group)
assignment.open()
self.stepTic()
def changeUser(self, user_id):
"""
Change the current user to user_id
"""
user_folder = self.getPortal().acl_users
user = user_folder.getUserById(user_id).__of__(user_folder)
newSecurityManager(None, user)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import base64
import os
import transaction
import httplib
from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeLiveTestCase import ERP5TypeLiveTestCase
from ShaCacheMixin import ShaCacheMixin
from ShaSecurityMixin import ShaSecurityMixin
class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeLiveTestCase):
"""
ShaCache - HTTP File Cache server
We must simulate the real usage of ShaCache using httplib.
"""
def getTitle(self):
"""
Return the title of the current test set.
"""
return "SHACACHE External - Real Usage Of ShaCache"
def afterSetUp(self):
"""
Initialize the ERP5 site.
"""
self.expected_content_type = 'application/octet-stream'
self.group = 'shacache'
ShaCacheMixin.afterSetUp(self)
ShaSecurityMixin.afterSetUp(self)
# Define POST headers with Authentication
self.content_type = 'application/json'
authentication_string = '%s:%s' % (self.lucas_user, self.lucas_user)
base64string = base64.encodestring(authentication_string).strip()
self.header_dict = {'Authorization': 'Basic %s' % base64string,
'Content-Type': self.content_type}
# HTTP Connection properties
self.host = self.portal.REQUEST.get('SERVER_NAME')
self.port = self.portal.REQUEST.get('SERVER_PORT')
web_site_path = self.portal.data_set_module.web_site_module.shacache.getPath()
self.path = os.path.join(web_site_path, self.key)
def test_external_post(self):
"""
Test the external usage to POST information
"""
now = DateTime()
connection = httplib.HTTPConnection('%s:%s' % (self.host, self.port))
try:
connection.request('PUT', self.path, self.data, self.header_dict)
result = connection.getresponse()
transaction.commit()
self.tic()
data = result.read()
finally:
connection.close()
self.assertEquals('', data)
self.assertEquals(201, result.status)
# Check Document
document = self.portal.portal_catalog.getResultValue(portal_type='File',
reference=self.key,
creation_date=' >= "%s"' % now)
self.assertNotEquals(None, document)
self.assertEquals(self.data, document.getData())
self.assertEquals('File', document.getPortalType())
self.assertEquals('Published Alive', document.getValidationStateTitle())
self.assertEquals(self.expected_content_type, document.getContentType())
def test_external_get(self, annonymous=False):
"""
Test the external usage to retrive the information
"""
self.test_external_post()
header_dict = {}
if not annonymous:
header_dict = self.header_dict
connection = httplib.HTTPConnection('%s:%s' % (self.host, self.port))
try:
connection.request('GET', self.path, headers=header_dict)
result = connection.getresponse()
data = result.read()
finally:
connection.close()
self.assertEquals(self.data, data)
self.assertEquals(200, result.status)
self.assertEquals(self.expected_content_type,
result.getheader("content-type"))
def test_external_get_anonymous(self):
"""
Test the external usage to retrive information
accessing as Anonymous User.
"""
self.test_external_get(annonymous=True)
def test_external_post_anonymous(self):
"""
Anonymous should not be able to POST a file.
"""
connection = httplib.HTTPConnection('%s:%s' % (self.host, self.port))
header_dict = {'Content-Type': self.content_type}
try:
connection.request('PUT', self.path, self.data, header_dict)
result = connection.getresponse()
transaction.commit()
self.tic()
finally:
connection.close()
self.assertEquals(302, result.status)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import transaction
from AccessControl import Unauthorized
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from ShaCacheMixin import ShaCacheMixin
from ShaSecurityMixin import ShaSecurityMixin
class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase):
"""
ShaCache Security Test Case
"""
def getTitle(self):
"""
Return the title of the current test set.
"""
return "SHADIR Security Test Case"
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ShaCacheMixin().getBusinessTemplateList() + \
('erp5_pdm',
'erp5_data_set',
'erp5_web_shadir',
'networkcache_erp5',)
def afterSetUp(self):
"""
Initialize the ERP5 site.
"""
self.group = 'shacache'
ShaCacheMixin.afterSetUp(self)
ShaSecurityMixin.afterSetUp(self)
def beforeTearDown(self):
"""
Clear everything for next test.
"""
for module in ('person_module',
'image_module',
'document_module',):
folder = self.portal[module]
folder.manage_delObjects(list(folder.objectIds()))
transaction.commit()
self.tic()
# Tests
def test_anonymous_can_not_create_document(self):
"""
Annonymous should not be able to create any kind of document
under document_module and image_module.
"""
self.logout()
self.assertTrue(self.portal.portal_membership.isAnonymousUser())
for module in ('image_module', 'document_module',):
module = getattr(self.portal, module)
for portal_type in module.getVisibleAllowedContentTypeList():
def tryToCreateDataSet():
module.newContent(portal_type=portal_type,
reference=self.key)
self.assertRaises(Unauthorized, tryToCreateDataSet)
def test_anonymous_can_not_view_document_module(self):
"""
Anonymous should not be able to view document module.
"""
self.logout()
self.assertTrue(self.portal.portal_membership.isAnonymousUser())
self.assertRaises(Unauthorized, self.portal.document_module.view)
self.assertRaises(Unauthorized, self.portal.document_module)
def test_anonymous_can_not_view_image_module(self):
"""
Anonymous should not be able to view image module.
"""
self.logout()
self.assertTrue(self.portal.portal_membership.isAnonymousUser())
self.assertRaises(Unauthorized, self.portal.image_module.view)
self.assertRaises(Unauthorized, self.portal.image_module)
def test_anonymous_can_not_read_document_list(self):
"""
Anonymous can not read any document object under document_module
and image_module.
"""
for module in ('image_module', 'document_module',):
module = getattr(self.portal, module)
for portal_type in module.getVisibleAllowedContentTypeList():
self.login()
self.assertFalse(self.portal.portal_membership.isAnonymousUser())
document = module.newContent(portal_type=portal_type)
document.publishAlive()
self.stepTic()
self.logout()
self.assertTrue(self.portal.portal_membership.isAnonymousUser())
self.assertRaises(Unauthorized, document.view)
self.assertRaises(Unauthorized, document)
def test_user_can_create_and_view_document_list(self):
"""
User must be able to create and view any document object under
document_module and image_module.
It also must check if document can be published alive.
"""
self.changeUser(self.lucas_user)
for module in ('image_module', 'document_module',):
module = getattr(self.portal, module)
for portal_type in module.getVisibleAllowedContentTypeList():
document = module.newContent(portal_type=portal_type)
document()
document.view()
document.publishAlive()
self.stepTic()
self.assertEquals('Published Alive',
document.getValidationStateTitle())
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Auditor', document)
def test_user_can_not_view_document_module(self):
"""
User must not be able to see document module.
Author can not view the module.
"""
self.changeUser(self.lucas_user)
self.assertRaises(Unauthorized, self.portal.document_module.view)
self.assertRaises(Unauthorized, self.portal.document_module)
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Author',
self.portal.document_module)
def test_user_can_not_view_image_module(self):
"""
User must not be able to see image module.
Author can not view the module.
"""
self.changeUser(self.lucas_user)
self.assertRaises(Unauthorized, self.portal.image_module.view)
self.assertRaises(Unauthorized, self.portal.image_module)
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Author',
self.portal.image_module)
def test_user_can_view_published_alive_document_from_other_users(self):
"""
If the user A creates a document object, and set it as published alive.
The user B must be able to view the object.
"""
for module in ('image_module', 'document_module',):
module = getattr(self.portal, module)
for portal_type in module.getVisibleAllowedContentTypeList():
self.changeUser(self.toto_user)
document = module.newContent(portal_type=portal_type)
document.publishAlive()
self.stepTic()
self.changeUser(self.lucas_user)
document()
document.view()
# Contribution Tool
def test_user_create_document_using_contribution_tool(self):
"""
User must be able to create a document using contribution.
"""
self.changeUser(self.lucas_user)
contribution_tool = self.portal.portal_contributions
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Author',
contribution_tool)
document = self.portal.portal_contributions.newContent(
filename='test.txt',
data='test content',
reference='test-reference')
document()
document.view()
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Auditor', document)
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import base64
import json
import os
import transaction
import httplib
from DateTime import DateTime
from Products.ERP5Type.tests.ERP5TypeLiveTestCase import ERP5TypeLiveTestCase
from ShaDirMixin import ShaDirMixin
from ShaSecurityMixin import ShaSecurityMixin
class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeLiveTestCase):
"""
ShaDir - HTTP Information Cache server
We must simulate the real usage of ShaDir using httplib.
"""
def getTitle(self):
"""
Return the title of the current test set.
"""
return "SHADIR External - Real Usage Of ShaDir"
def afterSetUp(self):
"""
Initialize the ERP5 site.
"""
self.group = 'shadir'
ShaDirMixin.afterSetUp(self)
ShaSecurityMixin.afterSetUp(self)
# Define POST headers with Authentication
self.content_type = 'application/json'
authentication_string = '%s:%s' % (self.lucas_user, self.lucas_user)
base64string = base64.encodestring(authentication_string).strip()
self.header_dict = {'Authorization': 'Basic %s' % base64string,
'Content-Type': self.content_type}
# HTTP Connection properties
self.host = self.portal.REQUEST.get('SERVER_NAME')
self.port = self.portal.REQUEST.get('SERVER_PORT')
web_site_path = self.portal.web_site_module.shadir.getPath()
self.path = os.path.join(web_site_path, self.key)
def test_external_post(self):
"""
Test the external usage to POST information
"""
now = DateTime()
connection = httplib.HTTPConnection('%s:%s' % (self.host, self.port))
try:
connection.request('PUT', self.path, self.data, self.header_dict)
result = connection.getresponse()
transaction.commit()
self.tic()
data = result.read()
finally:
connection.close()
self.assertEquals('', data)
self.assertEquals(201, result.status)
# Check Data Set
data_set = self.portal.portal_catalog.getResultValue(
portal_type='Data Set',
reference=self.key)
self.assertNotEquals(None, data_set)
self.assertEquals('Published', data_set.getValidationStateTitle())
# Check Document
document = self.portal.portal_catalog.getResultValue(portal_type='File',
reference=self.sha512sum,
creation_date=' >= "%s"' % now)
self.assertNotEquals(None, document)
self.assertEquals(self.data, document.getData())
self.assertEquals(str(self.expiration_date),
str(document.getExpirationDate()))
self.assertEquals(data_set, document.getFollowUpValue())
self.assertEquals('File', document.getPortalType())
self.assertEquals('Published Alive', document.getValidationStateTitle())
def test_external_get(self, annonymous=False):
"""
Test the external usage to retrive the information
"""
self.test_external_post()
header_dict = {}
if not annonymous:
header_dict = self.header_dict
connection = httplib.HTTPConnection('%s:%s' % (self.host, self.port))
try:
connection.request('GET', self.path, headers=header_dict)
result = connection.getresponse()
data = result.read()
finally:
connection.close()
self.assertEquals(json.dumps([json.loads(self.data)]), data)
self.assertEquals(200, result.status)
self.assertEquals(self.content_type, result.getheader("content-type"))
def test_external_get_anonymous(self):
"""
Test the external usage to retrive information
accessing as Anonymous User.
"""
self.test_external_get(annonymous=True)
def test_external_post_anonymous(self):
"""
"""
connection = httplib.HTTPConnection('%s:%s' % (self.host, self.port))
header_dict = {'Content-Type': self.content_type}
try:
connection.request('PUT', self.path, self.data, header_dict)
result = connection.getresponse()
transaction.commit()
self.tic()
finally:
connection.close()
self.assertEquals(302, result.status)
def test_external_post_with_wrong_data(self):
"""
The data which is sent to the server must follow a JSON schema.
If the data does not follow the schema it must return the error.
"""
# Removing a required property
self.data_list[0].pop('file')
self.data = json.dumps(self.data_list)
connection = httplib.HTTPConnection('%s:%s' % (self.host, self.port))
try:
connection.request('PUT', self.path, self.data, self.header_dict)
result = connection.getresponse()
transaction.commit()
self.tic()
data = result.read()
finally:
connection.close()
self.assertTrue("Required field 'file' is missing" in data, data)
self.assertEquals(500, result.status)
self.assertEquals('text/html; charset=utf-8',
result.getheader("content-type"))
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import transaction
from AccessControl import Unauthorized
from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
from ShaDirMixin import ShaDirMixin
from ShaSecurityMixin import ShaSecurityMixin
class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase):
"""
ShaDir Security Test Case
"""
def getTitle(self):
"""
Return the title of the current test set.
"""
return "SHADIR Security Test Case"
def getBusinessTemplateList(self):
"""
Return the list of required business templates.
"""
return ShaDirMixin().getBusinessTemplateList() + \
('networkcache_erp5',)
def afterSetUp(self):
"""
Initialize the ERP5 site.
"""
self.group = 'shadir'
ShaDirMixin.afterSetUp(self)
ShaSecurityMixin.afterSetUp(self)
def beforeTearDown(self):
"""
Clear everything for next test.
"""
for module in ('person_module',
'data_set_module',
'document_module',):
folder = self.portal[module]
folder.manage_delObjects(list(folder.objectIds()))
transaction.commit()
self.tic()
# Tests
def test_anonymous_can_not_create_data_set(self):
"""
Annonymous should not be able to create data set and it also should not
be able to view data_set_module.
"""
self.logout()
self.assertTrue(self.portal.portal_membership.isAnonymousUser())
def tryToCreateDataSet():
self.portal.data_set_module.newContent(
portal_type='Data Set',
reference=self.key)
self.assertRaises(Unauthorized, tryToCreateDataSet)
def test_anonymous_can_not_view_data_set_module(self):
"""
Anonymous should not be able to view data set module.
"""
self.logout()
self.assertTrue(self.portal.portal_membership.isAnonymousUser())
self.assertRaises(Unauthorized, self.portal.data_set_module.view)
def test_anonymous_can_read_data_set_object(self):
"""
Anonymous can read a data set object if it is in published state.
"""
self.login()
self.assertFalse(self.portal.portal_membership.isAnonymousUser())
data_set = self.portal.data_set_module.newContent(portal_type='Data Set',
reference=self.key)
data_set.publish()
self.stepTic()
self.logout()
self.assertTrue(self.portal.portal_membership.isAnonymousUser())
data_set.view()
data_set()
def test_user_can_create_and_view_data_set(self):
"""
User must be able to create and view a data set object
It also must check if data set can be published.
"""
self.changeUser(self.lucas_user)
data_set = self.portal.data_set_module.newContent(
portal_type='Data Set',
reference=self.key)
self.stepTic()
data_set()
data_set.view()
data_set.publish()
self.stepTic()
self.assertEquals('Published', data_set.getValidationStateTitle())
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Auditor', data_set)
def test_user_can_not_view_data_set_module(self):
"""
User must not be able to see data set module.
Author can not view the module.
"""
self.changeUser(self.lucas_user)
self.assertRaises(Unauthorized, self.portal.data_set_module.view)
self.assertRaises(Unauthorized, self.portal.data_set_module)
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Author',
self.portal.data_set_module)
def test_user_can_view_published_data_set_from_other_users(self):
"""
If the user A creates a Data Set object, and publish it.
The user B must be able to view the object.
"""
self.changeUser(self.toto_user)
data_set = self.portal.data_set_module.newContent(
portal_type='Data Set',
reference=self.key)
data_set.publish()
self.stepTic()
self.changeUser(self.lucas_user)
data_set()
data_set.view()
# Text Document
def test_user_can_create_and_view_document(self):
"""
User must be able to create and view a text document object
It also must check if the document can be published alive.
"""
self.changeUser(self.lucas_user)
document = self.portal.document_module.newContent(portal_type='Text')
self.stepTic()
document()
document.view()
document.publishAlive()
self.stepTic()
self.assertEquals('Published Alive', document.getValidationStateTitle())
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Auditor', document)
def test_user_can_not_view_document_module(self):
"""
User must not be able to see document module.
Author can not view the module.
"""
self.changeUser(self.lucas_user)
self.assertRaises(Unauthorized, self.portal.document_module.view)
self.assertRaises(Unauthorized, self.portal.document_module)
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Author',
self.portal.document_module)
def test_user_can_view_published_alive_text_from_other_users(self):
"""
If the user A creates a Text object, and publish it.
The user B must be able to view the object.
"""
self.changeUser(self.toto_user)
document = self.portal.document_module.newContent(portal_type='Text')
document.publishAlive()
self.stepTic()
self.changeUser(self.lucas_user)
document()
document.view()
# Contribution Tool
def test_user_create_text_document_using_contribution_tool(self):
"""
User must be able to create a text document using contribution.
"""
self.changeUser(self.lucas_user)
contribution_tool = self.portal.portal_contributions
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Author',
contribution_tool)
data_set = self.portal.data_set_module.newContent(portal_type='Data Set')
document = self.portal.portal_contributions.newContent(
filename='test.txt',
data='test content',
reference='test-reference',
discover_metadata=False,
follow_up_list=[data_set.getRelativeUrl()])
document()
document.view()
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Auditor', document)
27-05-2011 Lucas
* Initial Import
\ No newline at end of file
Nexedi 2011
\ No newline at end of file
erp5_web_shacache
erp5_web_shadir
\ No newline at end of file
Proprietary
\ No newline at end of file
17
\ No newline at end of file
data_set_module
document_module
image_module
portal_contributions
\ No newline at end of file
data_set_module
document_module
image_module
portal_contributions
\ No newline at end of file
portal_categories/group/shacache
portal_categories/group/shacache/**
portal_categories/group/shadir
portal_categories/group/shadir/**
\ No newline at end of file
Contribution Tool
Data Set
Data Set Module
Document Module
Drawing
File
Image
Image Module
PDF
Presentation
Spreadsheet
Text
\ No newline at end of file
Contribution Tool
Data Set
Data Set Module
Document Module
Drawing
File
Image
Image Module
PDF
Presentation
Spreadsheet
Text
\ No newline at end of file
testShaCacheSecurity
testShaDirSecurity
testShaDirExternal
testShaCacheExternal
ShaSecurityMixin
\ No newline at end of file
networkcache_erp5
\ No newline at end of file
5.4.7
\ No newline at end of file
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2011 Nexedi SA and Contributors. All Rights Reserved.
# Lucas Carvalho <lucas@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
_marker=[]
from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Core.Folder import Folder
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
class VirtualFolderMixin:
"""
Virtual Folder Mixin is a class which allows to customize the _setObject
and _getOb methods for a given portal type.
"""
security = ClassSecurityInfo()
security.declarePrivate('PUT_factory')
def PUT_factory(self, name, typ, body):
""" Factory for PUT requests to objects which do not yet exist.
Used by NullResource.PUT.
Returns -- Bare and empty object of the appropriate type (or None, if
we don't know what to do)
"""
method = getattr(self, 'Base_putFactory', None)
if method is not None:
return method(name, typ, body)
return Folder.PUT_factory(self, name, typ, body)
security.declarePrivate('_setObject')
def _setObject(self, id, ob, **kw):
"""
XXX
"""
tv = getTransactionalVariable()
key = (id, )
tv[key] = ob.__of__(self).getRelativeUrl()
method = getattr(self, 'Base_setObject', None)
if method is not None:
return method(id, ob, **kw)
return Folder._setObject(self, id, ob, **kw)
security.declarePrivate('_getOb')
def _getOb(self, id, default=_marker, **kw):
"""
XXX
"""
tv = getTransactionalVariable()
document_url = tv.get((id,), None)
if document_url is not None:
return self.getPortalObject().unrestrictedTraverse(document_url)
return Folder._getOb(self, id, **kw)
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