Merge lp:~openerp-dev/openobject-addons/trunk-bug-1219163-avo into lp:openobject-addons

Proposed by Amit Vora(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1219163-avo
Merge into: lp:openobject-addons
Diff against target: 21 lines (+4/-0)
1 file modified
mail/mail_thread.py (+4/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1219163-avo
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+185450@code.launchpad.net

Description of the change

Hello,
       I have passed the language into the context so mail.message.subtype can be translated.

Thanks.
Amit Vora

To post a comment you must log in.
8899. By Amit Vora(OpenERP)

[IMP] improve code

8900. By Mehul Mehta(OpenERP)

[Merge] with main main addons

Unmerged revisions

8900. By Mehul Mehta(OpenERP)

[Merge] with main main addons

8899. By Amit Vora(OpenERP)

[IMP] improve code

8898. By Amit Vora(OpenERP)

[FIX] pass language in context

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mail/mail_thread.py'
2--- mail/mail_thread.py 2013-10-18 14:49:24 +0000
3+++ mail/mail_thread.py 2013-10-29 08:51:20 +0000
4@@ -391,6 +391,8 @@
5 :return list: a list of (field_name, column_info obj), containing
6 always tracked fields and modified on_change fields
7 """
8+ if context is None:
9+ context = {}
10 lst = []
11 for name, column_info in self._all_columns.items():
12 visibility = getattr(column_info.column, 'track_visibility', False)
13@@ -398,6 +400,8 @@
14 lst.append(name)
15 if not lst:
16 return lst
17+ if not 'lang' in context:
18+ context.update({'lang': self.pool.get('res.users').browse(cr, uid, uid, context=context).lang})
19 return self.fields_get(cr, uid, lst, context=context)
20
21 def message_track(self, cr, uid, ids, tracked_fields, initial_values, context=None):

Subscribers

People subscribed via source and target branches

to all changes: