Commit 9dcf08bd authored by Romain Courteaud's avatar Romain Courteaud

Export skin folder's property business_template_registered_skin_selections to a

specific Business Template parameter (template_registered_skin_selection).
This modification will help adding an existing skin folder to a new skin
selection.

Skin folder exported after this revision will not have the
business_template_registered_skin_selections properties anymore, and so, it
will be required to update the business template configuration.

Compatibility with existing bt5 is supported by allowing imported skin folder
with this property.

Thanks to Kazuhiko for the review.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28759 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 972e5b96
This diff is collapsed.
......@@ -75,6 +75,11 @@ class BusinessTemplate:
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_registered_skin_selection',
'description' : 'A list of registered skin selections used by this template',
'type' : 'lines',
'mode' : 'w',
'default' : () },
{ 'id' : 'template_workflow_id',
'description' : 'A list of ids of workflows used by this template',
'type' : 'lines',
......
......@@ -86,6 +86,7 @@
<value>
<list>
<string>my_template_skin_id_list</string>
<string>my_template_registered_skin_selection</string>
<string>my_template_workflow_id_list</string>
</list>
</value>
......
1289
\ No newline at end of file
1290
\ No newline at end of file
......@@ -857,6 +857,16 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
self.assertEqual(len(wf_ids), 1)
bt.edit(template_skin_id_list=wf_ids)
def stepAddRegistredSelectionToBusinessTemplate(self, sequence=None,
sequence_list=None, **kw):
"""
Add registered selection to business template
"""
bt = sequence.get('current_bt', None)
self.failUnless(bt is not None)
bt.edit(template_registered_skin_selection_list = \
('%s | Foo' % sequence.get('skin_folder_id'), ))
def stepAddPathToBusinessTemplate(self, sequence=None, sequence_list=None, **kw):
"""
Add a path to business template
......@@ -4622,6 +4632,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
CreateNewBusinessTemplate \
UseExportBusinessTemplate \
AddSkinFolderToBusinessTemplate \
AddRegistredSelectionToBusinessTemplate \
BuildBusinessTemplate \
SaveBusinessTemplate \
RemoveSkinFolder \
......@@ -5414,6 +5425,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
CreateNewBusinessTemplate \
UseExportBusinessTemplate \
AddSkinFolderToBusinessTemplate \
AddRegistredSelectionToBusinessTemplate \
BuildBusinessTemplate \
SaveBusinessTemplate \
RemoveSkinFolder \
......@@ -5444,6 +5456,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
CreateNewBusinessTemplate \
UseExportBusinessTemplate \
AddSkinFolderToBusinessTemplate \
AddRegistredSelectionToBusinessTemplate \
BuildBusinessTemplate \
SaveBusinessTemplate \
RemoveSkinFolder \
......@@ -5471,6 +5484,7 @@ class TestBusinessTemplate(ERP5TypeTestCase, LogInterceptor):
CreateNewBusinessTemplate \
UseExportBusinessTemplate \
AddSkinFolderToBusinessTemplate \
AddRegistredSelectionToBusinessTemplate \
BuildBusinessTemplate \
SaveBusinessTemplate \
RemoveSkinFolder \
......
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