From 952d39f30518d795d0e55b0e8f05f26a5e73baa2 Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Thu, 19 Jul 2007 15:56:01 +0000
Subject: [PATCH] Add a call to getPrice because it will be called on
 reindexation and it modifies the line, thus wasting space as the object would
 be commited twice.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15255 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_banking_core/CashDetail_saveFastInputLine.xml          | 2 ++
 bt5/erp5_banking_core/bt/revision                               | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml
index e027b6a4ac..f0c6d0615b 100644
--- a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml
+++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDetail_saveFastInputLine.xml
@@ -276,6 +276,8 @@ for resource_id in per_resource_dict.keys():\n
         cell.setInventory(variation_item["quantity"])\n
       else:\n
         cell.setQuantity(variation_item["quantity"])\n
+  line.getPrice() # Call getPrice now because it will be called on reindexation and it modifies the line.\n
+                  # So better modify it here so it\'s only saved once to ZODB.\n
 \n
 request  = context.REQUEST\n
 N_ = context.Base_translateString\n
diff --git a/bt5/erp5_banking_core/bt/revision b/bt5/erp5_banking_core/bt/revision
index 3bac779c0a..cb28afbd3c 100644
--- a/bt5/erp5_banking_core/bt/revision
+++ b/bt5/erp5_banking_core/bt/revision
@@ -1 +1 @@
-310
\ No newline at end of file
+313
\ No newline at end of file
-- 
2.30.9