Commit b7a35a98 authored by Dalahro's avatar Dalahro

Logs des controles

parent 3444084b
......@@ -28,7 +28,7 @@ class Facture(models.Model):
return name
def __str__(self):
return str(self.date) + ' ' + str(self.user)
return str(self.user) + ' ' + str(self.date)
@receiver(post_save, sender=Facture)
def facture_post_save(sender, **kwargs):
......
......@@ -16,20 +16,22 @@
</tr>
</thead>
{% for revision in revisions_list %}
<tr>
<td>{% for reversion in revision.version_set.all %}{{ reversion.object|truncatechars:20 }}{% endfor %}</td>
<td>{% for reversion in revision.version_set.all %}{{ reversion.object|classname }}{% endfor %}</td>
<td>{{ revision.user }}</td>
<td>{{ revision.date_created }}</td>
<td>{{ revision.comment }}</td>
{% if is_bureau %}
<td>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}">
<i class="glyphicon glyphicon-remove"></i>
Annuler
</a>
</td>
{% endif %}
</tr>
{% for reversion in revision.version_set.all %}
<tr>
<td>{{ reversion.object|truncatechars:20 }}</td>
<td>{{ reversion.object|classname }}</td>
<td>{{ revision.user }}</td>
<td>{{ revision.date_created }}</td>
<td>{{ revision.comment }}</td>
{% if is_bureau %}
<td>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}">
<i class="glyphicon glyphicon-remove"></i>
Annuler
</a>
</td>
{% endif %}
</tr>
{% endfor %}
{% endfor %}
</table>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment