-
Notifications
You must be signed in to change notification settings - Fork 0
/
exercise-defaults
28 lines (26 loc) · 1.24 KB
/
exercise-defaults
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Index: addons/openacademy/models.py
===================================================================
--- addons.orig/openacademy/models.py
+++ addons/openacademy/models.py
@@ -20,9 +20,10 @@
_description = "OpenAcademy Sessions"
name = fields.Char(required=True)
- start_date = fields.Date()
+ start_date = fields.Date(default=fields.Date.today)
duration = fields.Float(digits=(6, 2), help="Duration in days")
seats = fields.Integer(string="Number of seats")
+ active = fields.Boolean(default=True)
instructor_id = fields.Many2one('res.partner', string="Instructor",
domain=['|', ('instructor', '=', True),
Index: addons/openacademy/views/openacademy.xml
===================================================================
--- addons.orig/openacademy/views/openacademy.xml
+++ addons/openacademy/views/openacademy.xml
@@ -94,6 +94,7 @@
<field name="course_id"/>
<field name="name"/>
<field name="instructor_id"/>
+ <field name="active"/>
</group>
<group string="Schedule">
<field name="start_date"/>