From 7e7e2482df3d93a9dd5ab3876f32e36cd201be1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 4 Jul 2008 17:30:18 +0200 Subject: [PATCH] Don't translate technical field and fix technical field string --- trytond/osv/orm.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index 68b290c208..69a081f85c 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -319,11 +319,13 @@ class ORM(object): field.help, columns[k]['id'])) trans_name = self._name + ',' + k if trans_name not in trans_columns: - cursor.execute('INSERT INTO ir_translation ' \ - '(name, lang, type, src, value, module) ' \ - 'VALUES (%s, %s, %s, %s, %s, %s)', - (trans_name, 'en_US', 'field', - field.string, '', module_name)) + if k not in ('create_uid', 'create_date', + 'write_uid', 'write_date', 'id'): + cursor.execute('INSERT INTO ir_translation ' \ + '(name, lang, type, src, value, module) ' \ + 'VALUES (%s, %s, %s, %s, %s, %s)', + (trans_name, 'en_US', 'field', + field.string, '', module_name)) elif trans_columns[trans_name]['src'] != field.string: cursor.execute('UPDATE ir_translation ' \ 'SET src = %s ' \ @@ -760,13 +762,13 @@ class ORM(object): if self._log_access: self.create_uid = fields.Many2One('res.user', - 'Creation user', required=True, readonly=True) - self.create_date = fields.DateTime('Creation date', + 'Create User', required=True, readonly=True) + self.create_date = fields.DateTime('Create Date', required=True, readonly=True) self.write_uid = fields.Many2One('res.user', - 'Last modification by', readonly=True) + 'Write User', readonly=True) self.write_date = fields.DateTime( - 'Last modification date', readonly=True) + 'Write Date', readonly=True) self.id = fields.Integer('ID', readonly=True) # reinit the cache on _columns self.__columns = None