[i18n] [m2m] in tree view loses context
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned | ||
OpenERP Community Backports (Web) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Problem:
Many2many fields in Tree views will not get translated.
If you check the context for a name_get of a m2m field, it is passed as None.
How to replicate:
Create Model A with a name_get, make parts of the name_get translatable.
Create Model B with a m2m reference to Model A.
Create a TreeView for B with a field for the m2m Model A.
Load translations and change language.
Expected output:
The TreeView for B will show comma-separated names for the Model A elements.
These names will be translated according to i18n.
A check of context in the name_get function while fetching the tree view will have context with the 'lang' key.
Actual output:
The TreeView for B will show comma-separated names for the Model A elements.
These names show in their original form, no localization.
A check of context in the name_get function while fetching the tree view will have context as None.
Version:
openerp-web: r4138
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedaddons/web/static/src/js/view_list.js (+1/-1)
- OpenERP R&D Web Team: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedaddons/web/static/src/js/view_list.js (+1/-1)
- Sandy Carter (http://www.savoirfairelinux.com) (community): Needs Fixing (code review, test)
- OpenERP Core Team: Pending requested
-
Diff: 30 lines (+3/-3)1 file modifiedaddons/web/static/src/js/view_list.js (+3/-3)
- Yannick Vaucher @ Camptocamp: Approve (code review, no tests)
- Holger Brunn (Therp): Approve (code review)
-
Diff: 12 lines (+1/-1)1 file modifiedaddons/web/static/src/js/view_list.js (+1/-1)
Changed in ocb-web: | |
status: | New → Fix Released |