Commit 13d5e351 authored by Lucas Carvalho's avatar Lucas Carvalho

The erp5_barcode is not required anymore, once it also fails using the...

The erp5_barcode is not required anymore, once it also fails using the erp5_core. Using proper API instead of portal_catalog.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36564 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fd76d2be
...@@ -82,7 +82,6 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -82,7 +82,6 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
return ('erp5_base', return ('erp5_base',
'erp5_csv_style', 'erp5_csv_style',
'erp5_pdf_style', 'erp5_pdf_style',
'erp5_barcode',
) )
def getTitle(self): def getTitle(self):
...@@ -6771,8 +6770,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -6771,8 +6770,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
portal = self.getPortalObject() portal = self.getPortalObject()
template_tool = portal.portal_templates template_tool = portal.portal_templates
# Try with erp5_base, which contais ActionTemplateItem and works. # Try with erp5_base, which contais ActionTemplateItem and works.
bt5obj = portal.portal_catalog.getResultValue(portal_type='Business Template', bt5obj = template_tool.getInstalledBusinessTemplate('erp5_base')
title='erp5_base')
template_copy = template_tool.manage_copyObjects(ids=(bt5obj.getId(),)) template_copy = template_tool.manage_copyObjects(ids=(bt5obj.getId(),))
new_id_list = template_tool.manage_pasteObjects(template_copy) new_id_list = template_tool.manage_pasteObjects(template_copy)
...@@ -6785,8 +6783,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor): ...@@ -6785,8 +6783,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
# Use erp5_barcode because it contains ActionTemplateItem, which seems to # Use erp5_barcode because it contains ActionTemplateItem, which seems to
# cause problems to be export. Maybe create a test bt5 with all items could # cause problems to be export. Maybe create a test bt5 with all items could
# be more appropriated. # be more appropriated.
bt5obj = portal.portal_catalog.getResultValue(portal_type='Business Template', bt5obj = template_tool.getInstalledBusinessTemplate('erp5_core')
title='erp5_barcode')
# it is required to copy and paste to be able to export it # it is required to copy and paste to be able to export it
template_copy = template_tool.manage_copyObjects(ids=(bt5obj.getId(),)) template_copy = template_tool.manage_copyObjects(ids=(bt5obj.getId(),))
new_id_list = template_tool.manage_pasteObjects(template_copy) new_id_list = template_tool.manage_pasteObjects(template_copy)
......
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