Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
610 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 25
747
2
thg 5 25
1227
Change filename Đã xử lý
1
thg 5 25
633
0
thg 3 25
772
0
thg 1 25
675