mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Added IPN to Supplier Part string representation
Improved Supplier Part templates and fixed 'Order Part' button in supplier_part_orders
This commit is contained in:
parent
ca8472ac23
commit
af6b30eaca
@ -423,12 +423,15 @@ class SupplierPart(models.Model):
|
||||
return str(self)
|
||||
|
||||
def __str__(self):
|
||||
s = "{supplier} ({sku})".format(
|
||||
sku=self.SKU,
|
||||
supplier=self.supplier.name)
|
||||
s = ''
|
||||
|
||||
if self.part.IPN:
|
||||
s += f'{self.part.IPN}'
|
||||
|
||||
s += f' | {self.supplier.name} | {self.SKU}'
|
||||
|
||||
if self.manufacturer_string:
|
||||
s = s + ' - ' + self.manufacturer_string
|
||||
s = s + ' | ' + self.manufacturer_string
|
||||
|
||||
return s
|
||||
|
||||
|
@ -94,7 +94,7 @@ src="{% static 'img/blank_image.png' %}"
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
$('#order-part').click(function() {
|
||||
$('#order-part, #order-part2').click(function() {
|
||||
launchModalForm(
|
||||
"{% url 'order-parts' %}",
|
||||
{
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
{% include "company/supplier_part_tabs.html" with tab='orders' %}
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>{% trans "Supplier Part Orders" %}</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id='button-bar'>
|
||||
<div class='btn-group'>
|
||||
<button class='btn btn-primary' type='button' id='part-order2' title='Order part'>Order Part</button>
|
||||
<button class='btn btn-primary' type='button' id='order-part2' title='Order part'>Order Part</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -7,10 +7,10 @@
|
||||
|
||||
{% include "company/supplier_part_tabs.html" with tab='pricing' %}
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>{% trans "Pricing Information" %}</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id='price-break-toolbar' class='btn-group'>
|
||||
<button class='btn btn-primary' id='new-price-break' type='button'>{% trans "Add Price Break" %}</button>
|
||||
</div>
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
{% include "company/supplier_part_tabs.html" with tab='stock' %}
|
||||
|
||||
<hr>
|
||||
|
||||
<h4>{% trans "Supplier Part Stock" %}</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
{% include "stock_table.html" %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<div id='order-toolbar-buttons' class='btn-group' style='float: right;'>
|
||||
{% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.change %}
|
||||
<button type='button' class='btn btn-default' id='new-po-line'>{% trans "Add Line Item" %}</button>
|
||||
<button type='button' class='btn btn-primary' id='new-po-line'>{% trans "Add Line Item" %}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user