From 00fc7fcf77e3425cdc4f3bceb1c1e924e4f8763c Mon Sep 17 00:00:00 2001
From: jordan <jordan@le-filament.com>
Date: Tue, 14 Dec 2021 15:05:00 +0100
Subject: [PATCH] [add] cotiz html reminder on wizard refund

---
 wizard/scop_bordereau_refund_wizard.py  | 2 ++
 wizard/scop_bordereau_refund_wizard.xml | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/wizard/scop_bordereau_refund_wizard.py b/wizard/scop_bordereau_refund_wizard.py
index ffaf5d0..53614d1 100644
--- a/wizard/scop_bordereau_refund_wizard.py
+++ b/wizard/scop_bordereau_refund_wizard.py
@@ -17,6 +17,7 @@ class ScopBordereauRefundWizard(models.TransientModel):
     date_refund = fields.Date(
         string="Date de régularisation",
         default=fields.Date.today(), required=1)
+    cotiz_reminder = fields.Html('Rappel des cotisations', readonly=1)
     amount_refund = fields.Float('Montant (par trimestre)', required=1)
     comment = fields.Char('Motif de l\'avoir', required=1)
     type_cotiz = fields.Selection(
@@ -52,6 +53,7 @@ class ScopBordereauRefundWizard(models.TransientModel):
         )
         res.update({
             'bordereau_id': bordereau_id.id,
+            'cotiz_reminder': bordereau_id.details,
         })
         return res
 
diff --git a/wizard/scop_bordereau_refund_wizard.xml b/wizard/scop_bordereau_refund_wizard.xml
index faac159..e42f5c0 100644
--- a/wizard/scop_bordereau_refund_wizard.xml
+++ b/wizard/scop_bordereau_refund_wizard.xml
@@ -11,6 +11,8 @@
                 <form string="Générer un avoir">
                     <sheet>
                         <group>
+                            <field name="cotiz_reminder"/>
+                            <hr/>
                             <field name="type_cotiz"/>
                             <field name="date_refund"/>
                             <separator/>
-- 
GitLab