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