Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
641 Zobrazení

Hello,


I have button that calls an action in python, from there I want to call JS in the frontend .

I tried client action, but it changes the view, I don't want that.


def some_button(self):

return {

'type': 'ir.actions.client',

'tag': 'some_action',

}


odoo.define('mymodule.some_action', function (require) {

"use strict";

const AbstractAction = require('web.AbstractAction');

const core = require('web.core');

const SomeAction = AbstractAction.extend({

start() {

console.log("SomeAction!");

return Promise.resolve();

}

});

core.action_registry.add('some_action', SomeAction);

});


Thank you!

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
kvě 25
777
2
kvě 25
1271
1
kvě 25
665
0
bře 25
792
0
led 25
691