diff options
| author | Frédéric van der Essen <fvdessen@gmail.com> | 2014-12-30 17:16:12 +0100 |
|---|---|---|
| committer | Frédéric van der Essen <fvdessen@gmail.com> | 2014-12-31 15:34:32 +0100 |
| commit | dc6cbc2aaae570d30801bcc4c55656d4b803df47 (patch) | |
| tree | f399fa76e6773c05ebcabea3aad07e05777c3dc7 /addons/pos_restaurant/static/src/js | |
| parent | 34657532d0d12c29a1422492f26e32d59c96c368 (diff) | |
[IMP] pos_restaurant: do not pollute global namespace with file loading functions
Diffstat (limited to 'addons/pos_restaurant/static/src/js')
| -rw-r--r-- | addons/pos_restaurant/static/src/js/floors.js | 5 | ||||
| -rw-r--r-- | addons/pos_restaurant/static/src/js/main.js | 16 | ||||
| -rw-r--r-- | addons/pos_restaurant/static/src/js/multiprint.js | 5 | ||||
| -rw-r--r-- | addons/pos_restaurant/static/src/js/notes.js | 5 | ||||
| -rw-r--r-- | addons/pos_restaurant/static/src/js/printbill.js | 4 | ||||
| -rw-r--r-- | addons/pos_restaurant/static/src/js/splitbill.js | 5 |
6 files changed, 23 insertions, 17 deletions
diff --git a/addons/pos_restaurant/static/src/js/floors.js b/addons/pos_restaurant/static/src/js/floors.js index d6d694578a9..8a43c91f00f 100644 --- a/addons/pos_restaurant/static/src/js/floors.js +++ b/addons/pos_restaurant/static/src/js/floors.js @@ -1,4 +1,4 @@ -function openerp_restaurant_floors(instance,module){ +openerp.pos_restaurant.load_floors = function(instance,module){ var QWeb = instance.web.qweb; var _t = instance.web._t; @@ -741,4 +741,5 @@ function openerp_restaurant_floors(instance,module){ } }, }); -} +}; + diff --git a/addons/pos_restaurant/static/src/js/main.js b/addons/pos_restaurant/static/src/js/main.js index 4f7d52cc170..edb899588d3 100644 --- a/addons/pos_restaurant/static/src/js/main.js +++ b/addons/pos_restaurant/static/src/js/main.js @@ -1,14 +1,16 @@ -openerp.pos_restaurant = function(instance){ +openerp.pos_restaurant = function(openerp){ - var module = instance.point_of_sale; + var module = openerp.point_of_sale; - openerp_restaurant_notes(instance,module); + openerp.pos_restaurant.load_notes(openerp,module); - openerp_restaurant_splitbill(instance,module); + openerp.pos_restaurant.load_splitbill(openerp,module); - openerp_restaurant_printbill(instance,module); + openerp.pos_restaurant.load_printbill(openerp,module); - openerp_restaurant_floors(instance,module); + openerp.pos_restaurant.load_floors(openerp,module); + + openerp.pos_restaurant.load_multiprint(openerp,module); - openerp_restaurant_multiprint(instance,module); }; + diff --git a/addons/pos_restaurant/static/src/js/multiprint.js b/addons/pos_restaurant/static/src/js/multiprint.js index 0ca4695768b..61b8c1663a4 100644 --- a/addons/pos_restaurant/static/src/js/multiprint.js +++ b/addons/pos_restaurant/static/src/js/multiprint.js @@ -1,4 +1,4 @@ -function openerp_restaurant_multiprint(instance,module){ +openerp.pos_restaurant.load_multiprint = function(instance,module){ var QWeb = instance.web.qweb; var _t = instance.web._t; @@ -257,4 +257,5 @@ function openerp_restaurant_multiprint(instance,module){ }, }); -} +}; + diff --git a/addons/pos_restaurant/static/src/js/notes.js b/addons/pos_restaurant/static/src/js/notes.js index ef33552b8ee..2d60b66d62b 100644 --- a/addons/pos_restaurant/static/src/js/notes.js +++ b/addons/pos_restaurant/static/src/js/notes.js @@ -1,4 +1,4 @@ -function openerp_restaurant_notes(instance,module){ +openerp.pos_restaurant.load_notes = function(instance,module){ "use strict"; var QWeb = instance.web.qweb; @@ -64,4 +64,5 @@ function openerp_restaurant_notes(instance,module){ return this.pos.config.iface_orderline_notes; }, }); -} +}; + diff --git a/addons/pos_restaurant/static/src/js/printbill.js b/addons/pos_restaurant/static/src/js/printbill.js index 3ea879e5b92..898dfdc21c2 100644 --- a/addons/pos_restaurant/static/src/js/printbill.js +++ b/addons/pos_restaurant/static/src/js/printbill.js @@ -1,4 +1,4 @@ -function openerp_restaurant_printbill(instance,module){ +openerp.pos_restaurant.load_printbill = function(instance,module){ var QWeb = instance.web.qweb; var _t = instance.web._t; @@ -23,5 +23,5 @@ function openerp_restaurant_printbill(instance,module){ return this.pos.config.iface_printbill; }, }); -} +}; diff --git a/addons/pos_restaurant/static/src/js/splitbill.js b/addons/pos_restaurant/static/src/js/splitbill.js index 06d03705d5f..70714418430 100644 --- a/addons/pos_restaurant/static/src/js/splitbill.js +++ b/addons/pos_restaurant/static/src/js/splitbill.js @@ -1,4 +1,4 @@ -function openerp_restaurant_splitbill(instance, module){ +openerp.pos_restaurant.load_splitbill = function(instance, module){ var QWeb = instance.web.qweb; module.SplitbillScreenWidget = module.ScreenWidget.extend({ @@ -179,4 +179,5 @@ function openerp_restaurant_splitbill(instance, module){ return this.pos.config.iface_splitbill; }, }); -} +}; + |
