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

Requested reviews:
  OpenERP R&D Web Team (openerp-dev-web)
Related bugs:
  Bug #908719 in OpenERP Web: "[trunk] bad reload of the creation of a record 
from a dashboard"
  https://bugs.launchpad.net/openerp-web/+bug/908719

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-908719-vda/+merge/87573

creatable dashboad action do not have previous view to switch by default view 
is form.


-- 
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-bug-908719-vda/+merge/87573
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/trunk-bug-908719-vda.
=== modified file 'addons/web/static/src/js/views.js'
--- addons/web/static/src/js/views.js	2011-12-30 18:32:25 +0000
+++ addons/web/static/src/js/views.js	2012-01-05 08:29:42 +0000
@@ -359,6 +359,10 @@
         // after saving, go to page view (don't come back in list)"
         if (created && current_view === 'form' && previous_view === 'list') {
             return this.on_mode_switch('page');
+        } else if(created && this.action && this.action.flags.default_view == 'form') {
+            //Special case: dashboad creatable attrs,
+            // no previous view for creatable action.
+            return this.on_mode_switch('page');
         }
         return this.on_mode_switch(previous_view, true);
     },

_______________________________________________
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