mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	[Refactor] BOM Validation (#10056)
* Add "bom_validated" field to the Part model * Check bom validity of any assemblies when a part is changed * Improved update logic * Fixes for circular imports * Add additional info to BOM validation serializer * More intelligent caching * Refactor * Update API filter * Data migration to process existing BomItem entries * Add "BOM Valid" filter to part table * Add dashboard widget * Display BOM validation status * Tweak dashboard widget * Update BomTable * Allow locked BOM items to be validated * Adjust get_item_hash - preserve "some" backwards compatibility * Bump API version * Refactor app URL patterns * Fix import sequence * Tweak imports * Fix logging message * Fix error message * Update src/backend/InvenTree/part/migrations/0141_auto_20250722_0303.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update exception handling * Try info level debug * Disable exchange rate update * Add registry ready flag * Add is_ready func * Cleaner init code * Protect against plugin access until ready * Fix dashboard widget filter * Adjust unit test * Fix receiver name * Only add plugin URLs if registry is ready * Cleanup code * Update playwright tests * Update docs * Revert changes to urls.py --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
		| @@ -4,7 +4,8 @@ import { | ||||
|   clickOnRowMenu, | ||||
|   getRowFromCell, | ||||
|   loadTab, | ||||
|   navigate | ||||
|   navigate, | ||||
|   setTableChoiceFilter | ||||
| } from '../helpers'; | ||||
| import { doCachedLogin } from '../login'; | ||||
|  | ||||
| @@ -81,10 +82,32 @@ test('Parts - Supplier Parts', async ({ browser }) => { | ||||
| }); | ||||
|  | ||||
| test('Parts - BOM', async ({ browser }) => { | ||||
|   const page = await doCachedLogin(browser, { url: 'part/87/bom' }); | ||||
|   const page = await doCachedLogin(browser, { | ||||
|     url: 'part/category/index/parts' | ||||
|   }); | ||||
|  | ||||
|   // Display all active assemblies with validated BOMs | ||||
|   await clearTableFilters(page); | ||||
|   await setTableChoiceFilter(page, 'assembly', 'Yes'); | ||||
|   await setTableChoiceFilter(page, 'active', 'Yes'); | ||||
|   await setTableChoiceFilter(page, 'BOM Valid', 'Yes'); | ||||
|  | ||||
|   await page.getByText('1 - 12 / 12').waitFor(); | ||||
|  | ||||
|   // Navigate to BOM for a particular assembly | ||||
|   await navigate(page, 'part/87/bom'); | ||||
|   await loadTab(page, 'Bill of Materials'); | ||||
|   await page.waitForLoadState('networkidle'); | ||||
|  | ||||
|   // Mouse-hover to display BOM validation info for this assembly | ||||
|   await page.getByRole('button', { name: 'bom-validation-info' }).hover(); | ||||
|   await page | ||||
|     .getByText('The Bill of Materials for this part has been validated') | ||||
|     .waitFor(); | ||||
|   await page.getByText('Validated On: 2025-07-23').waitFor(); | ||||
|   await page.getByText('Robert Shuruncle').waitFor(); | ||||
|  | ||||
|   // Move the mouse away | ||||
|   await page.getByRole('link', { name: 'Bill of Materials' }).hover(); | ||||
|  | ||||
|   const cell = await page.getByRole('cell', { | ||||
|     name: 'Small plastic enclosure, black', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user