[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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user