diff --git a/tailbone/views/custorders/orders.py b/tailbone/views/custorders/orders.py index c60e859e..12a0c339 100644 --- a/tailbone/views/custorders/orders.py +++ b/tailbone/views/custorders/orders.py @@ -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'): diff --git a/tailbone/views/employees.py b/tailbone/views/employees.py index febe521e..c1f4b01c 100644 --- a/tailbone/views/employees.py +++ b/tailbone/views/employees.py @@ -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'): diff --git a/tailbone/views/master.py b/tailbone/views/master.py index 3807408b..7eb9ebc8 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -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) diff --git a/tailbone/views/purchases/core.py b/tailbone/views/purchases/core.py index 2cd28be8..eb32fa73 100644 --- a/tailbone/views/purchases/core.py +++ b/tailbone/views/purchases/core.py @@ -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)