From 457dc39eb7d679ea9fb4958fb34d895db2cc55b6 Mon Sep 17 00:00:00 2001 From: Cyril VINH-TUNG Date: Sat, 3 Jan 2026 11:30:47 -1000 Subject: [PATCH] [IMP] contract: reintroduce date field in contract that was remove in v14 --> we might have a signature date different than the date of the first invoice --- contract/models/contract.py | 6 ++++++ contract/views/contract.xml | 1 + 2 files changed, 7 insertions(+) diff --git a/contract/models/contract.py b/contract/models/contract.py index 18da3b8ff0..dd2570460b 100644 --- a/contract/models/contract.py +++ b/contract/models/contract.py @@ -33,6 +33,12 @@ class ContractContract(models.Model): active = fields.Boolean(default=True) code = fields.Char(string="Reference") name = fields.Char() + date = fields.Date( + required=True, + default=lambda self: fields.Date.today(), + help="This is the date the contract is taken into account \ + (e.g.: signature date)", + ) user_id = fields.Many2one( comodel_name="res.users", string="Responsible", diff --git a/contract/views/contract.xml b/contract/views/contract.xml index 07e27abaaa..bc97240411 100644 --- a/contract/views/contract.xml +++ b/contract/views/contract.xml @@ -59,6 +59,7 @@ +