[Erp5-report] r32333 rafael - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 8 19:43:48 CET 2010


Author: rafael
Date: Mon Feb  8 19:43:47 2010
New Revision: 32333

URL: http://svn.erp5.org?rev=32333&view=rev
Log:
Just few style changes (make some lines shorter).

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=32333&r1=32332&r2=32333&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Mon Feb  8 19:43:47 2010
@@ -631,7 +631,7 @@
       path = os.path.join(root_path, (os.sep).join(encode_folders))
       bta.addFolder(name=path)
       # export object in xml
-      f=StringIO()
+      f = StringIO()
       XMLExportImport.exportXML(obj._p_jar, obj._p_oid, f)
       bta.addObject(obj=f.getvalue(), name=id, path=path)
 
@@ -813,9 +813,13 @@
       return subobjects_dict
     # XXX btsave is for backward compatibility
     if action == 'backup' or action == 'btsave' or action == 'save_and_remove':
-      subobjects_dict = self.portal_trash.backupObject(trashbin, container_path, object_id, save=1, **kw)
+      subobjects_dict = self.portal_trash.backupObject(trashbin, 
+                                                container_path, object_id, 
+                                                save=1, **kw)
     elif action == 'install':
-      subobjects_dict = self.portal_trash.backupObject(trashbin, container_path, object_id, save=0, **kw)
+      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
@@ -1458,8 +1462,9 @@
     root_path = os.path.join(bta.path, self.__class__.__name__)
     bta.addFolder(name=root_path)
     # export workflow chain
-    xml_data = self.generateXml()
-    bta.addObject(obj=xml_data, name='registered_skin_selection',  path=root_path)
+    bta.addObject(obj=self.generateXml(), 
+                  name='registered_skin_selection',  
+                  path=root_path)
 
   def install(self, context, trashbin, **kw):
     update_dict = kw.get('object_to_update')
@@ -3065,7 +3070,8 @@
         try:
           if trash and trashbin is not None:
             container_path = key.split('/')
-            self.portal_trash.backupObject(trashbin, container_path, key, save=1, keep_subobjects=1)
+            self.portal_trash.backupObject(trashbin, container_path, 
+                                           key, save=1, keep_subobjects=1)
           p.manage_delObjects([key])
         except NotFound:
           pass
@@ -4982,9 +4988,7 @@
       self.clean()
 
       self.updateRevisionNumber()
-
       self._setTemplateFormatVersion(1)
-
       self.storeTemplateItemData()
 
       # Build each part
@@ -5058,7 +5062,8 @@
       if installed_bt == self:
         reinstall = 1
         if self.portal_templates._getOb(INSTALLED_BT_FOR_DIFF, None) is None:
-          bt2 = self.portal_templates.manage_clone(ob=installed_bt, id=INSTALLED_BT_FOR_DIFF)
+          bt2 = self.portal_templates.manage_clone(ob=installed_bt, 
+                                                   id=INSTALLED_BT_FOR_DIFF)
           # update portal types properties to get last modifications
           bt2.getPortalTypesProperties()
           bt2.edit(description='tmp bt generated for diff', bt_for_diff=1)
@@ -5085,7 +5090,8 @@
         old_item = getattr(installed_bt, item_name, None)
         if new_item is not None:
           if old_item is not None and hasattr(old_item, '_objects'):
-            modified_object = new_item.preinstall(context=self, installed_bt=old_item)
+            modified_object = new_item.preinstall(context=self, 
+                                                  installed_bt=old_item)
             if len(modified_object) > 0:
               modified_object_list.update(modified_object)
           else:
@@ -5158,7 +5164,8 @@
         for item_name in self._item_name_list:
           item = getattr(self, item_name, None)
           if item is not None:
-            item.install(self, force=force, object_to_update=object_to_update, trashbin=trashbin, installed_bt=installed_bt)
+            item.install(self, force=force, object_to_update=object_to_update, 
+                               trashbin=trashbin, installed_bt=installed_bt)
 
       # update catalog if necessary
       if force and self.isCatalogUpdatable():




More information about the Erp5-report mailing list