Avoid "physical location" product field, if underlying table is missing
This commit is contained in:
		
							parent
							
								
									41ce64b67f
								
							
						
					
					
						commit
						1ec511b60c
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -25,6 +25,7 @@ CORE-POS product views | |||
| """ | ||||
| 
 | ||||
| from corepos.db.office_op import model as corepos | ||||
| from corepos.db.util import table_exists | ||||
| 
 | ||||
| from webhelpers2.html import HTML | ||||
| 
 | ||||
|  | @ -90,6 +91,9 @@ class ProductView(CoreOfficeMasterView): | |||
|     def configure_form(self, f): | ||||
|         super(ProductView, self).configure_form(f) | ||||
| 
 | ||||
|         if not table_exists(self.Session(), corepos.FloorSection): | ||||
|             f.remove('physical_location') | ||||
| 
 | ||||
|         f.set_renderer('vendor', self.render_corepos_vendor) | ||||
| 
 | ||||
|         f.set_renderer('flags', self.render_flags) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar