Browse Source

[FIX] colulmn name was not translated

pull/1/head
Ivan Yelizariev 11 years ago
parent
commit
776b783247
  1. 7
      models.py

7
models.py

@ -5,7 +5,7 @@ from openerp import SUPERUSER_ID
class mail_thread(osv.Model):
_inherit = "mail.thread"
def message_track(self, cr, uid, ids, tracked_fields, initial_values, context=None):
def message_track(self, cr, uid, ids, tracked_fields, initial_values, context={}):
def convert_for_display(value, col_info):
if not value and col_info['type'] == 'boolean':
@ -32,6 +32,8 @@ class mail_thread(osv.Model):
if not tracked_fields:
return True
update_fields = [f for f in tracked_fields]
for browse_record in self.browse(cr, uid, ids, context=context):
p = getattr(browse_record, 'partner_id', None)
if p:
@ -41,6 +43,9 @@ class mail_thread(osv.Model):
changes = set()
tracked_values = {}
# update translation
tracked_fields = self._get_tracked_fields(cr, uid, update_fields, browse_record._context)
# generate tracked_values data structure: {'col_name': {col_info, new_value, old_value}}
for col_name, col_info in tracked_fields.items():
initial_value = initial[col_name]

Loading…
Cancel
Save