From 232b4b8dc0429f9fff03d92fe9f398c82bf20d94 Mon Sep 17 00:00:00 2001 From: "matteo.tognini" Date: Fri, 19 May 2023 10:04:36 +0200 Subject: [PATCH] [IMP]Issue riba without admin permissions --- .../wizard/wizard_riba_issue.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/l10n_it_ricevute_bancarie/wizard/wizard_riba_issue.py b/l10n_it_ricevute_bancarie/wizard/wizard_riba_issue.py index fcc1552baa9c..da93319063a5 100644 --- a/l10n_it_ricevute_bancarie/wizard/wizard_riba_issue.py +++ b/l10n_it_ricevute_bancarie/wizard/wizard_riba_issue.py @@ -136,17 +136,8 @@ def create_rdl( countme += 1 # ----- show slip form - mod_obj = self.env["ir.model.data"] - act_obj = self.env["ir.actions.act_window"] - action = mod_obj.get_object_reference( - "l10n_it_ricevute_bancarie", "distinta_riba_action" + action_vals = self.env["ir.actions.act_window"]._for_xml_id( + "l10n_it_ricevute_bancarie.distinta_riba_action" ) - view = mod_obj.get_object_reference( - "l10n_it_ricevute_bancarie", "view_riba_distinta_form" - ) - action_id = action and action[1] or False - action = act_obj.browse(action_id) - action_vals = action.read()[0] - action_vals["views"] = [(view and view[1] or False, "form")] action_vals["res_id"] = rd_id return action_vals