Commit 96a0d6af authored by Sebastien Robin's avatar Sebastien Robin

added method getSubVariationText


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4802 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 553baea4
...@@ -36,6 +36,8 @@ from Products.ERP5Type.XMLObject import XMLObject ...@@ -36,6 +36,8 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Document.Amount import Amount from Products.ERP5.Document.Amount import Amount
from zLOG import LOG
class Movement(XMLObject, Amount): class Movement(XMLObject, Amount):
""" """
The Movement class allows to implement ERP5 universal accounting model. The Movement class allows to implement ERP5 universal accounting model.
...@@ -624,6 +626,21 @@ class Movement(XMLObject, Amount): ...@@ -624,6 +626,21 @@ class Movement(XMLObject, Amount):
quantity = self.getTotalQuantity() quantity = self.getTotalQuantity()
return self.getConsumptionQuantity(quantity=quantity) return self.getConsumptionQuantity(quantity=quantity)
security.declareProtected(Permissions.AccessContentsInformation,
'getSubVariationText')
def getSubVariationText(self,**kw):
"""
Provide a string representation of XXX
"""
base_category_list = self.getPortalSubVariationBaseCategoryList()
portal_type_list = self.getPortalSubVariationTypeList()
return_list = []
for base_category in base_category_list:
variation_list = self.getAcquiredCategoryMembershipList(base_category,
portal_type=portal_type_list,base=1)
return_list.extend(variation_list)
return "\n".join(return_list)
# SKU vs. CU # SKU vs. CU
# security.declareProtected(Permissions.AccessContentsInformation, 'getSourceStandardInventoriatedQuantity') # security.declareProtected(Permissions.AccessContentsInformation, 'getSourceStandardInventoriatedQuantity')
# def getSourceStandardInventoriatedQuantity(self): # def getSourceStandardInventoriatedQuantity(self):
......
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