* Add "testable" field to the Part model
- Default = False
- Determines whether a particular part can have tests defined against it
* Adds data migration to set default 'testable' state
* Update part serializers
* CUI: Update table filters
* PUI: Update tables and filters
* CUI: Update part detail page
* PUI: Update part detail page
* Update CUI
* Update build pages
* Update BuildLine serializer
* Bump API version
* Update docs
* Add 'testable' to fieldset
* Add new global setting
* Check if there are open children before completing a build
* Adds management command to export settings definition
* Fix settings export
* Extract settings data into documentation
* Add global settings spec
* User settings
* Revert strict mode
* Tweak unit test
* Remove unreachable code
* Always export settings first
* Remove unused macro
* Remove old images
* Re-add missing docs strings
* Tweak docs
* Remove unused import
* Add "ON_HOLD" status code for orders
* Add placeholder buttons for purchase order status change
* Adds hooks for introspecting status code enumerations
* Refactor status codes for import session
- Remove hard-coded values
* Refactor into <PrimaryActionButton />
* Cleanup
* more permission checks
* Add placeholder actions for SalesOrder
* Placeholder actions for ReturnOrder
* Placeholder actions for build order
* Actions for "return order"
* Update actions for return order
- Add "on hold" transition
* Implement transitions for SalesOrder
* Allow control over SalesOrderLineItemTable
* Implement PurchaseOrder actions
* Improve API query lookup efficiency
* UI cleanup
* CUI cleanup
* Build Order Updates
- Implement StateTransitionMixin for BuildOrder model
- Add BuildIssue API endpoint
- Add BuildHold API endpoint
- API query improvements
- PUI actions
* Increase timeout
* Bump API version
* Fix API version
* Fix sales order actions
* Update src/backend/InvenTree/order/serializers.py
Co-authored-by: Matthias Mair <code@mjmair.com>
* Adjust build filters
* PUI updates
* CUI refactoring for purchase orders
* Refactor CUI sales order page
* Refactor for return order
* Refactor CUI build page
* Playwright tests for build order
* Add playwright test for sales orders
* Add playwright test for purchase orders
* js linting
* Refactor return order page
* Add missing functions from previous commit
* Fix for "on order" badge on PartDetail page
* UI tweaks
* Fix unit tests
* Update version check script
* Fix typo
* Enforce integer conversion for BaseEnum class
* Unit test updates
- Includes improvement for equality comparison for enums
* Update documentation
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Skeleton for "test results" panel on build detail page
* Generate table columns based on test templates
* Fill out test result table in build panel
* Fix for form submission with files attached
- Better determination of "hasFiles"
- Ignore undefined values
* Add modal form to create a new test result
* Add button for creating a new test result
* Fix for build output table
* Add extra API filtering options to BuildLine API endpoint
* Improve table rendering
* Adjust form fields
* Account for multiple test results
* Add "location" column
* Docs updates
* playwright tests
* initial implementation of barcode generation using plugins
* implement short QR code scanning
* add PUI qrcode preview
* use barcode generation for CUI show barcode modal
* remove short qr prefix validators and fix short qr detection regex
* catch errors if model with pk is not found for scanning and generating
* improve qrcode templatetag
* fix comments
* fix for python 3.9
* add tests
* fix: tests
* add docs
* fix: tests
* bump api version
* add docs to BarcodeMixin
* fix: test
* added suggestions from code review
* fix: tests
* Add MinLengthValidator to short barcode prefix setting
* fix: tests?
* trigger: ci
* try custom cache
* try custom cache ignore all falsy
* remove debugging
* Revert "Add MinLengthValidator to short barcode prefix setting"
This reverts commit 76043ed96b.
* Revert "fix: tests"
This reverts commit 3a2d46ff72.
* Fix machine request pickeling
* fix precommit
* fix: shared state between workers and main thread for machine registry
* remove last usage of legacy PUI form framework to fix machine edit/delete modal
* reset cache before initialization
* update documentation
* fix: invalidating cache
* implement machine registry hash to check if a reload is required
* trigger: ci
* fix: request bug
* fix: test
* trigger: ci
* add clear errors and improve restart hook
* auto initialize not initialized machines when changing active state
* fix: tests
* Bump djangorestframework from 3.14.0 to 3.15.2 in /src/backend
Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.14.0 to 3.15.2.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](https://github.com/encode/django-rest-framework/compare/3.14.0...3.15.2)
---
updated-dependencies:
- dependency-name: djangorestframework
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* fix req
* fix deps again
* patch serializer
* bump api version
* Fix "min_value" for DRF decimal fields
* Add default serializer values for 'IPN' and 'revision'
* Add specific serializer for email field
* Fix API version
* Add 'revision_of' field to Part model
* Add validation checks for new revision_of field
* Update migration
* Add unit test for 'revision' rules
* Add API filters for revision control
* Add table filters for PUI
* Add "revision_of" field to PUI form
* Update part forms for PUI
* Render part revision selection dropdown in PUI
* Prevent refetch on focus
* Ensure select renders above other items
* Disable searching
* Cleanup <PartDetail/>
* UI tweak
* Add setting to control revisions for assemblies
* Hide revision selection drop-down if revisions are not enabled
* Query updates
* Validate entire BOM table from PUI
* Sort revisions
* Fix requirements files
* Fix api_version.py
* Reintroduce previous check for IPN / revision uniqueness
* Set default value for refetchOnWindowFocus (false)
* Revert serializer change
* Further CI fixes
* Further unit test updates
* Fix defaults for query client
* Add docs
* Add link to "revision_of" in CUI
* Add playwright test for revisions
* Ignore notification errors for playwright
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
* Add "locked" field to Part model
- Default = false
* Add "locked" field to PartSerializer
- Allow filtering in API
* Filter CUI tables by "locked" status
* Add "locked" filter to part table
* Update PUI table
* PUI: Update display of part details page
* Add "locked" element
* Ensmallen the gap
* Edit "locked" field in CUI
* Check BomItem before editing or deleting
* Prevent bulk delete of BOM items
* Check part lock for PartParameter model
* Prevent deletion of a locked part
* Add option to prevent build order creation for unlocked part
* Bump API version
* Hide actions from BOM table if part is locked
* Fix for boolean form field
* Update <PartParameterTable>
* Add unit test for 'BUILDORDER_REQUIRE_LOCKED_PART' setting
* Add unit test for part deletion
* add bom item test
* unit test for part parameter
* Update playwright tests
* Update docs
* Remove defunct setting
* Update playwright tests
* feat: Add settings for SSO group sync
* feat: Handle SSO group sync
* fix(SSO): Add default group only if it is the only one
When syncing SSO groups on first user creation,
the default group should not be added if there is
already another group synced by the IdP
* docs: Add SSO goup sync instructions
* fix: Run pre-commit hooks
* i18n(SSO): Wrap settings name and description
* docs(SSO): Fix links to allauth docs
* fix(frontend): Add SSO_GROUP_KEY option
* add unittests for SSO
* docs(SSO): Make hint for example comfiguration a tip
* docs(SSO): Describe relation between SSO sync and signup group
* fix(SSO): Avoid potential key error
* feat(SSO): Create mapped group if it does not exist
* docs(SSO): Describe how groups can be created during signup
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* bump pre-commit tools
* move uv config to pyproject
* style fix
* bump pre-commit deps again
* add config for code spell
* spelling fixes
* bump regex
* bump pre-commit
* bump versions again
* roll back regex version
* reverse uv bump
* compile for 3.12
* use 3.12 for ci
* remove unused env vars
* only cache main version
* set caching dep path
* remove caching distinction
* pip installl regex
* switch back to 3.9 default
* remove install test
* reset versions
* remove tomli
* Update playwright.config.ts
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Add new global setting for currency options
- Moving away from external configuration
- Refactor currency support code into new file
* Refactoring
- Move functions into currency.py
* Limit choices for default currency
* Improve validation
* Adds data migration for existing currency selection
* Docs updates
* Remove currency config from external settings
* bump api version
* Add debug message
* Add unit tests
* Fix after_change_currency func
* Fix after_change_currency func
* Revert change to after_chance_currency
* Revert other change
* Add new setting to bypass "shipped" status
* Bypass "shipped" status optionally
* Update setting description string
* Update unit tests
* Refactor location of status_codes
* Link source code into docs
* Add stock status codes
* And the build order too
* Fix import
* Update docs
- Add note about permission denied error
* Add macro for generating link to github code
* Implement similar feature for source directory links
* Adds helper function for link checking
* Allow for specification of "raw" file links
* Remove debug statement
* Generate list of available invoke tasks
* Adds a new "generic" ReportTemplate model
* expose API endpoints
* Update model / migrations / serializer
* Add new mixin class to existing database models
* - Add detail view for report template
- Revert filters field behaviour
* Filter report list by provided item IDs
- Greatly simplify filtering logic compared to existing implemetation
- Expose to API schema
* Create data migration for converting *old* report templates
* Ignore internal reports for data migration
* Add report mixin to StockLocation model
* Provide model choices in admin interface
* Offload context data generation to the model classes
* Remove old report template models
* Refactor JS code in CUI
* Fix for API filtering
* Add data migration to delete old models
* Remove dead URL
* Updates
* Construct sample report templates on app start
* Bump API version
* Typo fix
* Fix incorrect context calls
* Add new LabelTemplate model
- ReportTemplate and LabelTemplate share common base
- Refactor previous migration
* Expose to admin interface
* Add in extra context from existing label models
* Add migration to create LabelTemplate instances from existing labels
* Add API endpoints for listing and updating LabelTemplate objects
* Adjust 'upload_to' path
* Refactor label printing
* Move default label templates
* Update API endpoints
* Update migrations
* Handle LookupError in migration
* Redirect the "label" API endpoint
* Add new model for handling result of template printing
* Refactor LabelPrinting mixin
* Unlink "labels" app entirely
* Fix typo
* Record 'plugin' used to generate a particular output
* Fix imports
* Generate label print response
- Still not good yet
* Refactoring label printing in CUI
* add "items" count to TemplateOutput model
* Fix for InvenTreeLabelSheetPlugin
* Remove old "label" app
* Make request object optional
* Fix filename generation
* Add help text for "model_type"
* Simplify TemplateTable
* Tweak TemplateTable
* Get template editor to display template data again
* Stringify template name
- Important, otherwise you get a TypeError instead of TemplateDoesNotExist
* Add hooks to reset plugin state
* fix context for StockLocation model
* Tweak log messages
* Fix incorrect serializer
* Cleanup TemplateTable
* Fix broken import
* Filter by target model type
* Remove manual file operations
* Update old migrations
- Remove references to functions that no longer exist
* Refactor asset / snippet uploading
* Update comments
* Retain original filename when editing templatese
* Cleanup
* Refactor model type filter to use new hook
* Add placeholder actions for printing labels and reports
* Improve hookiness
* Add new ReportOutput class
* Report printing works from PUI now!
* More inspired filename pattern for generated reports
* Fix template preview window
- Use new "output" response field across the board
* Remove outdated task
* Update data migration to use raw SQL
- If the 'labels' app is no longer available, this will fail
- So, use raw SQL instead
* Add more API endpoint defs
* Adds placeholder API endpoint for label printing
* Expose plugin field to the printing endpoint
* Adds plugin model type
* Hook to print labels
* Refactor action dropdown items
* Refactor report printing for CUI
* Refactor label print for CUI
- Still needs to handle custom printing options for plugin
* Fix migration
* Update ModelType dict
* playwright test fix
* Unit test fixes
* Fix model ruleset associations
* Fix for report.js
* Add support for "dynamic" fields in metadata.py
* Add in custom fields based on plugin
* Refactoring
* Reset plugin on form close
* Set custom timeout values
* Update migration
- Not atomic
* Cleanup
* Implement more printing actions
* Reduce timeout
* Unit test updates
* Fix part serializers
* Label printing works in CUI again
* js linting
* Update <ActionDropdown>
* Fix for label printing API endpoint
* Fix filterselectdrawer
* Improve button rendering
* Allow printing from StockLocationTable
* Add aria-labels to modal form fields
* Add test for printing stock item labels from table
* Add test for report printing
* Add unit testing for report template editing / preview
* Message refactor
* Refactor InvenTreeReportMixin class
* Update playwright test
* Update 'verbose_name' for a number of models
* Additional admin filtering
* Playwright test updates
* Run checks against new python lib branch
(temporary, will be reverted)
* remove old app reference
* fix testing ref
* fix app init
* remove old tests
* Revert custom target branch
* Expose label and report output objects to API
* refactor
* fix a few tests
* factor plugin_ref out
* fix options testing
* Update table field header
* re-enable full options testing
* fix missing plugin matching
* disable call assert
* Add custom related field for PluginConfig
- Uses 'key' rather than 'pk'
- Revert label print plugin to use slug
* Add support for custom pk field in metadata
* switch to labels for testing
* re-align report testing code
* disable version check
* fix url
* Implement lazy loading
* Allow blank plugin for printing
- Uses the builtin label printer if not specified
* Add printing actions for StockItem
* Fix for metadata helper
* Use key instead of pk in printing actions
* Support non-standard pk values in RelatedModelField
* pass context data to report serializers
* disable template / item discovery
* fix call
* Tweak unit test
* Run python checks against specific branch
* Add task for running docs server
- Option to compile schema as part of task
* Custom branch no longer needed
* Starting on documentation updates
* fix tests for reports
* fix label testing
* Update template context variables
* Refactor report context documentation
* Documentation cleanup
* Docs cleanup
* Include sample report files
* Fix links
* Link cleanup
* Integrate plugin example code into docs
* Code cleanup
* Fix type annotation
* Revert deleted variable
* remove templatetype
* remove unused imports
* extend context testing
* test if plg can print
* re-enable version check
* Update unit tests
* Fix test
* Adjust unit test
* Add debug statement to test
* Fix unit test
- Labels get printed against LabelTemplate items, duh
* Unit test update
* Unit test updates
* Test update
* Patch fix for <PartColumn> component
* Fix ReportSerialierBase class
- Re-initialize field options if not already set
* Fix unit test for sqlite
* Fix kwargs for non-blocking label printing
* Update playwright tests
* Tweak unit test
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Refactor framework for generating batch codes
- Provide additional kwargs to plugin
- Move into new file
- Error handling
* Implement API endpoint for generating a new batch code
* Fixes
* Refactor into stock.generators
* Fix API endpoint
* Pass time context through to plugins
* Generate batch code when receiving items
* Create useGenerator hook
- Build up a dataset and query server whenever it changes
- Look for result in response data
- For now, just used for generating batch codes
- may be used for more in the future
* Refactor PurchaseOrderForms to use new generator hook
* Refactor StockForms implementation
* Remove dead code
* add OAS diff
* fix ref
* fix ref again
* wrong branch, sorry
* Update src/frontend/src/hooks/UseGenerator.tsx
Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
* Bump API version
* Do not override batch code if already generated
* Add serial number generator
- Move to /generate/ API endpoint
- Move batch code generator too
* Update PUI endpoints
* Add debouncing to useGenerator hook
* Refactor useGenerator func
* Add serial number generator to stock form
* Add batch code genereator to build order form
* Update buildfields
* Use build batch code when creating new output
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
* docs: Update docker compose dev setup
* docs: Fix example plugin date
Date must be iso formatted, otherwise exception is raised
* docs: Update plugin paths to new folder structure
* docs: fix typo, remove temporary containers afterwards