Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make Odoo javascript module in OpenERP/Odoo ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 307
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: