From dafd74ef6a5f8c33a42d8d8aa78f56a4afccd71d Mon Sep 17 00:00:00 2001 From: Juliana <juliana@le-filament.com> Date: Wed, 6 Apr 2022 11:13:08 +0200 Subject: [PATCH] [UPD]Change format table PDF --- models/acc_account.py | 6 ++--- report/account_template.xml | 53 ++++++++++++++++++++++--------------- security/security.xml | 4 ++- static/src/scss/style.scss | 34 +++++++++++++++++++----- views/assets.xml | 2 +- 5 files changed, 65 insertions(+), 34 deletions(-) diff --git a/models/acc_account.py b/models/acc_account.py index 08ddd39..673cd44 100644 --- a/models/acc_account.py +++ b/models/acc_account.py @@ -117,8 +117,7 @@ class AccAccount(models.Model): seq = str(rec.acc_injection_id.acc_account_surplus_count).zfill(3) rec.name = ( "FS-" - + - rec.acc_operation_id.name + + rec.acc_operation_id.name + "-" + rec.acc_injection_id.name + "-" @@ -128,8 +127,7 @@ class AccAccount(models.Model): seq = str(rec.acc_injection_id.acc_account_injection_count).zfill(3) rec.name = ( "F-" - + - rec.acc_operation_id.name + + rec.acc_operation_id.name + "-" + rec.acc_injection_id.name + "-" diff --git a/report/account_template.xml b/report/account_template.xml index fe2f7d8..79f759d 100644 --- a/report/account_template.xml +++ b/report/account_template.xml @@ -128,7 +128,7 @@ class="border-black o_subtotal" style="" > - <td><strong>Sous-Total</strong></td> + <td>Total H.T.</td> <td class="text-right"> <span t-field="o.amount_untaxed" @@ -140,7 +140,7 @@ <t> <td><span class="text-nowrap" - />TVA</td> + />TVA applicable 20%</td> <td class="text-right o_price_total" > @@ -153,12 +153,12 @@ </tr> </t> <tr class="border-black o_total"> - <td><strong>Total</strong></td> + <td><strong>Total TTC</strong></td> <td class="text-right"> - <span - class="text-nowrap" - t-field="o.amount_total" - /> + <strong><span + class="text-nowrap" + t-field="o.amount_total" + /></strong> </td> </tr> </table> @@ -249,19 +249,21 @@ <p> <span class="font-weight-bold" - >Référence Point de livraison (PDL):</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.acc_delivery_id.street" /><br /> + <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-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> + t-field="o.acc_delivery_id.city" + /><br /></t> </p> </div> <div> @@ -304,12 +306,16 @@ >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" + >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" + >Référence point d'injection (PRM):</span><br /> <span class="font-weight-bold" t-field="o.acc_injection_id.name" @@ -317,14 +323,17 @@ <span class="text-center font-weight-bold" >Lieu de production:</span><br /> - <span t-field="o.acc_injection_id.street" /><br /> + <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-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> + <span + t-field="o.acc_injection_id.zip" + /> - <span + t-field="o.acc_injection_id.city" + /><br /></t> </p> </div> </div> @@ -360,7 +369,7 @@ <hr /> <table - class="table table-sm o_main_table" + class="table table-sm table-none o_main_table" name="account_line_table" > <tr> diff --git a/security/security.xml b/security/security.xml index d81a8e8..704c342 100644 --- a/security/security.xml +++ b/security/security.xml @@ -25,7 +25,9 @@ <record id="acc_account_rule_portal_pmo" model="ir.rule"> <field name="name">Portail : Factures pour les pmo</field> <field name="model_id" ref="acc_account.model_acc_account" /> - <field name="domain_force">[('pmo_id','in',[user.partner_id.parent_id.id, user.partner_id.id])]</field> + <field + name="domain_force" + >[('pmo_id','in',[user.partner_id.parent_id.id, user.partner_id.id])]</field> <field name="groups" eval="[(4, ref('base.group_portal'))]" /> </record> diff --git a/static/src/scss/style.scss b/static/src/scss/style.scss index b3ebaae..9807754 100644 --- a/static/src/scss/style.scss +++ b/static/src/scss/style.scss @@ -1,17 +1,39 @@ -.o_report_layout_boxed .row > div > table tr:last-child td { +.o_report_layout_boxed .row > div > table tr:last-child td, +.o_report_layout_boxed + .row:not(#total) + > div + > table + tbody + tr:not(:last-child) + td:last-child, +.o_report_layout_boxed table tbody tr td.o_price_total { background-color: #fff !important; color: #495057 !important; } .o_report_layout_boxed .row > div > table tr.o_total strong, .o_report_layout_boxed div#total table tr.o_total strong { - color: #000 !important; + color: #495057 !important; +} + +.o_report_layout_boxed table.table-none tbody tr td { + border-right: none !important; +} + +.table th, +.table td { + border-top: none !important; +} + +.o_report_layout_boxed table thead tr th { + color: #495057; + text-transform: none !important; } -.o_report_layout_boxed table tbody tr td { - border-right: 0px solid #495057 !important; +.o_report_layout_boxed table thead { + border-bottom: 1px solid rgb(73, 80, 87) !important; } -.o_report_layout_boxed table { - border: 0px solid #495057 !important; +.o_report_layout_boxed .row > div > table tr:last-child td:first-child { + border-right: 1px solid #495057 !important; } diff --git a/views/assets.xml b/views/assets.xml index d491fe7..781a42a 100644 --- a/views/assets.xml +++ b/views/assets.xml @@ -2,7 +2,7 @@ <odoo> <!-- Assets for reports --> <template id="report_assets_common" inherit_id="web.report_assets_common"> - <xpath expr="." position="inside">--> + <xpath expr="." position="inside"> <link rel="stylesheet" type="text/scss" -- GitLab