From b37b8e1cfd7330e84b0fed47f0f7862a1750534a Mon Sep 17 00:00:00 2001 From: "robin.keunen" Date: Thu, 4 Jun 2020 16:20:34 +0200 Subject: [PATCH 1/2] [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"] From 3a640f4f779da8ce210b352fbdf7786fb4d53d8d Mon Sep 17 00:00:00 2001 From: "robin.keunen" Date: Thu, 4 Jun 2020 16:42:12 +0200 Subject: [PATCH 2/2] [FIX] emc: add demo subscription account and set it on the company to avoid 1) needing a localization for scratch install 2) bumbing into standard chart of account --- easy_my_coop/demo/coop.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easy_my_coop/demo/coop.xml b/easy_my_coop/demo/coop.xml index e274b45..6538115 100644 --- a/easy_my_coop/demo/coop.xml +++ b/easy_my_coop/demo/coop.xml @@ -76,6 +76,10 @@ + + + +