Skip to content

Commit

Permalink
[FIX] remove Environment.manage and yank accidental addition of accou…
Browse files Browse the repository at this point in the history
…nt_banking_ach_discount (#116)
  • Loading branch information
thinkwelltwd authored and JasminSForgeFlow committed Jul 2, 2024
1 parent c7d662c commit a93a8bd
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions account_banking_ach_credit_transfer/post_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@


def update_bank_journals(cr, registry):
with api.Environment.manage():
env = api.Environment(cr, SUPERUSER_ID, {})
journals = env["account.journal"].search([("type", "=", "bank")])
ach_ct = env.ref(
"account_banking_ach_credit_transfer.ach_credit_transfer",
raise_if_not_found=False,
)
if ach_ct:
journals.write({"outbound_payment_method_line_ids": [(4, ach_ct.id)]})
return
env = api.Environment(cr, SUPERUSER_ID, {})
journals = env["account.journal"].search([("type", "=", "bank")])
ach_ct = env.ref(
"account_banking_ach_credit_transfer.ach_credit_transfer",
raise_if_not_found=False,
)
if ach_ct:
journals.write({"outbound_payment_method_line_ids": [(4, ach_ct.id)]})

0 comments on commit a93a8bd

Please sign in to comment.