19 lines
722 B
Diff
19 lines
722 B
Diff
--- web_example/static/src/js/first_module.js
|
|
+++ web_example/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();
|
|
+ }
|
|
+ });
|
|
};
|