Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Rename variable names in template

akjanik40d867c5d34e
diff --git a/templates/dashboard/order/detail.html b/templates/dashboard/order/detail.html
index 445b2e04e2..bb9ef36297 100644
--- a/templates/dashboard/order/detail.html
+++ b/templates/dashboard/order/detail.html
@@ -299,51 +299,51 @@
{% endif %}
</tfoot>
<tbody>
- {% for item in group.items.all %}
+ {% for line in group.lines.all %}
<tr>
<td>
- {{ item.product_name }}<br>
+ {{ line.product_name }}<br>
</td>
<td>
- {{ item.product_sku }}
+ {{ line.product_sku }}
</td>
<td class="right-align">
- {% gross item.get_price_per_item html=True %}
+ {% gross line.get_price_per_item html=True %}
</td>
<td class="right-align">
{% if group.can_edit_items %}
- <a class="dropdown-button" href="#" data-activates="line-actions-{{ item.pk }}" data-constrainwidth="false">
- {{ item.quantity }} {% if item.stock_location %} ({{ item.stock_location|truncatechars:10 }}) {% endif %}
+ <a class="dropdown-button" href="#" data-activates="line-actions-{{ line.pk }}" data-constrainwidth="false">
+ {{ line.quantity }} {% if line.stock_location %} ({{ line.stock_location|truncatechars:10 }}) {% endif %}
<svg data-src="{% static "dashboard/images/arrow_drop_down.svg" %}" width="24" height="24" />
</a>
- <ul id="line-actions-{{ item.pk }}" class="dropdown-content">
+ <ul id="line-actions-{{ line.pk }}" class="dropdown-content">
<li>
- <a href="#base-modal" data-href="{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom" title="{% trans "Change quantity" context "Shipment group table row action" %}">
+ <a href="#base-modal" data-href="{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=line.pk %}" class="modal-trigger-custom" title="{% trans "Change quantity" context "Shipment group table row action" %}">
{% trans "Change quantity" context "Shipment group table row action" %}
</a>
</li>
<li>
- <a href="#base-modal" data-href="{% url 'dashboard:orderline-change-stock' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom" title="{% trans "Change stock location" context "Shipment group table row action" %}">
+ <a href="#base-modal" data-href="{% url 'dashboard:orderline-change-stock' order_pk=order.pk line_pk=line.pk %}" class="modal-trigger-custom" title="{% trans "Change stock location" context "Shipment group table row action" %}">
{% trans "Change stock" context "Shipment group table row action" %}
</a>
</li>
<li>
- <a href="#base-modal" data-href="{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom" title="{% trans "Split line" context "Shipment group table row action" %}">
+ <a href="#base-modal" data-href="{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=line.pk %}" class="modal-trigger-custom" title="{% trans "Split line" context "Shipment group table row action" %}">
{% trans "Split order line" context "Shipment group table row action" %}
</a>
</li>
<li>
- <a href="#base-modal" data-href="{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom" title="{% trans "Remove line" context "Shipment group table row action" %}">
+ <a href="#base-modal" data-href="{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=line.pk %}" class="modal-trigger-custom" title="{% trans "Remove line" context "Shipment group table row action" %}">
{% trans "Remove line" context "Shipment group table row action" %}
</a>
</li>
</ul>
{% else %}
- {{ item.quantity }}
+ {{ line.quantity }}
{% endif %}
</td>
<td class="right-align">
- {% gross item.get_total html=True %}
+ {% gross line.get_total html=True %}
</td>
</tr>
{% endfor %}
diff --git a/templates/dashboard/order/pdf/packing_slip.html b/templates/dashboard/order/pdf/packing_slip.html
index b96c6d3e04..fc7f046345 100644
--- a/templates/dashboard/order/pdf/packing_slip.html
+++ b/templates/dashboard/order/pdf/packing_slip.html
@@ -66,16 +66,16 @@
</tr>
</thead>
<tbody>
- {% for item in group.items.all %}
+ {% for line in group.lines.all %}
<tr>
<td>
- {{ item.product_name }}<br>
+ {{ line.product_name }}<br>
</td>
<td>
- {{ item.product_sku }}
+ {{ line.product_sku }}
</td>
<td class="right-align">
- {{ item.quantity }}
+ {{ line.quantity }}
</td>
</tr>
{% endfor %}