diff --git a/models/acc_account.py b/models/acc_account.py index 1687ebddb6ba0bad10f6dc106a406c00fd96492c..8e6f3bab117094ea8cf1d814786b866ad3bafbaf 100644 --- a/models/acc_account.py +++ b/models/acc_account.py @@ -98,7 +98,6 @@ class AccAccount(models.Model): string="Total", store=True, readonly=True, compute="_compute_amount" ) # inverse='_inverse_amount_total') - price_kwh = fields.Float("Prix de l'électricité au kWh", digits="Sale Price") power_cons = fields.Float("Consommation locale (index Enedis)") url = fields.Char("URL", compute="_compute_url", store=True) tax_tcfe = fields.Float( diff --git a/report/account_template.xml b/report/account_template.xml index 658930ad18fc139e7d364e0f193e0df7f66de36a..62006b96b0647ed3ba409b4b0d647b8d89a8b673 100644 --- a/report/account_template.xml +++ b/report/account_template.xml @@ -288,17 +288,22 @@ <t t-if="o.pmo_id.street2"><span t-field="o.pmo_id.street2" /><br /></t> + <t t-if="o.pmo_id.zip"> <span t-field="o.pmo_id.zip" /> - <span t-field="o.pmo_id.city" - /><br /> - <span - class="font-weight-bold" - >Téléphone:</span><br /> - <span t-field="o.pmo_id.phone" /><br /> - <span - class="text-center font-weight-bold" - >Courrier:</span><br /> - <span t-field="o.consumer_id.email" /> + /><br /></t> + <t t-if="o.pmo_id.phone"> + <span + class="font-weight-bold" + >Téléphone:</span><br /> + <span t-field="o.pmo_id.phone" /><br /> + </t> + <t t-if="o.pmo_id.email"> + <span + class="text-center font-weight-bold" + >Courrier:</span> + <span t-field="o.pmo_id.email" /> + </t> </p> <hr /> <p> @@ -334,16 +339,35 @@ </p> </div> <div> - <p> - <span - class="font-weight-bold" - >Synthèse de votre facture</span><br /> - <span - class="font-weight-bold" - >Période de livraison concernée : du <t - t-esc="start_date" - /> au <t t-esc="end_date" /></span><br /> - </p> + <h2>Synthèse de votre facture</h2> + <h3>Période de livraison concernée : du <t + t-esc="o.start_date" + /> au <t t-esc="o.end_date" /></h3> + + <t t-set="lines" t-value="o.line_ids" /> + <t t-set="current_subtotal" t-value="0" /> + <t t-foreach="lines" t-as="line"> + <t + t-set="current_subtotal" + t-value="current_subtotal + line.price_total" + /> + <div > + <span + t-field="line.description" + t-options="{'widget': 'text'}" + /><br /> + Prix de l'électricité locale <span + class="text-nowrap" + t-field="line.price_unit"/> € + <span + class="text-nowrap" + t-field="line.price_total"/> + </div> + + </t> + + + <table class="table table-sm o_main_table" name="account_line_table" @@ -351,10 +375,6 @@ <tr> <td>Prix de l'électricité locale</td> <td class="text-right"> - <span - t-field="o.price_kwh" - t-options='{"widget": "monetary", "display_currency": o.currency_id}' - > HT/kWh</span> </td> </tr> <tr> @@ -364,13 +384,6 @@ >kWh</span> </td> </tr> - <tr> - <td>Taxes CPSE/TCF</td> - <td class="text-right"> - <span t-field="o.tax_tcfe" /> <span - >en €/kWh</span> - </td> - </tr> <t t-set="lines" t-value="o.line_ids" /> <t t-set="current_subtotal" t-value="0" /> @@ -390,7 +403,7 @@ t-field="line.description" t-options="{'widget': 'text'}" /><br /> - à <span + Prix de l'électricité locale <span class="text-nowrap" t-field="line.price_unit" /> € diff --git a/views/acc_account_views.xml b/views/acc_account_views.xml index 29f1ed98919eb9c76451361b447482dfbc2a694a..565f85a3b1365c837daaac18cb26d9e611740919 100644 --- a/views/acc_account_views.xml +++ b/views/acc_account_views.xml @@ -241,10 +241,6 @@ <field name="start_date" /> <field name="end_date" /> <field name="power_cons" /> - <field - name="price_kwh" - options="{'field_digits': True}" - /> <field name="tax_tcfe" options="{'field_digits': True}"