

def item():
    ' RESTful CRUD controller '
    table = s3db.supply_item
    ctable = s3db.supply_item_category
    s3.filter = ((table.item_category_id == ctable.id) & (ctable.is_vehicle == True))
    field = s3db.supply_item.item_category_id
    ctable.requires = IS_ONE_OF(db, 'supply_item_category.id', s3db.supply_item_category_represent, sort=True, filterby='is_vehicle', filter_opts=[True])
    field.label = T('Vehicle Categories')
    field.comment = S3PopupLink(f='item_category', label=T('Add Vehicle Category'), info=T('Add a new vehicle category'), title=T('Vehicle Category'), tooltip=T("Only Categories of type 'Vehicle' will be seen in the dropdown."))
    s3.crud_strings['supply_item'] = Storage(label_create=T('Add New Vehicle Type'), title_display=T('Vehicle Type Details'), title_list=T('Vehicle Types'), title_update=T('Edit Vehicle Type'), label_list_button=T('List Vehicle Types'), label_delete_button=T('Delete Vehicle Type'), msg_record_created=T('Vehicle Type added'), msg_record_modified=T('Vehicle Type updated'), msg_record_deleted=T('Vehicle Type deleted'), msg_list_empty=T('No Vehicle Types currently registered'), msg_match=T('Matching Vehicle Types'), msg_no_match=T('No Matching Vehicle Types'))
    return s3db.supply_item_controller()

dataset/ETHPy150Open sahana/eden/controllers/vehicle.py item/VarMisuse@55/82 `field`->`ctable`