Commit 863cfd4d authored by Jérome Perrin's avatar Jérome Perrin

in the default configuration, we should only build the invoice related to the...

in the default configuration, we should only build the invoice related to the packing list that have been started/stopped

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25324 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 91796c04
......@@ -58,6 +58,9 @@ packing_list = sci[\'object\']\n
delivery_tool = sci.getPortal().portal_deliveries\n
\n
if packing_list.getPortalType() == \'Purchase Packing List\':\n
explanation_uid = packing_list.getCausalityUid(\n
portal_type=\'Purchase Order\') or packing_list.getUid()\n
\n
tag = \'build_invoice_%s\' % packing_list.getRelativeUrl()\n
# WARNING: this tag is also used in InvoiceTransaction_postGeneration script\n
tax_tag = \'build_invoice_tax_%s\' % packing_list.getRelativeUrl()\n
......@@ -71,7 +74,7 @@ if packing_list.getPortalType() == \'Purchase Packing List\':\n
\'recursiveImmediateReindexObject\',\n
\'updateAppliedRule\',\n
\'immediateReindexObject\' ],\n
).build()\n
).build(explanation_uid=explanation_uid)\n
else:\n
log(\'no purchase_invoice_builder found\')\n
\n
......@@ -84,7 +87,7 @@ if packing_list.getPortalType() == \'Purchase Packing List\':\n
\'recursiveImmediateReindexObject\',\n
\'updateAppliedRule\',\n
\'immediateReindexObject\' ],\n
).build()\n
).build(explanation_uid=explanation_uid)\n
else:\n
log(\'no purchase_invoice_tax_builder found\')\n
</string> </value>
......@@ -130,6 +133,7 @@ if packing_list.getPortalType() == \'Purchase Packing List\':\n
<string>packing_list</string>
<string>_getattr_</string>
<string>delivery_tool</string>
<string>explanation_uid</string>
<string>tag</string>
<string>tax_tag</string>
<string>getattr</string>
......
......@@ -56,7 +56,11 @@
<value> <string>from Products.ERP5Type.Log import log\n
packing_list = sci[\'object\']\n
delivery_tool = sci.getPortal().portal_deliveries\n
\n
if packing_list.getPortalType() == \'Sale Packing List\':\n
explanation_uid = packing_list.getCausalityUid(\n
portal_type=\'Sale Order\') or packing_list.getUid()\n
\n
tag = \'build_invoice_%s\' % packing_list.getRelativeUrl()\n
# WARNING: this tag is also used in InvoiceTransaction_postGeneration script\n
tax_tag = \'build_invoice_tax_%s\' % packing_list.getRelativeUrl()\n
......@@ -70,7 +74,7 @@ if packing_list.getPortalType() == \'Sale Packing List\':\n
\'recursiveImmediateReindexObject\',\n
\'updateAppliedRule\',\n
\'immediateReindexObject\' ],\n
).build()\n
).build(explanation_uid=explanation_uid)\n
else:\n
log(\'no sale_invoice_builder found\')\n
\n
......@@ -83,7 +87,7 @@ if packing_list.getPortalType() == \'Sale Packing List\':\n
\'recursiveImmediateReindexObject\',\n
\'updateAppliedRule\',\n
\'immediateReindexObject\' ],\n
).build()\n
).build(explanation_uid=explanation_uid)\n
else:\n
log(\'no sale_invoice_tax_builder found\')\n
</string> </value>
......@@ -129,6 +133,7 @@ if packing_list.getPortalType() == \'Sale Packing List\':\n
<string>packing_list</string>
<string>_getattr_</string>
<string>delivery_tool</string>
<string>explanation_uid</string>
<string>tag</string>
<string>tax_tag</string>
<string>getattr</string>
......
577
\ No newline at end of file
578
\ 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