[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
|
||||||
|
@@ -3,13 +3,13 @@
|
|||||||
<!-- TREE VIEW -->
|
<!-- TREE VIEW -->
|
||||||
<record id="view_study_participant_tree" model="ir.ui.view">
|
<record id="view_study_participant_tree" model="ir.ui.view">
|
||||||
<field name="name">study.participant.tree</field>
|
<field name="name">study.participant.tree</field>
|
||||||
<field name="model">study.participant</field>
|
<field name="model">study.participant</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Participants">
|
<tree string="Participants">
|
||||||
<field name="part_of"/>
|
<field name="part_of"/>
|
||||||
<field name="subject"/>
|
<field name="subject"/>
|
||||||
<field name="firstname"/>
|
<field name="firstname"/>
|
||||||
<field name="lastname"/>
|
<field name="lastname"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<!-- FORM VIEW -->
|
<!-- FORM VIEW -->
|
||||||
<record id="view_study_participant_form" model="ir.ui.view">
|
<record id="view_study_participant_form" model="ir.ui.view">
|
||||||
<field name="name">study.participant.form</field>
|
<field name="name">study.participant.form</field>
|
||||||
<field name="model">study.participant</field>
|
<field name="model">study.participant</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Participant">
|
<form string="Participant">
|
||||||
<header>
|
<header>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<!-- big buttons -->
|
<!-- big buttons -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
<h1>
|
<h1>
|
||||||
<label for="identifier_primary_id" string="Idientifiant Seintinelles" /><field name="identifier_primary_id" />
|
<label for="identifier_primary_id" string="Idientifiant Seintinelles" /><field name="identifier_primary_id" />
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<field name="firstname" />
|
<field name="firstname" />
|
||||||
</group>
|
</group>
|
||||||
<group name="participant_right">
|
<group name="participant_right">
|
||||||
|
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
<group name="participation" string="Participation">
|
<group name="participation" string="Participation">
|
||||||
@@ -51,30 +51,30 @@
|
|||||||
<field name="progress_status" />
|
<field name="progress_status" />
|
||||||
<field name="state" />
|
<field name="state" />
|
||||||
</group>
|
</group>
|
||||||
<group name="participation_right">
|
<group name="participation_right">
|
||||||
<field name="identifier" />
|
<field name="identifier" />
|
||||||
</group>
|
</group>
|
||||||
</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>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|
||||||
<!-- ACTIONS -->
|
<!-- ACTIONS -->
|
||||||
<record id="action_study_participant" model="ir.actions.act_window">
|
<record id="action_study_participant" model="ir.actions.act_window">
|
||||||
<field name="name">Participants</field>
|
<field name="name">Participants</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">study.participant</field>
|
<field name="res_model">study.participant</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
Reference in New Issue
Block a user