diff --git a/addons/web_rpc/__init__.py b/addons/web_api/__init__.py similarity index 100% rename from addons/web_rpc/__init__.py rename to addons/web_api/__init__.py diff --git a/addons/web_api/__openerp__.py b/addons/web_api/__openerp__.py new file mode 100644 index 00000000000..efc99afb7a9 --- /dev/null +++ b/addons/web_api/__openerp__.py @@ -0,0 +1,13 @@ +{ + "name" : "OpenERP Web API", + "category" : "Hidden", + "description":"""Openerp Web API.""", + "version" : "2.0", + "depends" : ['web'], + "installable" : True, + 'auto_install': False, + 'js' : [ + ], + 'css' : [ + ], +} diff --git a/addons/web_rpc/i18n/es_CR.po b/addons/web_api/i18n/es_CR.po similarity index 100% rename from addons/web_rpc/i18n/es_CR.po rename to addons/web_api/i18n/es_CR.po diff --git a/addons/web_rpc/i18n/web_rpc.pot b/addons/web_api/i18n/web_rpc.pot similarity index 100% rename from addons/web_rpc/i18n/web_rpc.pot rename to addons/web_api/i18n/web_rpc.pot diff --git a/addons/web_api/static/src/example.html b/addons/web_api/static/src/example.html new file mode 100644 index 00000000000..9c920e31fa2 --- /dev/null +++ b/addons/web_api/static/src/example.html @@ -0,0 +1,55 @@ + + + + + + OpenERP web_api example + + + + +

OpenERP web_api examples

+

Example 1: Load the list of defined ir.model

+
+

Code:

+
+<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> +
+

Div for output:

+
+   +
+
+

Help me to complete this examples on launchpad

+ + + diff --git a/addons/web_rpc/__openerp__.py b/addons/web_rpc/__openerp__.py deleted file mode 100644 index 44946d27cb5..00000000000 --- a/addons/web_rpc/__openerp__.py +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name" : "OpenERP Web Web", - "category" : "Hidden", - "description":"""Openerp Web Web.""", - "version" : "2.0", - "depends" : [], - "installable" : False, - 'auto_install': False, - 'js' : [ - "../web/static/lib/datejs/date-en-US.js", - "../web/static/lib/jquery/jquery-1.6.4.js", - "../web/static/lib/json/json2.js", - "../web/static/lib/qweb/qweb2.js", - "../web/static/lib/underscore/underscore.js", - "../web/static/lib/underscore/underscore.string.js", - "../web/static/src/js/boot.js", - "../web/static/src/js/core.js", - "../web/static/src/js/formats.js", - "../web/static/src/js/chrome.js", - "../web/static/src/js/data.js", - ], - 'css' : [ - ], -} diff --git a/addons/web_rpc/static/src/example.html b/addons/web_rpc/static/src/example.html deleted file mode 100644 index fb5d12f73e3..00000000000 --- a/addons/web_rpc/static/src/example.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - OpenERP web_rpc example - - - - - -

OpenERP web_rpc examples

-

Example 1: Display a list of defined ir.model

-

Code:

-
-<script type="text/javascript" src="/base/webclient/js?mods=web_rpc"></script> 
-<script type="text/javascript">
-
-    var c = openerp.init(); // get a new webclient
-    c._modules_loaded = true; // Hack to prevent loading of additional modules
-
-    var s = new c.base.Session(); // setup a Session
-    s.login("web-trunk", "admin", "admin", function() {
-
-            var ds = new c.base.DataSetSearch(s, "ir.model"); // DataSetSearch used to search, read
-            ds.read_slice(['name','model'], {}, function(users){
-                for(var i in users) { 
-                    $("#ex1res").append("<li>" + users[i].model + " (" + users[i].name + ") </li>")
-                }
-            });
-        }
-    );
-
</script> -
-

Div for output:

-
-   -
-

Help me to complete this example page on launchpad

- - -