[Erp5-report] r43656 nicolas - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 24 10:53:34 CET 2011
Author: nicolas
Date: Thu Feb 24 10:53:34 2011
New Revision: 43656
URL: http://svn.erp5.org?rev=43656&view=rev
Log:
- Add support of remove action
- small improvements to improve readability
reviewed by Julien
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=43656&r1=43655&r2=43656&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Thu Feb 24 10:53:34 2011
@@ -887,18 +887,18 @@ class ObjectTemplateItem(BaseTemplateIte
subobjects_dict[subobject_id] = subobject_copy
return subobjects_dict
# XXX btsave is for backward compatibility
- if action == 'backup' or action == 'btsave' or action == 'save_and_remove':
+ if action in ('backup', 'btsave', 'save_and_remove',):
subobjects_dict = self.portal_trash.backupObject(trashbin,
container_path, object_id,
save=1, **kw)
- elif action == 'install':
+ elif action in ('install', 'remove'):
subobjects_dict = self.portal_trash.backupObject(trashbin,
container_path, object_id,
save=0, **kw)
else:
# As the list of available actions is not strictly defined,
# prevent mistake if an action is not handled
- raise ValueError, 'Unknown action "%s"' % action
+ raise NotImplementedError, 'Unknown action "%s"' % action
return subobjects_dict
def beforeInstall(self):
More information about the Erp5-report
mailing list