diff --git a/tailbone_corepos/views/people.py b/tailbone_corepos/views/people.py index de6c9d0..6108c1a 100644 --- a/tailbone_corepos/views/people.py +++ b/tailbone_corepos/views/people.py @@ -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() + [