[Erp5-report] r24287 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Oct 22 16:39:01 CEST 2008
Author: aurel
Date: Wed Oct 22 16:38:58 2008
New Revision: 24287
URL: http://svn.erp5.org?rev=24287&view=rev
Log:
fix indentation of code thus roles of portal types are not installed
at each bt installation but depends on user selection
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=24287&r1=24286&r2=24287&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py Wed Oct 22 16:38:58 2008
@@ -2405,13 +2405,13 @@
action = update_dict[roles_path]
if action == 'nothing':
continue
- path = 'portal_types/%s' % roles_path.split('/', 1)[1]
- obj = p.unrestrictedTraverse(path, None)
- if obj is not None:
- setattr(obj, '_roles', []) # reset roles before applying
- type_roles_list = self._objects[roles_path] or []
- for type_role_property_dict in type_roles_list:
- obj._roles.append(RoleInformation(**type_role_property_dict))
+ path = 'portal_types/%s' % roles_path.split('/', 1)[1]
+ obj = p.unrestrictedTraverse(path, None)
+ if obj is not None:
+ setattr(obj, '_roles', []) # reset roles before applying
+ type_roles_list = self._objects[roles_path] or []
+ for type_role_property_dict in type_roles_list:
+ obj._roles.append(RoleInformation(**type_role_property_dict))
def uninstall(self, context, **kw):
p = context.getPortalObject()
More information about the Erp5-report
mailing list