[FIX] web: fix migration to new api

Context in new API is not more a parameter.
Before this fix, context was interpreted has attribute parameter
and so the fields_get return empty dict.

This commit fix tracback when we try to export data in list view from
any model. The wizard try to know the fields from current model and a
traceback is raised (key error for  field['string'])
This commit is contained in:
Jeremy Kersten
2016-06-20 13:05:20 +02:00
parent fc22b549b1
commit 6ad47aeb68
+2 -2
View File
@@ -1139,8 +1139,8 @@ class Export(http.Controller):
]
def fields_get(self, model):
Model = request.session.model(model)
fields = Model.fields_get(False, request.context)
Model = request.env[model]
fields = Model.fields_get()
return fields
@http.route('/web/export/get_fields', type='json', auth="user")