From 6d6efde22b9bfc1665e12c8acee584898ddd57e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 9 Aug 2019 18:12:11 +0200 Subject: [PATCH] Use account_receivable_used as invoice account Since issue8522, on_change_type does not set the account anymore. So we must ensure to set the default value if the party has no account defined. --- subscription.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subscription.py b/subscription.py index 6e5bd35c25..f6fbf2cf44 100644 --- a/subscription.py +++ b/subscription.py @@ -368,7 +368,7 @@ class Subscription(Workflow, ModelSQL, ModelView): party=self.party, invoice_address=self.invoice_address, currency=self.currency, - account=self.party.account_receivable, + account=self.party.account_receivable_used, ) invoice.on_change_type() invoice.payment_term = self.payment_term