From c532b829d06c95a073b1cf6781eca1cd7468fe37 Mon Sep 17 00:00:00 2001 From: benjamin <benjamin@le-filament.com> Date: Wed, 12 Feb 2025 14:53:08 +0100 Subject: [PATCH] [FIX] default date --- wizard/scop_bordereau_refund_wizard.py | 2 +- wizard/scop_cotisation_cg_regul.py | 2 +- wizard/scop_cotisation_cg_wizard.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wizard/scop_bordereau_refund_wizard.py b/wizard/scop_bordereau_refund_wizard.py index fbd29ac..00679b1 100644 --- a/wizard/scop_bordereau_refund_wizard.py +++ b/wizard/scop_bordereau_refund_wizard.py @@ -16,7 +16,7 @@ class ScopBordereauRefundWizard(models.TransientModel): ) date_refund = fields.Date( string="Date de régularisation", - default=fields.Date.today(), + default=lambda self: fields.Date.today(), required=1, ) cotiz_reminder = fields.Html("Rappel des cotisations", readonly=1) diff --git a/wizard/scop_cotisation_cg_regul.py b/wizard/scop_cotisation_cg_regul.py index f5df5b4..87d91fe 100644 --- a/wizard/scop_cotisation_cg_regul.py +++ b/wizard/scop_cotisation_cg_regul.py @@ -11,7 +11,7 @@ class ScopCotisationRegul(models.TransientModel): name = fields.Char() date_regul = fields.Date( - string="Date de régularisation", default=fields.Date.today() + string="Date de régularisation", default=lambda self: fields.Date.today() ) bordereau_id = fields.Many2one( comodel_name="scop.bordereau", diff --git a/wizard/scop_cotisation_cg_wizard.py b/wizard/scop_cotisation_cg_wizard.py index c49c745..ba9004a 100644 --- a/wizard/scop_cotisation_cg_wizard.py +++ b/wizard/scop_cotisation_cg_wizard.py @@ -45,7 +45,7 @@ class ScopCotisationWizard(models.TransientModel): default="all", ) partner_ids = fields.Many2many(comodel_name="res.partner", string="Coopératives") - date = fields.Date("Date de bordereau", default=fields.Date.today()) + date = fields.Date("Date de bordereau", default=lambda self: fields.Date.today()) date_start = fields.Date("Adhésion après le") date_limit = fields.Date("Adhésion avant le") -- GitLab