Compare commits
4 Commits
imp-progre
...
16.0-migra
Author | SHA1 | Date | |
---|---|---|---|
|
d7218bb593 | ||
|
6032220af1 | ||
|
8d9b29c1e0 | ||
|
78ec33b942 |
@@ -172,7 +172,7 @@
|
||||
</record>
|
||||
|
||||
<record id="study_questionnaire_subject_type_PRACTITIONER" model="study.questionnaire.subject.type">
|
||||
<field name="name">Praticient</field>
|
||||
<field name="name">Praticien</field>
|
||||
<field name="value">PRACTITIONER</field>
|
||||
</record>
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -36,17 +36,20 @@ class StudyQuestionnaire(models.Model):
|
||||
created = fields.Datetime("Created", compute="_compute_created", readonly=True)
|
||||
date = fields.Datetime("Date", compute="_compute_updated", readonly=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
|
||||
|
||||
@api.depends("write_date")
|
||||
def _compute_updated(self):
|
||||
for record in self:
|
||||
record.date = record.write_date
|
||||
|
||||
active = fields.Boolean("Actif", default=True)
|
||||
|
||||
def copy(self, default=None):
|
||||
|
@@ -34,3 +34,17 @@ class StudyQuestionnaireResponse(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
|
||||
|
@@ -95,6 +95,9 @@ class StudyStudy(models.Model):
|
||||
@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
|
||||
_logger.info(f"Record ID: {record.id}, write_date: {record.write_date}")
|
||||
record.updated = record.write_date
|
||||
|
||||
|
@@ -3,13 +3,13 @@
|
||||
<!-- TREE VIEW -->
|
||||
<record id="view_study_participant_tree" model="ir.ui.view">
|
||||
<field name="name">study.participant.tree</field>
|
||||
<field name="model">study.participant</field>
|
||||
<field name="model">study.participant</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Participants">
|
||||
<field name="part_of"/>
|
||||
<field name="subject"/>
|
||||
<field name="firstname"/>
|
||||
<field name="lastname"/>
|
||||
<tree string="Participants">
|
||||
<field name="part_of"/>
|
||||
<field name="subject"/>
|
||||
<field name="firstname"/>
|
||||
<field name="lastname"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -17,7 +17,7 @@
|
||||
<!-- FORM VIEW -->
|
||||
<record id="view_study_participant_form" model="ir.ui.view">
|
||||
<field name="name">study.participant.form</field>
|
||||
<field name="model">study.participant</field>
|
||||
<field name="model">study.participant</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Participant">
|
||||
<header>
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<!-- big buttons -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<label for="identifier_primary_id" string="Idientifiant Seintinelles" /><field name="identifier_primary_id" />
|
||||
@@ -43,7 +43,7 @@
|
||||
<field name="firstname" />
|
||||
</group>
|
||||
<group name="participant_right">
|
||||
|
||||
|
||||
</group>
|
||||
</group>
|
||||
<group name="participation" string="Participation">
|
||||
@@ -51,30 +51,30 @@
|
||||
<field name="progress_status" />
|
||||
<field name="state" />
|
||||
</group>
|
||||
<group name="participation_right">
|
||||
<group name="participation_right">
|
||||
<field name="identifier" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group name="technique" string="Technique">
|
||||
<group name="technique_left">
|
||||
<field name="create_date" />
|
||||
<field name="write_date" />
|
||||
<field name="created" />
|
||||
<field name="date" />
|
||||
</group>
|
||||
<group name="technique_right">
|
||||
</group>
|
||||
</group>
|
||||
|
||||
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- ACTIONS -->
|
||||
<record id="action_study_participant" model="ir.actions.act_window">
|
||||
<field name="name">Participants</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">study.participant</field>
|
||||
<field name="res_model">study.participant</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
@@ -61,8 +61,8 @@
|
||||
</group>
|
||||
<group name="technique" string="Technique">
|
||||
<group name="technique_left">
|
||||
<field name="create_date" />
|
||||
<field name="write_date" />
|
||||
<field name="created" />
|
||||
<field name="date" />
|
||||
</group>
|
||||
<group name="technique_right">
|
||||
</group>
|
||||
|
@@ -131,11 +131,19 @@
|
||||
<field name="model">study.study</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Études">
|
||||
<field name="title" string="Nom de l'étude" />
|
||||
<field name="name" string="Acronyme" />
|
||||
<field name="active" string="Actif" />
|
||||
<field name="description" string="Description" />
|
||||
<field name="identifier_author" string="ID Plateforme" />
|
||||
<field name="identifier_primary_id" string="Seintinelles ID"/>
|
||||
<field name="period_start" string="Date de début" />
|
||||
<field name="keywords" string="Mots-clés" />
|
||||
<field name="name" string="Acronyme" />
|
||||
<field name="period_end" string="Date de fin" />
|
||||
<field name="period_start" string="Date de début" />
|
||||
<field name="phase" string="Phase" />
|
||||
<field name="progress_status_id" string="Statut" />
|
||||
<field name="region" string="Région" />
|
||||
<field name="title" string="Nom de l'étude" />
|
||||
<field name="version" string="Version" />
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
Reference in New Issue
Block a user