[FIX] product: missing default init before using it as dict

This revision bring back the possibility to use the copy method
of product.product without passing parameters

Closes #5236
This commit is contained in:
moylop260 2015-02-13 15:01:00 +01:00 committed by Denis Ledoux
parent 7638fe51a9
commit 88ab3db5f2
1 changed files with 3 additions and 0 deletions

View File

@ -1103,6 +1103,9 @@ class product_product(osv.osv):
if context is None:
context={}
if default is None:
default = {}
product = self.browse(cr, uid, id, context)
if context.get('variant'):
# if we copy a variant or create one, we keep the same template