Hide deleted field from product details, according to permissions.

This commit is contained in:
Lance Edgar 2015-02-26 18:01:55 -06:00
parent 9e7d0e177d
commit 99e11fe8d8

View file

@ -291,6 +291,8 @@ class ProductCrud(CrudView):
if not self.readonly:
del fs.regular_price
del fs.current_price
if not self.request.has_perm('products.view_deleted'):
del fs.deleted
return fs
def pre_crud(self, product):