Xavier ALT (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-581388-xal into 
lp:openobject-client-web.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-581388-xal/+merge/131896

Hi,

Fix fix a problem when clicking on a button from an unsaved record (so having 
to "id").

Steps:
- Create a customer invoice
- Fill all required fields
- Click on "Change" button (next to "Currrency" field)
- Close the popup using the cross
- Click on "Change" button again
- Close the popup using the cross
- Switch to "List" view

Current: 2nd click on "Change" have created a new invoice (so we have twice the 
same)
Expect: 2nd click on "Change" should work on previously created invoice - and 
should not create another one.

Cheers,
Xavier
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-581388-xal/+merge/131896
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-581388-xal.
=== modified file 'addons/openerp/static/javascript/openerp/openerp.base.js'
--- addons/openerp/static/javascript/openerp/openerp.base.js	2012-08-09 12:59:37 +0000
+++ addons/openerp/static/javascript/openerp/openerp.base.js	2012-10-29 13:01:29 +0000
@@ -184,6 +184,13 @@
             }, null, {
                 width: 800
             });
+            if (terp_id && !$dialogs.length) {
+                if (jQuery('#_terp_id').val() == 'False') {
+                    // we are opening an action on an unsaved record,
+                    // we have to reload the current view with the newly given id
+                    window.top.editRecord(terp_id);
+                }
+            }
             break;
         case 'download':
             var $form = jQuery('<form action="" target="_blank" method="POST"><input type="text" name="download" value="true"/></form>').appendTo("body");

_______________________________________________
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