From 6901c4f981ca1562ac5ce85a3c6c08faad7ffe88 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 7 Jun 2013 11:30:44 +0200 Subject: [PATCH] [FIX] export: allow excluding special virtual fields from exportable data For example the virtual "Access Rights" fields on res.users cannot be browsed and cannot currently by exported. bzr revid: odo@openerp.com-20130607093044-y3bct44ralu8yf0o --- addons/web/controllers/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 93e08db64ea..d0bdfe3cdc4 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1481,6 +1481,8 @@ class Export(openerpweb.Controller): if all(dict(attrs).get('readonly', True) for attrs in field.get('states', {}).values()): continue + if not field.get('exportable', True): + continue id = prefix + (prefix and '/'or '') + field_name name = parent_name + (parent_name and '/' or '') + field['string']