Commit cbe8701e authored by Fabien Morin's avatar Fabien Morin

delete only the files exactlty created with ERP5Site_createModuleScribus

because other portal_type could include the name of other, ex. 'test' and
'test_2'


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20438 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 10d5d417
...@@ -124,11 +124,18 @@ def ERP5Site_updateModuleScribus(self, ...@@ -124,11 +124,18 @@ def ERP5Site_updateModuleScribus(self,
skin_folder = ManageModule.setSkinFolder(portal, skin_folder = ManageModule.setSkinFolder(portal,
portal_skins_folder) portal_skins_folder)
# all object in the skin_folder should be re-generated to be updated # all object created using ERP5Site_createModuleScribus in the skin_folder
# should be re-generated to be updated
# except the module form view (because it don't change) # except the module form view (because it don't change)
object_id_list = [] object_id_list = []
object_to_delete_list = ['%s_view' % temp_portal_type,
'%s_css.css' % temp_portal_type,
'%s_view%sAsPdf' % (temp_portal_type,
temp_portal_type)]
for object in skin_folder._objects: for object in skin_folder._objects:
if 'Module_view' not in object['id'] and temp_portal_type in object['id']: if object['id'] in object_to_delete_list:
object_id_list.append(object['id'])
elif '%s_background' % temp_portal_type in object['id']:
object_id_list.append(object['id']) object_id_list.append(object['id'])
# move the old objects in portal_trash # move the old objects in portal_trash
......
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