Commit d1f1e798 authored by Jérome Perrin's avatar Jérome Perrin

This script is also used for purchase invoices, update docs and variable names


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24270 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 01add7d3
......@@ -54,24 +54,23 @@
<item>
<key> <string>_body</string> </key>
<value> <string>#\n
# this script is called on the Sale Invoice Transaction\n
# after the sale_invoice_builder delivery builder has created\n
# the new Sale Invoice Transaction\n
# it calls SaleInvoiceTransaction_postGenerationActivity when indexing is done \n
# this script is called on the Invoice after the delivery builder has created\n
# the new Invoice.\n
# it calls InvoiceTransaction_postGenerationActivity when indexing is done \n
#\n
\n
if related_simulation_movement_path_list is None:\n
raise RuntimeError, \'related_simulation_movement_path_list is missing. Update ERP5 Product.\'\n
\n
sale_invoice = context\n
packing_list = sale_invoice.getCausalityValue()\n
invoice = context\n
packing_list = invoice.getCausalityValue()\n
if packing_list is not None:\n
sale_invoice.setDeliveryMode(packing_list.getDeliveryMode())\n
invoice.setDeliveryMode(packing_list.getDeliveryMode())\n
order = packing_list.getCausalityValue()\n
if order is not None:\n
sale_invoice.setSpecialise(order.getSpecialise())\n
invoice.setSpecialise(order.getSpecialise())\n
\n
sale_invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
invoice.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))).InvoiceTransaction_postGenerationActivity(related_simulation_movement_path_list=related_simulation_movement_path_list, **kw)\n
</string> </value>
</item>
......@@ -114,7 +113,7 @@ sale_invoice.activate(after_path_and_method_id=(related_simulation_movement_path
<string>None</string>
<string>RuntimeError</string>
<string>context</string>
<string>sale_invoice</string>
<string>invoice</string>
<string>_getattr_</string>
<string>packing_list</string>
<string>order</string>
......
149
\ No newline at end of file
150
\ 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