Hide deleted field from product details, according to permissions.
This commit is contained in:
parent
9e7d0e177d
commit
99e11fe8d8
|
@ -291,6 +291,8 @@ class ProductCrud(CrudView):
|
||||||
if not self.readonly:
|
if not self.readonly:
|
||||||
del fs.regular_price
|
del fs.regular_price
|
||||||
del fs.current_price
|
del fs.current_price
|
||||||
|
if not self.request.has_perm('products.view_deleted'):
|
||||||
|
del fs.deleted
|
||||||
return fs
|
return fs
|
||||||
|
|
||||||
def pre_crud(self, product):
|
def pre_crud(self, product):
|
||||||
|
|
Loading…
Reference in a new issue