[Erp5-report] r45482 luke - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Apr 15 11:29:31 CEST 2011
Author: luke
Date: Fri Apr 15 11:29:31 2011
New Revision: 45482
URL: http://svn.erp5.org?rev=45482&view=rev
Log:
- id is name of builtin function, so change it to key, which reflect the real variable
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=45482&r1=45481&r2=45482&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py [utf8] Fri Apr 15 11:29:31 2011
@@ -3427,14 +3427,14 @@ class DocumentTemplateItem(BaseTemplateI
force = kw.get('force')
if context.getTemplateFormatVersion() == 1:
need_reset = isinstance(self, DocumentTemplateItem)
- for id in self._objects.keys():
- if update_dict.has_key(id) or force:
+ for key in self._objects.keys():
+ if update_dict.has_key(key) or force:
if not force:
- action = update_dict[id]
+ action = update_dict[key]
if action == 'nothing':
continue
- text = self._objects[id]
- path, name = posixpath.split(id)
+ text = self._objects[key]
+ path, name = posixpath.split(key)
try:
self.local_file_writer_name(name, text, create=0)
except IOError, error:
@@ -3451,12 +3451,12 @@ class DocumentTemplateItem(BaseTemplateI
self.local_file_importer_name(name)
else:
BaseTemplateItem.install(self, context, trashbin, **kw)
- for id in self._archive.keys():
- text = self._archive[id]
+ for key in self._archive.keys():
+ text = self._archive[key]
# This raises an exception if the file exists.
- self.local_file_writer_name(id, text, create=1)
+ self.local_file_writer_name(key, text, create=1)
if self.local_file_importer_name is not None:
- self.local_file_importer_name(id)
+ self.local_file_importer_name(key)
def remove(self, context, **kw):
"""Conversion of magically uniqued paths to real ones"""
More information about the Erp5-report
mailing list