Skip to Content
Menu
This question has been flagged
2 Replies
4673 Views

xml code:

                <header>
<button name="action_prueba" string="prueba" type="object"/>
</header>

js code:

var Widget      = require('web.Widget');
class_geofence = Widget.extend({
events: {
"click button[name='action_prueba']": function() {
alert("prueba");
},
},
});


error:

TypeError: this.do_execute_action(...) is undefined
http://localhost:8069/web/content/2102-91fc68e/web.assets_backend.js:469
Rastreo de error:
execute_action@http://localhost:8069/web/content/2102-91fc68e/web.assets_backend.js:469:625
proxy/<@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3923:11
trigger@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3921:180
_trigger_up@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3927:365
_trigger_up@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3927:449
trigger_up@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3927:280
_callButtonAction@http://localhost:8069/web/content/2102-91fc68e/web.assets_backend.js:1328:1694
saveAndExecuteAction/<@http://localhost:8069/web/content/2102-91fc68e/web.assets_backend.js:1431:653
then/</</<@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:802:681
fire@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:796:299
add@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:797:471
then/</<@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:802:649
each@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:625:767
then/<@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:802:560
Deferred@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:803:194
then@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:802:525
saveAndExecuteAction@http://localhost:8069/web/content/2102-91fc68e/web.assets_backend.js:1431:577
_onButtonClicked@http://localhost:8069/web/content/2102-91fc68e/web.assets_backend.js:1432:340
proxy/<@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3923:11
trigger@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3921:180
_trigger_up@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3927:365
_trigger_up@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3927:449
trigger_up@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:3927:280
_addOnClickAction/<@http://localhost:8069/web/content/2102-91fc68e/web.assets_backend.js:1390:334
dispatch@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:892:451
add/elemData.handle@http://localhost:8069/web/content/2010-89bd273/web.assets_common.js:865:173 
Avatar
Discard

Hi,

Are you looking to add the button in header near create and edit?

Best Answer

Hello Eduardo,

XML:

<button name="action_prueba" string="prueba" class="btn btn-link o_call_button_prueba"/>


JS:

events: {
'click .o_call_button_prueba': '_action_prueba',
},

_action_prueba: function () {

alert("prueba");

}


Regards,




Email:   odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 19
2265
2
Jan 22
3237
2
Jan 20
8072
0
Jul 21
1613
2
Jan 18
5222