Show card number filter by default, for CORE Stock Purchases grid

This commit is contained in:
Lance Edgar 2023-11-30 18:25:49 -06:00
parent 0cdd16b908
commit 95cdea2aef

View file

@ -44,13 +44,18 @@ class StockPurchaseView(CoreTransMasterView):
}
def configure_grid(self, g):
""" """
super().configure_grid(g)
# card_number
g.filters['card_number'].default_active = True
g.filters['card_number'].default_verb = 'equal'
g.set_link('card_number')
g.set_type('amount', 'currency')
g.set_sort_defaults('datetime', 'desc')
g.set_link('card_number')
g.set_link('transaction_number')
g.set_link('datetime')
@ -61,6 +66,7 @@ class StockPurchaseView(CoreTransMasterView):
return {'totals_display': app.render_currency(total)}
def configure_form(self, f):
""" """
super().configure_form(f)
f.set_renderer('card_number', self.render_linked_corepos_card_number)