Merge lp:~openerp-dev/openerp-web/7.0-opw-593931-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-593931-msh
Merge into: lp:openerp-web/7.0
Diff against target: 16 lines (+2/-0)
1 file modified
addons/web/static/src/js/view_form.js (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-593931-msh
Reviewer Review Type Date Requested Status
Martin Trigaux (OpenERP) Pending
Xavier (Open ERP) Pending
Review via email:

Description of the change


Fixed the issue of quick create dialog box which is not appear when you quick create two times, so second time by lossing focus through tab does not open quick create dialog, second time you have to forcefully write your data again in many2one when dialog not opens and then if you press tab then it opens dialog box.

Demo:- To generate Go to any form view or say for example go to Sale Order Form, add customer name which is not exist in system and just press Tab it blows many2one quick create popup, now save the record and again create Sale Order and again enter customer name which is not exist in the system and press tab, you will not get the quick create dialog, you have to again write and then pressing tab will show dialog.

Reason:- M2ODialog eventually calls quick_create method which sets self.no_ed to True and so second time Dialog does not open, it is specifically set to True, if someone click on quick_create from autocomplete suggestion so at that time also anyoneloosefous called so at that time Dialog must not be opened.


To post a comment you must log in.

Unmerged revisions

3980. By Mohammed Shekha<email address hidden>

[FIX]Fixed the issue of quick create, issue is that quick create dialog not opened when you create many2one record once through dialog, second time when you try to create record, quick create dialog not opened, then when again type the keywords and loose focus then many2one quick create dialog displayed.

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-06-07 13:22:03 +0000
3+++ addons/web/static/src/js/view_form.js 2013-06-20 11:12:28 +0000
4@@ -3030,10 +3030,12 @@
5 this.$("input").val(this.getParent().last_query);
6 this.$buttons.find(".oe_form_m2o_qc_button").click(function(){
7 self.getParent()._quick_create(self.$("input").val());
8+ self.getParent().no_ed = false;
9 self.destroy();
10 });
11 this.$buttons.find(".oe_form_m2o_sc_button").click(function(){
12 self.getParent()._search_create_popup("form", undefined, self.getParent()._create_context(self.$("input").val()));
13+ self.getParent().no_ed = false;
14 self.destroy();
15 });
16 this.$buttons.find(".oe_form_m2o_cancel_button").click(function(){