Peppy fixes

This commit is contained in:
Oliver Walters 2019-06-13 22:16:27 +10:00
parent c9cddd2a19
commit 38001b5358
4 changed files with 10 additions and 5 deletions

View File

@ -49,4 +49,3 @@ class EditPurchaseOrderLineItemForm(HelperForm):
'reference',
'notes',
]

View File

@ -83,7 +83,9 @@ InvenTree | {{ order }}
<th data-field='received'>Received</th>
{% endif %}
<th data-field='notes'>Note</th>
{% if order.status == OrderStatus.PENDING %}
<th data-field='buttons'></th>
{% endif %}
</tr>
{% for line in order.lines.all %}
<tr>
@ -107,6 +109,7 @@ InvenTree | {{ order }}
<td>
{{ line.notes }}
</td>
{% if order.status == OrderStatus.PENDING %}
<td>
<div class='btn-group'>
<button class='btn btn-default btn-edit' id='edit-line-item-{{ line.id }} title='Edit line item' onclick='editPurchaseOrderLineItem()'>
@ -117,6 +120,7 @@ InvenTree | {{ order }}
</button>
</div>
</td>
{% endif %}
</tr>
{% endfor %}
</table>

View File

@ -190,7 +190,7 @@ class OrderParts(AjaxView):
except SupplierPart.DoesNotExist:
continue
if not supplier.name in suppliers:
if supplier.name not in suppliers:
supplier.order_items = []
supplier.selected_purchase_order = None
suppliers[supplier.name] = supplier
@ -387,7 +387,7 @@ class OrderParts(AjaxView):
if form_step == 'select_parts':
# No errors? Proceed to PO selection form
if part_errors == False:
if part_errors is False:
self.ajax_template_name = 'order/order_wizard/select_pos.html'
else:
@ -567,4 +567,4 @@ class POLineItemDelete(AjaxDeleteView):
def get_data(self):
return {
'danger': 'Deleted line item',
}
}

View File

@ -3,6 +3,8 @@ ignore =
# - W293 - blank lines contain whitespace
W293,
# - E501 - line too long (82 characters)
E501
E501,
# - C901 - function is too complex
C901,
exclude = .git,__pycache__,*/migrations/*
max-complexity = 20