flectra/addons/web/doc/module/9
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

22 lines
848 B
Plaintext

# 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();
+ }
+ });
};