[IMP] don't fetch an m2o's subfields in import compat (we're just discarding them anyway, it's a waste of time)

bzr revid: xmo@openerp.com-20110831140402-9gs2m3nbt5tisv4x
This commit is contained in:
Xavier Morel 2011-08-31 16:04:02 +02:00
parent 2a63d1d635
commit bc92fa4ef5
1 changed files with 3 additions and 1 deletions

View File

@ -1089,9 +1089,11 @@ class Export(View):
def get_fields(self, req, model, prefix='', parent_name= '',
import_compat=True, parent_field_type=None):
fields = self.fields_get(req, model)
if import_compat and parent_field_type == "many2one":
fields = {}
else:
fields = self.fields_get(req, model)
fields.update({'id': {'string': 'ID'}, '.id': {'string': 'Database ID'}})
fields_sequence = sorted(fields.iteritems(),