Now, I understand how ORM works... or not

This commit is contained in:
2016-12-14 01:04:38 +01:00
committed by Skia
parent bfa09c0bcd
commit 147287f9a9
4 changed files with 39 additions and 5 deletions

View File

@ -14,13 +14,16 @@
<thead>
<tr>
<td>{% trans %}Nature of operation{% endtrans %}</td>
<td>{% trans %}Amount{% endtrans %}</td>
<td>{% trans %}Sum{% endtrans %}</td>
</tr>
</thead>
<tbody></tr>
<td>bla</td>
<td>{{self.get_test()}}</td>
<tr>
<tbody>
{% for key in bilan.keys() %}
<tr>
<td>{{object.operations.get(accounting_type__code=key).accounting_type.label}}</td>
<td>{{bilan[key]}}</td>
</tr>
{% endfor %}
</tbody>
</table>

View File

@ -22,6 +22,7 @@
<p>{% trans %}Journal is closed, you can not create operation{% endtrans %}</p>
{% else %}
<p><a href="{{ url('accounting:op_new', j_id=object.id) }}">{% trans %}New operation{% endtrans %}</a></p>
<p><a href="{{ url('accounting:journal_bilan', j_id=object.id) }}">{% trans %}Journal Bilan{% endtrans %}</a></p>
{% endif %}
<table>
<thead>