Skip to Content
Menu
This question has been flagged

Like in version 15 we can achieve it this way:
var BoardRenderer = FormRenderer.extend({
custom_events: _.extend({}, FormRenderer.prototype.custom_events, {
update_filters: '_onUpdateFilters',
switch_view: '_onSwitchView',
}),
events: _.extend({}, FormRenderer.prototype.events, {
'click .oe_dashboard_column .oe_fold': '_onFoldClick',
'click .oe_dashboard_link_change_layout': '_onChangeLayout',
'click .oe_dashboard_column .oe_close': '_onCloseAction',
}),

Avatar
Discard
Best Answer

Hi,

Try this code to perform on click in odoo 16 form view.

var BasicRenderer = require('web.BasicRenderer');
var FormRenderer = BasicRenderer.extend({
className: "o_legacy_form_view",
events: _.extend({}, BasicRenderer.prototype.events, {
'click .o_notification_box .oe_field_translate': '_onTranslate',
'click .o_notification_box .btn-close': '_onTranslateNotificationClose',
'shown.bs.tab a[data-bs-toggle="tab"]': '_onNotebookTabChanged',
'click .o_form_label': '_onFieldLabelClicked',
}),
custom_events: _.extend({}, BasicRenderer.prototype.custom_events, {
'navigation_move': '_onNavigationMove',
'activate_next_widget': '_onActivateNextWidget',
'quick_edit': '_onQuickEdit',
}),
})

Regards

Avatar
Discard
Related Posts Replies Views Activity
1
Aug 24
1425
2
Dec 24
2237
1
Oct 24
580
2
May 24
503
0
Nov 23
388