Skip to content
Extraits de code Groupes Projets
Valider 92aa8539 rédigé par Juliana's avatar Juliana
Parcourir les fichiers

[UPD]Update template + delete fields on account model

parent f20dfaa1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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(
......
......@@ -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 />
/><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><br />
<span t-field="o.consumer_id.email" />
>Courrier:</span>
<span t-field="o.pmo_id.email" />
</t>
</p>
<hr />
<p>
......@@ -334,16 +339,35 @@
</p>
</div>
<div>
<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
class="font-weight-bold"
>Synthèse de votre facture</span><br />
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="font-weight-bold"
>Période de livraison concernée : du <t
t-esc="start_date"
/> au <t t-esc="end_date" /></span><br />
</p>
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"
/>
......
......@@ -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}"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter