From b37b8e1cfd7330e84b0fed47f0f7862a1750534a Mon Sep 17 00:00:00 2001 From: "robin.keunen" Date: Thu, 4 Jun 2020 16:20:34 +0200 Subject: [PATCH] [IMP] emc: get journal by xml id rather than code --- easy_my_coop/models/coop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_my_coop/models/coop.py b/easy_my_coop/models/coop.py index ba370d9..45ad68c 100644 --- a/easy_my_coop/models/coop.py +++ b/easy_my_coop/models/coop.py @@ -512,7 +512,7 @@ class SubscriptionRequest(models.Model): invoice.sent = True def get_journal(self): - return self.env["account.journal"].search([("code", "=", "SUBJ")])[0] + return self.env.ref("easy_my_coop.subscription_journal") def get_accounting_account(self): account_obj = self.env["account.account"]