From cf18060ad227c27e51454d7b80a95180ad22595d Mon Sep 17 00:00:00 2001 From: "Guewen Baconnier @ Camptocamp" Date: Wed, 26 Sep 2012 09:33:39 +0200 Subject: [PATCH] [IMP] do not get the fields when that is not needed (/home/gbaconnier/code/openerp/c2c-web-addons/lp6.1-main rev 8) --- web_translate_dialog_page/orm.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web_translate_dialog_page/orm.py b/web_translate_dialog_page/orm.py index 03b1f742..8ede8518 100644 --- a/web_translate_dialog_page/orm.py +++ b/web_translate_dialog_page/orm.py @@ -141,12 +141,12 @@ def read_translations(self, cr, user, ids, fields=None, context=None, load='_cla select = map(lambda x: isinstance(x, dict) and x['id'] or x, select) result = self._read_flat(cr, user, select, fields, context, load) - fields_pre = [f for f in fields if - (f in self._columns and - getattr(self._columns[f], '_classic_write'))] + \ - self._inherits.values() - if context.get('lang') and context['lang'] != 'en_US': + fields_pre = [f for f in fields if + (f in self._columns and + getattr(self._columns[f], '_classic_write'))] + \ + self._inherits.values() + for f in fields_pre: if self._columns[f].translate: res_ids = [x['id'] for x in result]