def _entities_hub_search(sender, data):
    import invenio_circulation_acquisition.models as models

    search = data

    models_entities = {'acquisition_loan_cycle': models.AcquisitionLoanCycle,
                       'acquisition_vendor': models.AcquisitionVendor}

    entity = models_entities.get(sender)
    res = None
    if entity:
        res = (entity.search(search), 'entities/' + sender + '.html')

    return {'name': 'acquisition_entity', 'result': res}
def _entities_hub_search(sender, data):
    import invenio_circulation_ill.models as models

    search = data

    models_entities = {'ill_loan_cycle': models.IllLoanCycle,
                       'ill_supplier': models.IllSupplier}

    entity = models_entities.get(sender)
    res = None
    if entity:
        res = (entity.search(search), 'ill_entities/' + sender + '.html')

    return {'name': 'ill_entity', 'result': res}
Beispiel #3
0
def _entities_hub_search(sender, data):
    import invenio_circulation_acquisition.models as models

    search = data

    models_entities = {
        'acquisition_loan_cycle': models.AcquisitionLoanCycle,
        'acquisition_vendor': models.AcquisitionVendor
    }

    entity = models_entities.get(sender)
    res = None
    if entity:
        res = (entity.search(search), 'entities/' + sender + '.html')

    return {'name': 'acquisition_entity', 'result': res}
def _entities_hub_search(sender, data):
    import invenio_circulation_ill.models as models

    search = data

    models_entities = {
        'ill_loan_cycle': models.IllLoanCycle,
        'ill_supplier': models.IllSupplier
    }

    entity = models_entities.get(sender)
    res = None
    if entity:
        res = (entity.search(search), 'ill_entities/' + sender + '.html')

    return {'name': 'ill_entity', 'result': res}
Beispiel #5
0
def _entities_hub_search(sender, data):
    import invenio_circulation.models as models

    search = data

    models_entities = {'record':  models.CirculationRecord,
                       'user': models.CirculationUser,
                       'item': models.CirculationItem,
                       'loan_cycle': models.CirculationLoanCycle,
                       'location': models.CirculationLocation,
                       'event': models.CirculationEvent,
                       'mail_template': models.CirculationMailTemplate,
                       'loan_rule': models.CirculationLoanRule,
                       'loan_rule_match': models.CirculationLoanRuleMatch}

    entity = models_entities.get(sender)
    res = None
    if entity:
        res = (entity.search(search), 'entities/' + sender + '.html')

    return {'name': 'entity', 'result': res}