Commit 790af8e6 authored by Fabien Morin's avatar Fabien Morin

remove the old method convertQuantity overload to use the generic one.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31621 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6da753b6
......@@ -57,15 +57,3 @@ class ApparelComponent(Resource):
, PropertySheet.ApparelCollection
, PropertySheet.VariationRange
)
# Unit conversion
security.declareProtected(Permissions.AccessContentsInformation, 'convertQuantity')
def convertQuantity(self, quantity, from_unit, to_unit):
quantity = float(quantity)
if from_unit == 'measurement/meter' and to_unit == 'unit/cone':
return quantity / self.getLengthQuantity()
elif from_unit == 'unit/cone' and to_unit == 'measurement/meter':
return quantity * self.getLengthQuantity()
else:
return quantity
241
\ No newline at end of file
242
\ No newline at end of file
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