diff --git a/addons/product/__openerp__.py b/addons/product/__openerp__.py index 6f9b9ab08f8..194cc91b019 100644 --- a/addons/product/__openerp__.py +++ b/addons/product/__openerp__.py @@ -65,7 +65,6 @@ Print product labels with barcode. 'product_pricelist_demo.yml', 'test/product_uom.yml', 'test/product_pricelist.yml', - 'test/compute_price_margin.yml', ], 'installable': True, 'auto_install': False, diff --git a/addons/product/test/compute_price_margin.yml b/addons/product/test/compute_price_margin.yml deleted file mode 100644 index cbef2994783..00000000000 --- a/addons/product/test/compute_price_margin.yml +++ /dev/null @@ -1,33 +0,0 @@ -- - I create a Product Template "Tablate PC" with variant "2GB, Wi-Fi , 6in and set Variant Price Margin(%) = 10 and Variant Price Extra = 30." -- - !record {model: product.template, id: product_template_test1}: - name: Tablate PC - type: service - categ_id: product_category_8 - uom_id: product_uom_unit - uom_po_id: product_uom_unit - product_variant_ids: - - variants: 2GB, Wi-Fi , 6in - list_price: 20.0 - price_margin: 10.0 - price_extra: 30.0 -- - Now I check new sale price after setting price margins and price extra is equal to (20 + ((20 * 10) / 100)) + 30. -- - !python {model: product.template}: | - template = self.browse(cr, uid, ref("product_template_test1")) - for variant_id in template.product_variant_ids: - product = self.pool.get('product.product').browse(cr,uid,variant_id.id,context=context) - assert product.lst_price == (20 + ((20 * 10) / 100)) + 30, "Sell price is not correspond." -- - In order to check the Price Extra after setting 'public sale price(lst_price)' of a product. price extra is equal to 32 - (20 + ((20 * 10) / 100)). -- - !python {model: product.template}: | - template = self.browse(cr, uid, ref("product_template_test1")) - for variant_id in template.product_variant_ids: - self.pool.get('product.product').write(cr,uid,variant_id.id,{'lst_price':32},context=context) - product = self.pool.get('product.product').browse(cr,uid,variant_id.id,context=context) - #assert product.lst_price == 32, "Sale Price should be 32." - #assert product.list_price == 20, "Template Sale Price should not be changed." - #assert product.price_extra == 10, "Extra Price should be 10."