From 790af8e6794779ff21841e4ac56f3a5608384d8c Mon Sep 17 00:00:00 2001 From: Fabien Morin <fabien@nexedi.com> Date: Thu, 7 Jan 2010 08:59:26 +0000 Subject: [PATCH] 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 --- .../DocumentTemplateItem/ApparelComponent.py | 12 ------------ bt5/erp5_apparel/bt/revision | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/bt5/erp5_apparel/DocumentTemplateItem/ApparelComponent.py b/bt5/erp5_apparel/DocumentTemplateItem/ApparelComponent.py index cf61436f39..e107ae8725 100644 --- a/bt5/erp5_apparel/DocumentTemplateItem/ApparelComponent.py +++ b/bt5/erp5_apparel/DocumentTemplateItem/ApparelComponent.py @@ -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 - diff --git a/bt5/erp5_apparel/bt/revision b/bt5/erp5_apparel/bt/revision index 9ce0f492d8..b6e27607fb 100644 --- a/bt5/erp5_apparel/bt/revision +++ b/bt5/erp5_apparel/bt/revision @@ -1 +1 @@ -241 \ No newline at end of file +242 \ No newline at end of file -- 2.30.9