Cleanup attribute names for CORE Customer model
This commit is contained in:
parent
98ca1ec402
commit
6dc246258a
|
@ -40,52 +40,42 @@ class CustomerView(CoreOfficeMasterView):
|
||||||
|
|
||||||
labels = {
|
labels = {
|
||||||
'id': "ID",
|
'id': "ID",
|
||||||
'CardNo': "Card No.",
|
'card_number': "Card No.",
|
||||||
'personNum': "Person No.",
|
'person_number': "Person No.",
|
||||||
'LastName': "Last Name",
|
'charge_ok': "Charge OK",
|
||||||
'FirstName': "First Name",
|
'member_type_id': "Member Type No.",
|
||||||
'CashBack': "Cash Back",
|
'number_of_checks': "Number of Checks",
|
||||||
'MemDiscountLimit': "Member Discount Limit",
|
|
||||||
'ChargeLimit': "Charge Limit",
|
|
||||||
'ChargeOk': "Charge OK",
|
|
||||||
'WriteChecks': "Write Checks",
|
|
||||||
'StoreCoupons': "Store Coupons",
|
|
||||||
'memType': "Member Type No.",
|
|
||||||
'NumberOfChecks': "Number of Checks",
|
|
||||||
'memCoupons': "Member Coupons",
|
|
||||||
'blueLine': "Blue Line",
|
|
||||||
'LastChange': "Last Change",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
grid_columns = [
|
grid_columns = [
|
||||||
'CardNo',
|
'card_number',
|
||||||
'FirstName',
|
'first_name',
|
||||||
'LastName',
|
'last_name',
|
||||||
'ChargeOk',
|
'charge_ok',
|
||||||
'ChargeLimit',
|
'charge_limit',
|
||||||
'Balance',
|
'balance',
|
||||||
'WriteChecks',
|
'write_checks',
|
||||||
'Purchases',
|
'purchases',
|
||||||
]
|
]
|
||||||
|
|
||||||
def configure_grid(self, g):
|
def configure_grid(self, g):
|
||||||
super(CustomerView, self).configure_grid(g)
|
super(CustomerView, self).configure_grid(g)
|
||||||
|
|
||||||
g.filters['FirstName'].default_active = True
|
g.filters['first_name'].default_active = True
|
||||||
g.filters['FirstName'].default_verb = 'contains'
|
g.filters['first_name'].default_verb = 'contains'
|
||||||
|
|
||||||
g.filters['LastName'].default_active = True
|
g.filters['last_name'].default_active = True
|
||||||
g.filters['LastName'].default_verb = 'contains'
|
g.filters['last_name'].default_verb = 'contains'
|
||||||
|
|
||||||
g.set_type('ChargeLimit', 'currency')
|
g.set_type('charge_limit', 'currency')
|
||||||
g.set_type('Balance', 'currency')
|
g.set_type('balance', 'currency')
|
||||||
g.set_type('Purchases', 'currency')
|
g.set_type('purchases', 'currency')
|
||||||
|
|
||||||
g.set_sort_defaults('CardNo')
|
g.set_sort_defaults('card_number')
|
||||||
|
|
||||||
g.set_link('CardNo')
|
g.set_link('card_number')
|
||||||
g.set_link('FirstName')
|
g.set_link('first_name')
|
||||||
g.set_link('LastName')
|
g.set_link('last_name')
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def includeme(config):
|
||||||
|
|
Loading…
Reference in a new issue