From 9e1c303cfa8e08318d6b6dbf054036218b17a6f5 Mon Sep 17 00:00:00 2001
From: Mame Coumba Sall <mame@nexedi.com>
Date: Wed, 29 Oct 2008 17:10:05 +0000
Subject: [PATCH] file modified so that categories delivery_mode and incoterm
 can be copied on invoice

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24404 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/InvoicingRule.py   | 9 ++++++++-
 product/ERP5/PropertySheet/Simulation.py | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Document/InvoicingRule.py b/product/ERP5/Document/InvoicingRule.py
index 2049c48592..2d3ef1e5e3 100644
--- a/product/ERP5/Document/InvoicingRule.py
+++ b/product/ERP5/Document/InvoicingRule.py
@@ -107,6 +107,8 @@ class InvoicingRule(Rule):
         'resource': context_movement.getResource(),
         'variation_category_list': context_movement.getVariationCategoryList(),
         'variation_property_dict': context_movement.getVariationPropertyDict(),
+	'delivery_mode':context_movement.getDeliveryMode(),
+	'incoterm':context_movement.getIncoterm(),
         'base_contribution_list': context_movement.getBaseContributionList(),
         'aggregate_list': context_movement.getAggregateList(),
         'quantity': context_movement.getCorrectedQuantity(),
@@ -135,7 +137,10 @@ class InvoicingRule(Rule):
       if not parent_movement.isFrozen():
         add_list, modify_dict, \
           delete_list = self._getCompensatedMovementList(applied_rule, **kw)
-
+	LOG("KW",0,kw)
+        LOG("Add List",0,add_list)
+	LOG("Delete List",0,delete_list)
+	LOG("Modify Dict",0,modify_dict)
         for movement_id in delete_list:
           applied_rule._delObject(movement_id)
       
@@ -150,6 +155,8 @@ class InvoicingRule(Rule):
           else:
             new_mvmt = applied_rule.newContent(portal_type=self.movement_type)
           new_mvmt.edit(**movement_dict)
+	  LOG("Movement Dict",0,movement_dict)
+	 
 
     # Pass to base class
     Rule.expand(self, applied_rule, force=force, **kw)
diff --git a/product/ERP5/PropertySheet/Simulation.py b/product/ERP5/PropertySheet/Simulation.py
index a53120600c..b52bfaedd3 100644
--- a/product/ERP5/PropertySheet/Simulation.py
+++ b/product/ERP5/PropertySheet/Simulation.py
@@ -74,5 +74,5 @@ class Simulation:
             'mode'        : 'w' },
   )
 
-  _categories = ('order', 'delivery')
+  _categories = ('order', 'delivery','delivery_mode','incoterm')
 
-- 
2.30.9