diff --git a/bemade_full_formview_from_modal/static/src/view_dialogs/form_view_dialog.js b/bemade_full_formview_from_modal/static/src/view_dialogs/form_view_dialog.js index cfa1f80..4168fb1 100644 --- a/bemade_full_formview_from_modal/static/src/view_dialogs/form_view_dialog.js +++ b/bemade_full_formview_from_modal/static/src/view_dialogs/form_view_dialog.js @@ -3,7 +3,7 @@ import { patch } from "@web/core/utils/patch"; import { useService } from "@web/core/utils/hooks"; import { X2ManyFieldDialog } from "@web/views/fields/relational_utils" -import { FormViewDialog } from "@web/views/view_dialogs/form_view_dialog" +import { FormViewDialog } from "@web/views/view_dialogs/form_view_dialog" patch(X2ManyFieldDialog.prototype, { setup () { @@ -27,13 +27,13 @@ patch(FormViewDialog.prototype, { setup () { super.setup(); this.action = useService('action') - this.env.dialogData.onOpenButtonClicked = this.onOpenButtonClicked.bind(this); + this.onOpenButtonClicked = this.onOpenButtonClicked.bind(this); }, - onOpenButtonClicked: function () { + onOpenButtonClicked() { this.action.doAction({ type: "ir.actions.act_window", - res_model: this.record.resModel, - res_id: this.record.resId, + res_model: this.props.resModel, + res_id: this.props.resId, views: [[false, "form"]], target: "current", context: this.props.context, diff --git a/bemade_full_formview_from_modal/static/src/view_dialogs/form_view_dialog.xml b/bemade_full_formview_from_modal/static/src/view_dialogs/form_view_dialog.xml index 294be49..cdf8f50 100644 --- a/bemade_full_formview_from_modal/static/src/view_dialogs/form_view_dialog.xml +++ b/bemade_full_formview_from_modal/static/src/view_dialogs/form_view_dialog.xml @@ -2,17 +2,12 @@ - + - - - - - - - - - + + + + \ No newline at end of file