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

Proposed by Vishmita Jadeja (openerp)
Status: Rejected
Rejected by: Christophe Matthieu (OpenERP)
Proposed branch: lp:~openerp-dev/openerp-web/7.0-bug-1095366-vja
Merge into: lp:openerp-web/7.0
Diff against target: 22 lines (+2/-3)
1 file modified
addons/web/static/src/js/view_form.js (+2/-3)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-bug-1095366-vja
Reviewer Review Type Date Requested Status
Christophe Matthieu (OpenERP) (community) Disapprove
Review via email: mp+144249@code.launchpad.net

Description of the change

Hello,

To Reproduce:
1. Go to Accounting => Suppliers => Supplier payments
2. Create a new payment
3. select eg AsusTEK as supplier
4. add a line, create a journal item and select asustek as partner,click ok, click on "validate"
5. then click on unreconcile button
6. close the dialog that opens => the unreconcile button becomes greyed out

Fixed this issue by resolve deferred object on close of confirm dialog.

Thanks.

To post a comment you must log in.
Revision history for this message
Christophe Matthieu (OpenERP) (chm-openerp) wrote :

Hi,
It's fixed in 7.0 (see view_form: ligne 1932, line 1938).
Thanks.

view_form.js
ligne 1932:
self.on_confirmed().always(function() {
   $(self2).dialog("close");
});

line 1938:

beforeClose: function() {
   def.resolve();
},

review: Disapprove

Unmerged revisions

3709. By Vishmita Jadeja (openerp)

[Fix]Resolve deferred on close of dialog

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 09:25:32 +0000
4@@ -1913,6 +1913,7 @@
5 var dialog = instance.web.dialog($('<div/>').text(self.node.attrs.confirm), {
6 title: _t('Confirm'),
7 modal: true,
8+ close: function(){def.resolve(); },
9 buttons: [
10 {text: _t("Cancel"), click: function() {
11 def.resolve();
12@@ -1920,9 +1921,7 @@
13 }
14 },
15 {text: _t("Ok"), click: function() {
16- self.on_confirmed().done(function() {
17- def.resolve();
18- });
19+ self.on_confirmed();
20 $(this).dialog("close");
21 }
22 }