From c691943fe8c11c79ff52f02321935479d089d8c0 Mon Sep 17 00:00:00 2001 From: Juliana <juliana@le-filament.com> Date: Tue, 5 Apr 2022 15:34:42 +0200 Subject: [PATCH] [UPD]Update template PDF --- models/acc_account.py | 4 ++++ report/account_template.xml | 30 +++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/models/acc_account.py b/models/acc_account.py index 3bacb71..08ddd39 100644 --- a/models/acc_account.py +++ b/models/acc_account.py @@ -116,6 +116,8 @@ class AccAccount(models.Model): if res.is_account_buyer: seq = str(rec.acc_injection_id.acc_account_surplus_count).zfill(3) rec.name = ( + "FS-" + + rec.acc_operation_id.name + "-" + rec.acc_injection_id.name @@ -125,6 +127,8 @@ class AccAccount(models.Model): else: seq = str(rec.acc_injection_id.acc_account_injection_count).zfill(3) rec.name = ( + "F-" + + rec.acc_operation_id.name + "-" + rec.acc_injection_id.name diff --git a/report/account_template.xml b/report/account_template.xml index 075201d..7570697 100644 --- a/report/account_template.xml +++ b/report/account_template.xml @@ -249,12 +249,19 @@ <p> <span class="font-weight-bold" - >Référence Point de livraison:</span><br /> + >Référence Point de livraison (PDL):</span><br /> <span t-field="o.acc_delivery_id.name" /><br /> <span class="font-weight-bold" >Lieu de consommation:</span><br /> - <span t-field="o.consumer_id.street" /> + <span t-field="o.acc_delivery_id.street" /><br /> + <t t-if="o.acc_delivery_id.street2"><span + t-field="o.acc_delivery_id.street2" + /><br /></t> + <t t-if="o.acc_delivery_id.zip"> + <span t-field="o.acc_delivery_id.zip" /> - <span + t-field="o.acc_delivery_id.city" + /><br /></t> </p> </div> <div> @@ -297,10 +304,27 @@ >Référence Autoconsommation collective:</span><br /> <span t-field="o.acc_operation_id.name" /><br /> + <span class="font-weight-bold">Nom producteur</span><br /> + <span + class="font-weight-bold" + t-field="o.producer_id.name" + /><br /> + <span class="font-weight-bold">Référence point d'injection (PRM):</span><br /> + <span + class="font-weight-bold" + t-field="o.acc_injection_id.name" + /><br /> <span class="text-center font-weight-bold" >Lieu de production:</span><br /> - <!-- <p t-field="o.consumer_id.street"/>--> + <span t-field="o.acc_injection_id.street" /><br /> + <t t-if="o.acc_injection_id.street2"><span + t-field="o.acc_injection_id.street2" + /><br /></t> + <t t-if="o.acc_injection_id.zip"> + <span t-field="o.acc_injection_id.zip" /> - <span + t-field="o.acc_injection_id.city" + /><br /></t> </p> </div> </div> -- GitLab