Commit be4a9f98 authored by Rafael Monnerat's avatar Rafael Monnerat

Modified to generate invoices only when the erp5_accounting is installed.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12495 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fac33603
......@@ -68,23 +68,23 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>LOG=lambda msg:context.log("PackingList_buildInvoice", msg)\n
LOG=lambda msg:\'DISABLED\'\n
<value> <string>LOG=lambda msg:context.log("TaskReport_buildInvoice", msg)\n
\n
packing_list = sci.object\n
delivery_tool = sci.getPortal().portal_deliveries\n
LOG("packing_list : %s"%packing_list.getPath())\n
LOG("Task Report : %s"%packing_list.getPath())\n
\n
if hasattr(delivery_tool, \'task_invoice_builder\') :\n
delivery_tool.task_invoice_builder.activate(\n
after_method_id = [ \'expand\', \n
\'recursiveImmediateReindexObject\',\n
\'immediateReindexObject\' ],\n
).build()\n
else :\n
packing_list.log("ERP5 Simulation",\n
"Unable to build Invoice from packing list at %s "\\\n
": no sale_invoice_builder" % packing_list.getPath())\n
if sci.getPortal().getDefaultModule(\'Accounting Module\') is not None:\n
if hasattr(delivery_tool, \'task_invoice_builder\'):\n
delivery_tool.task_invoice_builder.activate(\n
after_method_id = [ \'expand\', \n
\'recursiveImmediateReindexObject\',\n
\'immediateReindexObject\' ],\n
).build()\n
else :\n
packing_list.log("ERP5 Simulation",\n
"Unable to build Invoice from Task Report at %s "\\\n
": no task_invoice_builder" % packing_list.getPath())\n
</string> </value>
</item>
<item>
......@@ -132,6 +132,7 @@ else :\n
<string>_getattr_</string>
<string>packing_list</string>
<string>delivery_tool</string>
<string>None</string>
<string>hasattr</string>
</tuple>
</value>
......
202
\ No newline at end of file
204
\ 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