[REMOVE]test case of price margin.
bzr revid: dka@tinyerp.com-20140117101353-vbi7u3wfom0dep6j
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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."
|
||||
Reference in New Issue
Block a user