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:
@ -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):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user