Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
624 Widoki

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!

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 25
750
2
maj 25
1234
Change filename Rozwiązane
1
maj 25
636
0
mar 25
773
0
sty 25
680