From 6d1149f646660b96f2f2595553f244cb2e84bc87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 20 Jan 2009 18:25:40 +0000
Subject: [PATCH] r25183 was a wrong use of edit_order. edit_order are for
 properties that must be edited after other, not before.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25210 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Movement.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Document/Movement.py b/product/ERP5/Document/Movement.py
index b091db2695..d935a8aff3 100644
--- a/product/ERP5/Document/Movement.py
+++ b/product/ERP5/Document/Movement.py
@@ -810,7 +810,8 @@ class Movement(XMLObject, Amount):
   security.declarePrivate('_edit')
   def _edit(self, edit_order=(), **kw):
     """Overloaded _edit to support setting debit and credit at the same time,
-    which is required for the GUI. Also sets the resource first, because
+    which is required for the GUI.
+    Also sets the variation category list at the end, because 
     _setVariationCategoryList needs the resource to be set.
     """
     quantity = 0
@@ -823,7 +824,7 @@ class Movement(XMLObject, Amount):
                    kw.pop('destination_credit') or 0)
       kw['quantity'] = quantity
     if not edit_order:
-      edit_order = ('resource', 'resource_value')
+      edit_order = ('variation_category_list', )
     return XMLObject._edit(self, edit_order=edit_order, **kw)
 
   # Debit and credit methods for asset
-- 
2.30.9