Wrong lang in context when tracking changes

Bug #1320213 reported by Andreas Brueckl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

When a record is updated, then the tracking features
1. collects the old values
2. performs the write
3. collects the new values
4. Writes the changes to history

This is done in write() of mail_thread.py.

If the 'lang' is not provided then in point 1 the 'lang' of the user is used to translated the changes (e.g. selection field).
But in point 3 the context without the 'lang' is used and therefore OpenERP always uses English.

Solution:
Also use "track_ctx" after the write:
----------------
        if not context.get('mail_notrack'):
            # Perform the tracking
            #tracked_fields = self._get_tracked_fields(cr, uid, values.keys(), context=context)
            tracked_fields = self._get_tracked_fields(cr, uid, values.keys(), context=track_ctx)
-----------------

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.