diff --git a/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_getPrototype.xml b/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_getPrototype.xml new file mode 100644 index 0000000000000000000000000000000000000000..8125af2c7329b2ee9c278e13257ea4caac64e390 --- /dev/null +++ b/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_getPrototype.xml @@ -0,0 +1,140 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>\'\'\'\n + return the first coulour variation that have prototype property set to True\n + return None if no prototype is found\n +\'\'\'\n +\n +colour_variation_list = context.contenValues(portal_type=\'Apparel Model Colour Variation\')\n +prototype_list = [x for x in colour_variation_list if x.isPrototype()]\n +if len(prototype_list):\n + return prototype_list[0]\n +return None\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></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>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>_getattr_</string> + <string>context</string> + <string>colour_variation_list</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>x</string> + <string>prototype_list</string> + <string>len</string> + <string>_getitem_</string> + <string>None</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ApparelModel_getPrototype</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_apparel/bt/revision b/bt5/erp5_apparel/bt/revision index d3b981955773e59576c06a329282e9e01940b1ef..34251f6b242e79eb02dc1c4040ddbaa9fc924fce 100644 --- a/bt5/erp5_apparel/bt/revision +++ b/bt5/erp5_apparel/bt/revision @@ -1 +1 @@ -246 \ No newline at end of file +247 \ No newline at end of file