[FIX] studies_base: correct date field study_participant
This commit is contained in:
@@ -34,3 +34,17 @@ class StudyParticipant(models.Model):
|
|||||||
updated = fields.Datetime("Date mise à jour")
|
updated = fields.Datetime("Date mise à jour")
|
||||||
|
|
||||||
active = fields.Boolean("Actif", default=True)
|
active = fields.Boolean("Actif", default=True)
|
||||||
|
|
||||||
|
@api.depends("write_date")
|
||||||
|
def _compute_updated(self):
|
||||||
|
for record in self:
|
||||||
|
## XXXb0g : the following two lines are to be removed when all records will have been updated during migration
|
||||||
|
# if record.updated:
|
||||||
|
# continue
|
||||||
|
record.updated = record.write_date
|
||||||
|
|
||||||
|
@api.depends("create_date")
|
||||||
|
def _compute_created(self):
|
||||||
|
for record in self:
|
||||||
|
if not record.created:
|
||||||
|
record.created = record.create_date
|
||||||
|
@@ -57,8 +57,8 @@
|
|||||||
</group>
|
</group>
|
||||||
<group name="technique" string="Technique">
|
<group name="technique" string="Technique">
|
||||||
<group name="technique_left">
|
<group name="technique_left">
|
||||||
<field name="create_date" />
|
<field name="created" />
|
||||||
<field name="write_date" />
|
<field name="date" />
|
||||||
</group>
|
</group>
|
||||||
<group name="technique_right">
|
<group name="technique_right">
|
||||||
</group>
|
</group>
|
||||||
|
Reference in New Issue
Block a user