2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-13 08:21:26 +00:00

Added part category path string to serializer

This commit is contained in:
Oliver
2018-04-24 17:54:08 +10:00
parent 25fcd3e9f1
commit f46c09e3a7
4 changed files with 11 additions and 4 deletions

View File

@ -153,6 +153,12 @@ class Part(models.Model):
verbose_name = "Part"
verbose_name_plural = "Parts"
@property
def category_path(self):
if self.category:
return self.category.pathstring
return ''
@property
def available_stock(self):
"""