From 1f97d4f5e5905218610849e0a0a8832b2e2fe874 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 19 Sep 2023 14:40:58 -0500 Subject: [PATCH] Add link to vendor name for receiving batches grid --- tailbone/views/purchasing/batch.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tailbone/views/purchasing/batch.py b/tailbone/views/purchasing/batch.py index 8960a522..96557d55 100644 --- a/tailbone/views/purchasing/batch.py +++ b/tailbone/views/purchasing/batch.py @@ -168,10 +168,12 @@ class PurchasingBatchView(BatchMasterView): super().configure_grid(g) model = self.model - g.joiners['vendor'] = lambda q: q.join(model.Vendor) - g.filters['vendor'] = g.make_filter('vendor', model.Vendor.name, - default_active=True, default_verb='contains') - g.sorters['vendor'] = g.make_sorter(model.Vendor.name) + # vendor + g.set_link('vendor') + g.set_joiner('vendor', lambda q: q.join(model.Vendor)) + g.set_sorter('vendor', model.Vendor.name) + g.set_filter('vendor', model.Vendor.name, + default_active=True, default_verb='contains') g.joiners['department'] = lambda q: q.join(model.Department) g.filters['department'] = g.make_filter('department', model.Department.name)