diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py index 8c330b86bfbfd7697e8c5f1ceaa758d5b04116bd..55767cd26ea5d61a79d78771999c867c24d010b4 100644 --- a/product/ERP5Form/Form.py +++ b/product/ERP5Form/Form.py @@ -755,6 +755,15 @@ class ERP5Form(ZMIForm, ZopePageTemplate): template_skin_id_list = template.getTemplateSkinIdList() if folder_id in template_skin_id_list: folder_id_set.update(set(template_skin_id_list)) + + # Find folders which can be surcharged by this skin folder + if '_' in folder_id: + surcharged_folder_id = 'erp5_%s' % folder_id.split('_')[-1] + if (surcharged_folder_id != folder_id) and \ + (getattr(self.portal_skins, surcharged_folder_id, None) \ + is not None): + folder_id_set.add(surcharged_folder_id) + break return list(folder_id_set)