From 6017f5714c8b1de457fbff037e898cebf3b9d8e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 4 May 2013 11:55:46 +0200 Subject: [PATCH] Fix Open Chart of Tax Codes when no fiscalyear is selected issue3202 --- tax.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tax.py b/tax.py index 332cdd8f86..edc830d088 100644 --- a/tax.py +++ b/tax.py @@ -318,7 +318,8 @@ class OpenChartTaxCode(Wizard): def do_open_(self, action): if self.start.method == 'fiscalyear': action['pyson_context'] = PYSONEncoder().encode({ - 'fiscalyear': self.start.fiscalyear.id, + 'fiscalyear': (self.start.fiscalyear.id + if self.start.fiscalyear else None), }) if self.start.fiscalyear: action['name'] += ' - %s' % self.start.fiscalyear.rec_name