diff --git a/addons/product/product_pricelist_demo.yml b/addons/product/product_pricelist_demo.yml index 09d5e9d3699..c0682abe5a9 100644 --- a/addons/product/product_pricelist_demo.yml +++ b/addons/product/product_pricelist_demo.yml @@ -13,21 +13,21 @@ - name: Default pricelist base: -1 base_pricelist_id: list0 - - name: 10% Discount on PC2 + - name: 10% Discount on Assemble Computer sequence: 1 product_id: product_product_4 base: !eval (ref('product.list_price')) price_discount: -0.10 - - name: 1 surchange on PC3 + - name: 1 surchange on Laptop sequence: 1 - product_id: product_product_5 + product_id: product_product_25 base: !eval (ref('product.list_price')) price_surcharge: 1 - - name: 5% Discount on all IT components + - name: 5% Discount on all Computer related products sequence: 1 min_quantity: 2 base: !eval (ref('product.list_price')) - categ_id: product_category_10 + categ_id: product_category_4 price_discount: -0.05 - name: v2.0 (Special Discount on all products during last 5 days in current year) date_start: 2011-12-27 @@ -48,15 +48,15 @@ sequence: 1 price_min_margin: 2 price_max_margin: -5 - product_id: product_product_4 + product_id: product_product_6 base: -2 - !record {model: pricelist.partnerinfo, id: supplier_pricelist0_product_pc2}: - suppinfo_id: supplierinfo6 + suppinfo_id: product_supplierinfo_2 min_quantity: 3 - price: 405 + price: 785 - !record {model: pricelist.partnerinfo, id: supplier_pricelist1_product_pc2}: - suppinfo_id: supplierinfo6 + suppinfo_id: product_supplierinfo_2 min_quantity: 1 - price: 455 + price: 790 diff --git a/addons/product/test/product_pricelist.yml b/addons/product/test/product_pricelist.yml index 4fbd0d2b731..3f245450ebf 100644 --- a/addons/product/test/product_pricelist.yml +++ b/addons/product/test/product_pricelist.yml @@ -1,17 +1,17 @@ - In order to check the calculation of price of the products according to pricelist, - - I check sale price of PC2. + I check sale price of Assemble Computer - !python {model: product.product}: | context.update({'pricelist': ref("customer_pricelist"), 'quantity':1}) product = self.browse(cr, uid, ref("product_product_4"), context=context) - assert product.price == product.lst_price-product.lst_price*(0.10), "Sell price is not correspond." + assert product.price == (product.lst_price-product.lst_price*(0.10)), "Sell price is not correspond." - - I check sale price of PC3. + I check sale price of Laptop. - !python {model: product.product}: | - product = self.browse(cr, uid, ref("product_product_5"), context=context) + product = self.browse(cr, uid, ref("product_product_25"), context=context) assert product.price == product.lst_price + 1, "Sell price is not correspond." - I check sale price of IT componet. @@ -48,15 +48,15 @@ - !python {model: product.product}: | context.update({'quantity':1, 'date': False, 'partner': ref('base.res_partner_4'), 'pricelist': ref("supplier_pricelist")}) - product = self.browse(cr, uid, ref("product_product_4"), context=context) - assert product.price == 450, "cost price is not correspond." + product = self.browse(cr, uid, ref("product_product_6"), context=context) + assert product.price == 785, "cost price is not correspond." - I check cost price of PC2 if more than 3 Unit. - !python {model: product.product}: | context.update({'quantity':3}) - product = self.browse(cr, uid, ref("product_product_4"), context=context) - assert product.price == 400, "cost price is not correspond." + product = self.browse(cr, uid, ref("product_product_6"), context=context) + assert product.price == 780, "cost price is not correspond." - I print the sale prices report.