#NEWLINE# def track_movement( ) : #NEWLINE# #INDENT# ' REST Controller ' #NEWLINE# table = s3db . inv_track_item #NEWLINE# s3db . configure ( 'inv_track_item' , create = False , deletable = False , editable = False , listadd = False ) #NEWLINE# def prep( r ) : #NEWLINE# #INDENT# if r . interactive : #NEWLINE# #INDENT# if ( 'viewing' in get_vars ) : #NEWLINE# #INDENT# ( dummy , item_id ) = get_vars . viewing . split ( '.' ) #NEWLINE# if ( item_id != 'None' ) : #NEWLINE# #INDENT# query = ( ( table . send_inv_item_id == item_id ) | ( table . recv_inv_item_id == item_id ) ) #NEWLINE# r . resource . add_filter ( query ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return True #NEWLINE# #UNINDENT# s3 . prep = prep #NEWLINE# output = s3_rest_controller ( 'inv' , 'track_item' , rheader = s3db . inv_rheader ) #NEWLINE# if ( 'add_btn' in output ) : #NEWLINE# #INDENT# del output [ 'add_btn' ] #NEWLINE# #UNINDENT# return table