Some fields are not exportable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web Client |
Fix Released
|
Undecided
|
Navrang Oza |
Bug Description
When browsing records on the web client, if you click on the export button, only the fields from the default form/tree will appear in the list of available fields. The GTK Client behaves correctly however.
In my case, I use a wizard to craft a context with specific parameters to compute a total of purchases on a supplier using a function field. That function field is only displayed on the view called at the end state of the wizard. When I want to export my carefully-crafted view, I can't select the total of purchases.
Note that for this bug to appear, the view must not have a form associated.
What happens under the hood (controllers/
The function _fields_get_all is always called with the view parameter set to '{}'; no matter what. This leads us to the calling code: ImpEx.get_fields(). It turns out that kw['views'] is eval()ed and breaks whenever the current view has no form associated because the value of the element 'form' is not False but false (probably because of some javascript or json).
Example kw['views']:
'{"tree": 511, "form": false}'
Proposed fix:
eval(
Good fix:
Track down which part of the client passes 'false'.
Changed in openobject-client-web: | |
assignee: | nobody → noz (Open ERP) (noz-tiny) |
Changed in openobject-client-web: | |
status: | New → Fix Released |
milestone: | none → 5.0.15 |
Okay. My fix is not as wrong as I thought. To be more correct it should just use the simplejson module to convert the string instead of doing an eval.