* Offload build output functions:
- cancel output
- scrap output
- complete output
Perform these in the background worker, and monitor for progress on the frontend.
* Refactor "build cancel"
- Offload expensive ops to background worker
* Offload build complete task
* Remove @atomic decorator from functions
- Allows operations to be performed "incrementally"
- If one task times out, the next task will get the rest
* Bug fix
* Bump API version
* Fix isInTestMode check
* Handle case where task returns immediately
* Fix docstring
* fix test_api
* Tweak order of operations
* additional unit testing for further coverage
* Adjust unit tests
* Offload order completion tasks
* Remove bad code
* Updated playwright test
* Robustify playwright tests
* Bump number of allowed queries
* Revert "Remove bad code"
This reverts commit 3a3ac3bdc7.
* Revert "Offload order completion tasks"
This reverts commit 6066dabe43.
* Add new global setting
* Update lock checks
* Bug fix for task comparison
* Update user interface
* Hide locked field if locking not enabled
* Update existing unit tests
* Update docs
* Add new Attachment model fields:
- is_image
- thumbnail
* Cache if the attachment is an image
* Add new setting for controlling max upload size
* Validate uploaded attachment file
* Add tqdm for progress bars
* Refactor migrations
- Don't need is_image field
- Can introspect from the thumbnail
* Data migration for existing attachments
* Bump API version
* Update tests and validators
* Add "is_image" field to the Attachment model
* Offload to background task
* Implement unit tests
* Docs
* Add unit test for data migration
* Additional unit test
* Omit migration tests from code coverage
* Additional unit tests
* Add API serializer for deleting a location
* Add serializer for part category delete
* Bump API version
* Fix unit tests
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Remove image download support
- Helper function remains (it is used in the supplier plugin mixin)
- No longer available to user
- Close massive security hole entirely
- Will be defunct soon anyway (moving to generic attachments)
* Update CHANGELOG.md
* Bump API version
* Fix for unit tests
* Implementation
* Update API and CHANGELOG
* Annotate response type
* Simplify attachment renaming
- Use the existing API endpoint
* Capture the actual saved path
* Tweak attachment table fields
* Use built-in validation
* Update docs
* Unit testing
* Ignore some lines from coverage
* Check if file exists before deleting
* Refactor panel indicator dots
- Allow indicator status to be fetched async
* Add indicator dot for attachments
* Support parameters panel
* Refactor
- Expose more types to @lib
- Define new PanelIndicatorType type
- Support old interface
* Provide explicit user information to report context
* Pass user information through to offloaded task
* Pass user information back to the plugin
* Fix user passing
* Add more complex unit test for report printing
- Test debug ON / OFF
- Test merge ON / OFF
- Check generated data output
* Unit testing for label generation
* Further refactoring
- Remove "request" from printing context entirely
* Simplify argument drilling
* Robustify unit tests
* Refactor build order filters
- Common set of filters for build order views
* Refactor PurchaseOrder filters
* Update company table
* Refactor SalesOrder filters
* Refactor common filters
* Refactor ReturnOrder table filters
* Add new "raw_amount" field to BomItem model
* Batch process data migration
* Update migration
* Calculate 'quantity' from 'raw_amount' field
* Improve decimal formatting in migration
* Allow raw_amount in serializer
* Adjust frontend form
* API validation and unit tests
* Additional playwright tests
* Update API version and CHANGELOG
* Updated docs
* Fix docstring
* Better handling of empty values
* Tweak unit tests
* Tweak unit test
* Fix unit test
* Adjust form field text
* Adjust migration file
* Tweak playwright tests
* Fix unit test
* Adjust serializers / import-export / playwright
* Fix migration
* Fix validation
* Loosen comparison
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Allow deletion of serialized build output
- If calling "delete_output" on a BuildOrder
- Only will delete an in_production output
- Ignore the global setting in this case
Co-authored-by: Copilot <copilot@github.com>
* Add unit test
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
* Fix "issued_by" for BuildOrder model
- Automatically capture user information
- Mark field as read-only
- Remove from frontend forms
* Add "created_by" property
* Update unit test
* Update API and CHANGELOG
* Further adjustments to unit tests
* Adjust system settings
- Rearrange settings to match major menu groups
- Split long settings panels into separate lists
Co-authored-by: Copilot <copilot@github.com>
* Adjust playwright tests
---------
Co-authored-by: Copilot <copilot@github.com>
* Fix ApiFormFIeldType docstring
* Case fix
* Add sub-forms for company creation
* Tweak component def
* Add new company for manufacturer-part and supplier-part
* Create new parameter template directly from parameter view
* Add tooltip
* Add playwright tests
* Consolidate translation
* Revert to left side
* Fix title case
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Ensure a new BOM item triggers check_bom_valid
* Ensure BOM validation is properly recomputed on a BOM item update
* Add unit tests
* Tweak unit tests
* Update 'clear_bom' method
* Move useFilterSet state to the @lib
* Refactor useTable hook into @lib
* Refactor string helper functions
* Refactor constructFormUrl func
* Refactor Boundary component
* Refactor StoredTableState
* More refactoring
* Refactor CopyButton and CopyableCell
* Pass table render func to plugins
* Provide internal wrapper function, while allowing the "api" and "navigate" functions to be provided by the caller
* Adds <InvenTreeTable /> component which is exposed to plugins
* Update frontend versioning
* Update docs
* Handle condition where UI does not provide table rendering function
* Move queryFilters out of custom state
* Fix exported type
* Extract searchParams
- Cannot be used outside of router component
- Only provide when the table is generated internally
* Bump UI version
* Fix for right-click context menu
- Function needs to be defined with the context menu provider
* Lazy evaluation of optional serializer fields
- Add OptionalField dataclass
- Pass serializer class and kwargs separately
* Refactor BuildLineSerializer class
* Simplify gathering
* Refactor BuildSerializer
* Refactor other Build serializers
* Refactor Part serializers
* Refactoring more serializers to use OptionalField
* More refactoring
* Cleanup for mixin class
* Ensure any optional fields we added in are not missed
* Fixes
* Rehydrate optional fields for metadata
* Add TreePathSerializer class
* Further improvements:
- Handle case where optional field shadows model property
- Consider read_only and write_only fields
* Adjust unit tests
* Fix for "build_relational_field"
- Handle case where optional field shadows model relation
* Fix case where multiple fields can share same filter
* additional unit tests
* Bump API version
* Remove top-level detection
- Request object is only available for the top-level serializer anyway
* Cache serializer to prevent multiple __init__ calls
* Revert caching change
- Breaks search results
* Simplify field removal
* Adjust unit test
* Remove docstring comment which is no longer true
* Ensure read-only fields are skipped for data import
* Use SAFE_METHODS
* Do not convert to lowercase
* Updated docstring
* Remove FilterableSerializerField mixin
- Annotation now performed using OptionalField
- Code can be greatly simplified
* Ensure all fields are returned when generating schema
* Fix order of operations
* Add assertion to unit test
* fix style
* Fix api_version
* Remove duplicate API entries
* Remove duplicate API entries
* Fix formatting in api_version.py
* Tweak ManufacturerPart serializer
* Revert formatting change
---------
Co-authored-by: Matthias Mair <code@mjmair.com>