[ADD]test case for computation of price margin.
bzr revid: dka@tinyerp.com-20131028053025-4h9ftnaqtmbzp2yl
This commit is contained in:
@@ -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."
|
||||
Reference in New Issue
Block a user