diff --git a/models/acc_operation.py b/models/acc_operation.py index 5a7b8255ef515269b681f9f4cf384fd822701ffc..67b9e2022a6cb262ee320b2fcfc5c1042f826867 100644 --- a/models/acc_operation.py +++ b/models/acc_operation.py @@ -335,6 +335,7 @@ class AccOperation(models.Model): date_end: date de fin power_cons_tot: consommation totale sur la période """ + Account = self.env["acc.account"] acc_account = Account.create( @@ -347,9 +348,14 @@ class AccOperation(models.Model): "start_date": date_start, "end_date": date_end, "is_collectivite": producer_id.is_collectivite, + "is_tva": producer_id.is_tva, + "tax_id": producer_id.tax_id.id, } ) + acc_account.acc_account_payment_ids = self.env["acc.account.payment"].search( + [("producer_id", "=", producer_id.id)]) + # Pour chaque point d'injection, création d'une ligne for acc_injection_id in self.acc_injection_ids.filtered( lambda r: r.partner_id == producer_id diff --git a/report/account_template.xml b/report/account_template.xml index f4eb7a8c7f4ac9462f4656cf1e4ae1065a6fc570..e6008d01d8a165ec3962610f11d2fb1772245606 100644 --- a/report/account_template.xml +++ b/report/account_template.xml @@ -193,7 +193,7 @@ </t> <t t-else=""> <div class="page"> - <div class="row mb-5"> + <div class="row mb-4"> <div class="col-4"> <t t-if="o.producer_id.image_1920"> <img @@ -225,7 +225,7 @@ </div> </div> - <div class="row mt-5 mb-5"> + <div class="row mt-4 mb-5"> <div class="col-4 grey-div "> <h5 class="font-weight-bold mb-3 mt-2 text-center">Vos références utiles</h5> <p> @@ -334,7 +334,7 @@ /><br /> </p> </div> - <div class="o_recap_table mt-4"> + <div class="o_recap_table mt-3"> <div class="text-center"> <h3 class="text-uppercase">Synthèse de votre facture</h3> <p class="font-italic">Détails en pages suivantes</p> @@ -433,22 +433,22 @@ </table> <t t-if="o.free_text"> - <div class="row mt-5"> + <div class="row mt-4"> <div class="col-12"> <h6 t-field="o.free_text"/> </div> </div> </t> - <t t-if="o.producer_id.acc_account_payment_ids"> - <div class="row mt-5"> + <t t-if="o.acc_account_payment_ids"> + <div class="row mt-4"> <div class="col-12"> <h5 class="font-weight-bold" >Modalités de paiement : </h5> <h6>Référence facture : <t t-esc="o.name" /></h6> - <ul t-foreach="o.producer_id.acc_account_payment_ids" t-as="acc_account_payment_id"> + <ul t-foreach="o.acc_account_payment_ids" t-as="acc_account_payment_id"> <li> - <span t-field="acc_account_payment_id.name_type"/><br/> + <span t-field="acc_account_payment_id.name_type"/> - <span t-field="acc_account_payment_id.description"/> </li> </ul> @@ -472,7 +472,7 @@ <div class="row mt-3"> <div class="col-12 font-italic font-mini"> <p class="mt-5"> - ⁽¹⁾Le total à payer correspond à l’électricité autoconsommée et à l'ACCISE - ⁽²⁾ACC : Auto-Consommation Collective + (1) Le total à payer correspond à l’électricité autoconsommée et à l'ACCISE - (2) ACC : Auto-Consommation Collective </p> <span t-if="o.invoice_terms" t-field="o.invoice_terms"/> </div> diff --git a/static/src/scss/style.scss b/static/src/scss/style.scss index aebcd97e5a1e1c0eb217b76a92e51c337aa16c1b..5d30aa265c97213cfb22f6a0f49e73e16ab9d0d7 100644 --- a/static/src/scss/style.scss +++ b/static/src/scss/style.scss @@ -48,7 +48,7 @@ padding: 20px !important; border-radius: 40px !important; border-collapse: inherit !important; - margin-top: 50px !important; + margin-top: 40px !important; } .o_report_layout_boxed table thead tr th {