summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant/static/src
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2015-03-13 14:02:50 +0100
committerGéry Debongnie <ged@odoo.com>2015-03-18 09:23:37 +0100
commit4fdf74fe21b9fb99ed9cdcb1a0ef2e21d34dafed (patch)
treecfd1e48916e8ff130dd4bc6b60424e13fe1d4c9f /addons/pos_restaurant/static/src
parent59a4706dd97391772efa420a8c5c1f3b1334db7e (diff)
[IMP] web+addons: improvement to module system
The module system needs to know the dependencies of a given module before executing the function. This is why the dependencies were defined once in an array, and then were described one more times in the call to require. But a trick can simplify this: the boot function can parse the string representation of the module and extract the calls to require from it. It is more work for the processor, but it leads to simpler module definitions.
Diffstat (limited to 'addons/pos_restaurant/static/src')
-rw-r--r--addons/pos_restaurant/static/src/js/floors.js2
-rw-r--r--addons/pos_restaurant/static/src/js/multiprint.js2
-rw-r--r--addons/pos_restaurant/static/src/js/notes.js2
-rw-r--r--addons/pos_restaurant/static/src/js/printbill.js2
-rw-r--r--addons/pos_restaurant/static/src/js/splitbill.js2
5 files changed, 5 insertions, 5 deletions
diff --git a/addons/pos_restaurant/static/src/js/floors.js b/addons/pos_restaurant/static/src/js/floors.js
index f8e42db9774..bbf102fc13f 100644
--- a/addons/pos_restaurant/static/src/js/floors.js
+++ b/addons/pos_restaurant/static/src/js/floors.js
@@ -1,4 +1,4 @@
-odoo.define('pos_restaurant.floors', ['point_of_sale.BaseWidget', 'point_of_sale.chrome', 'point_of_sale.gui', 'point_of_sale.models', 'point_of_sale.screens', 'web.core', 'web.Model'], function (require) {
+odoo.define('pos_restaurant.floors', function (require) {
"use strict";
var PosBaseWidget = require('point_of_sale.BaseWidget');
diff --git a/addons/pos_restaurant/static/src/js/multiprint.js b/addons/pos_restaurant/static/src/js/multiprint.js
index 10c430fe50d..4f218dbdaf6 100644
--- a/addons/pos_restaurant/static/src/js/multiprint.js
+++ b/addons/pos_restaurant/static/src/js/multiprint.js
@@ -1,4 +1,4 @@
-odoo.define('pos_restaurant.multiprint', ['point_of_sale.models', 'point_of_sale.screens', 'web.core', 'web.Session'], function (require) {
+odoo.define('pos_restaurant.multiprint', function (require) {
"use strict";
var models = require('point_of_sale.models');
diff --git a/addons/pos_restaurant/static/src/js/notes.js b/addons/pos_restaurant/static/src/js/notes.js
index f95a256e45d..b51e1465962 100644
--- a/addons/pos_restaurant/static/src/js/notes.js
+++ b/addons/pos_restaurant/static/src/js/notes.js
@@ -1,4 +1,4 @@
-odoo.define('pos_restaurant.notes', ['point_of_sale.models', 'point_of_sale.screens', 'web.core'], function (require) {
+odoo.define('pos_restaurant.notes', function (require) {
"use strict";
console.log("notes");
diff --git a/addons/pos_restaurant/static/src/js/printbill.js b/addons/pos_restaurant/static/src/js/printbill.js
index 697e4dbef2e..3c9cacdda91 100644
--- a/addons/pos_restaurant/static/src/js/printbill.js
+++ b/addons/pos_restaurant/static/src/js/printbill.js
@@ -1,4 +1,4 @@
-odoo.define('pos_restaurant.printbill', ['point_of_sale.screens', 'web.core'], function (require) {
+odoo.define('pos_restaurant.printbill', function (require) {
"use strict";
var core = require('web.core');
diff --git a/addons/pos_restaurant/static/src/js/splitbill.js b/addons/pos_restaurant/static/src/js/splitbill.js
index d85296355e7..9dd7e7449e2 100644
--- a/addons/pos_restaurant/static/src/js/splitbill.js
+++ b/addons/pos_restaurant/static/src/js/splitbill.js
@@ -1,4 +1,4 @@
-odoo.define('pos_restaurant.splitbill', ['point_of_sale.gui', 'point_of_sale.models', 'point_of_sale.screens', 'web.core'], function (require) {
+odoo.define('pos_restaurant.splitbill', function (require) {
"use strict";
var gui = require('point_of_sale.gui');