diff --git a/addons/web_api/static/src/example.html b/addons/web_api/static/src/example.html index 9c920e31fa2..5408b1de36c 100644 --- a/addons/web_api/static/src/example.html +++ b/addons/web_api/static/src/example.html @@ -18,38 +18,34 @@ -

OpenERP web_api examples

-

Example 1: Load the list of defined ir.model

-
-

Code:

+

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){
-                $("#ex1res").append("<li>" + m.model + " (" + m.name + ") </li>")
-            });
+
+</script>
+

Result:

+
         
-

Div for output:

-
-   -
-
-

Help me to complete this examples on launchpad