* Add search capability to selection list entry endpoint
* Use API lookup for selection entries
* Add renderer func
* Allow API filtering
* Fetch selectionentry data related to the selected data item
* remove now unneeded entry
* add missing modelinfo
* fix ref
* add api bump
* Provide optional single fetch function to API forms
- Useful if we need to perform a custom API call for initial data
* django-admin support for SelectionList
* Docstring improvements
* Apply 'active' filter
* Tweak api version entry
* Playwright tests
* Tweak docs wording
* Fix incorrect docstring
* Adjust playwright tests
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Add 'parameter' support for SalesOrderShipment model
* Add "parameters" tab for shipment view
* Playwright test
* Update CHANGELOG
* Update API version
* Install gettext
* Try yaml format
* Revert "Try yaml format"
This reverts commit 394a5551c8.
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Handle receive of virtual parts
- Update line item quantity
- Do not add any stock
* Add unit test
* Additional unit test
* UI form improvements
* Add playwright test
* Updated playwright tests
* Added keep open boolean field to Stock Location modal form
* Rewrite keep form open field feature to avoid calling methods in form field definitions
* Rewrite keep form open feature as common form property
* Removed unused artefact from previous implementation
* keepOpenOption removed as default option for all create forms. Instead it's enabled on selected forms.
* keepOpenOption field speed improvement
- using useRef instead of useState
- keepOpenSwitch moved to own component
* Added keep form open feature to changelog
* Updated documentation: keep form open feature added to concepts/user_interface docs
* Added test case for "keep form open" feature
* Changed switch selector in keep form open feature test
---------
Co-authored-by: spm <jan.krajdl@cecolo.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
* Fix complete_sales_order_shipment task
- Perform allocation *before* marking shipment as complete
- Ensure task is not marked as complete before it is actually done
* Add unit test
* Provide task status tracking for shipment completion
* Add integration testing
* Address unit test issues
* Bump API version
* Enhance playwright test
* Add new build task
* Refactor background task for consuming build stock
- Run as a single task
- Improve query efficiency
* Refactor consuming stock against build via API
- Return task_id for monitoring
- Keep frontend updated
* Task tracking for auto-allocation
* Add e2e integration tests:
- Auto-allocate stock
- Consume stock
* Bump API version
* Playwright test fixes
* Adjust unit tests
* Robustify unit test
* Widen test scope
* Adjust playwright test
* Loosen test requirements again
* idk, another change :|
* Robustify test
* Enhance docstring
* Return the ID of an offloaded task
* Add API endpoint for background task detail
* Add UI hook for monitoring background task progress
* Handle queued tasks (not yet started)
* Improve UX
* Update frontend lib version
* Bump API version
* Fix notification
* Simplify UI interface
* Implement internal hook
* Fix API path sequence
* Add unit tests for task detail endpoint
* Refactor code into reusable model
* Explicit operation_id for API endpoints
* Further refactoring
* Use 200 response code
- axios does not like 202, simplify it
* Return task response for validation of part BOM
* Fix schema
* Cleanup
* Run background worker during playwright tests
- For full e2e integration testing
* Improve hooks and unit testing
* Rename custom hooks to meet react naming requirements
* [bug] Users cannot create their own API tokens
Fixes#11486
* fix detection of metadata
* make easier to read
* add handler for IsAuthenticated
* use correct method
* fix style see #11487
* add frontend test
* make test more reliable?
* Prevent copy button if copy value is null
* Add "link" columns to order tables
* Support copy for default column types
* Tweak padding to avoid flickering issues
* Refactor IPNColumn
* Adjust visual styling
* Copy for SKU and MPN columns
* Add more copy columns
* More tweaks
* Tweak playwright testing
* Further cleanup
* More copy cols
* Support "default filters" for table views
- User overrides apply in preference
- Only when there is no stored value (null)
* Correctly handle partially constructed filters
- Reverse lookup on available filter set
* Add default filters for order tables
* Default filters for company tables
* More default filters
* Add some more default filters
* Bump CHANGELOG
* build fix
* Tweaks for playwright testing
* Tweak playwright test
* Improve test flexibility
* Add custom logo and splash to playwright fixtures
* Render custom logo in frontend
* Add playwright tests for customization settings
* Separate playwright run for customization
* Update ci file
* Update playwright config file
* Do not call get_custom_file from withing settings.py
- django app not fully initialized yet
- can cause loops
* Disable default tests (for now)
* Re-enable normal tests
* Update qc checks
* Order of operations?
* Debug output
* Use env
* Add more debug info
* More debug
* Further debug
* Add collectstatic check
* Run normal tests too
* Remove debug prints
* Add "primary" field to SupplierPart model
* Remove "default_supplier" field from the Part model
* Ensure only one SupplierPart can be "primary" for a given Part
* Update references to "default_supplier"
* Add 'primary' field to the SupplierPart API serializer
* update SupplierPart table
* Use bulk-update operations
* Bug fix for data migration
* Allow ordering by 'primary' field
* Tweak import message
* Edit 'primary' field in UI
* Fix checks in save() methods
* Better table updates
* Update CHANGELOG
* Bump API version
* Fix unit test
* Add unit test for API
* Playwright tests
* Data import flexibility
- Allow specification of alternative lookup fields for data import
* Observe field filters during data import
* Add alternative import fields for Part models
* More options for IMPORT_ID_FIELDS
* Update src/backend/InvenTree/importer/models.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Bump CHANGELOG
* Handle empty input values
* Add IMPORT_ID_FIELDS for more models
* PK field takes highest priority
* Update import docs
* Tweak return type
* Handle multiple date formats
* Add playwright testing
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Enhanced filtering for parameter templates
- Allow filtering by model ID as well as model type
* Enhanced filtering for ParameterTemplate
- Required for the parameteric data tables
- Enable filtering by base model ID
- Enable filtering by related model ID
* Bump API version
* Remove outdated comments
* Fix typo
* Remove debug statement
* Added unit tests
* Playwright tests
* Fix unit test
* Bump requirements
* Revert
* Add "install_into_detail" to BuildItem serializer
* Enhance the "resolveItem" function
* Add "StockColumn" renderer
* Fix output column for BuildAllocatedStockTable
* Replace column in stock item table
* More column refactoring
* Bump API version
* Add InvenTreeOutputOption descriptions
* Prefetch for better API performance
* Updated playwright testing
* Additional filtering options for stock list
* Fix ordering for stock table
* Ordering fix for build order table
* Ordering for supplier parts and manufacturer parts
* SalesOrderLineItem: Order by IPN
* ReturnOrderLineItem table:
- Order by part name
- Order by part IPN
* Update API version to 451
Increment API version to 451 and update changelog.
* Add playwright tests for column sorting
* Add backend tests for API ordering
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Data migrations for StockItemTracking
- Propagate the 'part' links
* Enable filtering of stock tracking entries by part
* Enable filtering by date range
* Display stock tracking for part
* Table enhancements
* Bump API version
* Display stock item column
* Ensure 'quantity' is recorded for stock tracking entries
* Add new global settings
* Adds background task for deleting old stock tracking entries
* Docs updates
* Enhanced docs
* Cast quantity to float
* Rever data migration
* Ensure part link gets created
* Improved prefetch for API
* Playwright testing
* Tweak unit test thresholds
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Allow part queryset to be passed to 'perform_stocktake' function
* Add new options to perform_stocktake
* Allow download of part stocktake snapshot data
* API endpoint for generating a stocktake entry
* Simplify code
* Generate report output
* Dashboard stocktake widget
- Generate stocktake snapshot from the dashboard
* Force stocktake entry for part
* Add docs
* Cleanup docs
* Update API version
* Improve efficiency of stocktake generation
* Error handling
* Add simple playwright test
* Fix typing
* Automatic prefetch of related fields for enable_filter
- Allows us to *not* prefetch fields (expensive) when they are not going to be used
- Enables re-usable components for common detail fields
* Refactor "project_code_detail" filter into common component
- Automatically apply correct prefetch fields
* Refactor 'parameters' annotation
- add 'enable_parameters_filter' function
- Prefetch parameters only when needed
- Refactor / consolidate code
* Refactor SupplierPartSerializer
- Make fields switchable
- Ensure correct prefetch_related
* Refactor serializer for ManufacturerPart
* Refactor BuildSerializer
* Refactor PurchaseOrderSerializer
* Refactor SalesOrderSerializer
* Refactor ReturnOrderSerializer
* Remove debug statements
* Tweaks
* Simplify custom filterable fields
* Bump API version
* Fix for data export
* Additional unit tests
* Remove unused "prefetch_func" option
* Refactor PurchaseOrderLineItemList
* Refactor SalesOrderLineItemList
* Refactor ReturnOrderLineItem
* Cleanup "pretty_name"
* Fix for build list
* Refactoring StockItem API endpoint
- Needs significant work still
* Refactoring for BuildLineSerializer
* Keep all optional fields when exporting data
* Improve "UserRoles" API endpoint
- Prefetch roles
- Prevents significant number of db hits
* Prefetch Parameter API list
* Bug fix for exporting logic
* Specify InvenTreeOutputOption
* Optional prefetch for primary_address
* Fix typing
* Fix unit test
* fixes for playwright tests
* Update Part API
- Improved prefetching
* Fix for prefetch
* Add barcode buttons to related fields
- Only field types which support barcodes
* Add per-user settings for barcode support
* Fill form field with scanned data
* Updated docs
* Fix duplicate setting
* Add playwright tests
* Fix duplicate setting in docs
* Fix broken link
* Fix memo deps
* Fix typo
* Remove setting
* Updated playwright tests
* Improved typing
* 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
* feat(backend): bump to 5.2 lts / python 3.11
This will give us support till 2027-10 (PEP 664)
* bump dependencies
* fix dflt version
* remove 3.9 precaution
* changes for 5.2
* changes for py 3.10
* debug command
* lower crypto again
* another lowering
* fix version string
* lower minimum version to 3.11
* update refs
* fix text
* reaking: remove now unsupported OS
* disable break
* remove temp changes
* fix ruff call
* fix remaining ruff warnings
* remove old arg
* lower allauth reqs
* replace old method
* fix issue with args passing beeing depreceated
* add changelog entries
* bump dependencies a bit further
* fix broken image init for now
might need a refactor
* fix another test
* refactor image name lookup
* mroe refactoring
* ensure str does not cause an issue
* update referenced function
* fix cal sig
* simplify method and add test
* refactor
* ignore wrong typings
* fix deprecated feature
* simplify
* ensure image tests do their job
* simplify
* re-add type check
* fix test
* fix assertations - wonder how long this was broken
* bump to newer versions
* bump deps
* fix assertation