Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tev
plugin_event
Commits
0e3f3eaf
Commit
0e3f3eaf
authored
Jul 03, 2012
by
LE GAC Renaud
Browse files
Polish the database schema.
parent
406abcc4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
8 deletions
+18
-8
doc/database.png
doc/database.png
+0
-0
doc/database.xml
doc/database.xml
+1
-1
languages/fr-fr.py
languages/fr-fr.py
+5
-0
models/db.py
models/db.py
+3
-3
models/mydefaults.py
models/mydefaults.py
+2
-0
models/widgets.py
models/widgets.py
+7
-4
No files found.
doc/database.png
View replaced file @
406abcc4
View file @
0e3f3eaf
96.6 KB
|
W:
|
H:
98.8 KB
|
W:
|
H:
2-up
Swipe
Onion skin
doc/database.xml
View file @
0e3f3eaf
...
...
@@ -22,4 +22,4 @@
<type
label=
"Upload"
length=
"0"
sql=
"upload"
quote=
"'"
/>
<type
label=
"Password"
length=
"0"
sql=
"password"
quote=
"'"
/>
</group>
</datatypes><table
x=
"593"
y=
"21"
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=
"phd"
null=
"1"
autoincrement=
"0"
><datatype>
boolean
</datatype></row><row
name=
"hdr"
null=
"1"
autoincrement=
"0"
><datatype>
boolean
</datatype></row><row
name=
"phd_date"
null=
"1"
autoincrement=
"0"
><datatype>
date
</datatype></row><row
name=
"hdr_date"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"note"
null=
"1"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"596"
y=
"281"
name=
"teams"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"team"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"590"
y=
"393"
name=
"projects"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"project"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"932"
y=
"139"
name=
"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=
"definition"
null=
"1"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"803"
y=
"57"
name=
"careers"
><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_categories"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"categories"
row=
"id"
/></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=
"note"
null=
"0"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"327"
y=
"56"
name=
"responsabilities"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"id_people"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"people"
row=
"id"
/></row><row
name=
"id_teams"
null=
"1"
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=
"name"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></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=
"id_organizations"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"organizations"
row=
"id"
/></row><row
name=
"id_levels"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"levels"
row=
"id"
/></row><row
name=
"note"
null=
"1"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"348"
y=
"316"
name=
"hardware"
><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=
"model"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></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=
"cost"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"note"
null=
"1"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"109"
y=
"154"
name=
"organizations"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"organization"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"131"
y=
"248"
name=
"levels"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"level"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"807"
y=
"316"
name=
"budgets"
><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=
"year"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"line"
null=
"1"
autoincrement=
"0"
><datatype>
string
</datatype></row><row
name=
"demanded"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"notified"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"executed"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"note"
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=
"593"
y=
"21"
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=
"phd_flag"
null=
"1"
autoincrement=
"0"
><datatype>
boolean
</datatype></row><row
name=
"hdr_flag"
null=
"1"
autoincrement=
"0"
><datatype>
boolean
</datatype></row><row
name=
"phd_date"
null=
"1"
autoincrement=
"0"
><datatype>
date
</datatype></row><row
name=
"hdr_date"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"note"
null=
"1"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"596"
y=
"281"
name=
"teams"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"team"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"590"
y=
"393"
name=
"projects"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"project"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"932"
y=
"139"
name=
"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=
"definition"
null=
"1"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"803"
y=
"57"
name=
"careers"
><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_categories"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"categories"
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=
"note"
null=
"0"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"327"
y=
"56"
name=
"responsabilities"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"id_people"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"people"
row=
"id"
/></row><row
name=
"id_teams"
null=
"1"
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=
"name"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></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=
"id_organizations"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"organizations"
row=
"id"
/></row><row
name=
"id_levels"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"levels"
row=
"id"
/></row><row
name=
"note"
null=
"1"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"348"
y=
"316"
name=
"hardware"
><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=
"model"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></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=
"cost"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"note"
null=
"1"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"109"
y=
"154"
name=
"organizations"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"organization"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"131"
y=
"248"
name=
"levels"
><row
name=
"id"
null=
"0"
autoincrement=
"1"
><datatype>
integer
</datatype></row><row
name=
"level"
null=
"0"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"807"
y=
"316"
name=
"budgets"
><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=
"year"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"line"
null=
"1"
autoincrement=
"0"
><datatype>
string
</datatype></row><row
name=
"demanded"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"notified"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"executed"
null=
"1"
autoincrement=
"0"
><datatype>
integer
</datatype></row><row
name=
"note"
null=
"1"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table></sql>
\ No newline at end of file
languages/fr-fr.py
View file @
0e3f3eaf
...
...
@@ -2,7 +2,10 @@
{
'%Y-%m-%d'
:
'%Y-%m-%d'
,
'Birth Date'
:
'Né le'
,
'CDD'
:
'CDD'
,
'Category'
:
'Catégorie'
,
'Cdd'
:
'Cdd'
,
'Cdd Flag'
:
'Cdd Flag'
,
'Code'
:
'Code'
,
'Collections'
:
'Collections'
,
'Controller'
:
'Controller'
,
...
...
@@ -19,6 +22,7 @@
'First Name'
:
'Prénom'
,
'Forms'
:
'Formulaire'
,
'Grade'
:
'Grade'
,
'HDR'
:
'HDR'
,
'Hdr'
:
'Hdr'
,
'Hdr Date'
:
'Hdr Date'
,
'Hdr defense date'
:
"Date de soutenace de l'hdr"
,
...
...
@@ -34,6 +38,7 @@
'Note'
:
'Note'
,
'Notified'
:
'Notifié'
,
'Organization'
:
'Organisation'
,
'PHD'
:
'PHD'
,
'Percentage'
:
'Pourcentage'
,
'Period'
:
'Periode'
,
'Person'
:
'Persone'
,
...
...
models/db.py
View file @
0e3f3eaf
...
...
@@ -70,8 +70,8 @@ db.define_table("people",
Field
(
"last_name"
,
"string"
,
notnull
=
True
),
Field
(
"initials"
,
"string"
,
notnull
=
True
),
Field
(
"birth_date"
,
"date"
),
Field
(
"phd"
,
"boolean"
,
default
=
False
),
Field
(
"hdr"
,
"boolean"
,
default
=
False
),
Field
(
"phd
_flag
"
,
"boolean"
,
default
=
False
,
label
=
'PHD'
),
Field
(
"hdr
_flag
"
,
"boolean"
,
default
=
False
,
label
=
"HDR"
),
Field
(
"phd_date"
,
"date"
,
comment
=
T
(
"Phd defense date"
)),
Field
(
"hdr_date"
,
"date"
,
comment
=
T
(
"Hdr defense date"
)),
Field
(
"note"
,
"text"
),
...
...
@@ -121,6 +121,7 @@ db.define_table("careers",
Field
(
"id_teams"
,
db
.
teams
,
default
=
undef_id
,
label
=
'Team'
),
Field
(
"id_projects"
,
db
.
projects
,
default
=
undef_id
,
label
=
'Project'
),
Field
(
"id_categories"
,
db
.
categories
,
default
=
undef_id
,
label
=
'Category'
),
Field
(
"cdd_flag"
,
"boolean"
,
default
=
False
,
label
=
"CDD"
),
Field
(
"start_date"
,
"date"
,
default
=
today
,
notnull
=
True
),
Field
(
"end_date"
,
"date"
),
Field
(
"percentage"
,
"integer"
,
default
=
100
),
...
...
@@ -147,7 +148,6 @@ db.define_table("hardware",
Field
(
"model"
,
"string"
),
Field
(
"start_date"
,
"date"
,
default
=
today
,
notnull
=
True
),
Field
(
"end_date"
,
"date"
),
Field
(
"percentage"
,
"integer"
,
default
=
100
),
Field
(
"cost"
,
"double"
),
Field
(
"note"
,
"text"
),
migrate
=
"hardware.table"
)
...
...
models/mydefaults.py
View file @
0e3f3eaf
...
...
@@ -24,6 +24,8 @@ if db(db.categories.id).count() == 1:
db
.
categories
.
insert
(
id
=
16
,
code
=
'L3'
)
db
.
categories
.
insert
(
id
=
17
,
code
=
'M1'
)
db
.
categories
.
insert
(
id
=
18
,
code
=
'M2'
)
db
.
categories
.
insert
(
id
=
19
,
code
=
'PHD'
)
db
.
categories
.
insert
(
id
=
20
,
code
=
'ATER'
)
if
db
(
db
.
levels
.
id
).
count
()
==
1
:
db
.
levels
.
insert
(
id
=
2
,
level
=
'local'
)
...
...
models/widgets.py
View file @
0e3f3eaf
...
...
@@ -26,13 +26,13 @@ for table in ('careers', 'hardware', 'responsabilities'):
# merge phd and fields
#
fieldsModifier
=
dbui
.
FieldsModifier
(
'people'
)
fieldsModifier
.
configure_field
(
'phd'
,
flex
=
0.1
)
fieldsModifier
.
configure_field
(
'phd
_flag
'
,
flex
=
0.1
)
fieldsModifier
.
configure_field
(
'phd_date'
,
flex
=
1
)
fieldsModifier
.
merge_fields
(
'phd'
,
'phd_date'
,
fieldLabel
=
T
(
'Phd'
))
fieldsModifier
.
merge_fields
(
'phd
_flag
'
,
'phd_date'
,
fieldLabel
=
T
(
'Phd'
))
fieldsModifier
.
configure_field
(
'hdr'
,
flex
=
0.1
)
fieldsModifier
.
configure_field
(
'hdr
_flag
'
,
flex
=
0.1
)
fieldsModifier
.
configure_field
(
'hdr_date'
,
flex
=
1
)
fieldsModifier
.
merge_fields
(
'hdr'
,
'hdr_date'
,
fieldLabel
=
T
(
'Hdr'
))
fieldsModifier
.
merge_fields
(
'hdr
_flag
'
,
'hdr_date'
,
fieldLabel
=
T
(
'Hdr'
))
#
# customized grid budgets
...
...
@@ -90,6 +90,9 @@ gridModifier.set_filters(*filters,
# customized grid people
#
gridModifier
=
dbui
.
GridModifier
(
'people'
)
gridModifier
.
configure_column
(
'initials'
,
width
=
40
)
gridModifier
.
configure_column
(
'phd_flag'
,
width
=
30
)
gridModifier
.
configure_column
(
'hdr_flag'
,
width
=
30
)
gridModifier
.
set_rownumbering
()
#filters = [('first_name', 'contains', T('select entries where first name contains')),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment