Commit 6d1149f6 authored by Jérome Perrin's avatar Jérome Perrin

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
parent 293a0f7d
......@@ -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
......
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