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

[UPD]template PDF invoice 2

parent 133e278e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="1">
<data noupdate="0">
<!--
Precisions
-->
......@@ -9,5 +9,10 @@
<field name="digits">3</field>
</record>
<record forcecreate="True" id="unit_sale_price" model="decimal.precision">
<field name="name">Unité de Mesure</field>
<field name="digits">2</field>
</record>
</data>
</odoo>
......@@ -104,7 +104,9 @@ class AccAccount(models.Model):
string="Montant hors TCFE", store=True, readonly=True, compute="_compute_amount"
)
# inverse='_inverse_amount_total')
power_cons = fields.Float("Consommation locale (index Enedis)")
power_cons = fields.Float(
"Consommation locale (index Enedis)", digits="Unité de Mesure"
)
url = fields.Char("URL", compute="_compute_url", store=True)
@api.model_create_multi
......@@ -201,7 +203,7 @@ class AccAccountLine(models.Model):
date = fields.Date(
related="acc_account_id.date", store=True, readonly=True, index=True, copy=False
)
quantity = fields.Float(string="Quantité", default=1.0)
quantity = fields.Float(string="Quantité", default=1.0, digits="Unité de Mesure")
price_unit = fields.Float(string="Prix unitaire", digits="Sale Price")
currency_id = fields.Many2one(
"res.currency", string="Devise", related="acc_account_id.currency_id"
......
......@@ -324,14 +324,15 @@
</p>
</div>
<div>
<h2>Synthèse de votre facture</h2>
<h3>Période de livraison concernée : du <span
<h3>Synthèse de votre facture</h3>
<h4>Période de livraison concernée : du <span
t-field="o.start_date"
t-options="{'format': 'dd/MM/yyyy'}"
/> au <span
t-field="o.end_date"
t-options="{'format': 'dd/MM/yyyy'}"
/></h3>
/>
</h4>
<hr />
<table
......@@ -341,8 +342,10 @@
<tr>
<td>Consommation locale</td>
<td class="text-right">
<span t-field="o.power_cons" /> <span
>kWh</span>
<span
class="text-nowrap"
t-field="o.power_cons"
/>kWh
</td>
</tr>
<tr>
......@@ -404,60 +407,7 @@
électrique.</p>
</div>
</div>
<!-- <div class="clearfix">-->
<!-- <div id="total" class="row">-->
<!-- <div t-attf-class="col-6 ml-auto">-->
<!-- <table-->
<!-- class="table table-sm"-->
<!-- style="page-break-inside: avoid;"-->
<!-- >-->
<!-- <tr-->
<!-- class="border-black o_subtotal"-->
<!-- style=""-->
<!-- >-->
<!-- <td><strong>Sous-Total</strong></td>-->
<!-- <td class="text-right">-->
<!-- <span-->
<!-- t-field="o.amount_untaxed"-->
<!-- />-->
<!-- </td>-->
<!-- </tr>-->
<!-- <t t-if="o.is_tva">-->
<!-- <tr style="">-->
<!-- <t>-->
<!-- <td><span-->
<!-- class="text-nowrap"-->
<!-- />TVA</td>-->
<!-- <td-->
<!-- class="text-right o_price_total"-->
<!-- >-->
<!-- <span-->
<!-- class="text-nowrap"-->
<!-- t-field="o.amount_tax"-->
<!-- />-->
<!-- </td>-->
<!-- </t>-->
<!-- </tr>-->
<!-- </t>-->
<!-- <tr class="border-black o_total">-->
<!-- <td><strong>Total TTC*</strong></td>-->
<!-- <td class="text-right">-->
<!-- <span-->
<!-- class="text-nowrap"-->
<!-- t-field="o.amount_total"-->
<!-- />-->
<!-- </td>-->
<!-- </tr>-->
<!-- </table>-->
<!-- <div>-->
<!-- <p>*Le total à payer correspond à l’électricité autoconsommée,-->
<!-- la contribution d’acheminement et les taxes hors TVA sur cette-->
<!-- électricité sont collectées par le fournisseur du complément-->
<!-- électrique.</p>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
......@@ -474,7 +424,119 @@
<span
>Merci de bien vouloir indiquer le numéro de facture et/ou votre référence client sur l’ordre de virement</span>
</p>
<div class="row mt32 mb32" style="page-break-before:always;">
<div class="col-12">
<h4>Votre facture en détail</h4>
<!-- Table pour l'électricité locale-->
<table
class="table table-sm o_main_table"
name="account_line_table"
>
<thead>
<tr>
<th colspan="4">
Electricité Locale
</th>
</tr>
<tr>
<th>Production</th>
<th>Quantité d'électricité renouvelable</th>
<th>Prix</th>
<th>Montant</th>
</tr>
</thead>
<tbody>
<t t-set="lines" t-value="o.line_ids" />
<t t-foreach="lines" t-as="line">
<t t-if="not line.is_tax">
<tr class="">
<td>
<span
t-field="line.description"
t-options="{'widget': 'text'}"
/>
</td>
<td class="text-right">
<span
class="text-nowrap"
t-field="line.quantity"
/>
</td>
<td class="text-right">
<span
class="text-nowrap"
t-field="line.price_unit"
/><span> kWh</span>
</td>
<td class="text-right">
<span
class="text-nowrap"
t-field="line.price_total"
/>
</td>
</tr>
</t>
</t>
</tbody>
</table>
<!-- Table pour les taxes TCFE-->
<table
class="table table-sm o_main_table"
name="account_line_table"
>
<thead>
<tr>
<th colspan="4">
Taxe sur la consommation finale d’électricité (TCFE)
</th>
</tr>
<tr>
<th>Production</th>
<th
>Quantité d'électricité renouvelable autoconsommée</th>
<th>Prix</th>
<th>Montant</th>
</tr>
</thead>
<tbody>
<t t-set="lines" t-value="o.line_ids" />
<t t-foreach="lines" t-as="line">
<t t-if="line.is_tax">
<tr class="">
<td>
<span
t-field="line.description"
t-options="{'widget': 'text'}"
/>
</td>
<td class="text-right">
<span
class="text-nowrap"
t-field="line.quantity"
/>
</td>
<td class="text-right">
<span
class="text-nowrap"
t-field="line.price_unit"
/><span> kWh</span>
</td>
<td class="text-right">
<span
class="text-nowrap"
t-field="line.price_total"
/>
</td>
</tr>
</t>
<t t-else="" />
</t>
</tbody>
</table>
</div>
</div>
</div>
</t>
<div t-attf-class="footer o_boxed_footer o_company_layout">
......
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