Hello everyone
i have problem i want to call python method i have implement in hr.employee model and i want it to be called when clicking on div tag for design purpose
how can i achieve that
hello
odoo.define('finger_print_modules.action_hello', function (require) {
"use strict";
var core = require('web.core');
var rpc = require('web.rpc');
function say_hello() {
rpc.query({
model: 'hr.employee',
method: 'action_hello',
args: [],
}).then(function(result) {
// Handle the result if needed
});
}
core.action_registry.add('action_hello', say_hello);
return {
say_hello: say_hello,
};
});
class Employee(models.Model):
_inherit = 'hr.employee'
@api.model
def action_hello(self):
print('hello in fingerprint')
this is what i have found after long search if anyone have any method that can help
Thank you