* Add owner field to stock location create/edit form (#12537)
The platform UI form for stock locations is built from the explicit
field list in stockLocationFields(), which did not include 'owner'.
The StockLocation model (migration 0057), LocationSerializer and the
documentation all support the owner field, so restore UI parity by
adding it, following the same pattern as the stock item form.
* Hide owner field when stock ownership is disabled (#12537)
Per review: only render the owner field in the stock location
create/edit forms when the STOCK_OWNERSHIP_CONTROL global setting is
enabled. stockLocationFields() becomes the useStockLocationFields()
hook so the form can react to the setting, following the same pattern
as the expiry date field in useStockFields().
* Bug fixes for Note model
- Allow note to be created as "primary"
- Reset note creation fields in editor
* Tweak to ensure that the API spec does not change
* Fix for Note migration
- Handles case where data migration is running on a DB which does not support RETURNING
* Run migration tests against all supported backends
* Fix typo
* Adjust CI workflows
* TZ migration fix
* Tweak migration test
* Adjust migration tests
* Ensure consistent ordering
* Bump API version
* Fix tests to allow non psql database support
* skip plugin events if importing or migrating data
* Add bulkloaddata option
* Skip signals if importing
* Improve bulkloaddata command
* Optionally rebuild thumbnails
* enhancements for import_records task
* cache natural key references in bulkloaddata
* wrap export_records in @state_logger
* Reduce file size of exported data
* Added docs
* Test bulk workflow as part of CI
* Add progress bar for data import
* fix for import workflow bug
* Separately test bulk import workflow
* Exercise --prettify option
* Additional CI checks for content excludes
* Allow plugin loading for list_apps
* Additional CI unit tests
* Test for importing with conflicting records
* path fixes
* Adjust test conditions
* Add SCIM
Closes https://github.com/inventree/InvenTree/issues/6339
* also test scim
* extend testing with conformance suite
* fix test suite results
* coverage completion
* fil test gaps
* add missing schema values
* fix more type issues
* fix error view
* remove route from OpenAPI
* User permissions check for Attachment API (#12689)
* enable oidc proivder by default
* add .well-known entry for OIDC server
* add default client registration
* add changelog entry
* add codeowners
* remove redundant info
* re-name and restructure panel
* add a smal explainer section on top
* flesh out section a bit more
* change name
* basic sso panel
* refactor rendering
* add api and mgmt functions
* add create/delete options
* simplify test
* handle secret generation
* fix merge
* update coverage
* add test
* reduce user friction
* add better labels
* make it more clear that this is only shown once
* add regenerate function
* update tests
* simplify test calls
* fix test
* Adjust get_bom_hash function:
- Optionally skip inclusion of part names
- Skip 'piece_count' if default value set
* Fall back to legacy comparison
* Add per-line-item check
* Add regression tests
* Enhance search fields across REST API endpoints
* Revert search_fields on SettingsList to key only for security
* Bump API version to 537 for REST API search fields
* Clean TokenListView search fields and revert common/api.py
* Fix order allocation variant validation logic and serializer defects
* Format order models and tests with ruff preview style
* Fix TransferOrder destination field in allocation unit tests
- User can only change their own profile
- Users can only access notes against models they are scoped to
- Users can only access parameters against models they are scoped to
Co-authored-by: Matthias Mair <code@mjmair.com>
* Clarify SSO setup via Database Admin interface
Fixes#10415 by documenting that Social applications are
configured in Django admin at /admin/, not via config.yaml or API.
* docs: move Database Admin access details to db_admin.md
Per review: drop the access-how-to from SSO.md and link to the Database Admin guide instead.
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Document Docker Compose container health checks
Add user documentation and CHANGELOG entry for the production
docker-compose health checks proposed in #12124.
* docs: match health-check docs to merged docker-compose.yml
Reviewed against inventree/InvenTree#12124: server uses invoke server-health, proxy probes Caddy :9090, worker uses invoke worker-health.
* Add Docker container health checks
* Use invoke tasks for Docker container health checks
Updates server and worker healthchecks to use invoke server-health
and invoke worker-health as requested in #12124 review.
Refs #12124
* Added HTTP host check to server health check
* Add health-check endpoint for Caddyfile
* Simplify health check for Caddy
* Remove test file
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: DESKTOP-691E36A\Administrator <br198064@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
* Display note info
* Support user locale
* Add unit testing for HTML content
* Observe color mode
* Add link between Note and NotesImage
* Ensure image file is deleted when NotesImage is deleted
* Add support for image upload in editor
* Skeleton for data migration
* Updates
* Update data migration
- Find any NoteImage items which do not link to a model
- Try to associate them with an existing note
* Remove validator
* Updated API endpoints for NotesImage model
* Update server side sanitizing
* Specify max field length
* Remove old fields from NotesImage model
* Refactor clean_string
* Remove obsolete task
* Remove legacy "notes" field from older models
* Adjust search params when switching notes
* Remove NotesFieldMixin
* Change editor
* Resizable image support
* Support tables
* Add table style
* Adjust header actions
* Add data migration for SalesOrderShipment notes
* Adjust back-end sanitizing
* Adjust
* Use subtle editor variant
* Move undo/redo
* Enhance editing logic
* Add report tags for notes
* Add unit test for note image cleanup
* Render note to HTML
- Automatically replace images
* Fix migration order
* Adjust migration text
* Fix "dirty" trigger on notes
* Prevent navigate from dirty notes
* Add documentation
* Prevent image clicking if not in editing mode
* Update API
* Update migration files
* Fix migrations
* remove notes from test fixtures
* remove notes field that does not exsist anymore
* add missing ruleset
* fix assertation
* fix assertation
* Update docs/docs/concepts/notes.md
Co-authored-by: Matthias Mair <code@mjmair.com>
* Remove blocknote deps
* Move old helper functions
- Only used for this migration
- Will potentially be removed at some point in the future?
* Revert change
* Fix note image URL
* Fix migration conflicts
* Fix migrations
* Fix delete call
* Fix content mixin
* Fix note duplication
* Make save method atomic
* Fix double-save
* Add "template" field to Note model
* Adjust migrations
* Frontend updates
* Fix for NotesEditor
* Render Note instance in forms
* Fix button-within-button
* Fix migrations
* Fix missing import
* add docs
* docs for rendering notes in reports
* Restrict queryset based on user view permissions
* APi unit tests for note permissions
* Duplicate embedded images when copying notes
* Add unit test for note duplication
* Add CHANGELOG
* Add 'copy_note' option to duplicate serializer
* Add unit tests for data migrations
* implement note duplication serializers
* frontend UI elements
* Fix migration conflicts
* Use branch for playwrigh testing
* Implement duplicate action for stock item
* Fix import
* Updated playwright tests
* Bug fix for receiving stock items
* Add screenshot
* Fix api_version
* Update unit tests
* Fix docs
* Remove defunct tests
* Fix migration order
* Adjust import/export workflow
* Manual cleaning update
* Fix migrations
* Fix migration files
* Fix for note save
* Adjust save ordering
* Skip constraint checking in NoteSerializer
* Custom validate_constraints on Note model
* Revert "Skip constraint checking in NoteSerializer"
This reverts commit b42bc955c1.
* Fix for note search
* Fix for receive_line_items
* Shim model renderer for NoteTemplate
* Fix playwright tests
* Adjust frontend CI
* Fix import/export CI job
* Fix for data migration test
* Fix migration test
* Adjust unit test
* Fix conflicting migration
* Fix unit test
* Run migration tests in parallel
* Robustify migration test
* Disable parallel options
* Fix conflicting migration
* Remove extraneous unit test
* Fix conflicting migrations
* Additional regression tests
* Check permissions before deleting Note instance
* Updated docs
* Validate note model type
* Prevent discard of unsaved changes in note editor
* Clean up dead code
* Fix migration conflict
* Improved data migration
* Prefetch role groups
* UI refactoring
* Refactor permission checking code
* Further code refactoring
* use DuplicateField helper
* Refactoring
* Add prefetch
* Throw exception rather than assert
* Logic fix for notes editor
* reimplement old background task
* Adjust data migration
* Fix notes field when receiving items
* Fix existing report templates
* Fix save action for notes editor
* Refactoring: Add "instance-info" API endpoint for common model properties
* Fix indicator dots
* Tweak nav alert msg
* Adjust layout of buttons
* Sanitize notes during migration
* Fix for NotesImage delete cascade
* Fix caching
* Fix race condition in notes editor
* Fix distinct issue when searching notse
* Fix race condition when saving new note instance
* Fix improper error
* Refactor StockItem duplication
* Refactoring
* Increase query time
* Fix api_version.py
* Additional migration tests
* Fix CI workflow
---------
Co-authored-by: Matthias Mair <code@mjmair.com>