* Add ParameterTemplate model
- Data structure duplicated from PartParameterTemplate
* Apply data migration for templates
* Admin integration
* API endpoints for ParameterTemplate
* Scaffolding
* Add validator for ParameterTemplate model type
- Update migrations
- Make Parameter class abstract (for now)
- Validators
* API updates
- Fix options for model_type
- Add API filters
* Add definition for Parameter model
* Add django admin site integration
* Update InvenTreeParameterMixin class
- Fetch queryset of all linked Parameter instances
- Ensure deletion of linked instances
* API endpoints for Parameter instances
* Refactor UI table for parameter templates
* Add comment for later
* Add "enabled" field to ParameterTemplate model
* Add new field to serializer
* Rough-in new table
* Implement generic "parameter" table
* Enable parameters for Company model
* Change migration for part parameter
- Make it "universal"
* Remove code for ManufacturerPartParameter
* Fix for filters
* Add data import for parameter table
* Add verbose name to ParameterTemplate model
* Removed dead API code
* Update global setting
* Fix typos
* Check global setting for unit validation
* Use GenericForeignKey
* Add generic relationship to allow reverse lookups
* Fixes for table structure
* Add custom serializer field for ContentType with choices
* Adds ContentTypeField
- Handles representation of content type
- Provides human-readable options
* Refactor API filtering for endpoints
- Specify ContentType by ID, model or app label
* Revert change to parameters property
* Define GenericRelationship for linking model
* Refactoring some code
* Add a generic way to back-annotate and prefetch parameters for any model type
* Change panel position
* Directly annotate parameters against different model serializers
* remove defunct admin classes
* Run plugin validation against parameter
* Fix prefetching for PartSerializer
* Implement generic "filtering" against queryset
* Implement generic "ordering" by parameter
* Make parametric table generic
* Refactor segmented panels
* Consolidate part table views
* Fix for parametric part table
- Only display parameters for which we know there is a value
* Add parametric tables for company views
* Fix typo in file name
* Prefetch to reduce hits
* Add generic API mixin for filtering and ordering by parameter
* Fix hook for rebuilding template parameters
* Remove serializer
* Remove old models
* Fix code for copying parameters from category
* Implement more parametric tables:
- ManufacturerPart
- SupplierPart
- Fixes and enhancements
* Add parameter support for orders
* Add UI support for parameters against orders
* Update API version
* Update CHANGELOG.md
* Add parameter support for build orders
* Tweak frontend
* Add renderer
* Remove defunct endpoints
* Add migration requirement
* Require contenttypes to be updated
* Update migration
* Try using ID val
* Adjust migration dependencies
* fix params fixture
* fix schema export
* fix modelset
* Fixes for data migration
* tweak table
* Fix for Category Parameters
* Use branch of demo dataset for testing
* Add parameteric build order table
* disable broken imports
* remove old model from ruleset
* correct test
* Table tweaks
* fix test
* Remove old model type
* fix test
* fix test
* Refactor mixin to avoid specifying model type manually
* fix test
* fix resolve name
* remove unneeded import
* Tweak unit testing
* Fix unit test
* Enable bulk-create
* More fixes
* More unit test tweaks
* Enhancements
* Unit test fixes
* Add some migration tests
* Fix admin tests
* Fix part tests
* adapt expectation
* fix remaining typecheck
* Docs updates
* Rearrange models
* fix paramater caching
* fix doc links
* adjust assumption
* Adjust data migration unit tests
* docs fixes
* Fix docs link
* Fixes
* Tweak formatting
* Add doc for setting
* Add metadata view for parameters
* Add metadata view for ParamterTemplate
* Update CHANGELOG file
* Deconflict model_type fields
* Invert key:value
* Revert "Invert key:value"
This reverts commit d555658db2.
* fix assert
* Update API rev notes
* Initial unit tests for API
* Test parameter create / edit / delete via the API
* Add some more unit tests for the API
* Validate queryset annotation
- Add unit test with large dataset
- Ensure number of queries is fixed
- Fix for prefetching check
* Add breaking change info to CHANGELOG.md
* Ensure that parameters are removed when deleting the linked object
* Enhance type hinting
* Refactor part parameter exporter plugin
- Any model which supports parameters can use this now
- Update documentation
* Improve serializer field
* Adjust unit test
* Reimplement checks for locked parts
* Fix unit test for data migration
* Fix for unit test
* Allow disable edit for ParameterTable
* Fix supplier part import wizard
* Add unit tests for template API filtering
* Add playwright tests for purchasing index
* Add tests for manufacturing index page
* ui tests for sales index
* Add data migration tests for ManufacturerPartParameter
* Pull specific branch for python binding tests
* Specify target migration
* Remove debug statement
* Tweak migration unit tests
* Add options for spectacular
* Add explicit choice options
* Ensure empty string values are converted to None
* Don't use custom branch for python checks
* Fix for migration test
* Fix migration test
* Fix reference target
* Remove duplicate enum in spectactular.py
* Add null choice to custom serializer class
* [UI] Edit shipment details
- Pass "pending" status through to the form
* New migration strategy:
part.0144:
- Add new "enabled" field to PartParameterTemplate model
- Add new ContentType fields to the "PartParameterTemplate" and "PartParameter" models
- Data migration for existing "PartParameter" records
part.0145:
- Set NOT NULL constraints on new fields
- Remove the obsolete "part" field from the "PartParameter" model
* More migration updates:
- Create new "models" (without moving the existing tables)
- Data migration for PartCataegoryParameterTemplate model
- Remove PartParameterTemplate and PartParameter models
* Overhaul of migration strategy
- New models simply point to the old database tables
- Perform schema and data migrations on the old models first (in the part app)
- Swap model references in correct order
* Improve checks for data migrations
* Bug fix for data migration
* Add migration unit test to ensure that primary keys are maintained
* Add playwright test for company parameters
* Rename underlying database tables
* Fixes for migration unit tests
* Revert "Rename underlying database tables"
This reverts commit 477c692076.
* Fix for migration sequencing
* Simplify new playwright test
* Remove spectacular collision
* Monkey patch the drf-spectacular warn function
* Do not use custom branch for playwright testing
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Refactor NumberField into separate component
* Add helper func to ensure a number is a number
* Use placeholder value for suggested sale price
* Fix for auto-fill
* Tweak price calculation
* Add UI testing for sales order price breaks
* Fix aria label name
* Annotate price breaks to supplier part
* Fetch price break data
* Support price breaks for purchase order pricing
* Fix required to prevent circular imports
* Add playwright tests for purchase order price breaks
* Bump API version
* Re-add output options for SupplierPriceBreakList
* Revert change
* Simplify unit test
* Additional checks for virtual parts in sales order process
* Prevent allocation against virtual parts
* Fix order of operations
* Adjust part form fields based on selections
* Prevent order locking
* Updated playwright tests
* Add unit test
* [UI] Fix for form OPTIONS query
- Fetch OPTIONs each time form is opened
- Ensure default values are filled correctly
- Prevent issues with latching form state
* Add comment
* Add playwright test
- Check that the reference field increments properly
* Fix other Playwright tests
* Auto-fill supplier parts in order wizard
* Copy supplier part SKU from order parts wizard
* Add "on_order" filter to BuildLine table
* Allow ordering by production and ordering quantities
* Allow specification of purchase price
* Bump API version
* Adjust UI testings
* Cleaner handling of inputs
* Fix for frontend form:
- Fix typo in field
- Better option defaults
* Tweak part category delete form
* Add frontend tests
* Form Field updates:
- Allow spec of leftSection prop
- Allow spec of rightSection prop
* Add ability to auto-fill text input with placeholder value
* Simplify stock form
* Better serial number placeholders
* Update other generator fields
* Add default placeholder to DateInput
* Enhance TextField
* Remove serial_numbers field for non-creation forms
* Update playwright tests
* Adjust playwright tests
* Further playwright adjustments
* Fix project code field for build serializer
* commit initial draft for supplier import
* complete import wizard
* allow importing only mp and sp
* improved sample supplier plugin
* add docs
* add tests
* bump api version
* fix schema docu
* fix issues from code review
* commit unstaged changes
* fix test
* refactor part parameter bulk creation
* try to fix test
* fix tests
* fix test for mysql
* fix test
* support multiple suppliers by a single plugin
* hide import button if there is no supplier import plugin
* make form submitable via enter
* add pui test
* try to prevent race condition
* refactor api calls in pui tests
* try to fix tests again?
* fix tests
* trigger: ci
* update changelog
* fix api_version
* fix style
* Update CHANGELOG.md
Co-authored-by: Matthias Mair <code@mjmair.com>
* add user docs
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Handle partial completion of build output
* Add 'quantity' field to BuildOutputComplete API endpoint
* Allow partial scrapping of build outputs
* Adjust column text
* Adjust "complete build output" form
* Change order of operations when completing build output
- Run validation checks *before* potentially splitting stock item
* Extract quantity from serializer
* Documentation
- Update screenshots
- Add note on partial completion
- Add note on partial scrapping
* Update CHANGELOG.md
* Update API version
* Add unit test for partial scrapping
* Tweak text
* Unit test for partial output completion
* Fix validation check for quantity field
* Adjust playwright tests
* Add field to "update" existing records
* Ensure the ID is first
* Prevent editing of "ID" field
* Extract db instance
* Bump API version
* Prevent edit of "id" field
* Refactoring
* Enhanced playwright tests for data importing
* Update docs
* Update src/backend/InvenTree/importer/models.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/frontend/src/forms/ImporterForms.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix silly AI mistake
* Fix for table pagination
- Ensure page does not exceed available records
* Bug fix for playwright test
* Add end-to-end API testing
* Fix unit tests
* Adjust table page logic
* Ensure sensible page size
* Simplify playwright test
* Simplify test again
* Tweak unit test
- Importing has invalidated the BOM?
* Adjust playwright tests
* Further playwright fixes
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds "consumed" field to BuildLine model
* Expose new field to serializer
* Add "consumed" column to BuildLineTable
* Boolean column tweaks
* Increase consumed count when completing allocation
* Add comment
* Update migration
* Add serializer for consuming build items
* Improve build-line sub-table
* Refactor BuildItem.complete_allocation method
- Allow optional quantity to be specified
- Adjust the allocated quantity when consuming
* Perform consumption
* Add "BuildConsume" API endpoint
* Implement frontend form
* Fixes for serializer
* Enhance front-end form
* Fix rendering of BuildLineTable
* Further improve rendering
* Bump API version
* Update API description
* Add option to consume by specifying a list of BuildLine objects
* Add form to consume stock via BuildLine reference
* Fix api_version
* Fix backup colors
* Fix typo
* Fix migrations
* Fix build forms
* Forms fixes
* Fix formatting
* Fixes for BuildLineTable
* Account for consumed stock in requirements calculation
* Reduce API requirements for BuildLineTable
* Docs updates
* Updated playwright testing
* Update src/frontend/src/forms/BuildForms.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/frontend/src/tables/build/BuildLineTable.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add unit test for filters
* Add functional tests
* Tweak query count
* Increase max query time for testing
* adjust unit test again
* Prevent consumption of "tracked" items
* Adjust playwright tests
* Fix table
* Fix rendering
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Enhance 'count_queries' helper
* Add threshold
* Update typing
* Better rendering
* Improve StockItem
- Make model operations more efficient
* improve with_mixin
- Cache config map against the session cache
* Refactor receive_line_item
- Pass multiple line items in simultaneously
- DB query optimization
- Use bulk_create and bulk_update operations
* Remove extraneous save call
* Fix for unit tests
* Fix return type
* Fix serializer return type
* Refactor part pricing updates
* UI tweaks
* Use bulk_create
* Refactor API and endpoints
* Bump API version
* Fix unit tests
* Fix playwright tests
* Remove debug msg
* Fix for table filter hover
* Adjust unit test
* Bulk creation of test results
- Add BulkCreateMixin class
- Add frontend support
* Refactor test result serializer
- Allow lookup by template name
* Updated unit test
* Add unit tests
* Add row actions
* Docs
* Fix failing tests
* Bump API version
* Fix playwright tests
* Add "StockReturn" API endpoint
- Provide multiple items
- Provide quantity for each item
* Add frontend form
* update frontend forms
* Refactor frontend
* Allow splitting quantity
* Refactoring backend endpoints
* cleanup
* Update unit test
* unit tests
* Bump API version
* Fix unit test
* Add tests for returning build items to stock
* Playwright tests
* Enhanced unit tests
* Add docs
* Format <BuildLineTable />
* More formatting
* Add helper function for running playwright tests
* Fix playwright test
* Further formatting updates
* Adjust order tables
* Tweak SalesOrderAllocations table
* Refactor "include_variants" filter
* Improved API filtering for "SalesOrderLineItem" endpoint
* Fetch part detail for table
* Fix email template
- Referenced template which does not exist
* Refactor the "requirements" endpoint
- Include variant part requirements too
* Updated starred notifications
* Adjust column name
* Update PartDetail
- Extract information from partRequirements query first
* Cache BOM items
* Improve PartDetail page
* Enhance isGeneratingSchema
- Call inspect as late as possible
* Adjust PartDetail
* Improve BuildOrderAllocations table
* Exclude common.newsfeedentry when exporting
* Updated playwright tests
* Bump API version
* Add mixin for storing user who last updated an instance
* Add mixin to "PartParameter" model
* Fix typo
* Fix strings
* Refactor mixin class
* Update part parameter table:
- Add "user" filter
- Add "updated_by" column
- Add "update" column
- Add "note" column
* Fix for updating date
* Add user information when saving parameter
* small refactors
* Bump API version
* Add unit test for "updated" and "updated_by" fields
* Check for 'note' field
* Update docs image
* Add "category" filter for BomItem API endpoint
* Filter BOM table by part category
* Tweak filter label
* Bump API version
* Schema annotation
* Fix playwright test
* Add "serialize" form to build output table
* Fix dependencies for useGenerator hook
* Improve serializing of stock
- Copy test results
- Ensure fields get copied across
* Fix rendering for StockItemTestResultTable
* Enhanced playwright test
* Fix code
* Fix for unit test
* Refactor stock actions into a hook
* Cleanup hooks
* Allow transfer of "incomplete" outputs
* Simplify even further
* Enable transfer of stock allocated to build order
* Remove StockItemBriefSerializer entirely
* stock actions for items allocated to sales order
* Refactor <PartDetail> page
* Refactor <StockDetail>
* Refactor <LocationDetail>
* Bump API version
* SO button text
- Observe the "SALESORDER_SHIP_COMPLETE" value
* Fix palywright tests
* Adjust UI wording
- Separation between "items" and "stock"
* Add info panel if build order has no required items
* Fixes for playwright testing
- Ensure cookies are completely cleaned between sessions
- Fix base URL based on vite command
- Fix samesite cookie mode
- Prevent /static/ files being served by web server on :8000
* Remove gunicorn option
* Fix unit test
* Readjust base URL
* Simplify doCachedLogin
* Adjust text
* Ensure translations are extracted
- Otherwise, playwright will not find the right strings...
* Make admin test more reliable
* Remove asynciness
* Fix <AttachmentLink>
- Allow null "attachment" value
* Better implementation
* Cleanup
* Fixes for playwright testing
- Ensure cookies are completely cleaned between sessions
- Fix base URL based on vite command
- Fix samesite cookie mode
- Prevent /static/ files being served by web server on :8000
* Remove gunicorn option
* Readjust base URL
* Simplify doCachedLogin
* Fix logic func
* Revert webserver cmd
* Set base URL in playwrightconfig file
* Fix URL checks
* Fix URL definitions
* adjust playwright base URL
* Tweak for URL helper
* Further login tweaks
* Tweak test
* wait for API before starting tests
* Handle error
* Adjust login functions
* Don't use gunicorn
- But still use the webserver to serve static files in CI
* Enhanced login functions
* Tweak login tests
* Fix broken test
* Flipped the flippies
* Work in progress
- Seems to reset the columns on page refresh
- Probably related to the useLocalStorage hook
* Do not overwrite until the tablestate is loaded
* Prevent table fetch until data has been loaded from localStorage
* Improved persistance
* Adjust default column visibility
* Adjust playwright test
* Add BuildOrder reference to PurchaseOrderLineItem
* Add setting to enable / disable external build orders
* Fix for supplier part detail
* Update forms
* Filter build list by "external" status
* Add "external" attribute to BuildOrder
* Filter by external build when selecting against purchase order line item
* Add frontend elements
* Prevent creation of build outputs
* Tweak related model field
- Send filters when fetching initial data
* Fix migrations
* Fix some existing typos
* Add build info when receiving line items
* Logic fix
* Bump API version
* Updated relationship
* Add external orders tab for order
* Display table of external purchase orders against a build order
* Fix permissions
* Tweak field definition
* Add unit tests
* Tweak api_version.py
* Playwright testing
* Fix discrepancy in 'building' filter
* Add basic documentation
( more work required )
* Tweak docs macros
* Migration fix
* Adjust build page tabs
* Fix imports
* Fix broken import
* Update playywright tests
* Bump API version
* Handle DB issues
* Improve filter
* Cleaner code
* Fix column ordering bug
* Add filters to build output table
* Documentation
* Tweak unit test
* Add "scheduled_for_production" field
* Add helper function to part model
* Cleanup
* Add functionality to copy part test templates when duplicating a part instance
* Bug fixes
* Tweak part duplication fields
* Add simple playwright test
* Updated unit test for part duplication
* Bump API version