diff --git a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getResourceTitle.xml b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getResourceTitle.xml index 7c69414a88270f746b7548ba3ae6ec1760c54fcf..4422ca502b6da7526ae39a8a44a8368c28f0fe6b 100644 --- a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getResourceTitle.xml +++ b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getResourceTitle.xml @@ -75,9 +75,11 @@ \n # movement list should not be empty, as Item should always be created\n # from movement\n -last_movement = movement_list[0]\n -resource_uid = last_movement.resource_uid\n -return context.portal_catalog(uid=resource_uid)[0].title\n +# But, if it raises an error, ProxyField may be broken\n +if len(movement_list) == 1:\n + last_movement = movement_list[0]\n + resource_uid = last_movement.resource_uid\n + return context.portal_catalog(uid=resource_uid)[0].title\n </string> </value> </item> <item> @@ -124,6 +126,7 @@ return context.portal_catalog(uid=resource_uid)[0].title\n <string>context</string> <string>DateTime</string> <string>movement_list</string> + <string>len</string> <string>_getitem_</string> <string>last_movement</string> <string>resource_uid</string> diff --git a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_viewFieldLibrary/my_resource_title.xml b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_viewFieldLibrary/my_resource_title.xml index ca1656eaaf564008da1436d636a7250e9666ae51..a7b5c75089fbec8ccb12b630a14d8b60fb1467fd 100644 --- a/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_viewFieldLibrary/my_resource_title.xml +++ b/bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_viewFieldLibrary/my_resource_title.xml @@ -17,9 +17,9 @@ <value> <list> <string>title</string> - <string>editable</string> - <string>display_width</string> <string>default</string> + <string>display_width</string> + <string>editable</string> </list> </value> </item> @@ -67,6 +67,14 @@ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> </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>field_id</string> </key> <value> <string></string> </value> @@ -79,6 +87,10 @@ <key> <string>target</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> </dictionary> </value> </item> @@ -87,11 +99,15 @@ <value> <dictionary> <item> - <key> <string>display_width</string> </key> + <key> <string>default</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> + <key> <string>editable</string> </key> <value> <int>0</int> </value> </item> <item> @@ -107,7 +123,7 @@ <value> <string>Click to edit the target</string> </value> </item> <item> - <key> <string>title</string> </key> + <key> <string>title</string> </key> <value> <string>Resource</string> </value> </item> </dictionary> diff --git a/bt5/erp5_item/bt/revision b/bt5/erp5_item/bt/revision index 8fdd954df9831dfd29ceec0d74829b02f3f5d8c3..b39356075901abfb43d27aef2ae5b76b6aee19c4 100644 --- a/bt5/erp5_item/bt/revision +++ b/bt5/erp5_item/bt/revision @@ -1 +1 @@ -22 \ No newline at end of file +23 \ No newline at end of file