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
60ea48af
Commit
60ea48af
authored
Mar 02, 2017
by
LE GAC Renaud
Browse files
Update selector to add fiels id_people and id_objects.
parent
b6416c52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
modules/plugin_event/model_selector.py
modules/plugin_event/model_selector.py
+10
-2
modules/plugin_event/ui_selector.py
modules/plugin_event/ui_selector.py
+6
-2
No files found.
modules/plugin_event/model_selector.py
View file @
60ea48af
...
...
@@ -48,6 +48,8 @@ class Selector(object):
Field
(
"id_projects"
,
"reference projects"
,
label
=
"Project"
),
Field
(
"id_fundings"
,
"reference fundings"
,
label
=
""
),
Field
(
"id_people"
,
"reference people"
,
label
=
"Last name"
),
Field
(
"id_people_categories"
,
"reference alias_people_categories"
,
label
=
"Category"
),
...
...
@@ -56,7 +58,9 @@ class Selector(object):
"reference people_categories"
,
label
=
"Quality"
),
Field
(
"id_object_categories"
,
Field
(
"id_objects"
,
"reference objects"
,
label
=
"Reference"
),
Field
(
"id_object_categories"
,
"reference alias_object_categories"
,
label
=
"Category"
),
...
...
@@ -72,12 +76,16 @@ class Selector(object):
table
.
id_object_code
.
requires
=
\
IS_IN_DB
(
db
,
"object_categories.code"
)
table
.
id_people
.
requires
=
\
IS_IN_DB
(
db
,
"people.last_name"
)
table
.
id_people_categories
.
requires
=
\
IS_IN_DB
(
db
,
"alias_people_categories.category"
)
table
.
id_people_code
.
requires
=
IS_IN_DB
(
db
,
"people_categories.code"
)
table
.
id_domains
.
requires
=
IS_IN_DB
(
db
,
"domains.domain"
)
table
.
id_fundings
.
requires
=
IS_IN_DB
(
db
,
"fundings.agency"
)
table
.
id_objects
.
requires
=
IS_IN_DB
(
db
,
"objects.reference"
)
table
.
id_people_code
.
requires
=
IS_IN_DB
(
db
,
"people_categories.code"
)
table
.
id_projects
.
requires
=
IS_IN_DB
(
db
,
"projects.project"
)
table
.
id_teams
.
requires
=
IS_IN_DB
(
db
,
"teams.team"
)
...
...
modules/plugin_event/ui_selector.py
View file @
60ea48af
...
...
@@ -53,6 +53,7 @@ class SelectorUi(object):
mdf
.
configure_field
(
"id_categories"
,
emptyText
=
text
,
xtype
=
mytype
)
mdf
.
configure_field
(
"id_domains"
,
emptyText
=
text
,
xtype
=
mytype
)
mdf
.
configure_field
(
"id_fundings"
,
emptyText
=
text
,
xtype
=
mytype
)
mdf
.
configure_field
(
"id_objects"
,
emptyText
=
text
,
xtype
=
mytype
)
# to have an unique key use xcomboboxmaster instead of userreset
mdf
.
configure_field
(
"id_object_categories"
,
...
...
@@ -62,6 +63,7 @@ class SelectorUi(object):
xtype
=
"xcomboboxmaster"
)
mdf
.
configure_field
(
"id_object_code"
,
emptyText
=
text
,
xtype
=
mytype
)
mdf
.
configure_field
(
"id_people"
,
emptyText
=
text
,
xtype
=
mytype
)
# to have an unique key use xcomboboxmaster instead of userreset
mdf
.
configure_field
(
"id_people_categories"
,
...
...
@@ -105,12 +107,14 @@ class SelectorUi(object):
},
{
"title"
:
T
(
"People"
),
"collapsed"
:
True
,
"items"
:
[
"SelectorId_people_categories"
,
"items"
:
[
"SelectorId_people"
,
"SelectorId_people_categories"
,
"SelectorId_people_code"
]
},
{
"title"
:
T
(
"Object"
),
"collapsed"
:
True
,
"items"
:
[
"SelectorId_object_categories"
,
"items"
:
[
"SelectorId_objects"
,
"SelectorId_object_categories"
,
"SelectorId_object_code"
]
},
{
"title"
:
T
(
"Fundings"
),
...
...
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