Commit 6ea044e0 authored by Rafael Monnerat's avatar Rafael Monnerat

Use ERP5Type.Log.log instead ERP5Site.log

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29113 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bcabf766
......@@ -68,6 +68,7 @@ version of each of them.\n
# BG - not much use, they\'re too different\n
\n
from Products.ERP5Type.Utils import convertToUpperCase, convertToMixedCase\n
from Products.ERP5Type.Log import log\n
\n
def getRelatedLatest(category):\n
funcname = \'get%sValueList\' % convertToUpperCase(category)\n
......@@ -98,7 +99,7 @@ if relation_id == \'all\':\n
dic[obj] = None\n
return dic.keys()\n
\n
context.log(\'Relation %s is not provided for in this script\' % relation)\n
log(\'Relation %s is not provided for in this script\' % relation)\n
return [] # failover - undefined relation\n
</string> </value>
</item>
......@@ -141,6 +142,8 @@ return [] # failover - undefined relation\n
<string>Products.ERP5Type.Utils</string>
<string>convertToUpperCase</string>
<string>convertToMixedCase</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>getRelatedLatest</string>
<string>_getattr_</string>
<string>relation_id</string>
......
......@@ -67,6 +67,7 @@ Differences to the stock implementation:\n
"""\n
\n
# XXX For now, this script requires proxy manager to retrieve the Person object in all cases\n
from Products.ERP5Type.Log import log\n
\n
category_list = []\n
\n
......@@ -112,7 +113,7 @@ for assignment in person_object.contentValues(filter={\'portal_type\': \'Assignm
cdict[base_category] = \'/\'.join(grouplist[:-i])\n
category_list.append(cdict)\n
except RuntimeError,e:\n
context.log(str(e))\n
log(str(e))\n
\n
return category_list\n
......@@ -167,6 +168,8 @@ return category_list\n
<string>portal_type</string>
<string>strict</string>
<string>root</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>category_list</string>
<string>_getattr_</string>
<string>context</string>
......
......@@ -57,7 +57,7 @@
Security categories assigned from the Person who is set as the destination\n
of the document (e.g. in Memo type).\n
"""\n
\n
from Products.ERP5Type.Log import log\n
category_list = []\n
\n
for ob in object.getDestinationValueList():\n
......@@ -72,7 +72,8 @@ for ob in object.getDestinationValueList():\n
else:\n
raise RuntimeError, "Error: \'%s\' property is required in order to update person security group" % (base_category)\n
category_list.append(category_dict)\n
context.log(category_list)\n
\n
log(category_list)\n
return category_list\n
</string> </value>
</item>
......@@ -122,6 +123,8 @@ return category_list\n
<string>user_name</string>
<string>object</string>
<string>portal_type</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>category_list</string>
<string>_getiter_</string>
<string>_getattr_</string>
......@@ -132,7 +135,6 @@ return category_list\n
<string>None</string>
<string>_write_</string>
<string>RuntimeError</string>
<string>context</string>
</tuple>
</value>
</item>
......
......@@ -181,6 +181,7 @@ from ZTUtils import Batch\n
from ZTUtils import LazyFilter\n
from Products.CMFCore.utils import getToolByName\n
from Products.CMFDefault.utils import toUnicode\n
from Products.ERP5Type.Log import log\n
\n
req=context.REQUEST\n
login,password=(req.get(\'login\'),req.get(\'password\'))\n
......@@ -190,7 +191,7 @@ if login is not None and password is not None:\n
context.portal_skins.updateSkinCookie()\n
context.setupCurrentSkin(context.REQUEST)\n
\n
context.log(context.portal_membership.isAnonymousUser())\n
log(context.portal_membership.isAnonymousUser())\n
ptool = getToolByName(script, \'portal_properties\')\n
stool = getToolByName(script, \'portal_syndication\')\n
\n
......@@ -289,6 +290,8 @@ return context.RSS_template(**options)\n
<string>getToolByName</string>
<string>Products.CMFDefault.utils</string>
<string>toUnicode</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>_getattr_</string>
<string>context</string>
<string>req</string>
......
1025
\ No newline at end of file
1026
\ No newline at end of file
......@@ -56,6 +56,7 @@
<value> <string># We wants to get data in order to do a nice summary of items inside the order\n
# This report will mainly usefull when the same resource is ordered on many\n
# different lines\n
from Products.ERP5Type.Log import log\n
if target_language:\n
container.REQUEST[\'AcceptLanguage\'].set(target_language, 10)\n
\n
......@@ -91,7 +92,7 @@ def getMovementTitle(movement):\n
parent_value = movement.getParentValue()\n
while parent_value.getPortalType() not in order_type_list:\n
title = parent_value.getTitle() + \' / \' + title\n
context.log(\'parent_value\', parent_value)\n
log(\'parent_value\', parent_value)\n
parent_value = parent_value.getParentValue()\n
return title\n
\n
......@@ -263,6 +264,8 @@ return context.Order_viewODSSummary(format=format)\n
<string>quantity_unit_list</string>
<string>format</string>
<string>kw</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>_getattr_</string>
<string>_getitem_</string>
<string>container</string>
......
......@@ -59,6 +59,7 @@
which were already created so that they are not duplicated.\n
"""\n
from Products.ERP5Type.Message import translateString\n
from Products.ERP5Type.Log import log\n
result_list = []\n
sale_order_line_list = context.contentValues(portal_type=\'Sale Order Line\')\n
if sale_order_line_list!=[]:\n
......@@ -104,7 +105,7 @@ for line in listbox:\n
else:\n
# if there was no sale order line already defined\n
# for the sale order, add a new sale order line\n
context.log("it goes in here second")\n
log("it goes in here second")\n
if len(sale_order_line_list)==0 or line_id not in sale_order_line_id_list:\n
sale_order_line= context.newContent(\n
portal_type=\'Sale Order Line\',)\n
......@@ -180,6 +181,8 @@ return context.Base_redirect(form_id, keep_items=dict(\n
<string>kw</string>
<string>Products.ERP5Type.Message</string>
<string>translateString</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>result_list</string>
<string>_getattr_</string>
<string>context</string>
......
736
\ No newline at end of file
739
\ No newline at end of file
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