Vidhin Mehta  (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/trunk-bug-1071794-vme into lp:openerp-web.

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)
Related bugs:
  Bug #1071794 in OpenERP Web: "[7.0 ] [6.1] KeyError: u'.id' with "Export all 
data" containing ID field"
  https://bugs.launchpad.net/openerp-web/+bug/1071794

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-1071794-vme/+merge/132281

*.id* field manually added in fields,wich is not check/added in *fields_info* 
function.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-1071794-vme/+merge/132281
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-bug-1071794-vme.
=== modified file 'addons/web/controllers/main.py'
--- addons/web/controllers/main.py	2012-10-10 20:37:53 +0000
+++ addons/web/controllers/main.py	2012-10-31 10:15:34 +0000
@@ -1767,7 +1767,9 @@
     def fields_info(self, req, model, export_fields):
         info = {}
         fields = self.fields_get(req, model)
-
+        if ".id" in export_fields:
+            fields['.id'] = fields.pop('id', {'string': 'ID'})
+            
         # To make fields retrieval more efficient, fetch all sub-fields of a
         # given field at the same time. Because the order in the export list is
         # arbitrary, this requires ordering all sub-fields of a given field

_______________________________________________
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