Changes between Version 62 and Version 63 of S3/S3REST/s3_rest_controller


Ignore:
Timestamp:
04/26/11 11:23:45 (14 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3REST/s3_rest_controller

    v62 v63  
    8989By default, all readable fields of a table appear in list views.
    9090
    91 To control which fields are to be included in list views, to include virtual fields and to prescribe the order of the columns, use the {{{list_fields}}} CRUD setting.
     91To control which fields are to be included in list views, to include virtual fields or fields in referenced tables, or to change the order of the columns, use the {{{list_fields}}} CRUD setting.
    9292
    9393This setting takes a list of field names of the fields to be displayed:
     
    109109                          "location_id",
    110110                          (T("Total costs"), "total_costs")
     111                      ]
     112}}}
     113
     114You can use the tuple notation for any other field as well, in order to override the field label for this list view.
     115
     116To include a field from a referenced table, insert the field name as "<foreign_key>$<fieldname>", e.g.:
     117
     118{{{
     119s3xrc.model.configure(table,
     120                      list_fields=[
     121                          "id",
     122                          "name",
     123                          "location_id$lat",
     124                          "location_id$lon"
    111125                      ]
    112126}}}