summaryrefslogtreecommitdiff
path: root/addons/web_api/static/src
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2015-08-01 19:11:42 +0200
committerAntony Lesuisse <al@openerp.com>2015-08-01 19:11:42 +0200
commit6426648ceea551b3ed4d9ca396d34f48f5a3c7e4 (patch)
tree42161a6defeb14fe10006f2d302b371ace736422 /addons/web_api/static/src
parent46652b0ba512e41fc8a3c5996931dd23a27d0c2e (diff)
[REM] web_api: deprecated example module
Diffstat (limited to 'addons/web_api/static/src')
-rw-r--r--addons/web_api/static/src/example.html51
1 files changed, 0 insertions, 51 deletions
diff --git a/addons/web_api/static/src/example.html b/addons/web_api/static/src/example.html
deleted file mode 100644
index 25ad8eaf297..00000000000
--- a/addons/web_api/static/src/example.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html>
-<html style="height: 100%">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <style type="text/css">
- body {
- font-family: sans-serif;
- }
- pre.run {
- border: 1px solid black; margin:0;padding:8px;
- }
- .result {
- border: 1px solid black; margin:0;padding:8px;
- }
- </style>
- <title>Odoo web_api example</title>
- <script type="text/javascript" src="/web/webclient/js"></script>
- <script type="text/javascript">
- $(function() {
- $("body").on('click','button',function(ev){
- console.log($("textarea").val());
- eval($("textarea").val());
- });
- });
- </script>
- </head>
- <body>
- <h1>Odoo web_api test</h1>
- <h2>Example: Load the content of ir.model <button>Run it !</button></h2>
- <pre>
-&lt;script type="text/javascript" src="/web/webclient/js"&gt;&lt;/script&gt;
-&lt;script type="text/javascript"&gt;
-<textarea rows="12" cols="100"id="ex1" class="run">
-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("&lt;li&gt;" + m.model + " (" + m.name + ") &lt;/li&gt;")
- });
- });
-});
-</textarea>
-&lt;/script&gt;</pre>
- <h3>Result:</h3>
- <pre id="result" class="result">
- </pre>
- </body>
-</html>
-