mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Show 'available_stock' in Part string representation
This commit is contained in:
parent
852a680c09
commit
9fa13aeae3
@ -269,7 +269,7 @@ class Part(MPTTModel):
|
|||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "{n} - {d}".format(n=self.full_name, d=self.description)
|
return f"{self.full_name} - {self.description} - {self.available_stock}"
|
||||||
|
|
||||||
def checkAddToBOM(self, parent):
|
def checkAddToBOM(self, parent):
|
||||||
"""
|
"""
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<option value=''>--- {% trans "Select Part" %} ---</option>
|
<option value=''>--- {% trans "Select Part" %} ---</option>
|
||||||
{% for part in row.part_options %}
|
{% for part in row.part_options %}
|
||||||
<option value='{{ part.id }}' {% if part.id == row.part.id %} selected='selected' {% elif part.id == row.part_match.id %} selected='selected' {% endif %}>
|
<option value='{{ part.id }}' {% if part.id == row.part.id %} selected='selected' {% elif part.id == row.part_match.id %} selected='selected' {% endif %}>
|
||||||
{{ part.full_name }} - {{ part.description }}
|
{{ part }}
|
||||||
</option>
|
</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
|
Loading…
Reference in New Issue
Block a user