|
@@ -0,0 +1,32 @@
|
|
|
+openerp.dropdown_menu = function (instance, local) {
|
|
|
+ "use strict";
|
|
|
+
|
|
|
+ local.WelcomeWidget = instance.Widget.extend({
|
|
|
+ start: function() {
|
|
|
+ if (window) {
|
|
|
+ window.alert('Hola desde un menu muito louco')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ if (instance.web && instance.web.ListView) {
|
|
|
+ instance.web.ListView.include({
|
|
|
+ do_show: function() {
|
|
|
+ this._super.apply(this, arguments);
|
|
|
+
|
|
|
+ if (this.model != 'res.partner') return
|
|
|
+
|
|
|
+ this.sidebar.add_items('print', [
|
|
|
+ {
|
|
|
+ label: 'Menu muito louco',
|
|
|
+ classname: 'oe_sidebar_print',
|
|
|
+ callback: function () {
|
|
|
+ var widget = new local.WelcomeWidget(this);
|
|
|
+ widget.start()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|