Vaibhav (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/6.1bug-817396-vda into lp:openerp-web.

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)
Related bugs:
  Bug #817396 in OpenERP Web: "multiple create / action -> duplicate problem"
  https://bugs.launchpad.net/openerp-web/+bug/817396

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1bug-817396-vda/+merge/74215

Duplicate Record  while clicking multiple times on `Create&Edit`  during new 
record.



-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1bug-817396-vda/+merge/74215
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1bug-817396-vda.
=== modified file 'addons/web/static/src/js/form.js'
--- addons/web/static/src/js/form.js	2011-09-06 13:02:01 +0000
+++ addons/web/static/src/js/form.js	2011-09-06 13:16:19 +0000
@@ -356,8 +356,14 @@
             return true;
         }
     },
-    do_save_edit: function() {
-        this.do_save();
+    do_save_edit: function(e) {
+    	//activate on first click only to avoid hiding again on double clicks
+    	//IE8 don't recognise e.detail 
+    	if(!e.detail || e.detail == 1) {
+    		this.do_save();
+    	}
+    	return false;
+        
         //this.switch_readonly(); Use promises
     },
     switch_readonly: function() {

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to