From 1560d9ecca0bfffe073abf3a0cd8d61dfb1f6396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 11 Dec 2008 14:31:41 +0000 Subject: [PATCH] fix bug when making two templates from same document git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24865 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_core/Base_makeTemplateFromDocument.xml | 7 +++++-- product/ERP5/bootstrap/erp5_core/bt/revision | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml index 89fd0854ba..21d9841c88 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_makeTemplateFromDocument.xml @@ -65,9 +65,9 @@ if preference is None or preference.getPreferenceState()!=\'enabled\':\n parent = context.getParentValue()\n document_id = context.getId()\n cp = parent.manage_copyObjects(ids=[document_id])\n -preference.manage_pasteObjects(cb_copy_data=cp)\n +paste_info, = preference.manage_pasteObjects(cb_copy_data=cp)\n \n -template = getattr(preference, document_id)\n +template = getattr(preference, paste_info[\'new_id\'])\n template.makeTemplate()\n \n context.portal_caches.clearCacheFactory(\'erp5_ui_medium\')\n @@ -122,7 +122,10 @@ return context.Base_redirect(form_id,\n <string>parent</string> <string>document_id</string> <string>cp</string> + <string>_getiter_</string> + <string>paste_info</string> <string>getattr</string> + <string>_getitem_</string> <string>template</string> <string>_apply_</string> <string>dict</string> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index b25dcc8ec2..a17f5064dc 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -1036 \ No newline at end of file +1037 \ No newline at end of file -- 2.30.9