From 18a0696914bd9337b4388ae74aa6a4fd319c69fe Mon Sep 17 00:00:00 2001 From: Giacomo Grasso Date: Tue, 8 May 2018 14:00:19 +0200 Subject: [PATCH] l10n_it_withholding_tax: debugged error in case of wht with 0% rate (#468) --- l10n_it_withholding_tax/models/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l10n_it_withholding_tax/models/account.py b/l10n_it_withholding_tax/models/account.py index f6967c27f25c..18d696aeb17b 100644 --- a/l10n_it_withholding_tax/models/account.py +++ b/l10n_it_withholding_tax/models/account.py @@ -97,7 +97,7 @@ def generate_wt_moves(self): payment_lines = wt_st.withholding_tax_id.payment_term.compute( amount_wt, rec_line_statement.date or False) - if payment_lines: + if payment_lines and payment_lines[0]: p_date_maturity = payment_lines[0][0][0] wt_move_vals = { 'statement_id': wt_st.id,