odoo.define('module.custom_name', [] ,function (require) {
"use strict";
const rpc = require('web.rpc');
var ajax = require('web.ajax');
$(document).ready(function () {
$('#custom_btn').on('click', function (event) {
ajax.jsonRpc("/controller", 'call', {
--------
}).then(function(data) {
-------------
});
this structure is not working. How to do controller call in odoo 17?