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

Proposed by Mohammed Shekha(Open ERP)
Status: Merged
Merged at revision: 4172
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-605931-msh
Merge into: lp:openerp-web/7.0
Diff against target: 13 lines (+3/-0)
1 file modified
addons/web/static/src/js/view_form.js (+3/-0)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-605931-msh
Reviewer Review Type Date Requested Status
Martin Trigaux (OpenERP) (community) Approve
Naresh(OpenERP) Pending
Review via email: mp+215598@code.launchpad.net

Description of the change

Hello,

Fixed the issue of duplicated one2many lines, weired behavior when you added one2many line and then add another line without filling required field and then click on save(Parent record Save button), then remove added one2many line for which we didn't filled required data and then save it, you will get duplicated lines.

Demo: To repdocue this issue please go through document given if following bug report or second video.
https://bugs.launchpad.net/openerp-web/+bug/1265705

Reason: While save the record web-client maintains save_list, so when Parent record save button is clicked it call process_operation and it commit value for each field and hence commit_Value called for one2many which saves one2many record and hence save is called for one2many form it fails and we do no handle fail call back, we should pop save_obj from save_list in fails callback.

Thanks.

To post a comment you must log in.
Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

LGTM, thanks

revno: 4172 [merge]
revision-id: <email address hidden>

review: Approve

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 2014-03-26 12:35:13 +0000
3+++ addons/web/static/src/js/view_form.js 2014-04-14 05:43:58 +0000
4@@ -620,6 +620,9 @@
5 });
6 }
7 return $.when();
8+ }).fail(function() {
9+ self.save_list.pop();
10+ return $.when();
11 });
12 };
13 return iterate();