[FIX] product: context in _select_seller

It should contain 'partner_id' instead of 'partner' as it was the case
previously
This commit is contained in:
Nicolas Martinelli
2015-09-02 19:35:12 +02:00
parent bc1663ff53
commit 834721e708
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -470,7 +470,7 @@ class product_template(osv.osv):
if context is None:
context = {}
res = {}
partner = context.get('partner')
partner = context.get('partner_id')
minimal_quantity = context.get('quantity', 0.0)
date = context.get('date', time.strftime(DEFAULT_SERVER_DATE_FORMAT))
for product in self.browse(cr, uid, ids, context=context):
+1 -1
View File
@@ -51,7 +51,7 @@
-
!python {model: product.product}: |
from openerp.tools import float_compare
context.update({'quantity':1, 'date': False, 'partner': ref('base.res_partner_4')})
context.update({'quantity':1, 'date': False, 'partner_id': ref('base.res_partner_4')})
product = self.browse(cr, uid, ref("product_product_6"), context=context)
assert float_compare(product.seller_price, 790, precision_digits=2) == 0, "Wrong cost price: LCD Monitor."
-