Remove CORE ID field when creating product

This commit is contained in:
Lance Edgar 2020-08-20 20:01:34 -05:00
parent c5d119a542
commit b1e2af84b1

View file

@ -54,6 +54,12 @@ class ProductView(base.ProductsView):
model = self.rattail_config.get_model()
g.set_filter('corepos_id', model.CoreProduct.corepos_id)
def configure_form(self, f):
super(ProductView, self).configure_form(f)
if self.creating:
f.remove('corepos_id')
def get_version_child_classes(self):
model = self.rattail_config.get_model()
return super(ProductView, self).get_version_child_classes() + [