From d1f1e798411b8a97bebeae3ec16204196e04db23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 21 Oct 2008 11:56:55 +0000
Subject: [PATCH] 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
---
 .../InvoiceTransaction_postGeneration.xml     | 19 +++++++++----------
 bt5/erp5_invoicing/bt/revision                |  2 +-
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGeneration.xml b/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGeneration.xml
index cecf7b7fd0..1150076896 100644
--- a/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGeneration.xml
+++ b/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postGeneration.xml
@@ -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>
diff --git a/bt5/erp5_invoicing/bt/revision b/bt5/erp5_invoicing/bt/revision
index d7019ae2ee..4701cc7931 100644
--- a/bt5/erp5_invoicing/bt/revision
+++ b/bt5/erp5_invoicing/bt/revision
@@ -1 +1 @@
-149
\ No newline at end of file
+150
\ No newline at end of file
-- 
2.30.9