From 505b63fe5f4aa59bc6eadc6e5585f0d2d7539aa0 Mon Sep 17 00:00:00 2001
From: "Anup (OpenERP)" <ach@tinyerp.com>
Date: Tue, 11 May 2010 19:31:11 +0530
Subject: [PATCH] [IMP] By pass a missing field in the translation

bzr revid: ach@tinyerp.com-20100511140111-87az887kvi6rl0uz
---
 bin/tools/translate.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/tools/translate.py b/bin/tools/translate.py
index 05f7f95e9b41..cb6682863bf4 100644
--- a/bin/tools/translate.py
+++ b/bin/tools/translate.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
-#    
+#
 #    OpenERP, Open Source Management Solution
 #    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
 #
@@ -15,7 +15,7 @@
 #    GNU Affero General Public License for more details.
 #
 #    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 ##############################################################################
 
@@ -608,7 +608,7 @@ def trans_generate(lang, modules, dbname=None):
                     mod_paths.append(os.path.join(def_path,adp))
                 elif adp.startswith(def_path):
                     mod_paths.append(adp[len(def_path)+1:])
-        
+
         for mp in mod_paths:
             if path.startswith(mp) and (os.path.dirname(path) != mp):
                 path = path[len(mp)+1:]
@@ -767,7 +767,7 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name=
                 # the same source
                 obj = pool.get(model)
                 if obj:
-                    if not field in obj._columns:
+                    if field not in obj.fields_get_keys(cr, uid):
                         continue
                     ids = obj.search(cr, uid, [(field, '=', dic['src'])])
 
-- 
GitLab