Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions contract/models/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions contract/views/contract.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<group>
<field name="partner_id" required="1" />
<field name="user_id" />
<field name="date" />
</group>
<group>
<field
Expand Down