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 @@ ...@@ -68,23 +68,23 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>LOG=lambda msg:context.log("PackingList_buildInvoice", msg)\n <value> <string>LOG=lambda msg:context.log("TaskReport_buildInvoice", msg)\n
LOG=lambda msg:\'DISABLED\'\n
\n \n
packing_list = sci.object\n packing_list = sci.object\n
delivery_tool = sci.getPortal().portal_deliveries\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 \n
if hasattr(delivery_tool, \'task_invoice_builder\') :\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 delivery_tool.task_invoice_builder.activate(\n
after_method_id = [ \'expand\', \n after_method_id = [ \'expand\', \n
\'recursiveImmediateReindexObject\',\n \'recursiveImmediateReindexObject\',\n
\'immediateReindexObject\' ],\n \'immediateReindexObject\' ],\n
).build()\n ).build()\n
else :\n else :\n
packing_list.log("ERP5 Simulation",\n packing_list.log("ERP5 Simulation",\n
"Unable to build Invoice from packing list at %s "\\\n "Unable to build Invoice from Task Report at %s "\\\n
": no sale_invoice_builder" % packing_list.getPath())\n ": no task_invoice_builder" % packing_list.getPath())\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -132,6 +132,7 @@ else :\n ...@@ -132,6 +132,7 @@ else :\n
<string>_getattr_</string> <string>_getattr_</string>
<string>packing_list</string> <string>packing_list</string>
<string>delivery_tool</string> <string>delivery_tool</string>
<string>None</string>
<string>hasattr</string> <string>hasattr</string>
</tuple> </tuple>
</value> </value>
......
202 204
\ 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