From 385fb8f01d3e2686d2f77d11bc7626abfee16621 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 14 Mar 2018 12:49:34 +0100 Subject: [PATCH] Test if parent_line account is set when computing tax line company issue7219 review39221002 --- tax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tax.py b/tax.py index e718d0ae82..f39029f08b 100644 --- a/tax.py +++ b/tax.py @@ -1181,7 +1181,7 @@ class TaxLine(ModelSQL, ModelView): @fields.depends('_parent_move_line.account', 'move_line') def on_change_with_company(self, name=None): - if self.move_line: + if self.move_line and self.move_line.account: return self.move_line.account.company.id def get_rec_name(self, name):