2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-04-28 13:54:25 +00:00

BOM Enhancements (#10042)

* Add "round_up_multiple" field

* Adjust field def

* Add serializer field

* Update frontend

* Nullify empty numerical values

* Calculate round_up_multiple value

* Adjust table rendering

* Update API version

* Add unit test

* Additional unit test

* Change name of value

* Update BOM docs

* Add new fields

* Add data migration for new fields

* Bug fix for data migration

* Adjust API fields

* Bump API docs

* Update frontend

* Remove old 'overage' field

* Updated BOM docs

* Docs tweak

* Fix required quantity calculation

* additional unit tests

* Tweak BOM table

* Enhanced "can_build" serializer

* Refactor "can_build" calculations

* Code cleanup

* Serializer fix

* Enhanced rendering

* Updated playwright tests

* Fix method name

* Update API unit test

* Refactor 'can_build' calculation

- Make it much more efficient
- Reduce code duplication

* Fix unit test

* Adjust serializer type

* Update src/backend/InvenTree/part/models.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/backend/InvenTree/part/test_bom_item.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/docs/manufacturing/bom.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/docs/manufacturing/bom.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Adjust unit test

* Adjust tests

* Tweak requirements

* Tweak playwright tests

* More playwright fixes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Oliver
2025-07-20 19:14:29 +10:00
committed by GitHub
parent 31d4a88f90
commit 69ca942dfc
23 changed files with 819 additions and 394 deletions
+4 -2
View File
@@ -207,15 +207,17 @@ test('Stock - Serialize', async ({ browser }) => {
await page.getByLabel('text-field-serial_numbers').fill('200-250');
await page.getByRole('button', { name: 'Submit' }).click();
await page
.getByText('Group range 200-250 exceeds allowed quantity')
.getByText('Number of unique serial numbers (51) must match quantity (100)')
.waitFor();
await page.getByLabel('text-field-serial_numbers').fill('1, 2, 3');
await page.waitForTimeout(250);
await page.getByRole('button', { name: 'Submit' }).click();
await page
.getByText('Number of unique serial numbers (3) must match quantity (10)')
.getByText('Number of unique serial numbers (3) must match quantity (100)')
.waitFor();
await page.getByRole('button', { name: 'Cancel' }).click();