From d1a27fe23c14a057965a746113b117bb516c503a Mon Sep 17 00:00:00 2001 From: "Omar (Pexego)" Date: Tue, 5 May 2015 19:14:12 +0200 Subject: [PATCH] [FIX] l10n_es_aeat_mod349: Se corrige un problema al calcular las facturas rectificativas a declarar. --- l10n_es_aeat_mod349/models/mod349.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/l10n_es_aeat_mod349/models/mod349.py b/l10n_es_aeat_mod349/models/mod349.py index 47c0c583f30..9ad7358aeea 100644 --- a/l10n_es_aeat_mod349/models/mod349.py +++ b/l10n_es_aeat_mod349/models/mod349.py @@ -140,7 +140,10 @@ def _create_349_refund_records(self, refunds, partner, operation_key): # creates a dictionary key with partner_record id to # after recover it key = refund_details.partner_record_id - record[key] = record.get(key, []).append(refund) + if record.get(key, False): + record[key].append(refund) + else: + record[key] = [refund] break # recorremos nuestro diccionario y vamos creando registros for partner_rec in record: