* 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
* 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>
* Add basic task for generating apidocs
* Fix SPECTACTULAR_SETTINGS
- Some provided options were not correct
* Update .gitignore
* Fix for duplicated API path
- `/api/plugins/activate` routed to PluginActivate view
- Must be associated with a specific plugin ID
* By default, fail if warnings are raised
* Use GenericAPIView for GetAuthToken
* Use GenericAPIView for RolesDetail endpoint
* Refactor more endpoints to use GenericApiView
* More API cleanup
* Add extra type hints for exposed methods
* Update RoleDetails endpoint
- Specify serializer
- Use RetrieveAPI class type
* More type hints
* Export API docs as part of CI
* add more api views docs
* even more docs
* extend tests to api-version
* simplify serializer
* and more docs
* fix serializer
* added more API docs
* clean diff
* Added APISearch base
* do not assume you know the user
he might be anonymously creating the schema ;-)
* set empty serializer where no input is needed
* Use dummy model for schema generation
* fix OpenAPI docs section
* Update .github/workflows/qc_checks.yaml
Co-authored-by: Matthias Mair <code@mjmair.com>
* REmove duplicate commands
* Ignore warnings in CI
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Move locales definition into separate file
- Cleanup settings.py a bit
* Update docstring
* Expose 'default_locale' to info API endpoint
* Validate settings.LANGUAGE_CODE
* Fix bug in BuildDetail page
* Use selected language when making API queries
* Translate more strings
* Tweak variable name
* Update locale config
* Remove duplicate code
* Remove compiled messages.ts translation files
* Fixes for LanguageContext.tsx
* Update messages.d.ts for sr locale
* Ensure compiled files are served by django runserver
* Amend changes to STATICFILES_DIRS
* Cleanup prerender.py
* Refetch status codes when locale is changed
* Fix log msg
* Clear out old static files
* Add API endpoint for background task overview
* Cleanup other pending heartbeat tasks
* Adds API endpoint for queued tasks
* Adds API endpoint for scheduled tasks
* Add API endpoint for failed tasks
* Update API version info
* Add table for displaying pending tasks
* Add failed tasks table
* Use accordion
* Annotate extra data to scheduled tasks serializer
* Extend API functionality
* Update tasks.py
- Allow skipping of static file step in "invoke update"
- Allows for quicker updates in dev mode
* Display task result error for failed tasks
* Allow delete of failed tasks
* Remove old debug message
* Adds ability to delete pending tasks
* Update table columns
* Fix unused imports
* Prevent multiple heartbeat functions from being added to the queue at startup
* Add unit tests for API
* Add 'existing_image' field to part API serializer
* Ensure that the specified directory exists
* Fix serializer
- Use CharField instead of FilePathField
- Custom validation
- Save part with existing image
* Add unit test for new feature
* Bump API version
* Add skeleton for builtin label printing plugin
* Force selection of plugin when printing labels
* Enhance LabelPrintingMixin class
- Add render_to_pdf method
- Add render_to_html method
* Enhance plugin mixin
- Add class attribute to select blocking or non-blocking printing
- Add render_to_png method
- Add default method for printing multiple labels
- Add method for offloding print job
* Simplify print_label background function
- All arguments now handled by specific plugin
* Simplify label printing API
- Simply pass data to the particular plugin
- Check result type
- Return result
* Updated sample plugin
* Working on client side code
* Cleanup
* Update sample plugin
* Add new model type
- LabelOutput model
- Stores generated label file to the database
- Makes available for download
* Update label printing plugin mixin
* Add background task to remove any old label outputs
* Open file if response contains filename
* Remove "default printer" option which does not specify a plugin
* Delete old labels after 5 days
* Remove debug statements
* Update API version
* Changed default behaviour to background printing
* Update label plugin mixin docs
* Provide default printer if none provided (legacy)
* Update unit test
* unit test updates
* Further fixes for unit tests
* unit test updates
* fix .gitignore and spelling issues
* Fix setting get not cached correctly
* Add model to settings key type
* Fix plugin setting slug url
* Fix typo
* Fix resetting of related setting field
* Improved model comment
* Pass "Part" instance to plugins when calling validate_serial_number
* Pass part instance through when validating IPN
* Improve custom part name validation
- Pass the Part instance through to the plugins
- Validation is performed at the model instance level
- Updates to sample plugin code
* Pass StockItem through when validating batch code
* Pass Part instance through when calling validate_serial_number
* Bug fix
* Update unit tests
* Unit test fixes
* Fixes for unit tests
* More unit test fixes
* More unit tests
* Furrther unit test fixes
* Simplify custom batch code validation
* Further improvements to unit tests
* Further unit test
* Add unit test for deleting part which has pricing information
* Test delete of part without pricing
* Deal with post_delete errors
1. Deleting a Part deleted related objects (e.g. InternalPriceBreak)
2. post_delete signal is called for InternalPriceBreak
3. Subsequent updates to Part / PartPricing throw error
* Add unit test for deleting a Part via the API
- Add InternalPriceBreak so the previous error condition is checked
* Fix for unit test
* More unit test fixes
(cherry picked from commit fa346257f5)
* Ensure unique part names for unit testing
* Further unit test fixes
* Added devcontainer configuration files
* Added launch.json and improved devcontainer
* Added tasks.json
* fix: lint
* fix: lint
* Applied suggestions from codereview
* Added more system dependencies and preserve history
* devcontainer updates
- Add extra environment variables for InvenTree config
- Move venv into dev directory (cleaner structure)
- Ensure base package requirements get installed
- Handle write-permission error for compiling translations
- Install test data inside dev directory
* Auto create plugin dir and added gh cli
* Refactored postCreateCommand into own file
* Applied suggestions from codereview
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
* Simplify settings.py / config.py
- get_setting function has been streamlined
- move some functions into config.py
* Spelling fix: IGNORRED is IGNORED
* Ensure yaml is installed as part of docker image
- invoke path is still mucking us around
* Fix broken migration
* Copy media files from demo dataset when installing test data
* Cleanup settings.py
* Fix for configuration file traversal
* Line fix
* Update quickstart guide for docker
* Allow plugin file and plugin dir to be specified in configuration file
* Cleanup config template file
* Allow secret_key information to be provided in configuration file
* Adjust root paths for CI tests
* resolve paths
* Revert paths for CI step
* remove dead code
* Revert configuration variables to old names
- Prevent breaking changes
* Simplify secret key generation
* Fix default timeout for background worker process
* Revert change for customization options
* Simplification of development docker-compose file
- Rename .env file
- Remove requirement for variable interpolation within the docker-compose file itself
* Add debug flag to CI test
* Additional quick-start docs (for docker)
* docker-compose update
- Introspection did not work quite as expected
- Set project name inside docker-compose file
* Fixes for "setup_test" task
- Check if directory exists before first deleting it
- Parameterize the "path" variable
- Add option to ignore update step
* Add demo data dir to .gitignore
* Remove debug call
* Update CONTRIBUTING.md
* Simplified dockerfile
- Changed from alpine to python:slim
- Removed some database libs (because we *connect* to a db, not host it)
* - Add gettext as required package
- Only create inventree user as part of production build (leave admin access for dev build)
* Tweaks for tasks.py
* Fix user permissions (drop to inventree user)
* Drop to the 'inventree' user level as part of init.sh
- As we have mounted volumes at 'run time' we need to ensure that the inventree user has correct permissions!
- Ref: https://stackoverflow.com/questions/39397548/how-to-give-non-root-user-in-docker-container-access-to-a-volume-mounted-on-the
* Adjust user setup
- Only drop to non-root user as part of "production" build
- Mounted external volumes make it tricky when in the dev build
- Might want to revisit this later on
* More dockerfile changes
- reduce required system packages
-
* Add new docker github workflow
* Print some more debug
* GITHUB_BASE_REF
* Add gnupg to base requirements
* Improve debug output during testing
* Refactoring updates for label printing API
- Update weasyprint version to 55.0
- Generate labels as pdf files
- Provide filename to label printing plugin
- Additional unit testing
- Improve extraction of some hidden debug data during TESTING
- Fix a spelling mistake (notifaction -> notification)
* Working on github action
* More testing
* Add requirement for pdf2image
* Fix label printing plugin and update unit testing
* Add required packages for CI
* Move docker files to the top level directory
- This allows us to build the production image directly from soure
- Don't need to re-download the source code from github
- Note: The docker install guide will need to be updated!
* Fix for docker ci file
* Print GIT SHA
* Bake git information into the production image
* Add some exta docstrings to dockerfile
* Simplify version check script
* Extract git commit info
* Extract docker tag from check_version.py
* Newline
* More work on the docker workflow
* Dockerfile fixes
- Directory / path issues
* Dockerfile fixes
- Directory / path issues
* Ignore certain steps on a pull request
* Add poppler-utils to CI
* Consolidate version check into existing CI file
* Don't run docker workflow on pull request
* Pass docker image tag through to the build
Also check .j2k files
* Add supervisord.conf example file back in
* Remove --no-cache-dir option from pip install
- Previous migration needed some tweaking to get it to run... because.. why?
- It seems to pass when running manage.py migrate but fails when running manage.py test
- Stumped on this one