db.define_table("entry_attribute",
Field('name', 'string',
required=True,
requires=[IS_NOT_EMPTY(),
IS_ALPHANUMERIC()],
label=LABEL(T("Naziv"), _for="entry_attribute_type")),
Field('description', 'text',
required=True,
requires=IS_NOT_EMPTY(),
label=LABEL(T("Opis"), _for="entry_attribute_type")),
Field('field_type', 'string',
required=True,
requires=IS_IN_SET(("STRING",
"LOV",
"TEXT",
"BOOLEAN",
"INTEGER",
"DECIMAL",
"DATE",
"TIME",
"DATETIME",
"UPLOAD",
"LOCATION",
"PARTNER",
"MANUFACTURER"), zero=T("Odaberite
tip polja")),
label=LABEL(T("Tip polja"), _for=
"entry_attribute_field_type")),
Field('field_size', 'integer',
label=LABEL(T("Veličina polja"), _for=
"entry_attribute_field_size")),
)
db.define_table('report',
Field('name', 'string',
required=True,
requires=IS_NOT_EMPTY(),
label=LABEL(T("Naziv"), _for="report_name")),
Field('description', 'string',
required=False,
label=LABEL(T("Opis"), _for="report_description")),
Field('entry_class_id', 'reference entry_class',
required=True,
requires=IS_IN_DB(db, "entry_class.id", '%(name)s',zero
=T("-- Odaberite --")),
label=LABEL(T("Klasa"), _for="report_entry_class_id"
)),
)
db.define_table('report_attribute',
Field('report_id', 'reference report',
required=True,
requires=IS_IN_DB(db, "report.id", '%(name)s', zero=T("--
Odaberite --")),
label=LABEL(T("Izvještaj"), _for="report_report_id")),
Field('entry_attribute_id', 'reference entry_attribute',
requires=IS_IN_DB(db, "entry_attribute.id",
'%(name)s',
zero=T("-- Odaberite --")),
label=LABEL(T("Atribut"), _for=
"report_entry_attribute_id")),
Field('sorting', 'string',
required=False,
requires=IS_EMPTY_OR(IS_IN_SET(("ASC",
"DESC"),
zero=T("Odaberite
sortiranje"))),
label=LABEL(T("Sortiranje"), _for=
"report_attribute_sorting")),
)
db.define_table('report_attribute_filter',
Field('report_attribute_id', 'reference report_attribute',
required=True,
requires=IS_IN_DB(db(db.report_attribute.entry_attribute_id
== db.entry_attribute.id), "report_attribute.id", "%(entry_attribute_id)s",zero
=T("-- Odaberite --")),
label=LABEL(T("Attribut"), _for=
"report_attribute_filter_report_attribute_id")),
Field('filter_type', 'string',
requires=IS_IN_SET(("LIKE",
"=",
"<",
">",
"<=",
">="), zero=T("Odaberite filter"
)),
label=LABEL(T("TIP FILTERA"), _for=
"report_attribute_filter_filter_type")),
Field('filter_name', 'string',
required=True,
requires=IS_NOT_EMPTY(),
label=LABEL(T("Naziv filtera"), _for=
"report_attribute_filter_filter_name")),
)
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.