Commit 60ea48af authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update selector to add fiels id_people and id_objects.

parent b6416c52
......@@ -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")
......
......@@ -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"),
......
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