Merge lp:~openerp-dev/openerp-web/7.0-bug-1096832-vja into lp:openerp-web/7.0

Proposed by Vishmita Jadeja (openerp)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-bug-1096832-vja
Merge into: lp:openerp-web/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
addons/web/static/src/js/view_form.js (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-bug-1096832-vja
Reviewer Review Type Date Requested Status
Fabien Meghazi (OpenERP) (community) Needs Fixing
Review via email: mp+144224@code.launchpad.net

Description of the change

Hello,

     Field name in the notification should be consistent with field label in the form.

Thanks.

To post a comment you must log in.
Revision history for this message
Fabien Meghazi (OpenERP) (fme) wrote :

You have to check the existence of f.$label before chaining to .text()

field.$label is not always set, see line 1227 of the same file.

review: Needs Fixing

Unmerged revisions

3709. By Vishmita Jadeja (openerp)

[Fix]Field name in the notification should be consistent with field label in the form

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/view_form.js'
2--- addons/web/static/src/js/view_form.js 2013-01-07 16:18:07 +0000
3+++ addons/web/static/src/js/view_form.js 2013-01-22 06:40:52 +0000
4@@ -863,7 +863,7 @@
5 .filter(function (f) { return !f.is_valid(); })
6 .map(function (f) {
7 return _.str.sprintf('<li>%s</li>',
8- _.escape(f.string));
9+ _.escape(f.$label.text() || f.string));
10 }).value();
11 warnings.unshift('<ul>');
12 warnings.push('</ul>');