Hopefully fix "single store" behavior when make a new ordering batch
this does seem to fix for this use case, but previous commit for this code implied that it was fixing something for the receiving use case...
This commit is contained in:
		
							parent
							
								
									937c2920ac
								
							
						
					
					
						commit
						5cfe69d24b
					
				
					 1 changed files with 3 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -254,18 +254,15 @@ class PurchasingBatchView(BatchMasterView):
 | 
			
		|||
            f.replace('store', 'store_uuid')
 | 
			
		||||
            if single_store:
 | 
			
		||||
                store = self.rattail_config.get_store(self.Session())
 | 
			
		||||
                f.set_widget('store_uuid', forms.widgets.ReadonlyWidget())
 | 
			
		||||
                f.set_widget('store_uuid', dfwidget.HiddenWidget())
 | 
			
		||||
                f.set_default('store_uuid', store.uuid)
 | 
			
		||||
                f.set_hidden('store_uuid')
 | 
			
		||||
            else:
 | 
			
		||||
                f.set_widget('store_uuid', dfwidget.SelectWidget(values=self.get_store_values()))
 | 
			
		||||
                f.set_label('store_uuid', "Store")
 | 
			
		||||
        else:
 | 
			
		||||
            if single_store:
 | 
			
		||||
                f.remove_field('store')
 | 
			
		||||
            else:
 | 
			
		||||
                f.set_readonly('store')
 | 
			
		||||
                f.set_renderer('store', self.render_store)
 | 
			
		||||
            f.set_readonly('store')
 | 
			
		||||
            f.set_renderer('store', self.render_store)
 | 
			
		||||
 | 
			
		||||
        # purchase
 | 
			
		||||
        f.set_renderer('purchase', self.render_purchase)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue