2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

Update BomItem 'validated' field (#4486)

* Adds new "validated" field to the BomItem model

- Previously this was dynamically calculated (very expensive)
- Now cached and updated whenever a BomItem instance is saved
- Will make the BOM API much more responsive
- Cleanup BomItem list API code also

* Adds data migration to update existing BomItem objects

* Exclude 'validated' field from BomItemResource class
This commit is contained in:
Oliver
2023-03-14 13:53:33 +11:00
committed by GitHub
parent 06f8a50956
commit 1ba51e51c3
6 changed files with 84 additions and 34 deletions

View File

@ -259,6 +259,7 @@ class BomItemResource(InvenTreeResource):
'id',
'part',
'sub_part',
'validated',
]
level = Field(attribute='level', column_name=_('BOM Level'), readonly=True)