[FIX] web: sort tree view by id
Previously, if the ID column was displayed it was not sortable.
The particular case added 247c1972
is no longer needed with the new api,
id is in the list of existing fields (see xmo comment in #7461).
closes #7487, closes #7461
fixes #7459
opw-644009
This commit is contained in:
parent
be2efb207c
commit
0920c2fae0
|
@ -833,10 +833,7 @@ class view(osv.osv):
|
|||
if k not in fields_def:
|
||||
del fields[k]
|
||||
for field in fields_def:
|
||||
if field == 'id':
|
||||
# sometime, the view may contain the (invisible) field 'id' needed for a domain (when 2 objects have cross references)
|
||||
fields['id'] = {'readonly': True, 'type': 'integer', 'string': 'ID'}
|
||||
elif field in fields:
|
||||
if field in fields:
|
||||
fields[field].update(fields_def[field])
|
||||
else:
|
||||
message = _("Field `%(field_name)s` does not exist") % \
|
||||
|
|
Loading…
Reference in New Issue