Rifakat (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-579011-rha into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)
Related bugs:
  Bug #1048547 in OpenERP Addons: "[6.1] purchase: changing a product uses 
wrong supplier info data"
  https://bugs.launchpad.net/openobject-addons/+bug/1048547

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579011-rha/+merge/123682

Hello,

Fix domain of search() on product.supplierinfo, it searches for supplier on
onchange_product_id() with product_id instead of product_tmpl_id.

product.supplierinfo has relation with product.template, not with 
product.product
so when product_id and product_tmpl_id differs for any product in that case it
will cause problem.
(Courtesy to Niels Huylebroeck)

Thanks for your review.

Regards,
Rifakat Haradwala


-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-579011-rha/+merge/123682
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-579011-rha.
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py	2012-07-25 17:07:19 +0000
+++ purchase/purchase.py	2012-09-11 05:48:20 +0000
@@ -777,7 +777,7 @@
 
         qty = qty or 1.0
         supplierinfo = False
-        supplierinfo_ids = product_supplierinfo.search(cr, uid, [('name','=',partner_id),('product_id','=',product.id)])
+        supplierinfo_ids = product_supplierinfo.search(cr, uid, [('name', '=', partner_id),('product_id', '=', product.product_tmpl_id.id)])
         if supplierinfo_ids:
             supplierinfo = product_supplierinfo.browse(cr, uid, supplierinfo_ids[0], context=context)
             if supplierinfo.product_uom.id != uom_id:

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to