nel has proposed merging lp:~openerp-dev/openobject-addons/6.1-opw-575225-nel 
into lp:openobject-addons/6.1.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-575225-nel/+merge/112587

The method: onchange_product_id defined on the purchase order lines should 
return code + description of PO's supplier, instead of, all the time, product 
name.

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-575225-nel/+merge/112587
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-575225-nel.
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py	2012-02-16 12:34:08 +0000
+++ purchase/purchase.py	2012-06-28 15:19:23 +0000
@@ -755,7 +755,8 @@
         lang = res_partner.browse(cr, uid, partner_id).lang
         context_partner = {'lang': lang, 'partner_id': partner_id}
         product = product_product.browse(cr, uid, product_id, context=context_partner)
-        res['value'].update({'name': product.name, 'notes': notes or product.description_purchase})
+        prod_name = product_product.name_get(cr, uid, [product_id], context=context_partner)[0][1]
+        res['value'].update({'name': prod_name, 'notes': notes or product.description_purchase})
         
         # - set a domain on product_uom
         res['domain'] = {'product_uom': [('category_id','=',product.uom_id.category_id.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