[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")
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user