diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/OrderLine_getResourceTransformationItemList.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/OrderLine_getResourceTransformationItemList.xml new file mode 100644 index 0000000000000000000000000000000000000000..c7911b92ddcaaf27e7e8444236382909580947a0 --- /dev/null +++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/OrderLine_getResourceTransformationItemList.xml @@ -0,0 +1,179 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </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>portal = context.getPortalObject()\n +from ZTUtils import LazyFilter\n +resource = context.getResourceValue()\n +\n +result = []\n +\n +if include_empty:\n + result.append([\'\',\'\'])\n +if resource is None:\n + return result\n +\n +# XXX: Is it possible to use cache? Hook it on resource?\n +for transformation in LazyFilter(\n + resource.getResourceRelatedValueList(portal_type=\'Transformation\'),\n + skip=\'View\'\n + ):\n + if not skip_invalidated or transformation.getProperty(\'validation_state\',\'default\') != \'invalidated\':\n + result.append( (transformation.getTitle(),transformation.getRelativeUrl()) )\n +\n +result.sort(lambda x,y: cmp(x[0], y[0]) )\n +return result\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>include_empty=1, skip_invalidated=1</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>2</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>include_empty</string> + <string>skip_invalidated</string> + <string>_getattr_</string> +<string>context</string> + <string>portal</string> + <string>ZTUtils</string> + <string>LazyFilter</string> + <string>resource</string> + <string>result</string> + <string>None</string> + <string>_getiter_</string> + <string>transformation</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <int>1</int> + <int>1</int> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>OrderLine_getResourceTransformationItemList</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderLine_viewFieldLibrary.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderLine_viewFieldLibrary.xml index c91555cca74af9eb130f103e16247b9ae45d9feb..a38fd829ff6f6cdfd85042dc2cda650aaf2f5340 100644 --- a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderLine_viewFieldLibrary.xml +++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderLine_viewFieldLibrary.xml @@ -111,6 +111,7 @@ <string>my_title</string> <string>my_int_index</string> <string>my_reference</string> + <string>my_specialise</string> </list> </value> </item> diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderLine_viewFieldLibrary/my_specialise.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderLine_viewFieldLibrary/my_specialise.xml new file mode 100644 index 0000000000000000000000000000000000000000..564642683fbb2d4f79401040e908e2b1d33945f2 --- /dev/null +++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderLine_viewFieldLibrary/my_specialise.xml @@ -0,0 +1,132 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>title</string> + <string>items</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_specialise</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>items</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</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>items</string> </key> + <value> + <list/> + </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>Transformation</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python:here.OrderLine_getResourceTransformationItemList()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/bt/revision b/bt5/erp5_mrp/bt/revision index fefb598af8c98e1a2953068d56df3a81f968074b..9e6181a6edf278d8fe3d626196e7a67223fae140 100644 --- a/bt5/erp5_mrp/bt/revision +++ b/bt5/erp5_mrp/bt/revision @@ -1 +1 @@ -284 \ No newline at end of file +285 \ No newline at end of file