[IMP] point_of_sale: allow an order to remember what screen it was on, instead
authorFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Mon, 28 Jul 2014 09:33:24 +0000 (11:33 +0200)
committerFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Tue, 5 Aug 2014 12:09:07 +0000 (14:09 +0200)
of switching back to default screen.

This is used by the soon to be merged restaurant addon to create new orders
and display them at a particular screen.  However, this behaviour is more
confusing in the other cases, so I'll think of a better way to solve this.

addons/point_of_sale/static/src/js/screens.js

index 0485077..bb9a1e2 100644 (file)
@@ -73,8 +73,9 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
         load_saved_screen:  function(){
             this.close_popup();
             var selectedOrder = this.pos.get('selectedOrder');
-            // this.set_current_screen(selectedOrder.get_screen_data('screen') || this.default_screen,null,'refresh');
-            this.set_current_screen(this.default_screen,null,'refresh');
+            // FIXME : this changing screen behaviour is sometimes confusing ... 
+            this.set_current_screen(selectedOrder.get_screen_data('screen') || this.default_screen,null,'refresh');
+            //this.set_current_screen(this.default_screen,null,'refresh');
             
         },
         set_user_mode: function(user_mode){