Somesh Khare(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-server/6.1-opw-575650-skh into 
lp:openobject-server/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/6.1-opw-575650-skh/+merge/109831

Hello Sir,

[FIX] orm.py: Export data: key of selection field is not exported

Whenever we export the selection field its value exported, where it should be 
its key not the value.

This branch fixes this issue. Kindly review the branch and please share your 
views on it.

Thanks,
Somesh Khare
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/6.1-opw-575650-skh/+merge/109831
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/6.1-opw-575650-skh.
=== modified file 'openerp/osv/orm.py'
--- openerp/osv/orm.py	2012-06-09 01:05:49 +0000
+++ openerp/osv/orm.py	2012-06-12 13:03:21 +0000
@@ -1133,7 +1133,7 @@
                         if cols and cols._type == 'selection':
                             sel_list = cols.selection
                             if r and type(sel_list) == type([]):
-                                r = [x[1] for x in sel_list if r==x[0]]
+                                r = [x[0] for x in sel_list if r==x[0]]
                                 r = r and r[0] or False
                     if not r:
                         if f[i] in self._columns:

_______________________________________________
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