Commit 2d4e52af authored by Rafael Monnerat's avatar Rafael Monnerat

- Base.log is deprecated, replaced by ERP5Type.Log.log

- Remove DEBUG entries

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23830 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 35b3567c
......@@ -71,8 +71,8 @@ except ImportError:\n
# Return Message object, so that this message will be translated when it is rendered later.\n
\n
invoice = context\n
\n
LOG = lambda msg:context.log(\n
from Products.ERP5Type.Log import log\n
LOG = lambda msg:log(\n
"InvoiceTransaction_postGenerationActivity on %s" % (invoice.getPath()), msg)\n
\n
# set the causality relation \n
......@@ -174,6 +174,8 @@ invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list
<string>Exception</string>
<string>context</string>
<string>invoice</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>LOG</string>
<string>_getattr_</string>
<string>related_packing_list</string>
......
......@@ -58,8 +58,8 @@
# after the sale_invoice_transaction_builder delivery builder\n
# created Sale Invoice Transaction Line\n
# \n
\n
LOG = lambda msg:context.log(\n
from Products.ERP5Type.Log import log\n
LOG = lambda msg:log(\n
"SaleInvoiceTransaction_postTransactionLineGeneration", msg)\n
\n
sale_invoice = context\n
......@@ -134,6 +134,8 @@ context.AccountingTransaction_roundDebitCredit()\n
<value>
<tuple>
<string>kw</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>LOG</string>
<string>context</string>
<string>sale_invoice</string>
......
......@@ -53,29 +53,21 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>DEBUG = 1\n
LOG = lambda msg:context.log(script.getId(), msg)\n
\n
kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Rule\'\n
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Rule\'\n
kw[\'explanation_portal_type\'] = [\'Purchase Order\', \'Purchase Invoice Transaction\', \'Purchase Packing List\']\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = [\'started\']\n
\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
\n
if DEBUG :\n
LOG("SQL used = %s"%context.InvoiceTransaction_zSelectMovement(src__=1, **kw))\n
\n
movement_list = [] \n
for movement in context.InvoiceTransaction_zSelectMovement(**kw) :\n
movement = movement.getObject()\n
if movement.getDeliveryValue() is None :\n
movement_list.append(movement)\n
else : \n
LOG("simulation movement %s should not have been selected !" % movement.getPath())\n
\n
if DEBUG :\n
LOG("selected movement_list : %s"%movement_list)\n
else :\n
from Products.ERP5Type.Log import log\n
log(script.getId(), "simulation movement %s should not have been selected !" % movement.getPath())\n
\n
return movement_list\n
</string> </value>
......@@ -115,8 +107,6 @@ return movement_list\n
<value>
<tuple>
<string>kw</string>
<string>DEBUG</string>
<string>LOG</string>
<string>_write_</string>
<string>_getattr_</string>
<string>_apply_</string>
......@@ -125,6 +115,9 @@ return movement_list\n
<string>_getiter_</string>
<string>movement</string>
<string>None</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>script</string>
</tuple>
</value>
</item>
......
......@@ -53,29 +53,21 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>DEBUG = 1\n
LOG = lambda msg:context.log(script.getId(), msg)\n
\n
kw[\'parent_specialise_portal_type\'] = \'Invoicing Rule\'\n
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoicing Rule\'\n
kw[\'explanation_portal_type\'] = [\'Purchase Order\', \'Purchase Packing List\']\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = [\'started\', \'stopped\',\'delivered\']\n
\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
\n
if DEBUG : \n
LOG("SQL used = %s"%context.InvoiceTransaction_zSelectMovement(src__=1, **kw))\n
\n
movement_list = [] \n
for movement in context.InvoiceTransaction_zSelectMovement(**kw) :\n
movement = movement.getObject()\n
if movement.getDeliveryValue() is None :\n
movement_list.append(movement)\n
else : \n
LOG("simulation movement %s should not have been selected !" % movement.getPath())\n
\n
if DEBUG :\n
LOG("selected movement_list : %s"%movement_list)\n
from Products.ERP5Type.Log import log\n
log(script.getId(), "simulation movement %s should not have been selected !" % movement.getPath())\n
\n
return movement_list\n
</string> </value>
......@@ -115,8 +107,6 @@ return movement_list\n
<value>
<tuple>
<string>kw</string>
<string>DEBUG</string>
<string>LOG</string>
<string>_write_</string>
<string>_getattr_</string>
<string>_apply_</string>
......@@ -125,6 +115,9 @@ return movement_list\n
<string>_getiter_</string>
<string>movement</string>
<string>None</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>script</string>
</tuple>
</value>
</item>
......
......@@ -53,29 +53,21 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>DEBUG = 1\n
LOG = lambda msg:context.log("SaleInvoice_selectMovement", msg)\n
\n
kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Rule\'\n
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Rule\'\n
kw[\'explanation_portal_type\'] = [\'Sale Order\', \'Sale Invoice Transaction\', \'Sale Packing List\']\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = [\'started\']\n
\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
\n
if DEBUG :\n
LOG("SQL used = %s"%context.InvoiceTransaction_zSelectMovement(src__=1, **kw))\n
\n
movement_list = [] \n
for movement in context.InvoiceTransaction_zSelectMovement(**kw) :\n
movement = movement.getObject()\n
if movement.getDeliveryValue() is None :\n
movement_list.append(movement)\n
else : \n
LOG("simulation movement %s should not have been selected !" % movement.getPath())\n
\n
if DEBUG :\n
LOG("selected movement_list : %s"%movement_list)\n
else :\n
from Products.ERP5Type.Log import log\n
log(script.getId(), "simulation movement %s should not have been selected !" % movement.getPath())\n
\n
return movement_list\n
</string> </value>
......@@ -115,8 +107,6 @@ return movement_list\n
<value>
<tuple>
<string>kw</string>
<string>DEBUG</string>
<string>LOG</string>
<string>_write_</string>
<string>_getattr_</string>
<string>_apply_</string>
......@@ -125,6 +115,9 @@ return movement_list\n
<string>_getiter_</string>
<string>movement</string>
<string>None</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
<string>script</string>
</tuple>
</value>
</item>
......
......@@ -53,29 +53,22 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>DEBUG = 1\n
LOG = lambda msg:context.log("SaleInvoice_selectPackingListMovement", msg)\n
\n
kw[\'parent_specialise_portal_type\'] = \'Invoicing Rule\'\n
<value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoicing Rule\'\n
kw[\'explanation_portal_type\'] = [\'Sale Order\', \'Sale Packing List\']\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = [\'started\', \'stopped\',\'delivered\']\n
\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
\n
if DEBUG : \n
LOG("SQL used = %s"%context.InvoiceTransaction_zSelectMovement(src__=1, **kw))\n
\n
movement_list = [] \n
for movement in context.InvoiceTransaction_zSelectMovement(**kw) :\n
movement = movement.getObject()\n
if movement.getDeliveryValue() is None :\n
movement_list.append(movement)\n
else : \n
LOG("simulation movement %s should not have been selected !" % movement.getPath())\n
\n
if DEBUG :\n
LOG("selected movement_list : %s"%movement_list)\n
else :\n
from Products.ERP5Type.Log import log\n
log("SaleInvoice_selectPackingListMovement", \\\n
"simulation movement %s should not have been selected !" % movement.getPath())\n
\n
return movement_list\n
</string> </value>
......@@ -115,8 +108,6 @@ return movement_list\n
<value>
<tuple>
<string>kw</string>
<string>DEBUG</string>
<string>LOG</string>
<string>_write_</string>
<string>_getattr_</string>
<string>_apply_</string>
......@@ -125,6 +116,8 @@ return movement_list\n
<string>_getiter_</string>
<string>movement</string>
<string>None</string>
<string>Products.ERP5Type.Log</string>
<string>log</string>
</tuple>
</value>
</item>
......
136
\ No newline at end of file
138
\ 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