OpenERP web_api example

# OpenERP web_api test

## Example: Load the content of ir.model

    <script type="text/javascript" src="/web/webclient/js"></script>
    <script type="text/javascript">

    var instance = openerp.init(["web"]); // get a new instance
    instance.session.session_bind(); // bind it to the right hostname
    instance.session.session_authenticate("trunk", "admin", "admin", false).then(function() {
        var ds = new instance.web.DataSetSearch(null, "ir.model");
        ds.read_slice(['name','model'], {}).then(function(models){
            _.each(models,function(m,i){
                $("#result").append("<li>" + m.model + " (" + m.name + ") </li>")
            });
        });
    });

    </script>

### Result: