[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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
odoo.define('web.data', ['web.core', 'web.Model', 'web.session', 'web.pyeval'], function (require) {
|
||||
odoo.define('web.data', function (require) {
|
||||
"use strict";
|
||||
|
||||
var core = require('web.core');
|
||||
|
||||
Reference in New Issue
Block a user