Update some method calls to avoid deprecation warnings
This commit is contained in:
parent
dc28b1337d
commit
6af5157b4e
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -277,8 +277,9 @@ class CustomerOrderView(MasterView):
|
|||
return text
|
||||
|
||||
def get_batch_handler(self):
|
||||
return get_batch_handler(
|
||||
self.rattail_config, 'custorder',
|
||||
app = self.get_rattail_app()
|
||||
return app.get_batch_handler(
|
||||
'custorder',
|
||||
default='rattail.batch.custorder:CustomerOrderBatchHandler')
|
||||
|
||||
def create(self, form=None, template='create'):
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -112,7 +112,7 @@ class EmployeeView(MasterView):
|
|||
g.set_sorter('username', model.User.username)
|
||||
g.set_renderer('username', self.grid_render_username)
|
||||
else:
|
||||
g.hide_column('username')
|
||||
g.remove('username')
|
||||
|
||||
# id
|
||||
if self.has_perm('edit'):
|
||||
|
|
|
@ -455,7 +455,7 @@ class MasterView(View):
|
|||
# hide "local only" grid filter, unless global access allowed
|
||||
if self.secure_global_objects:
|
||||
if not self.has_perm('view_global'):
|
||||
grid.hide_column('local_only')
|
||||
grid.remove('local_only')
|
||||
grid.remove_filter('local_only')
|
||||
|
||||
self.configure_column_product_key(grid)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -311,12 +311,12 @@ class PurchaseView(MasterView):
|
|||
|
||||
purchase = self.get_instance()
|
||||
if purchase.status == self.enum.PURCHASE_STATUS_ORDERED:
|
||||
g.hide_column('cases_received')
|
||||
g.hide_column('units_received')
|
||||
g.hide_column('invoice_total')
|
||||
g.remove('cases_received',
|
||||
'units_received',
|
||||
'invoice_total')
|
||||
elif purchase.status in (self.enum.PURCHASE_STATUS_RECEIVED,
|
||||
self.enum.PURCHASE_STATUS_COSTED):
|
||||
g.hide_column('po_total')
|
||||
g.remove('po_total')
|
||||
|
||||
def configure_row_form(self, f):
|
||||
super(PurchaseView, self).configure_row_form(f)
|
||||
|
|
Loading…
Reference in a new issue