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
92c528ef
Commit
92c528ef
authored
Sep 25, 2012
by
LE GAC Renaud
Browse files
Modified the database schema and polish the interface.
parent
7dc7d1dc
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
54 additions
and
47 deletions
+54
-47
doc/database.png
doc/database.png
+0
-0
doc/database.xml
doc/database.xml
+1
-1
languages/fr-fr.py
languages/fr-fr.py
+6
-3
models/db.py
models/db.py
+11
-23
models/defaults.py.off
models/defaults.py.off
+1
-4
models/myseeds.py.off
models/myseeds.py.off
+0
-5
models/widgets_grids.py
models/widgets_grids.py
+33
-6
models/widgets_stores.py
models/widgets_stores.py
+2
-5
No files found.
doc/database.png
View replaced file @
7dc7d1dc
View file @
92c528ef
91 KB
|
W:
|
H:
100 KB
|
W:
|
H:
2-up
Swipe
Onion skin
doc/database.xml
View file @
92c528ef
...
...
@@ -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_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=
"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_categories"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"categories"
row=
"id"
/></row><row
name=
"id_agencies"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"agencies"
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=
"responsability"
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><row
name=
"note"
null=
"1"
autoincrement=
"0"
><datatype>
text
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"133"
y=
"277"
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=
"805"
y=
"339"
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><table
x=
"937"
y=
"266"
name=
"agencies"
><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></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><row
name=
"domain"
null=
"1"
autoincrement=
"0"
><datatype>
string
</datatype></row><key
type=
"PRIMARY"
name=
""
><part>
id
</part></key></table><table
x=
"594"
y=
"398"
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=
"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=
"usual"
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=
"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_categories"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"categories"
row=
"id"
/></row><row
name=
"id_agencies"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"agencies"
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=
"responsibilities"
><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_organizations"
null=
"0"
autoincrement=
"0"
><datatype>
integer
</datatype><relation
table=
"organizations"
row=
"id"
/></row><row
name=
"responsibility"
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=
"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><row
name=
"level"
null=
"1"
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=
"805"
y=
"339"
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><table
x=
"937"
y=
"266"
name=
"agencies"
><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></sql>
\ No newline at end of file
languages/fr-fr.py
View file @
92c528ef
# coding: utf8
{
'%Y-%m-%d'
:
'%Y-%m-%d'
,
'Agencies'
:
'Agencies'
,
'Agency'
:
'Agence'
,
'Birth Date'
:
'Né le'
,
'CDD'
:
'CDD'
,
...
...
@@ -13,6 +14,7 @@
'Cost'
:
'Coût'
,
'Definition'
:
'Définition'
,
'Demanded'
:
'Demandé'
,
'Domain'
:
'Domaine'
,
'End Date'
:
'Date de fin'
,
'Executed'
:
'Executé'
,
'Filter agencies'
:
'Filtrer les agences'
,
...
...
@@ -25,7 +27,7 @@
'Filter organizations'
:
'Filtrer les organisations'
,
'Filter people'
:
'Filtrer les persones'
,
'Filter projects'
:
'Filtrer les projets'
,
'Filter respons
a
bilities'
:
'Filt
r
er les responsabilit
é
s'
,
'Filter respons
i
bilities'
:
'Filter les responsabilit
ie
s'
,
'Filter teams'
:
'Filtrer les équipes'
,
'First Name'
:
'Prénom'
,
'Forms'
:
'Formulaire'
,
...
...
@@ -55,13 +57,14 @@
'Phd defense date'
:
'Date de la soutenance de la thèse'
,
'Project'
:
'Projet'
,
'Ratio'
:
'Ratio'
,
'Respons
a
bility'
:
'Responsabilit
y
'
,
'Respons
i
bility'
:
'Responsabilit
é
'
,
'Select'
:
'Selectionnez'
,
'Start Date'
:
'Date de début'
,
'Store'
:
'Store'
,
'Tables'
:
'Tables'
,
'Team'
:
'Équipe'
,
'Tools'
:
'Outils'
,
'Usual'
:
'Habituel'
,
'Year'
:
'Année'
,
'Year End'
:
'Year End'
,
'Year Start'
:
'Year Start'
,
...
...
@@ -83,7 +86,7 @@
'people'
:
'personnel'
,
'plugin not install'
:
'plugin not install'
,
'projects'
:
'projets'
,
'respons
a
bilities'
:
'responsabilités'
,
'respons
i
bilities'
:
'responsabilités'
,
'select...'
:
'selectionner...'
,
'startswith'
:
'startswith'
,
'teams'
:
'équipes'
,
...
...
models/db.py
View file @
92c528ef
...
...
@@ -63,13 +63,10 @@ db.define_table("agencies",
db
.
define_table
(
"categories"
,
Field
(
"code"
,
"string"
,
notnull
=
True
),
Field
(
"usual"
,
"string"
),
Field
(
"definition"
,
"text"
),
migrate
=
"categories.table"
)
db
.
define_table
(
"levels"
,
Field
(
"level"
,
"string"
,
notnull
=
True
,
unique
=
True
),
migrate
=
"levels.table"
)
db
.
define_table
(
"people"
,
Field
(
"first_name"
,
"string"
,
notnull
=
True
),
Field
(
"last_name"
,
"string"
,
notnull
=
True
),
...
...
@@ -84,15 +81,18 @@ db.define_table("people",
db
.
define_table
(
"organizations"
,
Field
(
"organization"
,
"string"
,
notnull
=
True
,
unique
=
True
),
Field
(
"note"
,
"text"
),
Field
(
"level"
,
"string"
,
default
=
undef
,
notnull
=
True
),
Field
(
"definition"
,
"text"
),
migrate
=
"organizations.table"
)
db
.
define_table
(
"projects"
,
Field
(
"project"
,
"string"
,
notnull
=
True
,
unique
=
True
),
Field
(
"agencies"
,
"string"
),
migrate
=
"projects.table"
)
db
.
define_table
(
"teams"
,
Field
(
"team"
,
"string"
,
notnull
=
True
,
unique
=
True
),
Field
(
"domain"
,
"string"
),
migrate
=
"teams.table"
)
#-------------------------------------------------------------------------------
...
...
@@ -172,29 +172,17 @@ db.history.id_agencies.requires = \
IS_IN_DB
(
db
,
'agencies.id'
,
'agencies.agency'
)
db
.
define_table
(
"respons
a
bilities"
,
db
.
define_table
(
"respons
i
bilities"
,
Field
(
"id_people"
,
db
.
people
,
default
=
undef_id
,
label
=
'Person'
),
Field
(
"id_teams"
,
db
.
teams
,
default
=
undef_id
,
label
=
'Team'
),
Field
(
"id_projects"
,
db
.
projects
,
default
=
undef_id
,
label
=
'Project'
),
Field
(
"responsability"
,
"text"
),
Field
(
"id_organizations"
,
db
.
organizations
,
default
=
undef_id
,
label
=
'Organization'
),
Field
(
"responsibility"
,
"text"
),
Field
(
"start_date"
,
"date"
,
default
=
today
,
notnull
=
True
),
Field
(
"end_date"
,
"date"
),
Field
(
"id_organizations"
,
db
.
organizations
,
default
=
undef_id
,
label
=
'Organization'
),
Field
(
"id_levels"
,
db
.
levels
,
default
=
undef_id
,
label
=
'Level'
),
Field
(
"note"
,
"text"
),
migrate
=
"respons
a
bilities.table"
)
migrate
=
"respons
i
bilities.table"
)
db
.
respons
a
bilities
.
id_people
.
requires
=
\
db
.
respons
i
bilities
.
id_people
.
requires
=
\
IS_IN_DB
(
db
,
'people.id'
,
'people.last_name'
)
db
.
responsabilities
.
id_teams
.
requires
=
\
IS_IN_DB
(
db
,
'teams.id'
,
'teams.team'
)
db
.
responsabilities
.
id_projects
.
requires
=
\
IS_IN_DB
(
db
,
'projects.id'
,
'projects.project'
)
db
.
responsabilities
.
id_organizations
.
requires
=
\
db
.
responsibilities
.
id_organizations
.
requires
=
\
IS_IN_DB
(
db
,
'organizations.id'
,
'organizations.organization'
)
db
.
responsabilities
.
id_levels
.
requires
=
\
IS_IN_DB
(
db
,
'levels.id'
,
'levels.level'
)
models/defaults.py.off
View file @
92c528ef
...
...
@@ -10,11 +10,8 @@ if not db(db.agencies.id).count():
if not db(db.categories.id).count():
db.categories.insert(id=undef_id, code=undef, definition=undef)
if not db(db.levels.id).count():
db.levels.insert(id=undef_id, level=undef)
if not db(db.organizations.id).count():
db.organizations.insert(id=undef_id, organization=undef)
db.organizations.insert(id=undef_id, organization=undef
, level=undef
)
if not db(db.people.id).count():
db.people.insert(id=undef_id, first_name=undef,
...
...
models/myseeds.py.off
View file @
92c528ef
...
...
@@ -27,10 +27,5 @@ if db(db.categories.id).count() == 1:
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')
db.levels.insert(id=3, level='national')
db.levels.insert(id=4, level='international')
if db(db.teams.id).count() == 1:
db.teams.insert(id=2, team='LHCb')
models/widgets_grids.py
View file @
92c528ef
...
...
@@ -10,6 +10,13 @@ dbui.configure_grids(db, plugins=['pGridRowEditorConfirmDelete',
'pGridRowEditorDblClick'
,
'pGridExport'
])
#
# categories
#
gridModifier
=
dbui
.
GridModifier
(
'agencies'
)
gridModifier
.
configure_column
(
'agency'
,
width
=
40
)
gridModifier
.
set_rownumbering
()
#
# budgets
#
...
...
@@ -29,7 +36,8 @@ gridModifier.set_filters(plugins=['pFormToolTip'], width=300)
# categories
#
gridModifier
=
dbui
.
GridModifier
(
'categories'
)
gridModifier
.
configure_column
(
'code'
,
width
=
15
)
gridModifier
.
configure_column
(
'code'
,
width
=
20
)
gridModifier
.
configure_column
(
'usual'
,
width
=
20
)
gridModifier
.
set_rownumbering
()
#
...
...
@@ -37,12 +45,15 @@ gridModifier.set_rownumbering()
#
gridModifier
=
dbui
.
GridModifier
(
'hardware'
)
gridModifier
.
append_plugins
(
'pGridPaging'
,
'pGridExport'
)
gridModifier
.
hide_columns
(
'id_projects'
,
'id_teams'
)
gridModifier
.
set_rownumbering
()
gridModifier
.
append_filter
((
'people.last_name'
,
'contains'
,
T
(
'contains'
)))
gridModifier
.
append_filter
((
'id_teams'
,
'=='
,
T
(
'is equal to'
)))
gridModifier
.
append_filter
((
'id_projects'
,
'=='
,
T
(
'is equal to'
)))
gridModifier
.
append_filter
((
'model'
,
'contains'
,
T
(
'contains'
)))
gridModifier
.
append_filter
((
'start_date'
,
'>='
,
T
(
'greater or equal to'
)))
gridModifier
.
append_filter
((
'end_date'
,
'<='
,
T
(
'less or equal to'
)))
gridModifier
.
set_filters
(
plugins
=
[
'pFormToolTip'
],
width
=
300
)
...
...
@@ -51,6 +62,7 @@ gridModifier.set_filters(plugins=['pFormToolTip'], width=300)
#
gridModifier
=
dbui
.
GridModifier
(
'history'
)
gridModifier
.
append_plugins
(
'pGridPaging'
,
'pGridExport'
)
gridModifier
.
hide_columns
(
'id_projects'
,
'id_agencies'
)
gridModifier
.
set_rownumbering
()
gridModifier
.
append_filter
((
'people.last_name'
,
'contains'
,
T
(
'contains'
)))
...
...
@@ -77,17 +89,32 @@ gridModifier.append_filter(('initials', 'startswith', T('startswith')))
gridModifier
.
set_filters
(
plugins
=
[
'pFormToolTip'
],
width
=
300
)
#
# projects
#
gridModifier
=
dbui
.
GridModifier
(
'projects'
)
gridModifier
.
configure_column
(
'project'
,
width
=
20
)
gridModifier
.
set_rownumbering
()
#
# responsibilities
#
gridModifier
=
dbui
.
GridModifier
(
'responsabilities'
)
gridModifier
=
dbui
.
GridModifier
(
'responsibilities'
)
gridModifier
.
configure_column
(
'responsibility'
,
width
=
400
)
gridModifier
.
hide_columns
(
'id_organizations'
,
'note'
)
gridModifier
.
append_plugins
(
'pGridPaging'
,
'pGridExport'
)
gridModifier
.
append_filter
((
'start_date'
,
'>='
,
T
(
'greater or equal to'
)))
gridModifier
.
append_filter
((
'end_date'
,
'<='
,
T
(
'less or equal to'
)))
gridModifier
.
set_rownumbering
()
gridModifier
.
append_filter
((
'people.last_name'
,
'contains'
,
T
(
'contains'
)))
gridModifier
.
append_filter
((
'id_teams'
,
'=='
,
T
(
'is equal to'
)))
gridModifier
.
append_filter
((
'id_projects'
,
'=='
,
T
(
'is equal to'
)))
gridModifier
.
append_filter
((
'id_organizations'
,
'=='
,
T
(
'is equal to'
)))
gridModifier
.
append_filter
((
'id_levels'
,
'=='
,
T
(
'is equal to'
)))
gridModifier
.
set_filters
(
plugins
=
[
'pFormToolTip'
],
width
=
300
)
\ No newline at end of file
gridModifier
.
set_filters
(
plugins
=
[
'pFormToolTip'
],
width
=
300
)
#
# teams
#
gridModifier
=
dbui
.
GridModifier
(
'teams'
)
gridModifier
.
configure_column
(
'team'
,
width
=
20
)
gridModifier
.
set_rownumbering
()
models/widgets_stores.py
View file @
92c528ef
...
...
@@ -17,9 +17,6 @@ storeModifier.orderby(db.people.last_name, db.hardware.start_date)
storeModifier
=
dbui
.
StoreModifier
(
'history'
)
storeModifier
.
orderby
(
db
.
people
.
last_name
,
db
.
history
.
start_date
)
storeModifier
=
dbui
.
StoreModifier
(
'levels'
)
storeModifier
.
orderby
(
db
.
levels
.
level
)
storeModifier
=
dbui
.
StoreModifier
(
'organizations'
)
storeModifier
.
orderby
(
db
.
organizations
.
organization
)
...
...
@@ -29,8 +26,8 @@ storeModifier.orderby(db.people.last_name)
storeModifier
=
dbui
.
StoreModifier
(
'projects'
)
storeModifier
.
orderby
(
db
.
projects
.
project
)
storeModifier
=
dbui
.
StoreModifier
(
'respons
a
bilities'
)
storeModifier
.
orderby
(
db
.
people
.
last_name
,
db
.
respons
a
bilities
.
start_date
)
storeModifier
=
dbui
.
StoreModifier
(
'respons
i
bilities'
)
storeModifier
.
orderby
(
db
.
people
.
last_name
,
db
.
respons
i
bilities
.
start_date
)
storeModifier
=
dbui
.
StoreModifier
(
'teams'
)
storeModifier
.
orderby
(
db
.
teams
.
team
)
\ No newline at end of file
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