[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:
@@ -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):
|
||||
|
||||
@@ -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."
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user