Commit 09194815 authored by Rafael Monnerat's avatar Rafael Monnerat

Base.log is deprecated. Using ERP5Type.Log.log instead.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22061 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b7f4e954
......@@ -66,7 +66,8 @@
<item>
<key> <string>_body</string> </key>
<value> <string>DEBUG = 1\n
LOG = lambda msg:context.log("SaleInvoice_selectPackingListMovement", msg)\n
from Products.ERP5Type.Log import log\n
LOG = lambda msg:log("SaleInvoice_selectPackingListMovement", msg)\n
\n
kw[\'parent_specialise_portal_type\'] = \'Invoicing Rule\'\n
kw[\'explanation_portal_type\'] = [\'Task\', \'Task Report\']\n
......@@ -134,6 +135,8 @@ return movement_list\n
<tuple>
<string>kw</string>
<string>DEBUG</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>LOG</string>
<string>_write_</string>
<string>_getattr_</string>
......
......@@ -89,8 +89,8 @@ for category in category_list:\n
uid = category.getUid())\n
\n
domain_list.append(domain)\n
\n
#context.log("%s on %s" % (script.getId(), context.getPath()), "%d objects domain" % len(domain_list))\n
#from Products.ERP5Type.Log import log\n
#log("%s on %s" % (script.getId(), context.getPath()), "%d objects domain" % len(domain_list))\n
return domain_list\n
</string> </value>
</item>
......
......@@ -65,7 +65,8 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>request = context.REQUEST\n
<value> <string>#from Products.ERP5Type.Log import log\n
request = context.REQUEST\n
object_path = request.get(\'object_path\')\n
if object_path is None:\n
# Sometimes the object_path not comes with the request, when you edit for example.\n
......@@ -94,7 +95,7 @@ for category in category_list:\n
\n
domain_list.append(domain)\n
\n
#context.log("%s on %s" % (script.getId(), context.getPath()), "%d objects domain" % len(domain_list))\n
#log("%s on %s" % (script.getId(), context.getPath()), "%d objects domain" % len(domain_list))\n
return domain_list\n
</string> </value>
</item>
......
......@@ -65,17 +65,18 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.log(\'task_list\',\'starting\')\n
<value> <string>from Products.ERP5Type.Log import log\n
log(\'task_list\',\'starting\')\n
task_module = context.getDefaultModule(\'Task Report\')\n
context.log(\'task_list\',\'next1\')\n
log(\'task_list\',\'next1\')\n
task_list = []\n
if not kw.has_key(\'parent_uid\'):\n
kw[\'parent_uid\'] = task_module.getUid()\n
context.log(\'task_list\',\'next2\')\n
context.log(\'context.getPath()\',context.getPath())\n
log(\'task_list\',\'next2\')\n
log(\'context.getPath()\',context.getPath())\n
\n
task_list = [x.getObject() for x in context.portal_catalog(**kw)]\n
context.log(\'task_list\',task_list)\n
log(\'task_list\',task_list)\n
#return context.searchFolder(**kw)\n
return task_list\n
</string> </value>
......@@ -121,6 +122,8 @@ return task_list\n
<value>
<tuple>
<string>kw</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>_getattr_</string>
<string>context</string>
<string>task_module</string>
......
531
\ No newline at end of file
533
\ No newline at end of file
......@@ -73,8 +73,8 @@ IMPORTANT WARNING: this script will not work if your simulation movements are no
reindexed yet ()\n
\n
"""\n
\n
LOG = lambda msg:context.log(\n
from Products.ERP5Type.Log import log\n
LOG = lambda msg:log(\n
"Delivery_setCausalityFromSimulation on %s" % context.getPath(), msg)\n
LOG = lambda msg:\'DISABLED\'\n
\n
......@@ -150,6 +150,8 @@ delivery.setCausalityValueList(causality_value_set.keys() + delivery.getCausalit
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>LOG</string>
<string>context</string>
<string>delivery</string>
......
......@@ -71,12 +71,12 @@ kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'simulation_state\'] = \'confirmed\'\n
\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
\n
#context.log(\'SaleOrder_selectMovement\', \'SQL\\n%s\' % context.Order_zSelectMovement(src__=1, **kw))\n
#from Products.ERP5Type.Log import log\n
#log(\'SaleOrder_selectMovement\', \'SQL\\n%s\' % context.Order_zSelectMovement(src__=1, **kw))\n
\n
if src__==0:\n
movement_list = [x.getObject() for x in context.Order_zSelectMovement(**kw)]\n
#context.log(\'SaleOrder_selectMovement\', \'mvt : %s\' % movement_list)\n
#log(\'SaleOrder_selectMovement\', \'mvt : %s\' % movement_list)\n
return movement_list\n
else:\n
return context.Order_zSelectMovement(src__=1, **kw)\n
......
395
\ No newline at end of file
396
\ No newline at end of file
......@@ -75,7 +75,7 @@
\n
XXX - redirect, translation of dialogs\n
"""\n
\n
from Products.ERP5Type.Log import log\n
req = context.REQUEST\n
\n
# check if everything was filled\n
......@@ -89,10 +89,10 @@ for f in fields:\n
else:\n
kwargs[f] = value\n
returned_params = \'&\'.join([f+\'=\'+kwargs[f] for f in kwargs])\n
context.log(returned_params)\n
log(returned_params)\n
if missing_string:\n
params = returned_params + \'&\' + missing_string + \'&portal_status_message=You did not fill all the required fields. See below to find out which fields still have to be filled.\'\n
context.log(params)\n
log(params)\n
return req.RESPONSE.redirect(context.absolute_url()+\'?\'+params)\n
if req.get(\'your_email\') != req.get(\'your_email_repeated\'):\n
missing_string += \'&missing:list=email&missing:list=email_repeated\'\n
......@@ -100,10 +100,10 @@ if req.get(\'your_email\') != req.get(\'your_email_repeated\'):\n
return req.RESPONSE.redirect(context.absolute_url()+\'?\'+params)\n
\n
# create a user\n
context.log(kwargs)\n
log(kwargs)\n
try:\n
user = context.WebSite_createUser(**kwargs)\n
context.log(user)\n
log(user)\n
msg = \'Thank you for registering. Your password will be sent to the email address that you provided once your account has been validated by the appropriate department.\'\n
except Exception, e:\n
msg = str(e)\n
......@@ -155,6 +155,8 @@ return req.RESPONSE.redirect(context.absolute_url() + \'?portal_status_message=\
<tuple>
<string>a</string>
<string>kw</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>_getattr_</string>
<string>context</string>
<string>req</string>
......
673
\ No newline at end of file
674
\ 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