p>Hi,
Try this code:
1. You can add the following templates
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-extend="FormView.buttons" t-name="button_near_create.buttons">
<t t-jquery="button.o_list_button_add" t-operation="after">
<button type="button" class="btn btn-primary open_wizard_action">
Open Wizard
</button>
</t>
</t>
</templates>
2. Add following js code
/** @odoo-module **/
import FormController from 'web.FormController';
import FormView from 'web.FormView';
import viewRegistry from 'web.view_registry';
var SaleFormController = FormController.extend({ buttons_template: 'button_near_create.buttons',
events: _.extend({}, ListController.prototype.events, {
'click .open_wizard_action': '_MoreOptions',
}),
_MoreOptions: function () {
console.log('Hello World!')
}
});
var SFormView = FormView.extend({
config: _.extend({}, FormView.prototype.config, {
Controller: CrmFormController,
}),
});
viewRegistry.add('sale_order_blog', CrmFormView);
export default {
CrmFormController: CrmFormController,
CrmFormView: CrmFormView,
};
Hope it helps