[ADD]test case for computation of price margin.

bzr revid: dka@tinyerp.com-20131028053025-4h9ftnaqtmbzp2yl
This commit is contained in:
Darshan Kalola (OpenERP)
2013-10-28 11:00:25 +05:30
parent 0d9d1dcec7
commit bc14d3e659
2 changed files with 26 additions and 0 deletions
+1
View File
@@ -62,6 +62,7 @@ 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,
@@ -0,0 +1,25 @@
-
I create a Product Template.
-
!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
-
I create product variant, set price margin and price extra.
-
!record {model: product.product, id: product_product_test1}:
product_tmpl_id: product_template_test1
standard_price: 10.0
list_price: 20.0
variants: 2GB, Wi-Fi , 6in
price_margin: 10.0
price_extra: 20.0
-
I check that the sale price of product is equal to (20 + ((20 * 10) / 100)) + 20.
-
!python {model: product.product}: |
product = self.browse(cr, uid, ref("product_product_test1"))
assert product.lst_price == (20 + ((20 * 10) / 100)) + 20, "Sell price is not correspond."