← Back to team overview

openerp-community team mailing list archive

lp:~openerp-community/openobject-addons/fix-1035868-sale-description into lp:openobject-addons/6.1

 

Niels Huylebroeck has proposed merging lp:~openerp-community/openobject-addons/fix-1035868-sale-description into lp:openobject-addons/6.1.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #1035868 in OpenERP Addons: "Notes field of sale order lines should be in partner language"
  https://bugs.launchpad.net/openobject-addons/+bug/1035868

For more details, see:
https://code.launchpad.net/~openerp-community/openobject-addons/fix-1035868-sale-description/+merge/130350

A fix for the correct language to be retrieved for the notes field of the product using the language of the customer instead of the language of the user.

This version avoids any changing of the context (duplicating/updating etc) and does not call another browse function.
-- 
https://code.launchpad.net/~openerp-community/openobject-addons/fix-1035868-sale-description/+merge/130350
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-addons/fix-1035868-sale-description.
=== modified file 'sale/sale.py'
--- sale/sale.py	2012-10-09 12:16:14 +0000
+++ sale/sale.py	2012-10-18 13:32:33 +0000
@@ -1246,6 +1246,8 @@
 
         if not flag:
             result['name'] = self.pool.get('product.product').name_get(cr, uid, [product_obj.id], context=context_partner)[0][1]
+            if product_obj.description_sale:
+                result['notes'] = product_obj.description_sale
         domain = {}
         if (not uom) and (not uos):
             result['product_uom'] = product_obj.uom_id.id


Follow ups