mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_move_template: sudo action
This commit is contained in:
committed by
Andrea Gidalti
parent
6188726b43
commit
8e5667c507
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user