[Erp5-report] r43598 jm - /erp5/trunk/products/ERP5/Document/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 23 11:20:13 CET 2011
Author: jm
Date: Wed Feb 23 11:20:12 2011
New Revision: 43598
URL: http://svn.erp5.org?rev=43598&view=rev
Log:
Update MRP to work with variated amount generator
Modified:
erp5/trunk/products/ERP5/Document/Resource.py
erp5/trunk/products/ERP5/Document/TransformedResource.py
Modified: erp5/trunk/products/ERP5/Document/Resource.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Resource.py?rev=43598&r1=43597&r2=43598&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Resource.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Resource.py [utf8] Wed Feb 23 11:20:12 2011
@@ -685,7 +685,7 @@ class Resource(XMLObject, XMLMatrix, Var
categories=new_category_list,
REQUEST=REQUEST, **kw)
# XXX When called for a generated amount, base_application may point
- # to nonexistant base_amount (e.g. "produced_quantity" for
+ # to nonexistant base_amount (e.g. "base_amount/produced_quantity" for
# transformations), which would make domain tool return nothing.
# Following hack cleans up a category we don't want to test anyway.
# Also, do not use '_setBaseApplication' to bypass interactions.
Modified: erp5/trunk/products/ERP5/Document/TransformedResource.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TransformedResource.py?rev=43598&r1=43597&r2=43598&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TransformedResource.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TransformedResource.py [utf8] Wed Feb 23 11:20:12 2011
@@ -97,7 +97,7 @@ class TransformedResource(AmountGenerato
@classmethod
def getBaseAmountQuantity(cls, delivery_amount, base_application, rounding):
value = delivery_amount.getGeneratedAmountQuantity(base_application)
- if base_application == 'produced_quantity':
+ if base_application == 'base_amount/produced_quantity':
value += delivery_amount.getConvertedQuantity()
return value
@@ -110,7 +110,8 @@ class TransformedResource(AmountGenerato
"""
"""
# It is OK to try to acquire
- return self._categoryGetBaseApplicationList() or ['produced_quantity']
+ return self._categoryGetBaseApplicationList() \
+ or ['base_amount/produced_quantity']
### Variation matrix definition
# XXX-JPS Some explanation needed
More information about the Erp5-report
mailing list