diff --git a/tailbone_corepos/views/corepos/vendors.py b/tailbone_corepos/views/corepos/vendors.py index dbcb273..c97f2fb 100644 --- a/tailbone_corepos/views/corepos/vendors.py +++ b/tailbone_corepos/views/corepos/vendors.py @@ -34,6 +34,7 @@ class VendorView(CoreOfficeMasterView): Base class for vendor views. """ model_class = corepos.Vendor + model_key = 'id' model_title = "CORE-POS Vendor" url_prefix = '/core-pos/vendors' route_prefix = 'corepos.vendors' @@ -68,10 +69,17 @@ class VendorView(CoreOfficeMasterView): def configure_grid(self, g): super(VendorView, self).configure_grid(g) + # TODO: this is only needed b/c of orm.synonym usage + g.set_sorter('id', corepos.Vendor.id) + g.set_link('id') g.set_link('name') g.set_link('abbreviation') + # TODO: ugh, would be nice to not have to do this... + def get_action_route_kwargs(self, row): + return {'id': row.id} + def configure_form(self, f): super(VendorView, self).configure_form(f)