Skip to content

Commit e739506

Browse files
committed
[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
1 parent f558b1c commit e739506

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

contract/models/contract.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ class ContractContract(models.Model):
3333
active = fields.Boolean(default=True)
3434
code = fields.Char(string="Reference")
3535
name = fields.Char()
36+
date = fields.Date(
37+
required=True,
38+
default=lambda self: fields.Date.today(),
39+
help="This is the date the contract is taken into account (e.g.: signature date)",
40+
)
3641
user_id = fields.Many2one(
3742
comodel_name="res.users",
3843
string="Responsible",

contract/views/contract.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
<group>
6060
<field name="partner_id" required="1" />
6161
<field name="user_id" />
62+
<field name="date" />
6263
</group>
6364
<group>
6465
<field

0 commit comments

Comments
 (0)