diff --git a/counter/templates/counter/product_form.jinja b/counter/templates/counter/product_form.jinja index c30b3e86..534ab223 100644 --- a/counter/templates/counter/product_form.jinja +++ b/counter/templates/counter/product_form.jinja @@ -83,15 +83,17 @@ {% endmacro %} {% block content %} -
{% trans %}Creation date{% endtrans %} : {{ object.created_at|date }}
diff --git a/counter/views/admin.py b/counter/views/admin.py index 6f5053d6..17277b14 100644 --- a/counter/views/admin.py +++ b/counter/views/admin.py @@ -181,6 +181,9 @@ class ProductEditView(CounterAdminTabsMixin, PermissionRequiredMixin, UpdateView permission_required = "counter.change_product" def has_permission(self): + # If users can see products but not edit them, + # still show them this form, as it is the place where all infos are, + # but forbid to save it. return self.request.user.has_perm("counter.change_product") or ( self.request.method == "GET" and self.request.user.has_perm("counter.view_product")