[FIX] added *.id* field manually.
authorVidhin Mehta (OpenERP) <vme@tinyerp.com>
Wed, 31 Oct 2012 10:07:37 +0000 (15:37 +0530)
committerVidhin Mehta (OpenERP) <vme@tinyerp.com>
Wed, 31 Oct 2012 10:07:37 +0000 (15:37 +0530)
lp bug: https://launchpad.net/bugs/1071794 fixed

bzr revid: vme@tinyerp.com-20121031100737-u0r015etp6jilo80

addons/web/controllers/main.py

index 72ffd95..4dabc4c 100644 (file)
@@ -1767,7 +1767,9 @@ class Export(View):
     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