From f69405d891d02f6fc3e088c5551e591738a71cde Mon Sep 17 00:00:00 2001 From: houssine Date: Tue, 27 Mar 2018 23:22:03 +0200 Subject: [PATCH] [IMP] send attestation only if he still have share --- .../models/tax_shelter_declaration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py b/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py index a7cf496..6cf6005 100644 --- a/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py +++ b/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py @@ -143,7 +143,7 @@ class TaxShelterCertificate(models.Model): if self.total_amount_eligible > 0: #if self.total_amount_resold == 0 and self.total_amount_transfered == 0: attachments.append(self.generate_pdf_report('subscription')) - if self.total_amount_previously_subscribed > 0: + if self.partner_id.total_value > 0: attachments.append(self.generate_pdf_report('shares')) #if self.total_amount_resold > 0 or self.total_amount_transfered > 0: # TODO