diff --git a/studies_base/models/study_participant.py b/studies_base/models/study_participant.py
index 718c701..a6cf8b5 100644
--- a/studies_base/models/study_participant.py
+++ b/studies_base/models/study_participant.py
@@ -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
diff --git a/studies_base/views/study_participant_views.xml b/studies_base/views/study_participant_views.xml
index b51f2b6..ff6811a 100644
--- a/studies_base/views/study_participant_views.xml
+++ b/studies_base/views/study_participant_views.xml
@@ -3,13 +3,13 @@
study.participant.tree
- study.participant
+ study.participant
-
-
-
-
-
+
+
+
+
+
@@ -17,7 +17,7 @@
study.participant.form
- study.participant
+ study.participant