invoicing: fix data-related-invoice-id for draft pool (#78015)
gitea/lingo/pipeline/head This commit looks good
Details
gitea/lingo/pipeline/head This commit looks good
Details
This commit is contained in:
parent
108a341057
commit
8216b85a0a
|
@ -1,6 +1,6 @@
|
|||
{% load i18n %}
|
||||
{% for line in object_list %}
|
||||
<li class="line" data-related-invoice-id="{{ invoice.pk }}">
|
||||
<li class="line" data-related-invoice-id="{{ line.invoice_id }}">
|
||||
{% if line.pool %}
|
||||
{% url 'lingo-manager-invoicing-pool-journal' regie_pk=regie.pk pk=line.pool.campaign_id pool_pk=line.pool.pk as journal_url %}
|
||||
<a href="{{ journal_url }}?pk={{ line.pk }}">#{{ line.pk }}</a>
|
||||
|
|
|
@ -1528,8 +1528,10 @@ def test_detail_pool_invoices(app, admin_user, draft):
|
|||
lines_resp = app.get(lines_url)
|
||||
if draft:
|
||||
assert len(lines_resp.pyquery('li')) == 3
|
||||
assert len(lines_resp.pyquery('li[data-related-invoice-id="%s"]' % invoice1.pk)) == 3
|
||||
else:
|
||||
assert len(lines_resp.pyquery('li')) == 6
|
||||
assert len(lines_resp.pyquery('li[data-related-invoice-id="%s"]' % invoice1.pk)) == 6
|
||||
assert (
|
||||
lines_resp.pyquery('li:nth-child(1)').text()
|
||||
== '#%s User1 Name1 (user:1) - 01/09/2022 - Label 11 (1.00)' % line11.pk
|
||||
|
|
Loading…
Reference in New Issue