Don't require CORE ID when creating/editing Person
This commit is contained in:
		
							parent
							
								
									52bc90a88e
								
							
						
					
					
						commit
						3e037965ab
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -57,6 +57,15 @@ class PersonView(base.PeopleView):
 | 
			
		|||
        model = self.rattail_config.get_model()
 | 
			
		||||
        g.set_filter('corepos_customer_id', model.CorePerson.corepos_customer_id)
 | 
			
		||||
 | 
			
		||||
    def configure_form(self, f):
 | 
			
		||||
        super(PersonView, self).configure_form(f)
 | 
			
		||||
 | 
			
		||||
        # corepos_customer_id
 | 
			
		||||
        if self.creating:
 | 
			
		||||
            f.remove('corepos_customer_id')
 | 
			
		||||
        elif self.editing:
 | 
			
		||||
            f.set_required('corepos_customer_id', False)
 | 
			
		||||
 | 
			
		||||
    def get_version_child_classes(self):
 | 
			
		||||
        model = self.rattail_config.get_model()
 | 
			
		||||
        return super(PersonView, self).get_version_child_classes() + [
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue