From 4bdeb0f4b613b764d5bdec794290dc788ad2ae89 Mon Sep 17 00:00:00 2001 From: ps-tubtim Date: Thu, 16 Dec 2021 13:52:51 +0700 Subject: [PATCH] [FIX] account_move_template: sudo action --- account_move_template/wizard/account_move_template_run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_move_template/wizard/account_move_template_run.py b/account_move_template/wizard/account_move_template_run.py index f66a34b6..d8ed322a 100644 --- a/account_move_template/wizard/account_move_template_run.py +++ b/account_move_template/wizard/account_move_template_run.py @@ -93,7 +93,7 @@ Valid dictionary to overwrite template lines: if not self.line_ids: return self.generate_move() action = self.env.ref("account_move_template.account_move_template_run_action") - result = action.read()[0] + result = action.sudo().read()[0] result.update({"res_id": self.id, "context": self.env.context}) # Overwrite self.line_ids to show overwrite values @@ -183,7 +183,7 @@ Valid dictionary to overwrite template lines: ) move = self.env["account.move"].create(move_vals) action = self.env.ref("account.action_move_journal_line") - result = action.read()[0] + result = action.sudo().read()[0] result.update( { "name": _("Entry from template %s") % self.template_id.name,