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