Javascript does not have built-in modules. As a result variables defined in different files are all mashed together and may conflict. This has given rise to various module patterns used to build clean namespaces and limit risks of naming conflict.
The Odoo framework uses one such pattern to define modules within web addons, in order to both namespace code and correctly order its loading.
oepetstore/static/js/petstore.js
contains a module declaration,Code look like below.
openerp.oepetstore = function(instance, local) {
local.xxx = ...;
}
Note-The Odoo framework uses one such pattern to define modules within web addons, in order to both namespace code and correctly order its loading.
0 Comment(s)