From 694dde198c63e343cf27cd5e737143422c70bee5 Mon Sep 17 00:00:00 2001 From: "Atik Agewan (OpenERP)" Date: Mon, 26 Dec 2011 16:05:20 +0530 Subject: [PATCH] [IMP] product:Add pricelist for special products bzr revid: aag@tinyerp.com-20111226103520-lv7d47r3hh8gbfo2 --- addons/product/test/product_price_list.yml | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/addons/product/test/product_price_list.yml b/addons/product/test/product_price_list.yml index 42f8b6a3733..8d58ec8cc07 100644 --- a/addons/product/test/product_price_list.yml +++ b/addons/product/test/product_price_list.yml @@ -21,6 +21,30 @@ result = self.price_get_multi(cr, uid, [ref("product.list0")], [(ref("product_product_pc1") ,5,ref("base.res_partner_desertic_hispafuentes"))]) new_price = result[ref("product_product_pc1")].values() assert new_price[0] == 400,"PC1 sale price is not 400 with Discount." +- + For special product pricelist, first I check "PC2" sale price is 750. +- + !python {model: product.product}: | + prd_brw = self.browse(cr, uid, ref("product_product_pc2")) + assert prd_brw.list_price == 750,"PC2 sale price is not 750" +- + Make new rule in "Default Public Pricelist Version" if product is "PC2" than 30 Rs off on sale price of product . +- + !record {model: product.pricelist.item, id: pricelist_rules_for_pc2}: + name: Default Public Pricelist for PC2 + min_quantity: 1 + product_id: product.product_product_pc2 + sequence: 1 + base: 2 + price_version_id: product.ver0 + price_surcharge: 220 +- + I check sale price of PC2 is 720 by discount. +- + !python {model: product.pricelist}: | + result = self.price_get_multi(cr, uid, [ref("product.list0")], [(ref("product_product_pc2") ,5,ref("base.res_partner_desertic_hispafuentes"))]) + new_price = result[ref("product_product_pc2")].values() + assert new_price[0] == 720,"PC1 sale price is not 720 with Discount." - Now I deactivate the old pricelist version. -