[IMP] product:special product category pricelist is added
bzr revid: aag@tinyerp.com-20111227130001-8rm8chyikfrndx11
This commit is contained in:
parent
fda056cc05
commit
867270b78a
|
@ -41,6 +41,28 @@
|
|||
ctx.update({'pricelist': ref("product.list0"), 'quantity': 1})
|
||||
product_price = product_obj.browse(cr, uid, ref("product_product_pc2"), context=ctx).price
|
||||
assert new_price[0] == product_price,"20% discount is not given on sale price of special product"
|
||||
-
|
||||
For special product category pricelist,I make new rule in "Default Public Pricelist Version" if special category than give 25% Discount.
|
||||
-
|
||||
!record {model: product.pricelist.item, id: pricelist_rules_category_1}:
|
||||
name: Default Public Pricelist for Category
|
||||
min_quantity: 1
|
||||
categ_id: product.cat1
|
||||
sequence: 3
|
||||
base: 1
|
||||
price_version_id: product.ver0
|
||||
price_discount: -0.25
|
||||
-
|
||||
I check 25% discount is given on sale price of special category product.
|
||||
-
|
||||
!python {model: product.pricelist}: |
|
||||
result = self.price_get_multi(cr, uid, [ref("product.list0")], [(ref("product_product_fan2") ,5,False)])
|
||||
product_obj = self.pool.get("product.product")
|
||||
new_price = result[ref("product_product_fan2")].values()
|
||||
ctx = context.copy()
|
||||
ctx.update({'pricelist': ref("product.list0"), 'quantity': 1})
|
||||
product_price = product_obj.browse(cr, uid, ref("product_product_fan2"), context=ctx).price
|
||||
assert new_price[0] == product_price,"25% discount is not given on sale price of special category product."
|
||||
-
|
||||
Now I create new pricelist for end of yearto give 30% discount.
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue