~robbyoconnor/sahana-eden/eden

« back to all changes in this revision

Viewing changes to models/06_supply.py

  • Committer: Fran Boon
  • Date: 2011-12-24 12:14:43 UTC
  • mfrom: (185.15.508 vita)
  • Revision ID: fran@aidiq.com-20111224121443-dkztge92h33fkfrx
merge nursix: Start moving models into modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1064
1064
        tablename = "supply_item_entity"
1065
1065
        table = super_entity(tablename, "item_entity_id", item_types,
1066
1066
                             # @ToDo: Make Items Trackable?
1067
 
                             #super_link(db.sit_trackable), # track_id
 
1067
                             #super_link(s3db.sit_trackable), # track_id
1068
1068
                             #location_id(),
1069
1069
                             supply_item_id(represent = lambda id: \
1070
1070
                                                supply_item_represent(id,
1386
1386
                    else:
1387
1387
                        # @ToDo: Assets and req_items
1388
1388
                        return NONE
1389
 
                        
 
1389
 
1390
1390
                    #site = org_site_represent(record.site_id)
1391
1391
                    #return site
1392
1392
                    otable = db.org_office
1647
1647
        values.push( $(this).attr('name') );
1648
1648
    });
1649
1649
    if ( values.length ) {
1650
 
        $('#list_formats a').attr('href', function() { 
 
1650
        $('#list_formats a').attr('href', function() {
1651
1651
            var href = this.href.split('?')[0] + '?item_entity.item_id$item_category_id=' + values[0];
1652
1652
            for ( i = 1; i <= (values.length - 1); i++ ) {
1653
1653
                href = href + ',' + values[i]
1655
1655
            return href;
1656
1656
        });
1657
1657
    } else {
1658
 
        $('#list_formats a').attr('href', function() { 
 
1658
        $('#list_formats a').attr('href', function() {
1659
1659
            return this.href.split('?')[0];
1660
1660
        });
1661
1661
    }
1672
1672
 
1673
1673
                return output
1674
1674
            response.s3.postp = postp
1675
 
            
 
1675
 
1676
1676
            output = s3_rest_controller("supply", "item_entity")
1677
1677
            return output
1678
1678