[IMP] product:Optimize code

bzr revid: aag@tinyerp.com-20111227122215-0nhphhqqf2oi3p4a
This commit is contained in:
Atik Agewan (OpenERP) 2011-12-27 17:52:15 +05:30
parent 96afba49be
commit 07b5052117
2 changed files with 7 additions and 6 deletions

View File

@ -61,9 +61,10 @@ Print product labels with barcode.
'partner_view.xml',
'process/product_process.xml'
],
'test':['test/product_report.yml',
'test/product_test.yml',
'test/product_price_list.yml'],
'test':['test/product_test.yml',
'test/product_price_list.yml',
'test/product_report.yml'],
'installable': True,
'active': False,

View File

@ -13,7 +13,7 @@
-
!python {model: product.pricelist}: |
product_obj = self.pool.get("product.product")
result = self.price_get_multi(cr, uid, [ref("product.list0")], [(ref("product_product_pc1") ,5,ref("base.res_partner_desertic_hispafuentes"))])
result = self.price_get_multi(cr, uid, [ref("product.list0")], [(ref("product_product_pc1") ,5,False)])
new_price = result[ref("product_product_pc1")].values()
ctx = context.copy()
ctx.update({'pricelist': ref("product.list0"), 'quantity': 5})
@ -34,7 +34,7 @@
I check 20% discount is given on sale price of special product.
-
!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"))])
result = self.price_get_multi(cr, uid, [ref("product.list0")], [(ref("product_product_pc2") ,5,False)])
product_obj = self.pool.get("product.product")
new_price = result[ref("product_product_pc2")].values()
ctx = context.copy()
@ -68,7 +68,7 @@
I check 30% discount is given on sale price of product at end of year.
-
!python {model: product.pricelist}: |
result = self.price_get_multi(cr, uid, [ref("product.list0")], [(ref("product_product_pc1") ,5,ref("base.res_partner_desertic_hispafuentes"))])
result = self.price_get_multi(cr, uid, [ref("product.list0")], [(ref("product_product_pc1") ,5,False)])
new_price = result[ref("product_product_pc1")].values()
product_obj = self.pool.get("product.product")
ctx = context.copy()