Merge lp:~openerp-dev/openerp-web/7.0-opw-596237-msh into lp:openerp-web/7.0

Proposed by Mohammed Shekha(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-596237-msh
Merge into: lp:openerp-web/7.0
Diff against target: 14 lines (+3/-1)
1 file modified
addons/web/static/src/js/view_form.js (+3/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-596237-msh
Reviewer Review Type Date Requested Status
Christophe CHAUVET (community) code review and test Approve
Martin Trigaux (OpenERP) Pending
Xavier (Open ERP) Pending
Review via email: mp+179035@code.launchpad.net

Description of the change

Hello,

Fixed the issue of statusbar not working with selection field, value not get saved(i.e. write called with None value because type casting of value of li.)

Demo:- Add any selection field in any model and in view set widget="statusbar", then go to that view and try to change the stage, currently it is not working instead write is called with value None.

For further detail go through bug https://bugs.launchpad.net/openerp-web/+bug/1202080.

Thanks.

To post a comment you must log in.
Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Hi

I Give a technical training, and i have this problem.

I confirm this patch solve the issue

review: Approve (code review and test)

Unmerged revisions

4009. By Mohammed Shekha<email address hidden>

[FIX]Fixed the issue of statusbar not working with selection field, value not get saved(i.e. write called with None value because type casting of value of li.)

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-07-19 09:07:53 +0000
3+++ addons/web/static/src/js/view_form.js 2013-08-07 19:16:27 +0000
4@@ -5449,7 +5449,9 @@
5 on_click_stage: function (ev) {
6 var self = this;
7 var $li = $(ev.currentTarget);
8- var val = parseInt($li.data("id"));
9+ var val = $li.data("id");
10+ if (this.field.type == 'many2one')
11+ val = parseInt(val);
12 if (val != self.get('value')) {
13 this.view.recursive_save().done(function() {
14 var change = {};