summaryrefslogtreecommitdiff
path: root/addons/web/doc/module/9
blob: 9113f914e7c6382dc72735fd6370f4adc5679b0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# HG changeset patch
# Parent 6a1a7240ea0e63182f60abb1eb5c631089d56dbe
diff --git a/static/src/js/first_module.js b/static/src/js/first_module.js
--- a/static/src/js/first_module.js
+++ b/static/src/js/first_module.js
@@ -1,7 +1,11 @@
 // static/src/js/first_module.js
 openerp.web_example = function (instance) {
-    instance.web.client_actions.add('example.action', 'instance.web_example.action');
-    instance.web_example.action = function (parent, action) {
-        console.log("Executed the action", action);
-    };
+    instance.web.client_actions.add('example.action', 'instance.web_example.Action');
+    instance.web_example.Action = instance.web.Widget.extend({
+        className: 'oe_web_example',
+        start: function () {
+            this.$el.text("Hello, world!");
+            return this._super();
+        }
+    });
 };