Commit ba2b8d86 authored by Rafael Monnerat's avatar Rafael Monnerat

Base.log is deprecated, using ERPType.Log.log instead.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22057 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2a31bd1f
......@@ -71,6 +71,7 @@
Generic method called when submitting a form in dialog mode.\n
Responsible for validating form data and redirecting to the form action.\n
"""\n
from Products.ERP5Type.Log import log\n
\n
# XXX We should not use meta_type properly,\n
# XXX We need to discuss this problem.(yusei)\n
......@@ -203,7 +204,7 @@ if len(listbox_id_list):\n
can_redirect = 0\n
# Warn if there are more than one listbox in form ...\n
if len(listbox_id_list) > 1:\n
context.log(\'Base_callDialogMethod\', \'There are %s listboxes in form %s.\' % (len(listbox_id_list), form.id))\n
log(\'Base_callDialogMethod\', \'There are %s listboxes in form %s.\' % (len(listbox_id_list), form.id))\n
# ... but handle them anyway.\n
for listbox_id in listbox_id_list:\n
listbox_line_list = []\n
......@@ -342,6 +343,8 @@ return request.RESPONSE.redirect(redirect_url)\n
<string>dialog_id</string>
<string>dialog_category</string>
<string>kw</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>isListBox</string>
<string>Products.Formulator.Errors</string>
<string>FormValidationError</string>
......@@ -373,7 +376,6 @@ return request.RESPONSE.redirect(redirect_url)\n
<string>splitted</string>
<string>len</string>
<string>_write_</string>
<string>log</string>
<string>listbox_id</string>
<string>listbox_line_list</string>
<string>listbox</string>
......
......@@ -67,7 +67,7 @@
<key> <string>_body</string> </key>
<value> <string>"""Check the object have an unique reference in it\'s parent folder\n
"""\n
\n
from Products.ERP5Type.Log import log\n
if editor is None : \n
return 1\n
\n
......@@ -75,13 +75,13 @@ reference = editor\n
\n
document = context.restrictedTraverse(request.object_path, None)\n
if document is None : \n
context.log(\'Base_uniqueReferenceInFolderValidator\', \'document is None\')\n
log(\'Base_uniqueReferenceInFolderValidator\', \'document is None\')\n
return 0\n
\n
parent_folder = document.getParentValue()\n
for same_reference in parent_folder.searchFolder(reference = reference):\n
if same_reference.uid != document.getUid() :\n
context.log(\'Base_uniqueReferenceInFolderValidator\',\n
log(\'Base_uniqueReferenceInFolderValidator\',\n
\'another document with reference %s exists at %s\' % (reference, same_reference.getPath()))\n
return 0\n
\n
......@@ -136,6 +136,8 @@ return 1\n
<tuple>
<string>editor</string>
<string>request</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>None</string>
<string>reference</string>
<string>_getattr_</string>
......
......@@ -65,8 +65,9 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string># this script is no longer needed.\n
context.log(\'Category_getSortedCategoryChildValueList\', \'use getCategoryChildValueList method\')\n
<value> <string>from Products.ERP5Type.Log import log\n
# this script is no longer needed.\n
log(\'Category_getSortedCategoryChildValueList\', \'use getCategoryChildValueList method\')\n
\n
value_list = filter(lambda o: o.getRelativeUrl() != context.getRelativeUrl(),context.getCategoryChildValueList())\n
sort_id=\'int_index\'\n
......@@ -115,9 +116,11 @@ return value_list\n
<value>
<tuple>
<string>kw</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>filter</string>
<string>_getattr_</string>
<string>context</string>
<string>filter</string>
<string>value_list</string>
<string>sort_id</string>
</tuple>
......
......@@ -87,7 +87,7 @@ From document pointed to by \'relative_url\':\n
For the portal, \'relative_url\' must be false and only module objects are\n
considered if id_list is None.\n
"""\n
\n
from Products.ERP5Type.Log import log\n
document = context.getPortalObject()\n
if relative_url:\n
document = document.restrictedTraverse(relative_url)\n
......@@ -132,7 +132,7 @@ else:\n
id_list = []\n
for day_ago in xrange(hbtree_days):\n
date = (DateTime()-day_ago).strftime(\'%Y%m%d\')\n
context.log(\'date for objectIds\', date)\n
log(\'date for objectIds\', date)\n
try:\n
id_list += document.objectIds(base_id=date)\n
except (TypeError, IndexError):\n
......@@ -212,6 +212,8 @@ else:\n
<string>packet</string>
<string>hbtree_days</string>
<string>method_kw</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>_getattr_</string>
<string>context</string>
<string>document</string>
......
......@@ -67,12 +67,13 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.ERP5Type.Log import log\n
folder = context\n
\n
# Keep compatibility with tree_id\n
if tree_id_list is not None:\n
context.log(\'tree_id\', tree_id)\n
context.log(\'tree_id_list\', tree_id_list)\n
log(\'tree_id\', tree_id)\n
log(\'tree_id_list\', tree_id_list)\n
if tree_id is not None:\n
raise ValueError, "both tree and tree_id_list should not be defined"\n
tree_id = tree_id_list.pop()\n
......@@ -197,11 +198,13 @@ if tree_id_list is not None:\n
<string>passive_commit</string>
<string>tree_tag</string>
<string>tree_after_tag</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>context</string>
<string>folder</string>
<string>None</string>
<string>_getattr_</string>
<string>ValueError</string>
<string>_getattr_</string>
<string>activate_kw</string>
<string>_getiter_</string>
<string>key</string>
......
......@@ -76,6 +76,7 @@ recursive method, etc.)\n
Then take this special list of objects and return a list of special\n
temp_objects to display as blocks \'as they are\'\n
"""\n
from Products.ERP5Type.Log import log\n
from Products.ERP5Type.Document import newTempMovement as newTempBase\n
from string import zfill\n
\n
......@@ -118,7 +119,7 @@ for input_object in input_object_list:\n
# creating new object\n
temp_object = newTempBase(context.getPortalObject(),id=str(temp_object_id), uid =\'new_%s\' % zfill(temp_object_id, 4) )\n
# editing object with new values\n
context.log("%s" % (",".join([start_property_id, str(block_begin),stop_property_id, str(block_end),size_property_id, str(block_size)])))\n
log("%s" % (",".join([start_property_id, str(block_begin),stop_property_id, str(block_end),size_property_id, str(block_size)])))\n
temp_object.setProperty(start_property_id, block_begin)\n
temp_object.setProperty(stop_property_id, block_end)\n
temp_object.setProperty(size_property_id, block_size)\n
......@@ -225,6 +226,8 @@ return temp_stat_object_list\n
<string>object_tree_line</string>
<string>REQUEST</string>
<string>field</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>Products.ERP5Type.Document</string>
<string>newTempMovement</string>
<string>newTempBase</string>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment