From 24eed8b0496bce3926ba834b3cc9ecb99d56fc8e Mon Sep 17 00:00:00 2001 From: Alexandre Boeglin <alex@nexedi.com> Date: Mon, 16 Jan 2006 16:10:53 +0000 Subject: [PATCH] If the resource and variations are set at the same time, resource must be set before any variation. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5129 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/DeliveryLine.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/product/ERP5/Document/DeliveryLine.py b/product/ERP5/Document/DeliveryLine.py index a8a75ce128..6ad6feeae3 100755 --- a/product/ERP5/Document/DeliveryLine.py +++ b/product/ERP5/Document/DeliveryLine.py @@ -89,6 +89,10 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated): # Force in _edit to modify variation_base_category_list first security.declarePrivate( '_edit' ) def _edit(self, REQUEST=None, force_update = 0, **kw): + # If variations and resources are set at the same time, resource must be + # set before any variation. + if kw.has_key('resource_value'): + self._setResourceValue( kw['resource_value'] ) # We must first prepare the variation_base_category_list before we do the edit of the rest #LOG('in edit', 0, str(kw)) if kw.has_key('variation_base_category_list'): -- 2.30.9