summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrédéric van der Essen <fva@openerp.com>2012-09-12 18:26:53 +0200
committerFrédéric van der Essen <fva@openerp.com>2012-09-12 18:26:53 +0200
commit9dfca35b19d4e2cbc3ddbc74e36a4b5b0703275f (patch)
treeacc44a2ffc2230f71fdd777595d10d84510b00d0
parenta5bed8994c913064e2d501de4667536a24c6cb1a (diff)
[IMP] point_of_sale: put debug window code in the right place
bzr revid: fva@openerp.com-20120912162653-fnbvqwg4l51lveal
-rw-r--r--addons/point_of_sale/static/src/js/widgets.js58
1 files changed, 30 insertions, 28 deletions
diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js
index c8e03ccff08..0ae127e0b1b 100644
--- a/addons/point_of_sale/static/src/js/widgets.js
+++ b/addons/point_of_sale/static/src/js/widgets.js
@@ -666,34 +666,8 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
hide: function(){ this.$el.hide(); },
});
-
-// ---------- Main Point of Sale Widget ----------
-
- // this is used to notify the user that data is being synchronized on the network
- module.SynchNotificationWidget = module.PosBaseWidget.extend({
- template: "SynchNotificationWidget",
- init: function(parent, options){
- options = options || {};
- this._super(parent, options);
- },
- renderElement: function() {
- var self = this;
- this._super();
- this.$('.oe_pos_synch-notification-button').click(function(){
- self.pos.flush();
- });
- },
- start: function(){
- var self = this;
- this.pos.bind('change:nbr_pending_operations', function(){
- self.renderElement();
- });
- },
- get_nbr_pending: function(){
- return this.pos.get('nbr_pending_operations');
- },
- });
-
+ // The debug widget lets the user control and monitor the hardware and software status
+ // without the use of the proxy
module.DebugWidget = module.PosBaseWidget.extend({
template: "DebugWidget",
eans:{
@@ -779,6 +753,34 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
},
});
+// ---------- Main Point of Sale Widget ----------
+
+ // this is used to notify the user that data is being synchronized on the network
+ module.SynchNotificationWidget = module.PosBaseWidget.extend({
+ template: "SynchNotificationWidget",
+ init: function(parent, options){
+ options = options || {};
+ this._super(parent, options);
+ },
+ renderElement: function() {
+ var self = this;
+ this._super();
+ this.$('.oe_pos_synch-notification-button').click(function(){
+ self.pos.flush();
+ });
+ },
+ start: function(){
+ var self = this;
+ this.pos.bind('change:nbr_pending_operations', function(){
+ self.renderElement();
+ });
+ },
+ get_nbr_pending: function(){
+ return this.pos.get('nbr_pending_operations');
+ },
+ });
+
+
// The PosWidget is the main widget that contains all other widgets in the PointOfSale.
// It is mainly composed of :
// - a header, containing the list of orders