Skip to content
Extraits de code Groupes Projets
Valider 43030395 rédigé par Hugo Trentesaux's avatar Hugo Trentesaux
Parcourir les fichiers

fix guarantee rate and add expiration date amended

parent a671b84a
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -51,7 +51,8 @@ class FinancialContractGuarantee(models.Model):
related="external_loan_id.number",
store=True,
)
guarantee_rate = fields.Float("Quotité garantie", tracking=1, aggregator="avg", digits=(5, 2))
# 123.45 % → 1.2345 → 5 digits, 4 after decimal
guarantee_rate = fields.Float("Quotité garantie", tracking=1, aggregator="avg", digits=(5, 4))
initial_guarantee_amount = fields.Monetary(
string="Montant initial garanti",
compute="_compute_initial_guarantee_amount",
......@@ -146,7 +147,9 @@ class FinancialContractGuarantee(models.Model):
readonly=False,
)
amount_received = fields.Monetary("Montant reçu")
end_date = fields.Date("Date de fin de prêt")
# if loan expiration date is updated, this field is set to a value
# which should be higher than expiration_date (from financial contract)
expiration_date_amended = fields.Date("Date de fin de prêt mise à jour")
remaining_capital = fields.Monetary("Capital restant dû", tracking=1)
loan_duration = fields.Integer(
string="Durée du crédit (mois)",
......
......@@ -83,6 +83,8 @@
<field name="external_loan_id" options="{'no_create': 1}" />
<field name="payment_date" />
<field name="amount_initial" />
<field name="expiration_date" />
<field name="expiration_date_amended" invisible="not expiration_date_amended"/>
<field name="amount_received" />
<field name="remaining_capital" />
</group>
......
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