From eed34396af827df03f43095adc77b4bd8ccc20fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20-=20Le=20Filament?= <remi@le-filament.com> Date: Mon, 12 Aug 2024 13:20:54 +0200 Subject: [PATCH] [IMP] Use float for mulch multiplier --- models/product_template.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/models/product_template.py b/models/product_template.py index b67b60f..79224d0 100644 --- a/models/product_template.py +++ b/models/product_template.py @@ -3,6 +3,7 @@ from odoo import fields, models + class ProductTemplate(models.Model): _inherit = "product.template" @@ -10,13 +11,8 @@ class ProductTemplate(models.Model): # Fields declaration # ------------------------------------------------------ nb_accesories = fields.Float("Nombre d'accessoires") - accessory_label = fields.Char( - related="categ_id.accessory_label", readonly=True - ) - mulch_quantity_multiplier = fields.Integer( - "Multiplicateur paillage", - default=1 - ) + accessory_label = fields.Char(related="categ_id.accessory_label", readonly=True) + mulch_quantity_multiplier = fields.Float("Multiplicateur paillage", default=1.0) # ------------------------------------------------------ # SQL Constraints -- GitLab