Commit 1daeb066 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Rename field stage_xxx as trainee_xxx

parent e1ae1dd0
......@@ -62,7 +62,7 @@ def trainee():
birth_date=selector.birth_date)
# people category
id_people_category = get_id(db.people_categories, code=selector.stage_level)
id_people_category = get_id(db.people_categories, code=selector.trainee_level)
# history section
id = db.history.insert(id_people=id_people,
......@@ -73,9 +73,9 @@ def trainee():
end_date=selector.end_date,
cdd_flag=True,
percentage=100,
stage_title=selector.stage_title,
stage_university=selector.stage_university,
stage_category=selector.stage_category)
trainee_title=selector.trainee_title,
trainee_university=selector.trainee_university,
trainee_category=selector.trainee_category)
return T("Add a new history line %i") % id
......
doc/database.png

129 KB | W: | H:

doc/database.png

127 KB | W: | H:

doc/database.png
doc/database.png
doc/database.png
doc/database.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -22,4 +22,4 @@
<type label="Upload" length="0" sql="upload" quote="'"/>
<type label="Password" length="0" sql="password" quote="'"/>
</group>
</datatypes><table x="231" y="31" name="people"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="first_name" null="0" autoincrement="0"><datatype>string</datatype></row><row name="last_name" null="0" autoincrement="0"><datatype>string</datatype></row><row name="initials" null="0" autoincrement="0"><datatype>string</datatype></row><row name="birth_date" null="1" autoincrement="0"><datatype>date</datatype></row><row name="note" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="233" y="192" name="teams"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="team" null="0" autoincrement="0"><datatype>string</datatype></row><row name="domain" null="1" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="233" y="292" name="projects"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="project" null="0" autoincrement="0"><datatype>string</datatype></row><row name="agencies" null="1" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="640" y="32" name="people_categories"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="code" null="0" autoincrement="0"><datatype>string</datatype></row><row name="category" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="444" y="61" name="history"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="id_people" null="0" autoincrement="0"><datatype>integer</datatype><relation table="people" row="id" /></row><row name="id_teams" null="0" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="id_projects" null="0" autoincrement="0"><datatype>integer</datatype><relation table="projects" row="id" /></row><row name="id_people_categories" null="0" autoincrement="0"><datatype>integer</datatype><relation table="people_categories" row="id" /></row><row name="id_fundings" null="0" autoincrement="0"><datatype>integer</datatype><relation table="fundings" row="id" /></row><row name="id_events" null="0" autoincrement="0"><datatype>integer</datatype><relation table="events" row="id" /></row><row name="cdd_flag" null="0" autoincrement="0"><datatype>boolean</datatype><default>False</default></row><row name="start_date" null="0" autoincrement="0"><datatype>date</datatype></row><row name="end_date" null="1" autoincrement="0"><datatype>date</datatype></row><row name="percentage" null="1" autoincrement="0"><datatype>integer</datatype></row><row name="stage_title" null="1" autoincrement="0"><datatype>text</datatype></row><row name="stage_university" null="1" autoincrement="0"><datatype>text</datatype></row><row name="id_organizations" null="0" autoincrement="0"><datatype>integer</datatype><relation table="organizations" row="id" /></row><row name="id_organization_levels" null="0" autoincrement="0"><datatype>integer</datatype><relation table="organization_levels" row="id" /></row><row name="responsibility" null="1" autoincrement="0"><datatype>string</datatype></row><row name="hardware_model" null="1" autoincrement="0"><datatype>string</datatype></row><row name="hardware_cost" null="1" autoincrement="0"><datatype>integer</datatype></row><row name="note" null="0" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="236" y="391" name="organizations"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="organization" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="650" y="154" name="fundings"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="agency" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="667" y="384" name="organization_levels"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="level" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="661" y="261" name="events"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="code" null="0" autoincrement="0"><datatype>string</datatype></row><row name="event" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definitiion" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table></sql>
\ No newline at end of file
</datatypes><table x="231" y="31" name="people"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="first_name" null="0" autoincrement="0"><datatype>string</datatype></row><row name="last_name" null="0" autoincrement="0"><datatype>string</datatype></row><row name="initials" null="0" autoincrement="0"><datatype>string</datatype></row><row name="birth_date" null="1" autoincrement="0"><datatype>date</datatype></row><row name="note" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="233" y="192" name="teams"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="team" null="0" autoincrement="0"><datatype>string</datatype></row><row name="domain" null="1" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="233" y="292" name="projects"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="project" null="0" autoincrement="0"><datatype>string</datatype></row><row name="agencies" null="1" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="640" y="32" name="people_categories"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="code" null="0" autoincrement="0"><datatype>string</datatype></row><row name="category" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>string</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="445" y="48" name="history"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="id_people" null="0" autoincrement="0"><datatype>integer</datatype><relation table="people" row="id" /></row><row name="id_teams" null="0" autoincrement="0"><datatype>integer</datatype><relation table="teams" row="id" /></row><row name="id_projects" null="0" autoincrement="0"><datatype>integer</datatype><relation table="projects" row="id" /></row><row name="id_people_categories" null="0" autoincrement="0"><datatype>integer</datatype><relation table="people_categories" row="id" /></row><row name="id_fundings" null="0" autoincrement="0"><datatype>integer</datatype><relation table="fundings" row="id" /></row><row name="id_events" null="0" autoincrement="0"><datatype>integer</datatype><relation table="events" row="id" /></row><row name="cdd_flag" null="0" autoincrement="0"><datatype>boolean</datatype><default>False</default></row><row name="start_date" null="0" autoincrement="0"><datatype>date</datatype></row><row name="end_date" null="1" autoincrement="0"><datatype>date</datatype></row><row name="percentage" null="1" autoincrement="0"><datatype>integer</datatype></row><row name="trainee_title" null="1" autoincrement="0"><datatype>text</datatype></row><row name="trainee_university" null="1" autoincrement="0"><datatype>text</datatype></row><row name="trainee_category" null="0" autoincrement="0"><datatype>string</datatype></row><row name="id_organizations" null="0" autoincrement="0"><datatype>integer</datatype><relation table="organizations" row="id" /></row><row name="id_organization_levels" null="0" autoincrement="0"><datatype>integer</datatype><relation table="organization_levels" row="id" /></row><row name="responsibility" null="1" autoincrement="0"><datatype>string</datatype></row><row name="hardware_model" null="1" autoincrement="0"><datatype>string</datatype></row><row name="hardware_cost" null="1" autoincrement="0"><datatype>integer</datatype></row><row name="note" null="0" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="236" y="391" name="organizations"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="organization" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="650" y="154" name="fundings"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="agency" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="667" y="384" name="organization_levels"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="level" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definition" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table><table x="661" y="261" name="events"><row name="id" null="0" autoincrement="1"><datatype>integer</datatype></row><row name="code" null="0" autoincrement="0"><datatype>string</datatype></row><row name="event" null="0" autoincrement="0"><datatype>string</datatype></row><row name="definitiion" null="1" autoincrement="0"><datatype>text</datatype></row><key type="PRIMARY" name=""><part>id</part></key></table></sql>
\ No newline at end of file
......@@ -128,9 +128,6 @@
'Select a teams and/or a project !!!': 'Select a teams and/or a project !!!',
'select...': 'selectionner...',
'Stage': 'Stage',
'Stage Category': 'Stage Category',
'Stage Title': 'Titre du stage',
'Stage University': 'Université',
'Start': 'Début',
'start': 'début',
'Start Date': 'Date de début',
......@@ -143,6 +140,10 @@
'Title': 'Titre',
'Titre': 'Titre',
'Tools': 'Outils',
'Trainee': 'Stage',
'Trainee Category': 'Domaine',
'Trainee Title': 'Titre du stage',
'Trainee University': 'Université',
'Type': 'Type',
'undefined': 'indéfini',
'University': 'Université',
......
......@@ -111,9 +111,9 @@ db.define_table("history",
Field("start_date", "date", default=today, notnull=True),
Field("end_date", "date"),
Field("percentage", "integer", default=None),
Field("stage_title", "text", label=T('Title')),
Field("stage_university", "text", label=T('University')),
Field("stage_category", "string", default=undef, label=T("Domain")),
Field("trainee_title", "text", label=T('Title')),
Field("trainee_university", "text", label=T('University')),
Field("trainee_category", "string", default=undef, label=T("Domain")),
Field("id_organizations", db.organizations, default=undef_id, label='Organization'),
Field("id_organization_levels", db.organization_levels, default=undef_id, label='Level'),
Field("responsibility", "text"),
......@@ -143,7 +143,7 @@ IS_IN_DB(db, 'people.id', 'people.last_name')
db.history.id_projects.requires = \
IS_IN_DB(db, 'projects.id', 'projects.project')
db.history.stage_category.requires = \
db.history.trainee_category.requires = \
IS_IN_SET((undef, 'PHY', 'IR'))
db.history.id_teams.requires = \
......
......@@ -139,11 +139,11 @@ virtdb.define_table('trainee_selector',
Field('year', 'integer', default=year),
Field('period_start', 'date'),
Field('period_end', 'date'),
Field('stage_category', 'string', label=T("Domain")),
Field('trainee_category', 'string', label=T("Domain")),
Field('format', 'string', default='html'))
virtdb.trainee_selector.stage_category.requires = \
db.history.stage_category.requires
virtdb.trainee_selector.trainee_category.requires = \
db.history.trainee_category.requires
virtdb.trainee_selector.format.requires = IS_IN_SET(FORMATS)
......@@ -156,10 +156,10 @@ virtdb.define_table('trainee_wizard',
Field("birth_date", "date"),
Field("start_date", "date"),
Field("end_date", "date"),
Field("stage_level", "string", label=T("Level")),
Field("stage_title", "text", label=T('Title')),
Field("stage_university", "text", label=T('University')),
Field("stage_category", "string", default='PHY', label=T("Domain")),
Field("trainee_level", "string", label=T("Level")),
Field("trainee_title", "text", label=T('Title')),
Field("trainee_university", "text", label=T('University')),
Field("trainee_category", "string", default='PHY', label=T("Domain")),
Field("id_teams", db.teams, default=id_lhcb, label='Team'),
Field("id_projects", db.projects, default=undef_id, label='Project'))
......@@ -169,12 +169,12 @@ IS_IN_DB(db, 'projects.id', 'projects.project')
virtdb.trainee_wizard.id_teams.requires = \
IS_IN_DB(db, 'teams.id', 'teams.team')
virtdb.trainee_wizard.stage_category.requires = \
IS_IN_SET(('PHY', 'IR'))
virtdb.trainee_wizard.trainee_category.requires = \
db.history.trainee_category.requires
query = db.people_categories.category=='stagiaire'
rows = db(query).select(db.people_categories.code,
orderby=db.people_categories.code)
virtdb.trainee_wizard.stage_level.requires = \
virtdb.trainee_wizard.trainee_level.requires = \
IS_IN_SET((el.code for el in rows))
......@@ -44,9 +44,9 @@ formModifier.merge_fields('hardware_model',
title=T('Hardware'),
flex=1)
formModifier.merge_fields('stage_title',
'stage_university',
'stage_category',
formModifier.merge_fields('trainee_title',
'trainee_university',
'trainee_category',
dbui.Spacer(height=25),
title=T('Stage'),
flex=1)
......
......@@ -48,9 +48,9 @@ gridModifier.hide_columns('cdd_flag',
'note',
'percentage',
'responsibility',
'stage_category',
'stage_title',
'stage_university')
'trainee_category',
'trainee_title',
'trainee_university')
gridModifier.set_rownumbering()
gridModifier.append_filter(('people.last_name', 'contains', T('contains')))
......
--------------------------------- CHANGE LOG ----------------------------------
HEAD
- Rename field stage_xxx as trainee_xxx
- Minor polishing of the interface
0.2.0 (Feb 2013)
- Migrate to plugin_dbui 0.4.10.1 to develop filter on date.
......
......@@ -12,7 +12,7 @@
# regular columns to be displayed in the view
columns = ['people.last_name',
'people_categories.code',
'history.stage_category',
'history.trainee_category',
'history.start_date',
'history.end_date']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment