diff --git a/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_copyComposition.xml b/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_copyComposition.xml index 296f6004ee482049bfe329e61c9608408418722c..1605c266e0cdd7a5d61d8176bf3c36c88d7f0e56 100644 --- a/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_copyComposition.xml +++ b/bt5/erp5_apparel/SkinTemplateItem/portal_skins/erp5_apparel/ApparelModel_copyComposition.xml @@ -83,8 +83,8 @@ elif len(colour_range.contentValues(portal_type=\'Apparel Colour Range Variation cell = fabric.getCell(cat, base_id=\'composition\')\n if cell is not None:\n new_cell = context.newCell(cat, base_id=\'composition\',\n - portal_type=\'Mapped Value\')\n - new_cell.setQuantity(cell.getQuantity())\n + portal_type=\'Mapped Value\', # XXX\n + quantity=cell.getProperty(\'quantity\'))\n if len(poly_list):\n msg = context.Base_translateString(\'${count} Compositions created.\',\n mapping={\'count\': len(poly_list)})\n diff --git a/bt5/erp5_apparel/bt/revision b/bt5/erp5_apparel/bt/revision index 800607208989be000adc8de8c204c78b2ec63f3a..e21ad0e4fb7d1edee08de145cb18998d252085ab 100644 --- a/bt5/erp5_apparel/bt/revision +++ b/bt5/erp5_apparel/bt/revision @@ -1 +1 @@ -272 \ No newline at end of file +273 \ No newline at end of file diff --git a/product/ERP5/tests/testApparelModel.py b/product/ERP5/tests/testApparelModel.py index f0f33c751624c9b1b5911058a1c4b29db69a875f..add4192eaad6424965db9a4cdac5bb9b8425c12a 100644 --- a/product/ERP5/tests/testApparelModel.py +++ b/product/ERP5/tests/testApparelModel.py @@ -152,13 +152,13 @@ class TestApparelModel(ERP5TypeTestCase): 'composition/acrylique', base_id = 'composition') self.assertNotEquals(acrylique, None) - self.assertEqual(acrylique.getQuantity(), 0.88) + self.assertEqual(acrylique.getProperty('quantity'), 0.88) elasthane = apparel_model.getCell( 'composition/elasthane', base_id = 'composition') self.assertNotEquals(elasthane, None) - self.assertEqual(elasthane.getQuantity(), 0.12) + self.assertEqual(elasthane.getProperty('quantity'), 0.12) # check indexes are present self.assertTrue(apparel_model.index.has_key('composition'))