* Fix restriction for PartTestTemplate
- limit_choices_to should be "testable", not "trackable"
- ref: https://github.com/inventree/InvenTree/pull/7888
* Add migration file
* Fix validation check
* Fix API filter
* Fix for test fixture
* Fix another test
* Fixture data
* Fix comment
* More fixes
* More fixes
* Moar fix plz thx
* Add Link/Unlink Barcode action
Fixes#7920
* remove unneeded imports
* remove duplication
* simplify
* add testing
* refactor type
* wait for reload to add coverage
* Add warning if custom barcode is used
* Add Image based assign
* fix action button size
* fix selection to prevent wrapping
* use left section for button
* Refactor to seperate Input
* Add comment when not scanning
* Fix punctuation
* factor scan area out
* fix readonly arg
* make BarcodeInput more generic
* make button optional
* reduce code duplication by using BarcodeInput
* remove unneeded abstraction
* add table buttons to build line table
* Add deallocate row action
* Restrict row actions
* Add functionality to 'deallocate' stock from build order
* Implement 'auto-allocate'
* Table column cleanup
* Refactor code into new hook:
- Helper function to update a set of selected rows
- Callback function to remove row
* Refactor existing forms to use new hook
* Fix for RelatedModelField
- Handle callback for null value
* Memoize each field instance
* Cleanup dead code
* Define interfac for TableField row properties
* Handle processing of nested errors
* Pass form controller through to table field rows
* Pass row errors through to individual table rows
* Allow Standalone field to render errors
* Allow allocation against build lines
* Adjust quantity value when stock item is changed
* Fix issue related to field name
* Add "available" filter
* Add "remove row" button
* Add field for selecting source location
* Filter out consumable items
* Adjust form success message
* Revert changes from https://github.com/inventree/InvenTree/pull/7965
* Add error handling for wrong key
* Add e2e test case for error condition
Fixes#7964
* Better code code / flow
* [BUG] Order of states in schema descriptions is not stable
Fixes#7977
* Prevent template adjustment
* Prevent template from being edited
* Fix 'attachment' field for StockItemTestResultSerializer
- Allow 'null' value
* Bump API version
* Add custom user defined states
* make tests more reliable
* fix list options
* Adapt version
* do not engage if rebuilding
* remove unneeded attr
* remove unneeded attr
* fix enum imports
* adapt cove target
* Add status_custom_key to all other serializers
* fix serializer method
* simplify branching
* remove unneeded imports
* inherit read_only status from leader field
* Add more tests
* fix tests
* add test for function
* refactor for easier testing
* move test to seperate class
* Add options testing
* extend serializer
* add test for all states and refactor to reuse already build functions
* use custom field in PUI too
* reset diff
* style fix
* fix comparison
* Add test for str
* test color exceptions too
* remove user state from tracking
* Add intro from model fields too
* update docs
* simplify implementation
* update tests
* fix name
* rename test
* simplify tags and test fully
* extend test to machine status
* move logic for response formatting over
* extend api response with machine status
* ensure only direct subclasses are discovered
* test for length of total respone too
* use new fields on PUI too
* fix test assertion with plugins enabled
* also observe rendering in filters
* Add managment endpoints and APIs
* Add contenttypes to PUI renderes
* use filteres instead
* fix import order
* fix api route definition
* move status choices to serializer
* fix lookup
* fix filtering
* remove admin integration
* cleanup migration
* fix migration change
* cleanup code location
* fix imports
* Add docs for custom states
* add links to custom status
* Add "create_child_builds" field to BuildOrder serializer
- only when creating a new order
- write only field
* Update serializer field
* Add placeholder task for creating child build orders
* Add field to PUI forms
* Auto-create build orders as required
* Bump API vresion
* Add documentation
* Update unit tests
* Update function signature for 'validate_serial_number'
- Pass through stock item parameter
- Required if we want to exclude a particular item from that test
* Update documentation
* Docs fixes
* Add type annotations
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Remove default "not yet implemented" action
- Will force us to manually add "not yet implemented"
- Intended to highlight where we still need to work
* Refactor more components
* Fix for onClick
* Add API bump
* [PUI] Add theme setting to navbar
Closes https://github.com/invenhost/InvenTree/issues/106
* Rename to the same as ColorToggle
* Change action text
Co-authored-by: @SchrodingersGat
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* 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
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add helper func to check user permission against a given model type
* Validate bulk delete of attachments
- Check permissions against linked model type(s)
* Check permission when creating or editing an attachment instance
* Fix typo
* Fix AttachmentSerializer to allow editing
* Update unit tests accordingly
* Remove unused custom permission classs
* Bump API version
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* adapt namespace
* add new labels
* make baseimage available for labels
* remove unneeded ending
* ensure image name is correct for ghcrio
* ensure the right outputs are used
* fix reference
* fix assigment
* only push docker reg image if authd
* swith back to env
this gets provided by the version ci script
* make repo targets changeable
* make readable
* revert ghcr.io change
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* 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
* Create build order from sales order table
* Allow creation of child build order from build page
* Add production and purcahse order quantitres to sales order item serializer
* Bump API version
* Fix playwright test
* Check user permission for tables
* Update permissions for user table
* Fix permission checks for group table
* Permission check for group detail
* Add divider
* Fix permission for template tables
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* 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>
* Add placeholder for more sales order actions
* Add <SalesOrderShipmentTable />
* Allow filtering by date fields
* Add <ReturnOrderLineItemTable />
- Add label rendering for ReturnOrderLineItem
* Add placeholder actions
* Edit / delete / add line items for return order
* Fix for duplicate action
* Cleanup unused code
* Bump API version
* Update playwright tests
* Build allocation API updates
- Improve API query efficiency
- Add extra export fields to the BuildItemSerializer
* Remove commented code
* Improve query efficiency for BuildLine serializer
* Further improvements
* Improve StockList API endpoint
- Reduce from ~700ms to ~300ms with 250 results
* Improve query efficiency when fetching part parameter data
* Bump API version
* make tree searchable by pathstring
* fix related model field colors in dark mode
* remove unused import
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Add new "ON_HOLD" status code to order models
* Update legacy migration for build status
- Pin it to the "live" build status codes
* Fix legacy migrations for order status codes
* Revert "ON_HOLD" status codes
- Just limiting this PR to cleanup
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add limit to default location annotation
Limits the number of results from the default_location filter to 1
* Add unit test to verify annotation functionality
* 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
* Added test statistics
Fixed#5995
* Bump API version
* Fix javascript varible scopes
* Fix javascript exports
* Remove duplicated import
* Add files modified by the pre-commit scripts
* Move test statistics API urls to a separate endpoint
* Merge test-statistics urls
* Undo unrelated changes
* Formatting fix
* Fix API urls for test statistics in PUI
* Fix prefixing in test statistic functions
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* [PUI] Bug fix for API forms
- Ensure that "blank" data does not get overriden with previous fields
- Better logic for form data fetching
* Playwright test fixes
* add plugin_static template tag
* don't load plugins for collectstatic anymore as they are now collected seperatly
* fix clear plugin staic files bug with nested folder path
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Included substitute IPN to BOM export
* Added Part Revision to BOM export
* removed trailing whitespace
* Update test_bom_export.py
Added Part Revision to test
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Make libffi version more flexible
Can not install on debian 12
Fixes#6036
* target v11 packaging on v12 install
we are only targeting one version per debian / ubuntu channel. This should not present a problem
* Add permissions to group API
* factor out permission formatting
* add group permission details to UI
* add nicer accordions with permissions
* add group to models
* Add Admin button to change permissions
* add missing instance renderer
* turn off default view permission to everything
* add migration
* fix rule assigment
* Add now missing view permissions
* Adjust test for the now new default permission count
* add missing view permission
* fix permissions for search test
* adjust search testing to also account for missing permissions
* adjust to new defaults
* expand role testing
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* 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 76043ed96b1700ae50f9cfda7997629efa8d97e2.
* Revert "fix: tests"
This reverts commit 3a2d46ff720c35b51e21aedaa22357d71bd120e1.
* Adjust caching key to be numeric for user
* Add strong usermodel to colortheme
* switch to using user model everywhere for colortheme
* re-enable ColorTheme tests
* fix call
* remove old migratin
* fix directory discovery
* Make initial data query wait until options query is complete
* Fix form error issues
- Form fields were being re-constructed
* Update playwright tests - check for form error message
* Prevent reconstruction of form fields
* Hide form elements until OPTIONS request is complete
* Fix for <ChoiceField />
- "value" must be stringified!
* Handle undefined choice values
* Add "batch code" to stock detail page
* Fix for initial focus
* Allow form field definition to change externally
* Force override of fetched data
* Update playwright tests
* Add backup value
* Cleanup initialdataquery
* Unit test updates
* Test updates
* Tweak API Form
* Adjust playwright test
* Package frontend in deb
* Add artifact download
* remove 0.8.0 check
* remove array casting
* fix format once more
* another try
* add brackets again
* add version
* and bash
* and shell
* more debuging
* various style fixes
* small fixes
* and ls for prosperity
* debug
* maybe git as source?
* fix download cmd?
* debug a bit
* debug a bit more
* remove sha download - is not working with GHA restrictions
* write version number
* check if a new frontend must be dowloaded
* write versions into frontend packages
* Matmair/issue7338 (#205)
* Package frontend in deb
* Add artifact download
* remove 0.8.0 check
* remove array casting
* fix format once more
* another try
* add brackets again
* add version
* and bash
* and shell
* more debuging
* various style fixes
* small fixes
* and ls for prosperity
* debug
* maybe git as source?
* fix download cmd?
* debug a bit
* debug a bit more
* remove sha download - is not working with GHA restrictions
* write version number
* check if a new frontend must be dowloaded
* write versions into frontend packages
* change ref dir for tests
* add better build logging
* extend task to get ref from package
* fix downloading syntax
* fix name ref
* make more robust
* more logging
* move import
* turn down unzipping noise
* strip content (spaces, newlines)
* add info what happens now
* fix quite flag
* adjust publisher
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix typo
* Adds new field to DataImportSession model
- field_filters
- Allows custom API field filters to be specified
* Update serializer
* Add button to import purchase order line items
* Fix instance renderer
* Make use of "filters" attribute
* Specify default currency for import
* Update serializer
* Bump API version
* Rename purchaseorderline -> purchaseorderlineitem
Fixed rendering bug when switching from a company that has an image and one that hasn't in a related model field due to the number of rendered hooks changes, because Thumbnail is not used as a component here, but a normal function.
* Allow override of packaging field when receiving items against a PurchaseOrder
* Allow editing of batch code and packaging when transferring stock
* Bump API version
* Translate table headers
* [PUI] Update receive items form
* [PUI] Allow packaging adjustment on stock actions
* Hide packaging field for other actions
* JS linting
* Add 'note' field when receiving item against purchase order
* [CUI] implement note field
* Implement "note" field in PUI
* Comment out failing tests
* Add "field_overrides" field to DataImportSession model
* Adjust logic for extracting field value
* Add import drawer to BOM table
* Enable download of BOM data
* Improve support for hidden errors in forms
* Improve form submission on front-end
- Handle a mix of files and JSON fields
- Stringify any objects
* Update backend validation for data import session
- Accept override values if provided
- Ensure correct data format
- Update fields for BomItem serializer
* Add completion check for data import session
* Improvements to importer drawer
* Render column selection as a table
* Add debouncing to text form fields
- Significantly reduces rendering calls
* Fix for TextField
* Allow instance data to be updated manually
* Allow specification of per-field default values when importing data
* Improve rendering of import
* Improve UI for data import drawer
* Bump API version
* Add callback after bulk delete
* Update playwright test
* Fix for editRow function
* Expose batch code field to StockItemSerializerBrief
* Expose more fields to PartBriefSerializer
* Additional export fields to BuildItemSerializer
* Bump API version
* Fix playwright test
* 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>
* fix possible access to None value
* fix possible access to empty valie
* fix possible access to empty value
* define exception
* remove old todo
* fix trigger on none
* merge condition
* remove empty object pattern
* fix typo
* fix usage of var
* add missing import
* use for of itterator instead
* use let instead of var
* move declaration to ensure logger is accessible
* Revert "remove empty object pattern"
This reverts commit 4701cc97ec30dac38bc63806142859a67a9ba8d7.
* Add server-side annotation for "can_build"
- This calculation now performed on the server (in the API)
- Allows better table ordering, etc
- Makes it available for data export
* Bump API version
* Fix project_code serializer field
- Imroperly marked as "read only"
* Add unit test
* Bump API version
* Add project code label to order serializers
- Making it available in exported dataset
* [FR] Add invoke task to remove compiled files
Fixes#7559
* add optional clear step before install ensuring clean updates
* add pre-install
* Update preinstall.sh
* Update functions.sh
* Update preinstall.sh
* add a generic run helper to ensure commands run from top directory
* use generic run for other helpers
* updated translation base
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Enable passing of enviroment variables
* keep server url static
see #6882 (3)
* keep plugin api out of schema
see #6882 (1)
* Add kwarg to override db settings
* keep currencies stable for schema generation
see #6882 (2)
* use str instead of bool
* add version bump
* Adds new model for DataImportSession
* Add file extension validation
Expose to admin interface also
* Switch to new 'importer' app
* Refactoring to help prevent circular imports
* Add serializer registry
- Use @register_importer tag for any serializer class
* Cleanup migration file
- Do not use one-time hard-coded values here
* Refactor code into registry.py
* Add validation for the uploaded file
- Must be importable by tablib
* Refactoring
* Adds property to retrieve matching serializer class
* Update helper functions
* Add hook to auto-assign columns on initial creation
* Rename field
* Enforce initial status value
* Add model for individual rows in the data import
* Add DataImportRow model
* Extract data rows as dict
* Update fields
- Remove "progress" field (will be calculated)
- Added "timestamp" field
- Added "complete" field to DataImportRow
* Auto-map column names
- Provide "sensible" default values
* Add API endpoint for DataImportSession
* Offload data import operation
- For large data files this may take a significant amount of time
- Offload it to the background worker process
* Refactor data import code
* Update models
- Add "columns" field to DataImportSession
- Add "errors" field to DataImportRow
* Move field mapping to a new model type
- Simpler validation
* Save "valid" status for each data row
* Include session defaults when validating row data
* Update content_excludes
- Ignore importer models in import/export
* Remove port from ALLOWED_HOST entries
* Skip table events for importer models
* Bug fixes
* Serializer updates
* Add more endpoints
- DataImportColumnMappingList
- DataImportRowList
* further updates:
- Add 'get_api_url' method
- Handle case where
* Expose "available fields" to the DataImportSession serializer
Uses the (already available) inventree metadata middleware
* Add detail endpoints
* Clear existing column mappings
* Add endpoint for accepting column mappings
* Add API endpoint exposing available importer serializers
* Add simple playground area for testing data importer
* Adds simple form to start new import session
- Needs work, file field does not currently function correctly
* data_file is *not* read_only
* Add check for file type
* Remove debug statements
* Refactor column mapping
- Generate mapping for each column
- Remove "columns" field
- Column names are calculated dynamically
* Fix uniqueness requirements on mapping table
* Admin updates
- Prevent deletion of mappings
- Prevent addition of mappings
* API endpoint updates
- Prevent mappings from being deleted
- Prevent mappings from being created
* Update importer drawer
* Add widget for selecting data columns
* UI tweaks
* Delete import session when closing modal
* Allow empty string value
* Complete column mapping
* Adds ability to remove rows
* Adjust drawer specs
* Add column 'description' to serializer
* Add option to hide labels in API form field
* Update column heading
* Fix frontend linting errors
* Revert drawer position
* Return correct type
* Fix shadowing
* Fix f-string
* simplify frontend code
* Move importer app
* Update API version
* Reintroduce export formats
* Add new models to RuleSet
* typescript cleanup
* Typescript cleanup
* Improvement for Switch / boolean field
* Display original row data on popover
* Only display mapped columns
* Add DataExportMixin class
- Replaces existing APIDownloadMixin
- Uses DRF serializers for exporting
- *much* more efficient
* Create new file: importer.mixins.py
* Add new mixin to existing views which support data export
* Better error handling
* Cleanup:
- Remove references to APIDownloadMixin
- Remove download_queryset method
- All now handled by API-based export functionality
* Replace table with InvenTreeTable
- Paginate imported rows
- Data can be searched, ordered,
* Make 'pathstring' fields read-only
* Expose list of valid importer types to the API
* Exclude read-only fields
* Cleanup
* Updates for session model
- Column is now editable on mapping object
- Field is no longer editable
- Improve admin integration
* Adds new custom hook for controlling data import session
* Refactor column mapping widget
* Refactor ImportDataSelector
* Working on ImportDataSelector component
* Adds method for editing fields in import table
- Cell edit mode
- Row edit mode
- Form submission still needs work!
* Adds background task for removing old import sessions
* Fix api_version.py
* Update src/frontend/src/components/importer/ImportDataSelector.tsx
Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
* Update model verbose names
* Rename mixin class
* Add serializer mixin classes
- Will allow for fine-tuning of the import/export proces
* @register_importer requires specific mixin
* Check subclass for export
* Fix typos
* Refactor export serializer
- Keep operations local to the class
* Add shim class to process an individual row before exporting it
* Add mixin to existing serializers
* Add export functionality for company serializers
* Adds placeholder for custom admin class
* Update mantine styling
* spacing -> gap
* Add functionality to pre-process form data before upload
* Remove old references to download_queryset
* Improvements for data import drawer:
- Pin title at top of drawer
* Further improvements
* Fix column selection input
* Formatting improvements
* Use a <Stepper> component for better progress display
* Cleanup text
* Add export-only fields to BuildItem queryset
* Expand "export" fields for BuildItem dataset
* Skip backup and static steps in CI
* Remove hard-coded paths
* Fix for "accept_mapping" method
* Present required fields first on import session
* Add "get_importable_fields" method
* Add method for commiting imported row to database
* Cleanup
* Save "complete" state after row import
* Allow prevention of column caching
* Remove debug statement
* Add basic admin table for import sessions
* Fix for table filter functions
- New mantine version requires string values
* Add filters for import session table
* Remove debug message
* fix for <FilterItem />
* Create new import session from admin page
* Cleanup playground
* Re-open an existing import session
* Memoize cell value
* Update <ImportDataSelector>
* Enable download of build line data
* Add extra detail fields
* Register data importers for the stock app
* Enable download of stock item tracking data
* Register importerrs for "company" app
* Register importers for the "order" app
* Add extra fields to purchase order line item serializer
* Update verbose names for order models
* Cleanup import data table rendering
* Pass session information through to cell renderer
* add separate 'field_overrides' field
* Expose 'field_overrides' to API
* Refactor import field selection
* Use override data if provided
* Fix data extraction
- Ignore columns which are not mapped
* Fix fields.pop
- Provide 'None' argument
* Update import data rendering
* Handle missing / empty column names when importing data
* Bug fixin'
* Update hook
* Adds button to upload data straight to table
* Cache "available_fields"
- Reduces API access time by 85%
* Fix calculation of completed_row_count
* Import individual rows from import session
* Allow import of multiple simultaneous records
* Improve extraction of metadata
- Especially for related fields
- Request object no longer required
* Implement suspended rendering of model instances
* Cleanup
* Implement more columns for StockTable
* Allow stock filtering by packaging field
* Fix "stock_value" column
* Improve metadata extraction
- Handle read_only_fields in Meta
- Handle write_only_fields in Meta
* Increase maximum number of importable rows
* Force data import to run on background worker
* Add export-only fields to StockItemSerializer class
* Data conversion when performing initial import
* Various tweaks
* Fix order of operations for data import
* Rename component
* Allow import/export of more model types
* Fix verbose name
* Import rows as a bulk db operation
* Enable download for PartCategoryTemplateTable
* Update stock item export
* Updates for unit tests
* Remove xls format for now
- Causes some bug in tablib
- Surely xlsx is OK?
* More unit test updates
* Future proof migration
* Updates
* unit tests
* Unit test fix
* Remove 'field_overrides'
- field_defaults will suffice
* Remove 'xls' as download option from frontend
* Add simple unit test for data import
* PUI tweaks
---------
Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
* Add new setting: BUILDORDER_REQUIRE_VALID_BOM
- Prevent build orders from being created if the assembly BOM has not been validated
* Add validation check when creating a build order
* Add unit tests
* rename var
* Single-line installer is not looking for already exsisting installs
Fixes#6891
* move update script up
* fix check
* small syntax fix
* fix missing var assigment
* fix assigment
* better message
* log found settingsmore logging
* also check for 'null'
* fix name confusion
* Adjust caching key to be numeric for user
* Add strong usermodel to colortheme
* switch to using user model everywhere for colortheme
* add some types
* use pk instead of id
* fix migration clash
* fix request
* Add <PermissionDenied /> page
* Check permissions for admin center
* Wrap <PartDetail> page in an error handler
- Display client or server errors
* Add error handlers to other detail pages
* Refactor error pages
* Add playwright tests
* Refactor component locations
* Get test to work
* updated translation base
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Calculate weighted average price when merging stock items
* refactor currency averaging
- Only add samples which have an associated value
* Revert to using two loops
* Check for div-by-zero
* Add unit testing for purchase price averaging
* 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>
* updated translation base
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add "top_level" filter for PartCategory API endpoint
* Update CUI tables
* Update PUI table
* Similar updates for stock location table
* Fix "parent" field label
* Bump API version
* 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>
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* updated translation base
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* disable patch coverage
* also test for is_active flag
* ignore edge case regarding coverage
* add tests for api logout
* test login redirects
* style fixes
* fully utilise serializer for /api/user/roles api
* ignore logout mig from cov
* bump api version as we are now documenting the roles endpoint
* ignore on migration runs for coverage
* remove dead code
* ignore potential caching errors for coverage
* test default dj_rest_auth token endpoint
* move pragma
* just ignore whole block
* move ignore back
* test for token based token revocation
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add `2fa_urls`
* Add new fields to serializer
* Add new interface to PUI interfaces
* fix url resolving
* add frontend redirect for MFA login
* redirect login if mfa is required
* Merege upstream/master into branch
* reset default login
* remove mfa states
* fix auth args
* add handler for MFA redirect auth
* Revert "Merege upstream/master into branch"
This reverts commit 717001d8f1ad8ce291e79419f08450349190fbf3.
* revert api version bump
* revert frontend error handling change
* reduce complexity
* reset schema text
* Add e2e test for MFA login url
* accept either POST or body data for login pre-check
* remove CUI test
* style fixes
* Add basic model for handling generic attachments
* Refactor migration
* Data migration to convert old files across
* Admin updates
* Increase comment field max_length
* Adjust field name
* Remove legacy serializer classes / endpoints
* Expose new model to API
* Admin site list filters
* Remove legacy attachment models
- Add new mixin class to designate which models can have attachments
* Update data migration
- Ensure other apps are at the correct migration state beforehand
* Add migrations to remove legacy attachment tables
* Fix for "rename_attachment" callback
* Refactor model_type field
- ContentType does not allow easy API serialization
* Set allowed options for admin
* Update model verbose names
* Fix logic for file upload
* Add choices for serializer
* Add API filtering
* Fix for API filter
* Fix for attachment tables in PUI
- Still not solved permission issues
* Bump API version
* Record user when uploading attachment via API
* Refactor <AttachmentTable /> for PUI
* Display 'file_size' in PUI attachment table
* Fix company migrations
* Include permission informtion in roles API endpoint
* Read user permissions in PUI
* Simplify permission checks for <AttachmentTable />
* Automatically clean up old content types
* Cleanup PUI
* Fix typo in data migration
* Add reverse data migration
* Update unit tests
* Use InMemoryStorage for media files in test mode
* Data migration unit test
* Fix "model_type" field
- It is a required field after all
* Add permission check for serializer
* Fix permission check for CUI
* Fix PUI import
* Test python lib against specific branch
- Will be reverted once code is merged
* Revert STORAGES setting
- Might be worth looking into again
* Fix part unit test
* Fix unit test for sales order
* Use 'get_global_setting'
* Use 'get_global_setting'
* Update setting getter
* Unit tests
* Tweaks
* Revert change to settings.py
* More updates for get_global_setting
* Relax API query count requirement
* remove illegal chars and add unit tests
* Fix unit tests
* Fix frontend unit tests
* settings management updates
* Prevent db write under more conditions
* Simplify settings code
* Pop values before creating filters
* Prevent settings write under certain conditions
* Add debug msg
* Clear db on record import
* Refactor permissions checks
- Allows extension / customization of permission checks at a later date
* Unit test updates
* Prevent delete of attachment without correct permissions
* Adjust odcker.yaml
* Cleanup data migrations
* Tweak migration tests for build app
* Update data migration
- Handle case with missing data
* Prevent debug shell in TESTING mode
* Update migration dependencies
- Ensure all apps are "up to date" before removing legacy tables
* add file size test
* Update migration tests
* Revert some settings caching changes
* Fix incorrect logic in migration
* Update unit tests
* Prevent create on CURRENCY_CODES
- Seems to play havoc with bootup sequence
* Fix unit test
* Some refactoring
- Use get_global_setting
* Fix typo
* Revert change
* Add "tags" and "metadata"
* Include "tags" field in API serializer
* add "metadata" endpoint for attachments
* updated translation base
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Improve stock item tracking API query
- Cache related model lookups into single DB queries
- Significant improvements to query speed
- Ref: https://github.com/inventree/InvenTree/issues/7429
* Handle case where item does not exist in DB
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add helper functions to set/get settings
* Refactor instances of get_setting
* UPdates
* Fix for task
* Add debug messages
- Work out what is going on in CI
* add more debug
- Cannot reproduce locally?
* More debug...
* Remove debug prints
* Add better debug msg
* Simplify unit test
* Increase timeout for plugin tests
* Update validator code
* Add location type to location overview
* Remove the New Stock Item button from Stock view in case the user has not rights
* Remove the New Stock Item button from Stock view in case the user has not rights
* Add 'clear' option to 'invoke static'
* Add functions for copying static files from installed plugins
* Collect plugin static files as part of 'invoke static'
* Add 'activate' method for PluginConfig
* Run as part of `invoke plugins`
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add "choices" field to PartTestTemplate
- Will allow validation of "value" field on StockItemTestResult
* Run validation against StockItemTestResult
* Export SKU in stock item resource
* Add "choices" field to PartTestTemplate
- Will allow validation of "value" field on StockItemTestResult
* Run validation against StockItemTestResult
* Expose 'choices' to serializer
* Update unit test
* Add unit test for test result validation
* Add 'choices' field for CUI forms
* Add "choices" field to PUI form
* Add 'choices' column to PartTestTemplateTable
* memoize stockitemtestresult fields
- Adjust field type of "value" field based on template choices
* Bump API version
* updated translation base
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* PanelType.content is now required
* Make panel content non-optional
- Makes it easier to see which panels still need to be implemented
* Implement a panel
* Install mdxeditor
* Setup basic toolbar
* Refactoring
* Add placeholder for image upload
* Add fields to link uploaded notes to model instances
* Add custom delete method for InvenTreeNotesMixin
* Refactor CUI notes editor
- Upload model type and model ID information
* Enable image uplaod for PUI editor
* Update <NotesEditor> component
* Fix import
* Add button to save notes
* Prepend the host name to relative image URLs
* Disable image resize
* Add notifications
* Add playwright tests
* Enable "read-only" mode for notes
* Typo fix
* Styling updates to the editor
* Update yarn.lock
* Bump API version
* Update migration
* Remove duplicated value
* Improve toggling between edit mode
* Fix migration
* Fix migration
* Unit test updates
- Click on the right buttons
- Add 'key' properties
* Remove extraneous key prop
* fix api version
* Add custom serializer mixin for 'notes' field
- Pop the field for 'list' endpoints
- Keep for detail
* Update to NotesEditor
* Add unit test
* Adjust situations in which cache is disabled
- Prevent cache when running a number of housekeeping commands
* Add 'spectacular' to list of excluded commands
* Generate codes as list
- Ensure consistent ordering (for CI)
* Debug currency codes list
* Bump API version
* 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
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* 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
* Enforce query count middleware for testing
* Cache "DISPLAY_FULL_NAMES" setting
- Much better API performance
* Update unit_test.py
- Add default check for max query count
* Rework unit_test.py
- x-django-query-count header does not get passed through testing framework
* Adjust middleware settings
* Fix debug print
* Refactoring unit_test.py
* Adjust defaults
* Increase default query threshold
- We can work to reduce this further
* Remove outdated comment
* Install django-middleware-global-request
- Makes the request object globally available
- Cache plugin information against it
* Cache "plugins_checked" against global request
- reduce number of times we need to recalculate plugin data
* Cache plugin information to the request
- Prevent duplicate reloads if not required
* Simplify caching of settings
* Revert line
* Allow higher default counts for POST requests
* Remove global request middleware
- Better to implement proper global cache
* increase CI query thresholds
* Fix typo
* API updates
* Unit test updates
* Increase default MAX_QUERY_TIME
* Increase max query time for plugin functions
* Cleanup barcode unit tests
* Fix part test
* Update more tests
* Further unit test updates
* Updates for unit test code
* Fix for unit testing framework
* Fix
* Reduce default query time
* Increase time allowance
* Refactor part category tree
- New "NavigationTree" using native mantine components
- Make it generic, too
* Replace existing <StockLocationTree /> component
* Adjust API filtering for location tree endpoint
* Added playwright tests
* Update api filter classes
* Fix for DetailsImage
- Update to @mantine/core had changed the <AspectRatio> component
* fix for identifierString function
* Adjust playwright tests
* updated translation base
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Bug fix for label printing with plugin on CUI
- Missed edge case in recent refactor
* Fix typo
* Support non-pk fields
* fix a number of typos
* js fixes
* - move reqs file to contrib
- detect previously used python version
- safe extra requirements to INSTALLER_EXTRA
* add missing fi
* move site setting
* Updates for metadata information
- Override 'label' values with 'verbose_name' values
- Only if 'label' is *not* translated, but 'verbose_name' is
- Allows the translated model fields name to be pushed through to the metadata framework
* Remove unused import
* Add unit testing for metadata lookup
* Update serializer: allow 'category' to be blank
* Bump API version
* Fix for unit test
* 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
* updated translation base
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Fix sales order shipment / completed buttons
- Template logic needed tweaks
* Adjust logic for completing a sales order
* Tweak UV version
- Trying to get CI to run properly
* Pin version
* Ignore uv
* Cleanup
* Fix another --uv command
* Add 'adjustValue' callback for form field
* Cast checkbox values to boolean
* Call "onChange" callbacks
* Implement dynamic "data" field for PartParameter dialog
- Type of field changes based on selected template
* Add playwright unit tests
* Add labels to table row actions
* linting fixes
* Adjust playwright tests
* 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>
* Bare bones <StockTrackingTable /> component
* Implement details panel for StockTrackingTable
* Remove unused userState hook
* Expand RenderInstance to include link
* Allow inline renderers to display links
* 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>
* Expose filter for "bom_valid" status
* Expose part filter for "starred" status
* Bump API version
* Add simple unit test
* Add unit test for "starred" filtering
* 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
* Prevent deletion of part which is used in an assembly
* add 'validate_model_deletion' option to ValidationMixin plugun
* Add global setting to control part delete behaviour
* Update settings location
* Unit test updates
* Further unit test updates
* Fix typos
* Fix CUI URLs
* Fix for plugin setting API
- Fix conflict between "key" for PluginConfig and "key" for setting
- Needs to be "plugin" for plugin lookup, which accesses the "key" field in the PluginConfig model
* Fix for editing setting in PUI
* Add 'r' back in
* Remove debug code
* Update unit tests
* Bump API version
* Another unit test fix
* Update admin site
- Implement 'autocomplete' for more fields
- Improves admin loading time
* Add "admin" buttons to the PUI interface
* Only allow superuser access
* Use modal hook for creating new attachments
* Add "edit" and "delete" modals for attachment table
* Fix for drag-and-drop zone
- Update to match mantine v7
* Fix link clicking
* Fix call to cancelEvent
* Add placeholder for more unit tests
* Refactor "plugin activate" dialog
- Use hooked modal
* Remove actions from drawer
- Used dynamic modal code which is super buggy
* Update plugin drawer / table
* Refactor settings management:
- Use proper hooked form
- Reduce code duplication
- Run single callback for each <SettingList>
* Add error boundary
* Update ErrorTable
- Use useDeleteApiFormModal
* Refactor ManufacturerPartParameter table
- Use hooked modals
* Refactor existing tables
- Pass table state to forms
* Ensure table is reloaded
* Refactor ManufacturerPartTable
* Code cleanup
* More cleanup
* Lookup plugin by slug
- Adjust plugin API to use plugin key and not (variable) pk value
* Fix for plugin table in CUI (legacy interface)
* Fix API endpoint layout:
- Move special endpoints first
- Fix "metadata" endpoint
- Allow custom "lookup_field" attribute for MetadataView
* Add "active_plugins" count to RegistryStatusView
* Updates for PUI
- Plugin management now uses slug rather than pk
* Bump API version
* Remove unused code
* Adds index on 'key' field for PluginConfig model
* Fix URL structure
* Unit test updates
* Unit test updates
* More unit test fixes
* Copy requirements file
* Test more files when building docker image
* Refactor install task
* Raise exception
* Run install task
* Fix typos
- The tests work!
* updated translation base
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations messages.po from Crowdin
* Fix: New translations django.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@ -123,7 +123,7 @@ Refer to the [getting started guide](https://docs.inventree.org/en/latest/start/
<!-- Mobile App -->
<!-- Mobile App -->
## :iphone: Mobile App
## :iphone: Mobile App
InvenTree is supported by a [companion mobile app](https://docs.inventree.org/en/latest/app/app/) which allows users access to stock control information and functionality.
InvenTree is supported by a [companion mobile app](https://docs.inventree.org/app/) which allows users access to stock control information and functionality.
<divalign="center"><h4>
<divalign="center"><h4>
<ahref="https://play.google.com/store/apps/details?id=inventree.inventree_app">Android Play Store</a>
<ahref="https://play.google.com/store/apps/details?id=inventree.inventree_app">Android Play Store</a>
echo"# No setting for ${name} found - please set it manually either in ${INVENTREE_CONFIG_FILE} under '${config_key}' or with 'inventree config:set ${env_key}=value'"
ABORT=true
else
echo"# Found setting for ${name} - ${value}"
fi
}
# Custom checks if old version is below 0.8.0
if["${old_version_rev}" -lt "9"];then
echo"# Old version is below 0.9.0 - You might be missing some configs"
# Check for BACKUP_DIR and SITE_URL in INVENTREE_CONF_DATA and config
InvenTree defines an internal format for generating barcodes for various items. This format uses a simple JSON-style string to uniquely identify an item in the database.
InvenTree ships with two integrated internal formats for generating barcodes for various items which are available through the built-in InvenTree Barcode plugin. The used format can be selected through the plugin settings of the InvenTree Barcode plugin.
### 1. JSON-based QR Codes
This format uses a simple JSON-style string to uniquely identify an item in the database.
Some simple examples of this format are shown below:
Some simple examples of this format are shown below:
@ -12,10 +16,49 @@ Some simple examples of this format are shown below:
| Supplier Part | `{% raw %}{"supplierpart": 99}{% endraw %}` |
| Supplier Part | `{% raw %}{"supplierpart": 99}{% endraw %}` |
The numerical ID value used is the *Primary Key* (PK) of the particular object in the database.
The numerical ID value used is the *Primary Key* (PK) of the particular object in the database.
#### Downsides
1. The JSON format includes binary only characters (`{% raw %}{{% endraw %}` and `{% raw %}"{% endraw %}`) which requires unnecessary use of the binary QR code encoding which means fewer amount of chars can be encoded with the same version of QR code.
2. The model name key has not a fixed length. Some model names are longer than others. E.g. a part QR code with the shortest possible id requires 11 chars, while a stock location QR code with the same id would already require 20 chars, which already requires QR code version 2 and quickly version 3.
!!! info "QR code versions"
There are 40 different qr code versions from 1-40. They all can encode more data than the previous version, but require more "squares". E.g. a V1 QR codes has 21x21 "squares" while a V2 already has 25x25. For more information see [QR code comparison](https://www.qrcode.com/en/about/version.html).
For a more detailed size analysis of the JSON-based QR codes refer to [this issue](https://github.com/inventree/InvenTree/issues/6612).
### 2. Short alphanumeric QR Codes
While JSON-based QR Codes encode all necessary information, they come with the described downsides. This new, short, alphanumeric only format is build to improve those downsides. The basic format uses an alphanumeric string: `INV-??x`
- `INV-` is a constant prefix. This is configurable in the InvenTree Barcode plugins settings per instance to support environments that use multiple instances.
- `??` is a two character alphanumeric (`0-9A-Z $%*+-./:` (45 chars)) code, individual to each model.
- `x` the actual pk of the model.
Now with an overhead of 6 chars for every model, this format supports the following amount of model instances using the described QR code modes:
| QR code mode | Alphanumeric mode | Mixed mode |
| --- | --- | --- |
| v1 M ECL (15%) | `10**14` items (~3.170 items per sec for 1000 years) | `10**20` items (~3.170.979.198 items per sec for 1000 years) |
| v1 Q ECL (25%) | `10**10` items (~0.317 items per sec for 1000 years) | `10**13` items (~317 items per sec for 1000 years) |
| v1 H ECL (30%) | `10**4` items (~100 items per day for 100 days) | `10**3` items (~100 items per day for 10 days (*even worse*)) |
!!! info "QR code mixed mode"
Normally the QR code data is encoded only in one format (binary, alphanumeric, numeric). But the data can also be split into multiple chunks using different formats. This is especially useful with long model ids, because the first 6 chars can be encoded using the alphanumeric mode and the id using the more efficient numeric mode. Mixed mode is used by default, because the `qrcode` template tag uses a default value for optimize of 1.
Some simple examples of this format are shown below:
| Model Type | Example Barcode |
| --- | --- |
| Part | `INV-PA10` |
| Stock Item | `INV-SI123` |
| Stock Location | `INV-SL1` |
| Supplier Part | `INV-SP99` |
## Report Integration
## Report Integration
This barcode format can be used to generate 1D or 2D barcodes (e.g. for [labels and reports](../report/barcodes.md))
This barcode format can be used to generate 1D or 2D barcodes (e.g. for [labels and reports](../report/barcodes.md))
@ -26,14 +26,6 @@ To navigate to the Build Order display, select *Build* from the main navigation
{% include "img.html" %}
{% include "img.html" %}
{% endwith %}
{% endwith %}
#### Tree View
*Tree View* also provides a tabulated view of Build Orders. Orders are displayed in a hierarchical manner, showing any parent / child relationships between different build orders.
{% with id="build_tree", url="build/build_tree.png", description="Build Tree" %}
{% include "img.html" %}
{% endwith %}
#### Calendar View
#### Calendar View
*Calendar View* shows a calendar display with upcoming build orders, based on the various dates specified for each build.
*Calendar View* shows a calendar display with upcoming build orders, based on the various dates specified for each build.
@ -74,10 +66,23 @@ Each *Build Order* has an associated *Status* flag, which indicates the state of
| Status | Description |
| Status | Description |
| ----------- | ----------- |
| ----------- | ----------- |
| `Pending` | Build has been created and build is ready for subpart allocation |
| `Pending` | Build order has been created, but is not yet in production |
| `Production` | One or more build outputs have been created for this build |
| `Production` | Build order is currently in production |
| `Cancelled` | Build has been cancelled |
| `On Hold` | Build order has been placed on hold, but is still active |
| `Completed` | Build has been completed |
| `Cancelled` | Build order has been cancelled |
| `Completed` | Build order has been completed |
**Source Code**
Refer to the source code for the Build Order status codes:
::: build.status_codes.BuildStatus
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
### Stock Allocations
### Stock Allocations
@ -99,41 +104,29 @@ For further information, refer to the [stock allocation documentation](./allocat
## Build Order Display
## Build Order Display
The detail view for a single build order provides multiple display tabs, as follows:
The detail view for a single build order provides multiple display panels, as follows:
### Build Details
### Build Details
The *Build Details*tab provides an overview of the Build Order:
The *Build Details*panel provides an overview of the Build Order:
{% with id="build_details", url="build/build_details.png", description="Details tab" %}
{% with id="build_details", url="build/build_panel_details.png", description="Build details panel" %}
{% include "img.html" %}
{% include "img.html" %}
{% endwith %}
{% endwith %}
### Allocate Stock
### Line Items
The *Allocate Stock* tab provides an interface to allocate required stock (as specified by the BOM) to the build:
The *Line Items* panel displays all the line items (as defined by the [bill of materials](./bom.md)) required to complete the build order.
{% with id="build_allocate", url="build/build_allocate.png", description="Allocation tab" %}
{% with id="build_allocate", url="build/build_panel_line_items.png", description="Build line items panel" %}
{% include "img.html" %}
{% include "img.html" %}
{% endwith %}
{% endwith %}
The allocation table (as shown above) shows the stock allocation progress for this build. In the example above, there are two BOM lines, which have been partially allocated.
The allocation table (as shown above) provides an interface to allocate required stock, and also shows the stock allocation progress for each line item in the build.
!!! info "Completed Builds"
### Incomplete Outputs
The *Allocate Stock* tab is not available if the build has been completed!
### Consumed Stock
The *Incomplete Outputs* panel shows the list of in-progress [build outputs](./output.md) (created stock items) associated with this build.
The *Consumed Stock* tab displays all stock items which have been *consumed* by this build order. These stock items remain in the database after the build order has been completed, but are no longer available for use.
- [Tracked stock items](./allocate.md#tracked-stock) are consumed by specific build outputs
- [Untracked stock items](./allocate.md#untracked-stock) are consumed by the build order
### Build Outputs
The *Build Outputs* tab shows the [build outputs](./output.md) (created stock items) associated with this build.
As shown below, there are separate panels for *incomplete* and *completed* build outputs.
{% with id="build_outputs", url="build/build_outputs.png", description="Outputs tab" %}
{% with id="build_outputs", url="build/build_outputs.png", description="Outputs tab" %}
{% include "img.html" %}
{% include "img.html" %}
@ -146,11 +139,48 @@ As shown below, there are separate panels for *incomplete* and *completed* build
- Outputs which are "in progress" can be completed or cancelled
- Outputs which are "in progress" can be completed or cancelled
- Completed outputs (which are simply *stock items*) can be viewed in the stock table at the bottom of the screen
- Completed outputs (which are simply *stock items*) can be viewed in the stock table at the bottom of the screen
### Completed Outputs
This panel displays all the completed build outputs (stock items) which have been created by this build order:
### Allocated Stock
The *Allocated Stock* tab displays all stock items which have been *allocated* to this build order. These stock items are reserved for this build, and will be consumed when the build is completed:
{% with id="allocated_stock_table", url="build/allocated_stock_table.png", description="Allocated Stock Table" %}
{% include "img.html" %}
{% endwith %}
### Consumed Stock
The *Consumed Stock* tab displays all stock items which have been *consumed* by this build order. These stock items remain in the database after the build order has been completed, but are no longer available for use.
- [Tracked stock items](./allocate.md#tracked-stock) are consumed by specific build outputs
- [Untracked stock items](./allocate.md#untracked-stock) are consumed by the build order
### Child Builds
### Child Builds
If there exist any build orders which are *children* of the selected build order, they are displayed in the *Child Builds* tab:
If there exist any build orders which are *children* of the selected build order, they are displayed in the *Child Builds* tab:
{% with id="build_childs", url="build/build_childs.png", description="Child builds tab" %}
{% with id="build_childs", url="build/build_childs.png", description="Child builds panel" %}
{% include "img.html" %}
{% endwith %}
### Test Results
For *trackable* parts, test results can be recorded against each build output. These results are displayed in the *Test Results* panel:
{% with id="build_test_results", url="build/build_panel_test_results.png", description="Test Results panel" %}
{% include "img.html" %}
{% endwith %}
This table provides a summary of the test results for each build output, and allows test results to be quickly added for each build output.
### Test Statistics
For *trackable* parts, this panel displays a summary of the test results for all build outputs:
{% with id="build_test_stats", url="build/build_panel_test_statistics.png", description="Test Statistics panel" %}
{% include "img.html" %}
{% include "img.html" %}
{% endwith %}
{% endwith %}
@ -191,6 +221,10 @@ To create a build order for your part, you have two options:
Fill-out the form as required, then click the "Submit" button to create the build.
Fill-out the form as required, then click the "Submit" button to create the build.
### Create Child Builds
When creating a new build order, you have the option to automatically generate build orders for any subassembly parts. This can be useful to create a complete tree of build orders for a complex assembly. *However*, it must be noted that any build orders created for subassemblies will use the default BOM quantity for that part. Any child build orders created in this manner must be manually reviewed, to ensure that the correct quantity is being built as per your production requirements.
## Complete Build Order
## Complete Build Order
To complete a build, click on <spanclass='fas fa-tools'></span> icon on the build detail page, the `Complete Build` form will be displayed.
To complete a build, click on <spanclass='fas fa-tools'></span> icon on the build detail page, the `Complete Build` form will be displayed.
@ -234,3 +268,17 @@ Build orders may (optionally) have a target complete date specified. If this dat
- Builds can be filtered by overdue status in the build list
- Builds can be filtered by overdue status in the build list
- Overdue builds will be displayed on the home page
- Overdue builds will be displayed on the home page
## Build Order Settings
The following [global settings](../settings/global.md) are available for adjusting the behavior of build orders:
Several models within InvenTree support the use of custom states. The custom states are display only - the business logic is not affected by the state.
States can be added in the Admin Center under the "Custom States" section. Each state has a name, label and a color that are used to display the state in the user interface. Changes to these settings will only be reflected in the user interface after a full reload of the interface.
States need to be assigned to a model, state (for example status on a StockItem) and a logical key - that will be used for business logic. These 3 values combined need to be unique throughout the system.
Custom states can be used in the following models:
docker compose --project-directory . -f contrib/container/dev-docker-compose.yml up -d
```
```
### Bare Metal
### Bare Metal
@ -54,13 +54,23 @@ invoke setup-dev
InvenTree roughly follow the [GitLab flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html) branching style, to allow simple management of multiple tagged releases, short-lived branches, and development on the main branch.
InvenTree roughly follow the [GitLab flow](https://docs.gitlab.com/ee/topics/gitlab_flow.html) branching style, to allow simple management of multiple tagged releases, short-lived branches, and development on the main branch.
There are nominally 5 active branches:
- `master` - The main development branch
- `stable` - The latest stable release
- `l10n` - Translation branch: Source to Crowdin
- `l10_crowdin` - Translation branch: Source from Crowdin
- `y.y.x` - Release branch for the currently supported version (e.g. `0.5.x`)
All other branches are removed periodically by maintainers or core team members. This includes old release branches.
Do not use them as base for feature development or forks as patches from them might not be accepted without rebasing.
### Version Numbering
### Version Numbering
InvenTree version numbering follows the [semantic versioning](https://semver.org/) specification.
InvenTree version numbering follows the [semantic versioning](https://semver.org/) specification.
### Master Branch
### Main Development Branch
The HEAD of the "main" or "master" branch of InvenTree represents the current "latest" state of code development.
The HEAD of the "master" branch of InvenTree represents the current "latest" state of code development.
- All feature branches are merged into master
- All feature branches are merged into master
- All bug fixes are merged into master
- All bug fixes are merged into master
@ -73,7 +83,6 @@ Feature branches should be branched *from* the *master* branch.
- One major feature per branch / pull request
- One major feature per branch / pull request
- Feature pull requests are merged back *into* the master branch
- Feature pull requests are merged back *into* the master branch
- Features *may* also be merged into a release candidate branch
### Stable Branch
### Stable Branch
@ -82,21 +91,28 @@ The HEAD of the "stable" branch represents the latest stable release code.
- Versioned releases are merged into the "stable" branch
- Versioned releases are merged into the "stable" branch
- Bug fix branches are made *from* the "stable" branch
- Bug fix branches are made *from* the "stable" branch
#### Release Candidate Branches
- Release candidate branches are made from master, and merged into stable.
### Bugfix Branches
- RC branches are targeted at a major/minor version e.g. "0.5"
- When a release candidate branch is merged into *stable*, the release is tagged
#### Bugfix Branches
- If a bug is discovered in a tagged release version of InvenTree, a "bugfix" or "hotfix" branch should be made *from* that tagged release
- If a bug is discovered in a tagged release version of InvenTree, a "bugfix" or "hotfix" branch should be made *from* that tagged release
- When approved, the branch is merged back *into* stable, with an incremented PATCH number (e.g. 0.4.1 -> 0.4.2)
- When approved, the branch is merged back *into* stable, with an incremented PATCH number (e.g. 0.4.1 -> 0.4.2)
- The bugfix *must* also be cherry picked into the *master* branch.
- The bugfix *must* also be cherry picked into the *master* branch.
- A bugfix *might* also be backported from *master* to the *stable* branch automatically if marked with the `backport` label.
### Translation Branches
Crowdin is used for web-based translation management. The handling of files is fully automated, the `l10n` and `l10_crowdin` branches are used to manage the translation process and are not meant to be touched manually by anyone.
The translation process is as follows:
1. Commits to `master` trigger CI by GitHub Actions
2. Translation source files are created and automatically pushed to the `l10n` branch - this is the source branch for Crowdin
3. Crowdin picks up on the new source files and makes them available for translation
4. Translations made in Crowdin are automatically pushed back to the `l10_crowdin` branch by Crowdin once they are approved
5. The `l10_crowdin` branch is merged back into `master` by a maintainer periodically
## API versioning
## API versioning
The [API version](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/InvenTree/api_version.py) needs to be bumped every time when the API is changed.
The [API version]({{ sourcefile("src/backend/InvenTree/InvenTree/api_version.py") }}) needs to be bumped every time when the API is changed.
## Environment
## Environment
@ -109,7 +125,7 @@ The core software modules are targeting the following versions:
@ -18,12 +18,13 @@ You need to make sure that you have the following tools installed before continu
#### Docker Containers
#### Docker Containers
The InvenTree devcontainer setup will install two docker containers:
The InvenTree devcontainer setup will install the following docker containers:
| Container | Description |
| Container | Description |
| --- | --- |
| --- | --- |
| inventree | InvenTree host server |
| db | InvenTree database (postgresql) |
| db | InvenTree database (postgresql) |
| inventree | InvenTree server |
| redis | Redis server for caching |
#### Setup/Installation
#### Setup/Installation
@ -66,7 +67,7 @@ If you need to process your queue with background workers, run the `worker` task
You can either only run InvenTree or use the integrated debugger for debugging. Goto the `Run and debug` side panel make sure `InvenTree Server` is selected. Click on the play button on the left.
You can either only run InvenTree or use the integrated debugger for debugging. Goto the `Run and debug` side panel make sure `InvenTree Server` is selected. Click on the play button on the left.
!!! tip "Debug with 3rd party"
!!! tip "Debug with 3rd party"
Sometimes you need to debug also some 3rd party packages. Just select `InvenTree Servre - 3rd party`
Sometimes you need to debug also some 3rd party packages. Just select `InvenTree Server - 3rd party`
You can now set breakpoints and vscode will automatically pause execution if that point is hit. You can see all variables available in that context and evaluate some code with the debugger console at the bottom. Use the play or step buttons to continue execution.
You can now set breakpoints and vscode will automatically pause execution if that point is hit. You can see all variables available in that context and evaluate some code with the debugger console at the bottom. Use the play or step buttons to continue execution.
@ -119,3 +120,9 @@ If you are running a devcontainer in Windows, you may experience some performanc
For a significant improvement in performance, the source code should be installed into the **WSL 2** filesystem (not on your "Windows" filesystem). This will greatly improve file access performance, and also make the devcontainer much more responsive to file system changes.
For a significant improvement in performance, the source code should be installed into the **WSL 2** filesystem (not on your "Windows" filesystem). This will greatly improve file access performance, and also make the devcontainer much more responsive to file system changes.
You can also refer to the [Improve disk performance guide](https://code.visualstudio.com/remote/advancedcontainers/improve-performance) for more information.
You can also refer to the [Improve disk performance guide](https://code.visualstudio.com/remote/advancedcontainers/improve-performance) for more information.
### Redis Caching
The devcontainer setup provides a [redis](https://redis.io/) container which can be used for managing global cache. By default this is disabled, but it can be easily enabled for testing or developing with the [redis cache](../start/config.md#caching) enabled.
To enable the cache, locate the InvenTree configuration file (`./dev/config.yaml`) and set the `cache.enabled` setting to `True`.
InvenTree has a builtin machine registry. There are different machine types available where each type can have different drivers. Drivers and even custom machine types can be provided by plugins.
InvenTree has a builtin machine registry. There are different machine types available where each type can have different drivers. Drivers and even custom machine types can be provided by plugins.
!!! info "Requires Redis"
If the machines features is used in production setup using workers, a shared [redis cache](../../start/docker.md#redis-cache) is required to function properly.
### Registry
### Registry
The machine registry is the main component which gets initialized on server start and manages all configured machines.
The machine registry is the main component which gets initialized on server start and manages all configured machines.
@ -21,6 +24,13 @@ The machine registry initialization process can be divided into three stages:
2. The driver.init_driver function is called for each used driver
2. The driver.init_driver function is called for each used driver
3. The machine.initialize function is called for each machine, which calls the driver.init_machine function for each machine, then the machine.initialized state is set to true
3. The machine.initialize function is called for each machine, which calls the driver.init_machine function for each machine, then the machine.initialized state is set to true
#### Production setup (with a worker)
If a worker is connected, there exist multiple instances of the machine registry (one in each worker thread and one in the main thread) due to the nature of how python handles state in different processes. Therefore the machine instances and drivers are instantiated multiple times (The `__init__` method is called multiple times). But the init functions and update hooks (e.g. `init_machine`) are only called once from the main process.
The registry, driver and machine state (e.g. machine status codes, errors, ...) is stored in the cache. Therefore a shared redis cache is needed. (The local in-memory cache which is used by default is not capable to cache across multiple processes)
### Machine types
### Machine types
Each machine type can provide a different type of connection functionality between inventree and a physical machine. These machine types are already built into InvenTree.
Each machine type can provide a different type of connection functionality between inventree and a physical machine. These machine types are already built into InvenTree.
@ -37,6 +47,8 @@ If you want to create your own machine type, please also take a look at the alre
```py
```py
from django.utils.translation import gettext_lazy as _
from django.utils.translation import gettext_lazy as _
from generic.states import ColorEnum
from plugin.machine import BaseDriver, BaseMachineType, MachineStatus
from plugin.machine import BaseDriver, BaseMachineType, MachineStatus
class ABCBaseDriver(BaseDriver):
class ABCBaseDriver(BaseDriver):
@ -62,9 +74,9 @@ class ABCMachine(BaseMachineType):
@ -9,14 +9,14 @@ The InvenTree server code supports an extensible plugin architecture, allowing c
Plugins can be added from multiple sources:
Plugins can be added from multiple sources:
- Plugins can be installed in InvenTrees venv via PIP (python package manager)
- Plugins can be installed in InvenTrees venv via PIP (python package manager)
- Custom plugins should be placed in the directory `./src/backend/InvenTree/plugins`.
- Custom plugins should be placed in the directory `./data/plugins`.
- InvenTree built-in plugins are located in the directory `./src/backend/InvenTree/plugin/builtin`.
- InvenTree built-in plugins are located in the directory `./src/backend/InvenTree/plugin/builtin`.
For further information, read more about [installing plugins](./plugins/install.md).
For further information, read more about [installing plugins](./plugins/install.md).
### Plugin Base Class
### Plugin Base Class
Custom plugins must inherit from the [InvenTreePlugin class](https://github.com/inventree/InvenTree/blob/2d1776a151721d65d0ae007049d358085b2fcfd5/InvenTree/plugin/plugin.py#L204). Any plugins installed via the methods outlined above will be "discovered" when the InvenTree server launches.
Custom plugins must inherit from the [InvenTreePlugin class]({{ sourcefile("src/backend/InvenTree/plugin/plugin.py") }}). Any plugins installed via the methods outlined above will be "discovered" when the InvenTree server launches.
!!! warning "Namechange"
!!! warning "Namechange"
The name of the base class was changed with `0.7.0` from `IntegrationPluginBase` to `InvenTreePlugin`. While the old name is still available till `0.8.0` we strongly suggest upgrading your plugins. Deprecation warnings are raised if the old name is used.
The name of the base class was changed with `0.7.0` from `IntegrationPluginBase` to `InvenTreePlugin`. While the old name is still available till `0.8.0` we strongly suggest upgrading your plugins. Deprecation warnings are raised if the old name is used.
@ -28,7 +28,7 @@ Please read all release notes and watch out for warnings - we generally provide
#### Plugins
#### Plugins
General classes and mechanisms are provided under the `plugin` [namespaces](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/__init__.py). These include:
General classes and mechanisms are provided under the `plugin` [namespaces]({{ sourcefile("src/backend/InvenTree/plugin/__init__.py") }}). These include:
```python
```python
# Management objects
# Management objects
@ -44,7 +44,7 @@ MixinNotImplementedError # Is raised if a mixin was not implemented (core mec
#### Mixins
#### Mixins
Mixins are split up internally to keep the source tree clean and enable better testing separation. All public APIs that should be used are exposed under `plugin.mixins`. These include all built-in mixins and notification methods. An up-to-date reference can be found in the source code (current master can be [found here](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/mixins/__init__.py)).
Mixins are split up internally to keep the source tree clean and enable better testing separation. All public APIs that should be used are exposed under `plugin.mixins`. These include all built-in mixins and notification methods. An up-to-date reference can be found in the source code [can be found here]({{ sourcefile("src/backend/InvenTree/plugin/mixins/__init__.py") }}).
#### Models and other internal InvenTree APIs
#### Models and other internal InvenTree APIs
@ -72,7 +72,7 @@ MIN_VERSION = None # Lowest InvenTree version number that is supported by the p
MAX_VERSION = None # Highest InvenTree version number that is supported by the plugin
MAX_VERSION = None # Highest InvenTree version number that is supported by the plugin
```
```
Refer to the [sample plugins](https://github.com/inventree/InvenTree/tree/master/src/backend/InvenTree/plugin/samples) for further examples.
Refer to the [sample plugins]({{ sourcedir("src/backend/InvenTree/plugin/samples") }}) for further examples.
InvenTree supports decoding of arbitrary barcode data via a **Barcode Plugin** interface. Barcode data POSTed to the `/api/barcode/` endpoint will be supplied to all loaded barcode plugins, and the first plugin to successfully interpret the barcode data will return a response to the client.
InvenTree supports decoding of arbitrary barcode data and generation of internal barcode formats via a **Barcode Plugin** interface. Barcode data POSTed to the `/api/barcode/` endpoint will be supplied to all loaded barcode plugins, and the first plugin to successfully interpret the barcode data will return a response to the client.
InvenTree can generate native QR codes to represent database objects (e.g. a single StockItem). This barcode can then be used to perform quick lookup of a stock item or location in the database. A client application (for example the InvenTree mobile app) scans a barcode, and sends the barcode data to the InvenTree server. The server then uses the **InvenTreeBarcodePlugin** (found at `/src/backend/InvenTree/plugins/barcode/inventree.py`) to decode the supplied barcode data.
InvenTree can generate native QR codes to represent database objects (e.g. a single StockItem). This barcode can then be used to perform quick lookup of a stock item or location in the database. A client application (for example the InvenTree mobile app) scans a barcode, and sends the barcode data to the InvenTree server. The server then uses the **InvenTreeBarcodePlugin** (found at `src/backend/InvenTree/plugin/builtin/barcodes/inventree_barcode.py`) to decode the supplied barcode data.
Any third-party barcodes can be decoded by writing a matching plugin to decode the barcode data. These plugins could then perform a server-side action or render a JSON response back to the client for further action.
Any third-party barcodes can be decoded by writing a matching plugin to decode the barcode data. These plugins could then perform a server-side action or render a JSON response back to the client for further action.
@ -24,15 +24,27 @@ POST {
}
}
```
```
### Example
### Builtin Plugin
Please find below a very simple example that is executed each time a barcode is scanned.
The InvenTree server includes a builtin barcode plugin which can generate and decode the QR codes. This plugin is enabled by default.
To try it just copy the file to src/InvenTree/plugins and restart the server. Open the scan barcode window and start to scan codes or type in text manually. Each time the timeout is hit the plugin will execute and printout the result. The timeout can be changed in `Settings->Barcode Support->Barcode Input Delay`.
To try it just copy the file to src/InvenTree/plugins and restart the server. Open the scan barcode window and start to scan codes or type in text manually. Each time the timeout is hit the plugin will execute and printout the result. The timeout can be changed in `Settings->Barcode Support->Barcode Input Delay`.
### Custom Internal Format
To implement a custom internal barcode format, the `generate(...)` method from the Barcode Mixin needs to be overridden. Then the plugin can be selected at `System Settings > Barcodes > Barcode Generation Plugin`.
```python
from InvenTree.models import InvenTreeBarcodeMixin
from plugin import InvenTreePlugin
from plugin.mixins import BarcodeMixin
class InvenTreeBarcodePlugin(BarcodeMixin, InvenTreePlugin):
NAME = "MyInternalBarcode"
TITLE = "My Internal Barcodes"
DESCRIPTION = "support for custom internal barcodes"
A simple example plugin which responds to events on the InvenTree server.
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
This example simply prints out the event information.
### Sample Plugin - Specific Events
A more complex plugin could respond to specific events however it wanted.
"""
NAME = "EventPlugin"
SLUG = "event"
TITLE = "Triggered Events"
def process_event(self, event, *args, **kwargs):
print(f"Processing triggered event: '{event}'")
```
### Example (specific events)
If you want to process just some specific events, you can also implement the `wants_process_event` function to decide if you want to process this event or not. This function will be executed synchronously, so be aware that it should contain simple logic.
If you want to process just some specific events, you can also implement the `wants_process_event` function to decide if you want to process this event or not. This function will be executed synchronously, so be aware that it should contain simple logic.
Overall this function can reduce the workload on the background workers significantly since less events are queued to be processed.
Overall this function can reduce the workload on the background workers significantly since less events are queued to be processed.
The IconPackMixin class provides basic functionality for letting plugins expose custom icon packs that are available in the InvenTree UI. This is especially useful to provide a custom crafted icon pack with icons for different location types, e.g. different sizes and styles of drawers, bags, ESD bags, ... which are not available in the standard tabler icons library.
### Sample Plugin
The following example demonstrates how to use the `IconPackMixin` class to add a custom icon pack:
@ -74,10 +74,10 @@ Admin users can install plugins directly from the web interface, via the "Plugin
#### Local Directory
#### Local Directory
Custom plugins can be placed in the `src/InvenTree/plugins/` directory, where they will be automatically discovered. This can be useful for developing and testing plugins, but can prove more difficult in production (e.g. when using Docker).
Custom plugins can be placed in the `data/plugins/` directory, where they will be automatically discovered. This can be useful for developing and testing plugins, but can prove more difficult in production (e.g. when using Docker).
!!! info "Git Tracking"
!!! info "Git Tracking"
The `src/backend/InvenTree/plugins/` directory is excluded from Git version tracking - any plugin files here will be hidden from Git
The `data/plugins/` directory is excluded from Git version tracking - any plugin files here will be hidden from Git
!!! warning "Not Recommended For Production"
!!! warning "Not Recommended For Production"
Loading plugins via the local *plugins* directory is not recommended for production. If you cannot use PIP installation (above), specify a custom plugin directory (below) or use a [VCS](https://pip.pypa.io/en/stable/topics/vcs-support/) as a plugin install source.
Loading plugins via the local *plugins* directory is not recommended for production. If you cannot use PIP installation (above), specify a custom plugin directory (below) or use a [VCS](https://pip.pypa.io/en/stable/topics/vcs-support/) as a plugin install source.
@ -172,6 +172,14 @@ InvenTree supplies the `InvenTreeLabelPlugin` out of the box, which generates a
The default plugin also features a *DEBUG* mode which generates a raw HTML output, rather than PDF. This can be handy for tracking down any template rendering errors in your labels.
The default plugin also features a *DEBUG* mode which generates a raw HTML output, rather than PDF. This can be handy for tracking down any template rendering errors in your labels.
The *label* data are supplied to the plugin in both `PDF` and `PNG` formats. This provides compatibility with a great range of label printers "out of the box". Conversion to other formats, if required, is left as an exercise for the plugin developer.
The *label* data are supplied to the plugin in both `PDF` and `PNG` formats. This provides compatibility with a great range of label printers "out of the box". Conversion to other formats, if required, is left as an exercise for the plugin developer.
@ -28,4 +28,16 @@ If a locate plugin is installed and activated, the [InvenTree mobile app](../../
### Implementation
### Implementation
Refer to the [InvenTree source code](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/samples/locate/locate_sample.py) for a simple implementation example.
Refer to the [InvenTree source code]({{ sourcefile("src/backend/InvenTree/plugin/samples/locate/locate_sample.py") }}) for a simple implementation example.
### Sample Plugin
A simple example is provided in the InvenTree code base:
Refer to the `CustomPanelSample` example class in the `./plugin/samples/integration/` directory, for a fully worked example of how custom UI panels can be implemented.
Refer to the `CustomPanelSample` example class in the `./plugin/samples/integration/` directory, for a fully worked example of how custom UI panels can be implemented.
@ -14,48 +14,14 @@ A plugin which implements the ReportMixin mixin can define the `add_report_conte
Additionally the `add_label_context` method, allowing custom context data to be added to a label template at time of printing.
Additionally the `add_label_context` method, allowing custom context data to be added to a label template at time of printing.
### Example
### Sample Plugin
A sample plugin which provides additional context data to the report templates can be found [in the InvenTree source code](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/samples/integration/report_plugin_sample.py):
A sample plugin which provides additional context data to the report templates is available:
class ScheduledTaskPlugin(ScheduleMixin, SettingsMixin, InvenTreePlugin):
options:
"""
show_bases: False
Sample plugin which runs a scheduled task, and provides user configuration.
show_root_heading: False
"""
show_root_toc_entry: False
show_source: True
NAME = "Scheduled Tasks"
members: []
SLUG = 'schedule'
SCHEDULED_TASKS = {
'global': {
'func': 'some_module.function',
'schedule': 'H', # Run every hour
},
'member': {
'func': 'foo',
'schedule': 'I', # Minutes
'minutes': 15,
},
}
SETTINGS = {
'SECRET': {
'name': 'A secret',
'description': 'User configurable value',
},
}
def foo(self):
"""
This function runs every 15 minutes
"""
secret_value = self.get_setting('SECRET')
print(f"foo - SECRET = {secret_value})
```
!!! info "More Info"
For more information on any of the methods described below, refer to the InvenTree source code. [A working example is available as a starting point](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/samples/integration/scheduled_task.py).
@ -65,7 +65,7 @@ Additionally, add the following imports after the extended line.
#### Blocks
#### Blocks
The page_base file is split into multiple sections called blocks. This allows you to implement sections of the webpage while getting many items like navbars, sidebars, and general layout provided for you.
The page_base file is split into multiple sections called blocks. This allows you to implement sections of the webpage while getting many items like navbars, sidebars, and general layout provided for you.
The current default page base can be found [here](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/templates/page_base.html). Look through this file to determine overridable blocks. The [stock app](https://github.com/inventree/InvenTree/tree/master/src/backend/InvenTree/stock) offers a great example of implementing these blocks.
The current default page base can be found [here]({{ sourcefile("src/backend/InvenTree/templates/page_base.html") }}). Look through this file to determine overridable blocks. The [stock app]({{ sourcedir("src/backend/InvenTree/stock") }}) offers a great example of implementing these blocks.
!!! warning "Sidebar Block"
!!! warning "Sidebar Block"
You may notice that implementing the `sidebar` block doesn't initially work. Be sure to enable the sidebar using JavaScript. This can be achieved by appending the following code, replacing `label` with a label of your choosing, to the end of your template file.
You may notice that implementing the `sidebar` block doesn't initially work. Be sure to enable the sidebar using JavaScript. This can be achieved by appending the following code, replacing `label` with a label of your choosing, to the end of your template file.
@ -9,34 +9,40 @@ The `ValidationMixin` class enables plugins to perform custom validation of obje
Any of the methods described below can be implemented in a custom plugin to provide functionality as required.
Any of the methods described below can be implemented in a custom plugin to provide functionality as required.
!!! info "More Info"
!!! info "More Info"
For more information on any of the methods described below, refer to the InvenTree source code. [A working example is available as a starting point](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/plugin/samples/integration/validation_sample.py).
For more information on any of the methods described below, refer to the InvenTree source code. [A working example is available as a starting point]({{ sourcefile("src/backend/InvenTree/plugin/samples/integration/validation_sample.py") }}).
!!! info "Multi Plugin Support"
!!! info "Multi Plugin Support"
It is possible to have multiple plugins loaded simultaneously which support validation methods. For example when validating a field, if one plugin returns a null value (`None`) then the *next* plugin (if available) will be queried.
It is possible to have multiple plugins loaded simultaneously which support validation methods. For example when validating a field, if one plugin returns a null value (`None`) then the *next* plugin (if available) will be queried.
## Model Deletion
Any model which inherits the `PluginValidationMixin` class is exposed to the plugin system for custom deletion validation. Before the model is deleted from the database, it is first passed to the plugin ecosystem to check if it really should be deleted.
A custom plugin may implement the `validate_model_deletion` method to perform custom validation on the model instance before it is deleted.
Any model which inherits the `PluginValidationMixin` mixin class is exposed to the plugin system for custom validation. Before the model is saved to the database (either when created, or updated), it is first passed to the plugin ecosystem for validation.
Any model which inherits the `PluginValidationMixin` mixin class is exposed to the plugin system for custom validation. Before the model is saved to the database (either when created, or updated), it is first passed to the plugin ecosystem for validation.
Any plugin which inherits the `ValidationMixin` can implement the `validate_model_instance` method, and run a custom validation routine.
Any plugin which inherits the `ValidationMixin` can implement the `validate_model_instance` method, and run a custom validation routine.
The `validate_model_instance` method is passed the following arguments:
deltas: A dict of field deltas (if the instance is being updated)
"""
...
```
### Error Messages
### Error Messages
@ -52,7 +58,7 @@ To indicate a *field* validation error (i.e. the validation error applies only t
Note that an error can be which corresponds to multiple model instance fields.
Note that an error can be which corresponds to multiple model instance fields.
### Example
### Example Plugin
Presented below is a simple working example for a plugin which implements the `validate_model_instance` method:
Presented below is a simple working example for a plugin which implements the `validate_model_instance` method:
@ -102,21 +108,70 @@ By default, part names are not subject to any particular naming conventions or r
If the custom method determines that the part name is *objectionable*, it should throw a `ValidationError` which will be handled upstream by parent calling methods.
If the custom method determines that the part name is *objectionable*, it should throw a `ValidationError` which will be handled upstream by parent calling methods.
Validation of the Part IPN (Internal Part Number) field is exposed to custom plugins via the `validate_part_IPN` method. Any plugins which extend the `ValidationMixin` class can implement this method, and raise a `ValidationError` if the IPN value does not match a required convention.
Validation of the Part IPN (Internal Part Number) field is exposed to custom plugins via the `validate_part_ipn` method. Any plugins which extend the `ValidationMixin` class can implement this method, and raise a `ValidationError` if the IPN value does not match a required convention.
[Part parameters](../../part/parameter.md) can also have custom validation rules applied, by implementing the `validate_part_parameter` method. A plugin which implements this method should raise a `ValidationError` with an appropriate message if the part parameter value does not match a required convention.
[Part parameters](../../part/parameter.md) can also have custom validation rules applied, by implementing the `validate_part_parameter` method. A plugin which implements this method should raise a `ValidationError` with an appropriate message if the part parameter value does not match a required convention.
@ -128,17 +183,30 @@ The default InvenTree [serial numbering system](../../stock/tracking.md#serial-n
Custom serial number validation can be implemented using the `validate_serial_number` method. A *proposed* serial number is passed to this method, which then has the opportunity to raise a `ValidationError` to indicate that the serial number is not valid.
Custom serial number validation can be implemented using the `validate_serial_number` method. A *proposed* serial number is passed to this method, which then has the opportunity to raise a `ValidationError` to indicate that the serial number is not valid.
If the `stock_item` argument is provided, then this stock item has already been assigned with the provided serial number. This stock item should be excluded from any subsequent checks for *uniqueness*. The `stock_item` parameter is optional, and may be `None` if the serial number is being validated in a context where no stock item is available.
##### Example
##### Example
A plugin which requires all serial numbers to be valid hexadecimal values may implement this method as follows:
A plugin which requires all serial numbers to be valid hexadecimal values may implement this method as follows:
part: The Part instance for which this serial number is being validated
part: The Part instance for which this serial number is being validated
stock_item: The StockItem instance for which this serial number is being validated
"""
"""
try:
try:
@ -154,6 +222,15 @@ While InvenTree supports arbitrary text values in the serial number fields, behi
A custom plugin can implement the `convert_serial_to_int` method to determine how a particular serial number is converted to an integer representation.
A custom plugin can implement the `convert_serial_to_int` method to determine how a particular serial number is converted to an integer representation.
If this method is not implemented, or the serial number cannot be converted to an integer, then the sorting algorithm falls back to the text (string) value
If this method is not implemented, or the serial number cannot be converted to an integer, then the sorting algorithm falls back to the text (string) value
@ -163,6 +240,15 @@ A core component of the InvenTree serial number system is the ability to *increm
For custom serial number schemes, it is important to provide a method to generate the *next* serial number given a current value. The `increment_serial_number` method can be implemented by a plugin to achieve this.
For custom serial number schemes, it is important to provide a method to generate the *next* serial number given a current value. The `increment_serial_number` method can be implemented by a plugin to achieve this.
@ -14,7 +14,7 @@ Navigate to the "Settings" page and click on the "Display" tab, you should see t
{% include 'img.html' %}
{% include 'img.html' %}
{% endwith %}
{% endwith %}
The drop-down list let's you select any other color theme found in your static folder (see next section to find out how to [add color themes](#add-color-themes)). Once selected, click on the "Apply Theme" button for the new color theme to be activated.
The drop-down list let's you select any other color theme found in your static folder (see next section to find out how to [add color themes](#add-color-theme)). Once selected, click on the "Apply Theme" button for the new color theme to be activated.
!!! info "Per-user Setting"
!!! info "Per-user Setting"
Color themes are "user specific" which means that changing the color theme in your own settings won't affect other users.
Color themes are "user specific" which means that changing the color theme in your own settings won't affect other users.
@ -45,9 +45,24 @@ Each Return Order has a specific status code, as follows:
| --- | --- |
| --- | --- |
| Pending | The return order has been created, but not sent to the customer |
| Pending | The return order has been created, but not sent to the customer |
| In Progress | The return order has been issued to the customer |
| In Progress | The return order has been issued to the customer |
| On Hold | The return order has been placed on hold, but is still active |
| Complete | The return order was marked as complete, and is now closed |
| Complete | The return order was marked as complete, and is now closed |
| Cancelled | The return order was cancelled, and is now closed |
| Cancelled | The return order was cancelled, and is now closed |
**Source Code**
Refer to the source code for the Return Order status codes:
::: order.status_codes.ReturnOrderStatus
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
Return Order Status supports [custom states](../concepts/custom_states.md).
## Create a Return Order
## Create a Return Order
From the Return Order index, click on <spanclass='badge inventree add'><spanclass='fas fa-plus-circle'></span> New Return Order</span> which opens the "Create Return Order" form.
From the Return Order index, click on <spanclass='badge inventree add'><spanclass='fas fa-plus-circle'></span> New Return Order</span> which opens the "Create Return Order" form.
@ -98,7 +113,7 @@ While [line items](#line-items) must reference a particular stock item, extra li
## Return Order Reports
## Return Order Reports
Custom [reports](../report/return_order.md) can be generated against each Return Order.
Custom [reports](../report/templates.md) can be generated against each Return Order.
### Calendar view
### Calendar view
@ -108,3 +123,14 @@ This view can be accessed externally as an ICS calendar using a URL like the fol
@ -20,8 +20,26 @@ Each Sales Order has a specific status code, which represents the state of the o
| --- | --- |
| --- | --- |
| Pending | The sales order has been created, but has not been finalized or submitted |
| Pending | The sales order has been created, but has not been finalized or submitted |
| In Progress | The sales order has been issued, and is in progress |
| In Progress | The sales order has been issued, and is in progress |
| Shipped | The sales order has been completed, and is now closed |
| On Hold | The sales order has been placed on hold, but is still active |
| Shipped | The sales order has been shipped, but is not yet complete |
| Complete | The sales order is fully completed, and is now closed |
| Cancelled | The sales order was cancelled, and is now closed |
| Cancelled | The sales order was cancelled, and is now closed |
| Lost | The sales order was lost, and is now closed |
| Returned | The sales order was returned, and is now closed |
**Source Code**
Refer to the source code for the Sales Order status codes:
::: order.status_codes.SalesOrderStatus
options:
show_bases: False
show_root_heading: False
show_root_toc_entry: False
show_source: True
members: []
Sales Order Status supports [custom states](../concepts/custom_states.md).
### Sales Order Currency
### Sales Order Currency
@ -83,7 +101,7 @@ To view all the completed shipment, click on the <span class="badge inventree na
### Complete Order
### Complete Order
Once all items in the sales order have been shipped, click on <spanclass="badge inventree add"><spanclass='fas fa-check-circle'></span> Complete Order</span> to mark the sales order as complete.
Once all items in the sales order have been shipped, click on <spanclass="badge inventree add"><spanclass='fas fa-check-circle'></span> Complete Order</span> to mark the sales order as shipped. Confirm then click on <spanclass="badge inventree confirm">Submit</span> to complete the order.
### Cancel Order
### Cancel Order
@ -167,3 +185,15 @@ All these fields can be edited by the user:
{% with id="edit-shipment", url="order/edit_shipment.png", description="Edit shipment" %}
{% with id="edit-shipment", url="order/edit_shipment.png", description="Edit shipment" %}
{% include "img.html" %}
{% include "img.html" %}
{% endwith %}
{% endwith %}
## Sales Order Settings
The following [global settings](../settings/global.md) are available for sales orders:
@ -47,6 +47,10 @@ If a part is designated as an *Assembly* it can be created (or built) from other
If a part is designated as a *Component* it can be used as a sub-component of an *Assembly*. [Read further information about BOM management here](../build/bom.md)
If a part is designated as a *Component* it can be used as a sub-component of an *Assembly*. [Read further information about BOM management here](../build/bom.md)
### Testable
Testable parts can have test templates defined against the part, allowing test results to be recorded against any stock items for that part. For more information on testing, refer to the [testing documentation](./test.md).
### Trackable
### Trackable
Trackable parts can be assigned batch numbers or serial numbers which uniquely identify a particular stock item. Trackable parts also provide other features (and restrictions) in the InvenTree ecosystem.
Trackable parts can be assigned batch numbers or serial numbers which uniquely identify a particular stock item. Trackable parts also provide other features (and restrictions) in the InvenTree ecosystem.
@ -73,7 +77,15 @@ A [Purchase Order](../order/purchase_order.md) allows parts to be ordered from a
If a part is designated as *Salable* it can be sold to external customers. Setting this flag allows parts to be added to sales orders.
If a part is designated as *Salable* it can be sold to external customers. Setting this flag allows parts to be added to sales orders.
### Active
## Locked Parts
Parts can be locked to prevent them from being modified. This is useful for parts which are in production and should not be changed. The following restrictions apply to parts which are locked:
- Locked parts cannot be deleted
- BOM items cannot be created, edited, or deleted when they are part of a locked assembly
- Part parameters linked to a locked part cannot be created, edited or deleted
## Active Parts
By default, all parts are *Active*. Marking a part as inactive means it is not available for many actions, but the part remains in the database. If a part becomes obsolete, it is recommended that it is marked as inactive, rather than deleting it from the database.
By default, all parts are *Active*. Marking a part as inactive means it is not available for many actions, but the part remains in the database. If a part becomes obsolete, it is recommended that it is marked as inactive, rather than deleting it from the database.
When creating a complex part (such as an assembly comprised of other parts), it is often necessary to track changes to the part over time. For example, throughout the lifetime of an assembly, it may be necessary to adjust the bill of materials, or update the design of the part.
Rather than overwrite the existing part data, InvenTree allows you to create a new *revision* of the part. This allows you to track changes to the part over time, and maintain a history of the part design.
Crucially, creating a new *revision* ensures that any related data entries which refer to the original part (such as stock items, build orders, purchase orders, etc) are not affected by the change.
### Revisions are Parts
A *revision* of a part is itself a part. This means that each revision of a part has its own part number, stock items, parameters, bill of materials, etc. The only thing that differentiates a *revision* from any other part is that the *revision* is linked to the original part.
### Revision Fields
Each part has two fields which are used to track the revision of the part:
* **Revision**: The revision number of the part. This is a user-defined field, and can be any string value.
* **Revision Of**: A reference to the part of which *this* part is a revision. This field is used to keep track of the available revisions for any particular part.
### Revision Restrictions
When creating a new revision of a part, there are some restrictions which must be adhered to:
* **Circular References**: A part cannot be a revision of itself. This would create a circular reference which is not allowed.
* **Unique Revisions**: A part cannot have two revisions with the same revision number. Each revision (of a given part) must have a unique revision code.
* **Revisions of Revisions**: A single part can have multiple revisions, but a revision cannot have its own revision. This restriction is in place to prevent overly complex part relationships.
* **Template Revisions**: A part which is a [template part](./template.md) cannot have revisions. This is because the template part is used to create variants, and allowing revisions of templates would create disallowed relationship states in the database. However, variant parts are allowed to have revisions.
* **Template References**: A part which is a revision of a variant part must point to the same template as the original part. This is to ensure that the revision is correctly linked to the original part.
## Revision Settings
The following options are available to control the behavior of part revisions.
Note that these options can be changed in the InvenTree settings:
{% with id="part_revision_settings", url="part/part_revision_settings.png", description="Part revision settings" %}
{% include 'img.html' %}
{% endwith %}
* **Enable Revisions**: If this setting is enabled, parts can have revisions. If this setting is disabled, parts cannot have revisions.
* **Assembly Revisions Only**: If this setting is enabled, only assembly parts can have revisions. This is useful if you only want to track revisions of assemblies, and not individual parts.
## Create a Revision
To create a new revision for a given part, navigate to the part detail page, and click on the "Revisions" tab.
Select the "Duplicate Part" action, to create a new copy of the selected part. This will open the "Duplicate Part" form:
{% with id="part_create_revision", url="part/part_create_revision.png", description="Create part revision" %}
{% include 'img.html' %}
{% endwith %}
In this form, make the following updates:
1. Set the *Revision Of* field to the original part (the one that you are duplicating)
2. Set the *Revision* field to a unique revision number for the new part revision
Once these changes (and any other required changes) are made, press *Submit* to create the new part.
Once the form is submitted (without any errors), you will be redirected to the new part revision. Here you can see that it is linked to the original part:
{% with id="part_revision_b", url="part/part_revision_b.png", description="Revision B" %}
{% include 'img.html' %}
{% endwith %}
## Revision Navigation
When multiple revisions exist for a particular part, you can navigate between revisions using the *Select Part Revision* drop-down which renders at the top of the part page:
{% with id="part_revision_select", url="part/part_revision_select.png", description="Select part revision" %}
{% include 'img.html' %}
{% endwith %}
Note that this revision selector is only visible when multiple revisions exist for the part.
The *Scheduling* tab provides an overview of the *predicted* future availabile quantity of a particular part.
The *Scheduling* tab provides an overview of the *predicted* future available quantity of a particular part.
The *Scheduling* tab displays a chart of estimated future part stock levels. It begins at the current date, with the current stock level. It then projects into the "future", taking information from:
The *Scheduling* tab displays a chart of estimated future part stock levels. It begins at the current date, with the current stock level. It then projects into the "future", taking information from:
Parts which are designated as *trackable* (meaning they can be uniquely serialized) can define templates for tests which are to be performed against individual stock items corresponding to the part.
Parts which are designated as [testable](./part.md#testable) can define templates for tests which are to be performed against individual stock items corresponding to the part.
A test template defines the parameters of the test; the individual stock items can then have associated test results which correspond to a test template.
A test template defines the parameters of the test; the individual stock items can then have associated test results which correspond to a test template.
@ -28,7 +28,6 @@ Details provides information about the particular part. Parts details can be dis
{% with id="part_overview", url="part/part_overview.png", description="Part details" %}
{% with id="part_overview", url="part/part_overview.png", description="Part details" %}
{% include 'img.html' %}
{% include 'img.html' %}
{% endwith %}
{% endwith %}
<p></p>
A Part is defined in the system by the following parameters:
A Part is defined in the system by the following parameters:
@ -38,7 +37,7 @@ A Part is defined in the system by the following parameters:
**Description** - Longer form text field describing the Part
**Description** - Longer form text field describing the Part
**Revision** - An optional revision code denoting the particular version for the part. Used when there are multiple revisions of the same master part object.
**Revision** - An optional revision code denoting the particular version for the part. Used when there are multiple revisions of the same master part object. Read [more about part revisions here](./revision.md).
**Keywords** - Optional few words to describe the part and make the part search more efficient.
**Keywords** - Optional few words to describe the part and make the part search more efficient.
@ -62,7 +61,7 @@ Parts can have multiple defined parameters.
If a part is a *Template Part* then the *Variants* tab will be visible.
If a part is a *Template Part* then the *Variants* tab will be visible.
[Read about Part templates](./template.md)
[Read about Part templates and variants](./template.md)
### Stock
### Stock
@ -132,9 +131,9 @@ The *Scheduling* tab provides an overview of the *predicted* future availability
The *Stocktake* tab provide historical stock level information, based on user-provided stocktake data. Refer to the [stocktake documentation](./stocktake.md) for further information.
The *Stocktake* tab provide historical stock level information, based on user-provided stocktake data. Refer to the [stocktake documentation](./stocktake.md) for further information.
### Tests
### Test Templates
If a part is marked as *trackable*, the user can define tests which must be performed on any stock items which are instances of this part. [Read more about testing](./test.md).
If a part is marked as *testable*, the user can define tests which must be performed on any stock items which are instances of this part. [Read more about testing](./test.md).
@ -24,7 +24,7 @@ Refer to the [report documentation](../report/report.md) for further information
!!! warning "LaTeX Support"
!!! warning "LaTeX Support"
LaTeX report templates are no longer supported for a number of technical and ideological reasons
LaTeX report templates are no longer supported for a number of technical and ideological reasons
[#1292](https://github.com/inventree/InvenTree/pull/1292) adds support for build order / work order reports. Refer to the [build report documentation](../report/build.md) for further information.
[#1292](https://github.com/inventree/InvenTree/pull/1292) adds support for build order / work order reports. Refer to the [report documentation](../report/templates.md) for further information.
@ -53,7 +53,7 @@ This release also provides a marked improvement in unit testing and code coverag
[#2372](https://github.com/inventree/InvenTree/pull/2372) provides an overhaul of notifications, allowing users to view their notifications directly in the InvenTree interface.
[#2372](https://github.com/inventree/InvenTree/pull/2372) provides an overhaul of notifications, allowing users to view their notifications directly in the InvenTree interface.
### Why are you hiding my name?
### Why are you hiding my name?
[#2861](https://github.com/inventree/InvenTree/pull/2861) adds several changes to enable admins to remove more of InvenTrees branding. Change logo, hide the about-modal for all but superusers and add custom messages to login and main navbar. Check out [the docs](../start/config.md#customisation-options).
[#2861](https://github.com/inventree/InvenTree/pull/2861) adds several changes to enable admins to remove more of InvenTrees branding. Change logo, hide the about-modal for all but superusers and add custom messages to login and main navbar. Check out [the docs](../start/config.md#customization-options)
The bill of materials is an essential part of the documentation that needs to be sent to the factory. A simple csv export is OK to be important into SMT machines. But for human readable documentation it might not be sufficient. Additional information is needed. The Inventree report system allows to generate BOM well formatted BOM reports.
### Context variables
| Variable | Description |
| --- | --- |
| bom_items | Query set that contains all BOM items |
| bom_items...sub_part | One component of the BOM |
| bom_items...quantity | Number of parts |
| bom_items...reference | Reference designators of the part |
| bom_items...substitutes | Query set that contains substitutes of the part if any exist in the BOM |
### Examples
#### BOM
The following picture shows a simple example for a PCB with just three components from two different parts.
{% with id="report-options", url="report/bom_example.png", description="BOM example" %} {% include 'img.html' %} {% endwith %}
This example has been created using the following html template:
```html
{% raw %}
{% extends "report/inventree_report_base.html" %}
{% load i18n %}
{% load report %}
{% load inventree_extras %}
{% block page_margin %}
margin-left: 2cm;
margin-right: 1cm;
margin-top: 4cm;
{% endblock %}
{% block bottom_left %}
content: "v{{report_revision}} - {% format_date date %}";
Here we have a loop that runs through all allocated parts for the build. For each part
we list the original IPN from the BOM and the IPN of the allocated part. These can differ
in case you have substitutes or template/variants in the BOM. In case the parts differ
we use a different format for the table cell e.g. print bold font or red color.
For the picker we list the full path names of the stock locations and the quantity
that is needed for the build. This will result in the following printout:
{% with id="picklist", url="report/picklist.png", description="Picklist Example" %} {% include "img.html" %} {% endwith %}
For those of you who would like to replace the "/" by something else because it is hard
to read in some fonts use the following trick:
{% raw %}
```html
<td> {% for loc in line.stock_item.location.path %}{{ loc.name }}{% if not forloop.last %}-{% endif %}{% endfor %} </td>
```
{% endraw %}
Here we use location.path which is a query set that contains the location path up to the
topmost parent. We use a loop to cycle through that and print the .name of the entry followed
by a "-". The foorloop.last is a Django trick that allows us to not print the "-" after
the last entry. The result looks like here:
{% with id="picklist_with_path", url="report/picklist_with_path.png", description="Picklist Example" %} {% include "img.html" %} {% endwith %}
Finally added a `{% raw %}|floatformat:0{% endraw %}` to the quantity that removes the trailing zeros.
### Default Report Template
A default *BOM Report* template is provided out of the box, which is useful for generating simple test reports. Furthermore, it may be used as a starting point for developing custom BOM reports:
View the [source code](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/report/templates/report/inventree_bill_of_materials_report.html) for the default test report template.
Custom build order reports may be generated against any given [Build Order](../build/build.md). For example, build order reports can be used to generate work orders.
### Build Filters
A build order report template may define a set of filters against which [Build Order](../build/build.md) items are sorted.
### Context Variables
In addition to the default report context variables, the following context variables are made available to the build order report template for rendering:
| Variable | Description |
| --- | --- |
| build | The build object the report is being generated against |
| part | The [Part](./context_variables.md#part) object that the build references |
| line_items | A shortcut for [build.line_items](#build) |
| bom_items | A shortcut for [build.bom_items](#build) |
| build_outputs | A shortcut for [build.build_outputs](#build) |
| reference | The build order reference string |
| quantity | Build order quantity (number of assemblies being built) |
#### build
The following variables are accessed by build.variable
| Variable | Description |
| --- | --- |
| active | Boolean that tells if the build is active |
| batch | Batch code transferred to build parts (optional) |
| line_items | A query set with all the build line items associated with the build |
| bom_items | A query set with all BOM items for the part being assembled |
| build_outputs | A queryset containing all build output ([Stock Item](../stock/stock.md)) objects associated with this build |
| can_complete | Boolean that tells if the build can be completed. Means: All material allocated and all parts have been build. |
| are_untracked_parts_allocated | Boolean that tells if all bom_items have allocated stock_items. |
| creation_date | Date where the build has been created |
| completion_date | Date the build was completed (or, if incomplete, the expected date of completion) |
| completed_by | The [User](./context_variables.md#user) that completed the build |
| is_overdue | Boolean that tells if the build is overdue |
| is_complete | Boolean that tells if the build is complete |
| issued_by | The [User](./context_variables.md#user) who created the build |
| link | External URL for extra information |
| notes | Text notes |
| parent | Reference to a parent build object if this is a sub build |
| part | The [Part](./context_variables.md#part) to be built (from component BOM items) |
| quantity | Build order quantity (total number of assembly outputs) |
| completed | The number out outputs which have been completed |
| reference | Build order reference (required, must be unique) |
| required_parts | A query set with all parts that are required for the build |
| responsible | Owner responsible for completing the build. This can be a user or a group. Depending on that further context variables differ |
| sales_order | References to a [Sales Order](./context_variables.md#salesorder) object for which this build is required (e.g. the output of this build will be used to fulfil a sales order) |
| status | The status of the build. 20 means 'Production' |
| sub_build_count | Number of sub builds |
| sub_builds | Query set with all sub builds |
| target_date | Date the build will be overdue |
| take_from | [StockLocation](./context_variables.md#stocklocation) to take stock from to make this build (if blank, can take from anywhere) |
| title | The full name of the build |
| description | The description of the build |
| allocated_stock.all | A query set with all allocated stock items for the build |
As usual items in a query sets can be selected by adding a .n to the set e.g. build.required_parts.0
will result in the first part of the list. Each query set has again its own context variables.
#### line_items
The `line_items` variable is a list of all build line items associated with the selected build. The following attributes are available for each individual line_item instance:
| Attribute | Description |
| --- | --- |
| .build | A reference back to the parent build order |
| .bom_item | A reference to the BOMItem which defines this line item |
| .quantity | The required quantity which is to be allocated against this line item |
| .part | A shortcut for .bom_item.sub_part |
| .allocations | A list of BuildItem objects which allocate stock items against this line item |
| .allocated_quantity | The total stock quantity which has been allocated against this line |
| .unallocated_quantity | The remaining quantity to allocate |
| .is_fully_allocated | Boolean value, returns True if the line item has sufficient stock allocated against it |
| .is_overallocated | Boolean value, returns True if the line item has more allocated stock than is required |
#### bom_items
| Attribute | Description |
| --- | --- |
| .reference | The reference designators of the components |
| .quantity | The number of components required to build |
| .overage | The extra amount required to assembly |
| .consumable | Boolean field, True if this is a "consumable" part which is not tracked through builds |
| .sub_part | The part at this position |
| .substitutes.all | A query set with all allowed substitutes for that part |
| .note | Extra text field which can contain additional information |
#### allocated_stock.all
| Attribute | Description |
| --- | --- |
| .bom_item | The bom item where this part belongs to |
| .stock_item | The allocated [StockItem](./context_variables.md#stockitem) |
| .quantity | The number of components needed for the build (components in BOM x parts to build) |
### Example
The following example will create a report with header and BOM. In the BOM table substitutes will be listed.
{% raw %}
```html
{% extends "report/inventree_report_base.html" %}
{% load i18n %}
{% load report %}
{% load barcode %}
{% load inventree_extras %}
{% load markdownify %}
{% block page_margin %}
margin: 2cm;
margin-top: 4cm;
{% endblock %}
{% block style %}
.header-right {
text-align: right;
float: right;
}
.logo {
height: 20mm;
vertical-align: middle;
}
.details {
width: 100%;
border: 1px solid;
border-radius: 3px;
padding: 5px;
min-height: 42mm;
}
.details table {
overflow-wrap: break-word;
word-wrap: break-word;
width: 65%;
table-layout: fixed;
font-size: 75%;
}
.changes table {
overflow-wrap: break-word;
word-wrap: break-word;
width: 100%;
table-layout: fixed;
font-size: 75%;
border: 1px solid;
}
.changes-table th {
font-size: 100%;
border: 1px solid;
}
.changes-table td {
border: 1px solid;
}
.details table td:not(:last-child){
white-space: nowrap;
}
.details table td:last-child{
width: 50%;
padding-left: 1cm;
padding-right: 1cm;
}
.details-table td {
padding-left: 10px;
padding-top: 5px;
padding-bottom: 5px;
border-bottom: 1px solid #555;
}
{% endblock %}
{% block bottom_left %}
content: "v{{report_revision}} - {% format_date date %}";
{% endblock %}
{% block header_content %}
<!-- TODO - Make the company logo asset generic -->
{% with id="report-options", url="build/report-61.png", description="Report Example Builds" %} {% include "img.html" %} {% endwith %}
### Default Report Template
A default *Build Report* template is provided out of the box, which is useful for generating simple test reports. Furthermore, it may be used as a starting point for developing custom BOM reports:
View the [source code](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/report/templates/report/inventree_build_order_base.html) for the default build report template.
Context variables are provided to each template when it is rendered. The available context variables depend on the model type for which the template is being rendered.
!!! info "Specific Report Context"
### Global Context
Specific report types may have additional context variables, see below.
Each report has access to a number of context variables by default. The following context variables are provided to every report template:
In addition to the model-specific context variables, the following global context variables are available to all templates:
| Variable | Description |
| Variable | Description |
| --- | --- |
| --- | --- |
| base_url | The base URL for the InvenTree instance |
| date | Current date, represented as a Python datetime.date object |
| date | Current date, represented as a Python datetime.date object |
| datetime | Current datetime, represented as a Python datetime object |
| datetime | Current datetime, represented as a Python datetime object |
| page_size | The specified page size for this report, e.g. `A4` or `Letter landscape` |
| template | The report template instance which is being rendered against |
| report_template | The report template model instance |
| template_description | Description of the report template |
| report_name | Name of the report template |
| template_name | Name of the report template |
| report_description | Description of the report template |
| template_revision | Revision of the report template |
| report_revision | Revision of the report template |
| request | Django request object |
| user | User who made the request to render the template |
| user | User who made the request to render the template |
#### Label
::: report.models.ReportTemplateBase.base_context
options:
show_source: True
Certain types of labels have different context variables then other labels.
### Report Context
##### Stock Item Label
In addition to the [global context](#global-context), all *report* templates have access to the following context variables:
The following variables are made available to the StockItem label template:
| Variable | Description |
| Variable | Description |
| -------- | ----------- |
| --- | --- |
| item | The [StockItem](./context_variables.md#stockitem) object itself |
| page_size | The page size of the report |
| part | The [Part](./context_variables.md#part) object which is referenced by the [StockItem](./context_variables.md#stockitem) object |
| landscape | Boolean value, True if the report is in landscape mode |
| name | The `name` field of the associated Part object |
| ipn | The `IPN` field of the associated Part object |
Note that custom plugins may also add additional context variables to the report context.
| revision | The `revision` field of the associated Part object |
| quantity | The `quantity` field of the StockItem object |
::: report.models.ReportTemplate.get_context
| serial | The `serial` field of the StockItem object |
options:
| uid | The `uid` field of the StockItem object |
show_source: True
| tests | Dict object of TestResult data associated with the StockItem |
### Label Context
In addition to the [global context](#global-context), all *label* templates have access to the following context variables:
| Variable | Description |
| --- | --- |
| width | The width of the label (in mm) |
| height | The height of the label (in mm) |
Note that custom plugins may also add additional context variables to the label context.
::: report.models.LabelTemplate.get_context
options:
show_source: True
## Template Types
Templates (whether for generating [reports](./report.md) or [labels](./labels.md)) are rendered against a particular "model" type. The following model types are supported, and can have templates renderer against them:
| Model Type | Description |
| --- | --- |
| [build](#build-order) | A [Build Order](../build/build.md) instance |
| [buildline](#build-line) | A [Build Order Line Item](../build/build.md) instance |
| [salesorder](#sales-order) | A [Sales Order](../order/sales_order.md) instance |
| [returnorder](#return-order) | A [Return Order](../order/return_order.md) instance |
| [purchaseorder](#purchase-order) | A [Purchase Order](../order/purchase_order.md) instance |
| [stockitem](#stock-item) | A [StockItem](../stock/stock.md#stock-item) instance |
| [stocklocation](#stock-location) | A [StockLocation](../stock/stock.md#stock-location) instance |
| [part](#part) | A [Part](../part/part.md) instance |
### Build Order
When printing a report or label against a [Build Order](../build/build.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| bom_items | Query set of all BuildItem objects associated with the BuildOrder |
| build | The BuildOrder instance itself |
| build_outputs | Query set of all BuildItem objects associated with the BuildOrder |
| line_items | Query set of all build line items associated with the BuildOrder |
| part | The Part object which is being assembled in the build order |
| quantity | The total quantity of the part being assembled |
| reference | The reference field of the BuildOrder |
| title | The title field of the BuildOrder |
::: build.models.Build.report_context
options:
show_source: True
### Build Line
When printing a report or label against a [BuildOrderLineItem](../build/build.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| allocated_quantity | The quantity of the part which has been allocated to this build |
| allocations | A query set of all StockItem objects which have been allocated to this build line |
| bom_item | The BomItem associated with this line item |
| build | The BuildOrder instance associated with this line item |
| build_line | The build line instance itself |
| part | The sub-part (component) associated with the linked BomItem instance |
| quantity | The quantity required for this line item |
::: build.models.BuildLine.report_context
options:
show_source: True
### Sales Order
When printing a report or label against a [SalesOrder](../order/sales_order.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| customer | The customer object associated with the SalesOrder |
| description | The description field of the SalesOrder |
| extra_lines | Query set of all extra lines associated with the SalesOrder |
| lines | Query set of all line items associated with the SalesOrder |
| order | The SalesOrder instance itself |
| reference | The reference field of the SalesOrder |
| title | The title (string representation) of the SalesOrder |
::: order.models.Order.report_context
options:
show_source: True
### Return Order
When printing a report or label against a [ReturnOrder](../order/return_order.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| customer | The customer object associated with the ReturnOrder |
| description | The description field of the ReturnOrder |
| extra_lines | Query set of all extra lines associated with the ReturnOrder |
| lines | Query set of all line items associated with the ReturnOrder |
| order | The ReturnOrder instance itself |
| reference | The reference field of the ReturnOrder |
| title | The title (string representation) of the ReturnOrder |
### Purchase Order
When printing a report or label against a [PurchaseOrder](../order/purchase_order.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| description | The description field of the PurchaseOrder |
| extra_lines | Query set of all extra lines associated with the PurchaseOrder |
| lines | Query set of all line items associated with the PurchaseOrder |
| order | The PurchaseOrder instance itself |
| reference | The reference field of the PurchaseOrder |
| supplier | The supplier object associated with the PurchaseOrder |
| title | The title (string representation) of the PurchaseOrder |
### Stock Item
When printing a report or label against a [StockItem](../stock/stock.md#stock-item) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| barcode_data | Generated barcode data for the StockItem |
| barcode_hash | Hash of the barcode data |
| batch | The batch code for the StockItem |
| child_items | Query set of all StockItem objects which are children of this StockItem |
| ipn | The IPN (internal part number) of the associated Part |
| installed_items | Query set of all StockItem objects which are installed in this StockItem |
| item | The StockItem object itself |
| name | The name of the associated Part |
| part | The Part object which is associated with the StockItem |
| qr_data | Generated QR code data for the StockItem |
| qr_url | Generated URL for embedding in a QR code |
| parameters | Dict object containing the parameters associated with the base Part |
| parameters | Dict object containing the parameters associated with the base Part |
| quantity | The quantity of the StockItem |
| result_list | FLattened list of TestResult data associated with the stock item |
| results | Dict object of TestResult data associated with the StockItem |
| serial | The serial number of the StockItem |
| stock_item | The StockItem object itself (shadow of 'item') |
| tests | Dict object of TestResult data associated with the StockItem (shadow of 'results') |
| test_keys | List of test keys associated with the StockItem |
| test_template_list | List of test templates associated with the StockItem |
| test_templates | Dict object of test templates associated with the StockItem |
::: stock.models.StockItem.report_context
options:
show_source: True
##### Stock Location Label
### Stock Location
The following variables are made available to the StockLocation label template:
When printing a report or label against a [StockLocation](../stock/stock.md#stock-location) object, the following context variables are available:
| Variable | Description |
| Variable | Description |
| -------- | ----------- |
| --- | --- |
| location | The [StockLocation](./context_variables.md#stocklocation) object itself |
| location | The StockLocation object itself |
| qr_data | Formatted QR code data for the StockLocation |
| parent | The parent StockLocation object |
| stock_location | The StockLocation object itself (shadow of 'location') |
| stock_items | Query set of all StockItem objects which are located in the StockLocation |
::: stock.models.StockLocation.report_context
options:
show_source: True
### Part
When printing a report or label against a [Part](../part/part.md) object, the following context variables are available:
| Variable | Description |
| --- | --- |
| bom_items | Query set of all BomItem objects associated with the Part |
| category | The PartCategory object associated with the Part |
| description | The description field of the Part |
| IPN | The IPN (internal part number) of the Part |
| name | The name of the Part |
| parameters | Dict object containing the parameters associated with the Part |
| part | The Part object itself |
| qr_data | Formatted QR code data for the Part |
| qr_url | Generated URL for embedding in a QR code |
| revision | The revision of the Part |
| test_template_list | List of test templates associated with the Part |
| test_templates | Dict object of test templates associated with the Part |
::: part.models.Part.report_context
options:
show_source: True
## Model Variables
Additional to the context variables provided directly to each template, each model type has a number of attributes and methods which can be accessedd via the template.
For each model type, a subset of the most commonly used attributes are listed below. For a full list of attributes and methods, refer to the source code for the particular model type.
### Parts
### Parts
!!! incomplete "TODO"
This section requires further work
#### Part
#### Part
Each part object has access to a lot of context variables about the part. The following context variables are provided when accessing a `Part` object:
Each part object has access to a lot of context variables about the part. The following context variables are provided when accessing a `Part` object from within the template.
| Variable | Description |
| Variable | Description |
|----------|-------------|
|----------|-------------|
@ -106,6 +286,7 @@ Each part object has access to a lot of context variables about the part. The fo
#### Part Category
#### Part Category
| Variable | Description |
| Variable | Description |
|----------|-------------|
|----------|-------------|
| name | Name of this category |
| name | Name of this category |
@ -117,6 +298,7 @@ Each part object has access to a lot of context variables about the part. The fo
#### StockItem
#### StockItem
| Variable | Description |
| Variable | Description |
|----------|-------------|
|----------|-------------|
| parent | Link to another [StockItem](./context_variables.md#stockitem) from which this StockItem was created |
| parent | Link to another [StockItem](./context_variables.md#stockitem) from which this StockItem was created |
@ -139,7 +321,7 @@ Each part object has access to a lot of context variables about the part. The fo
| notes | Extra notes field |
| notes | Extra notes field |
| build | Link to a Build (if this stock item was created from a build) |
| build | Link to a Build (if this stock item was created from a build) |
| is_building | Boolean field indicating if this stock item is currently being built (or is "in production") |
| is_building | Boolean field indicating if this stock item is currently being built (or is "in production") |
| purchase_order | Link to a [PurchaseOrder](./context_variables.md#purchaseorder) (if this stock item was created from a PurchaseOrder) |
| purchase_order | Link to a [PurchaseOrder](./context_variables.md#purchase-order) (if this stock item was created from a PurchaseOrder) |
| infinite | If True this [StockItem](./context_variables.md#stockitem) can never be exhausted |
| infinite | If True this [StockItem](./context_variables.md#stockitem) can never be exhausted |
| sales_order | Link to a [SalesOrder](./context_variables.md#salesorder) object (if the StockItem has been assigned to a SalesOrder) |
| sales_order | Link to a [SalesOrder](./context_variables.md#salesorder) object (if the StockItem has been assigned to a SalesOrder) |
| purchase_price | The unit purchase price for this [StockItem](./context_variables.md#stockitem) - this is the unit price at time of purchase (if this item was purchased from an external supplier) |
| purchase_price | The unit purchase price for this [StockItem](./context_variables.md#stockitem) - this is the unit price at time of purchase (if this item was purchased from an external supplier) |
@ -164,6 +346,7 @@ Each part object has access to a lot of context variables about the part. The fo
#### Company
#### Company
| Variable | Description |
| Variable | Description |
|----------|-------------|
|----------|-------------|
| name | Name of the company |
| name | Name of the company |
@ -184,6 +367,7 @@ Each part object has access to a lot of context variables about the part. The fo
#### Address
#### Address
| Variable | Description |
| Variable | Description |
|----------|-------------|
|----------|-------------|
| line1 | First line of the postal address |
| line1 | First line of the postal address |
@ -194,9 +378,6 @@ Each part object has access to a lot of context variables about the part. The fo
#### Contact
#### Contact
Contacts are added to companies. Actually the company has no link to the contacts.
You can search the company object of the contact.
| Variable | Description |
| Variable | Description |
|----------|-------------|
|----------|-------------|
| company | Company object where the contact belongs to |
| company | Company object where the contact belongs to |
@ -207,6 +388,7 @@ You can search the company object of the contact.
#### SupplierPart
#### SupplierPart
| Variable | Description |
| Variable | Description |
|----------|-------------|
|----------|-------------|
| part | Link to the master Part (Obsolete) |
| part | Link to the master Part (Obsolete) |
@ -226,24 +408,13 @@ You can search the company object of the contact.
| has_price_breaks | Whether this [SupplierPart](./context_variables.md#supplierpart) has price breaks |
| has_price_breaks | Whether this [SupplierPart](./context_variables.md#supplierpart) has price breaks |
| manufacturer_string | Format a MPN string for this [SupplierPart](./context_variables.md#supplierpart). Concatenates manufacture name and part number. |
| manufacturer_string | Format a MPN string for this [SupplierPart](./context_variables.md#supplierpart). Concatenates manufacture name and part number. |
### Manufacturers
!!! incomplete "TODO"
This section requires further work
#### Manufacturer
| Variable | Description |
|----------|-------------|
#### ManufacturerPart
| Variable | Description |
|----------|-------------|
### Orders
### Orders
The [Purchase Order](../order/purchase_order.md) context variables are described in the [Purchase Order](./purchase_order.md) section.
@ -12,13 +12,13 @@ Some common functions are provided for use in custom report and label templates.
```
```
!!! tip "Use the Source, Luke"
!!! tip "Use the Source, Luke"
To see the full range of available helper functions, refer to the source file [report.py](https://github.com/inventree/InvenTree/blob/master/src/backend/InvenTree/report/templatetags/report.py) where these functions are defined!
To see the full range of available helper functions, refer to the source file [report.py]({{ sourcefile("src/backend/InvenTree/report/templatetags/report.py") }}) where these functions are defined!
## Assigning Variables
## Assigning Variables
When making use of helper functions within a template, it can be useful to store the result of the function to a variable, rather than immediately rendering the output.
When making use of helper functions within a template, it can be useful to store the result of the function to a variable, rather than immediately rendering the output.
For example, using the [render_currency](#rendering-currency) helper function, we can store the output to a variable which can be used at a later point in the template:
For example, using the [render_currency](#currency-formatting) helper function, we can store the output to a variable which can be used at a later point in the template:
```html
```html
{% raw %}
{% raw %}
@ -130,8 +130,8 @@ The following keyword arguments are available to the `render_currency` function:
| --- | --- |
| --- | --- |
| currency | Specify the currency code to render in (will attempt conversion if different to provided currency) |
| currency | Specify the currency code to render in (will attempt conversion if different to provided currency) |
| decimal_places | Specify the number of decimal places to render |
| decimal_places | Specify the number of decimal places to render |
| min_decimal_places | Specify the minimum number of decimal places to render (ignored if *decimal_places* is specified) |
| min_decimal_places | Specify the minimum number of decimal places to render |
| max_decimal_places | Specify the maximum number of decimal places to render (ignored if *decimal_places* is specified) |
| max_decimal_places | Specify the maximum number of decimal places to render |
| include_symbol | Include currency symbol in rendered value (default = True) |
| include_symbol | Include currency symbol in rendered value (default = True) |
## Maths Operations
## Maths Operations
@ -259,6 +259,31 @@ A shortcut function is provided for rendering an image associated with a Company
*Preview* and *thumbnail* image variations can be rendered for the `company_image` tag, in a similar manner to [part image variations](#image-variations)
*Preview* and *thumbnail* image variations can be rendered for the `company_image` tag, in a similar manner to [part image variations](#image-variations)
## Icons
Some models (e.g. part categories and locations) allow to specify a custom icon. To render these icons in a report, there is a `{% raw %}{% icon location.icon %}{% endraw %}` template tag from the report template library available.
This tag renders the required html for the icon.
!!! info "Loading fonts"
Additionally the icon fonts need to be loaded into the template. This can be done using the `{% raw %}{% include_icon_fonts %}{% endraw %}` template tag inside of a style block
!!! tip "Custom classes for styling the icon further"
The icon template tag accepts an optional `class` argument which can be used to apply a custom class to the rendered icon used to style the icon further e.g. positioning it, changing it's size, ... `{% raw %}{% icon location.icon class="my-class" %}{% endraw %}`.
```html
{% raw %}
{% load report %}
{% block style %}
{% include_icon_fonts %}
{% endblock style %}
{% icon location.icon %}
{% endraw %}
```
## InvenTree Logo
## InvenTree Logo
A template tag is provided to load the InvenTree logo image into a report. You can render the logo using the `{% raw %}{% logo_image %}{% endraw %}` tag:
A template tag is provided to load the InvenTree logo image into a report. You can render the logo using the `{% raw %}{% logo_image %}{% endraw %}` tag:
@ -272,7 +297,7 @@ A template tag is provided to load the InvenTree logo image into a report. You c
### Custom Logo
### Custom Logo
If the system administrator has enabled a [custom logo](../start/config.md#customisation-options), then this logo will be used instead of the base InvenTree logo.
If the system administrator has enabled a [custom logo](../start/config.md#customization-options) then this logo will be used instead of the base InvenTree logo.
This is a useful way to get a custom company logo into your reports.
This is a useful way to get a custom company logo into your reports.
@ -287,7 +312,7 @@ If you have a custom logo, but explicitly wish to load the InvenTree logo itself
## Report Assets
## Report Assets
[Report Assets](./report.md#report-assets) are files specifically uploaded by the user for inclusion in generated reports and labels.
[Report Assets](./templates.md#report-assets) are files specifically uploaded by the user for inclusion in generated reports and labels.
You can add asset images to the reports and labels by using the `{% raw %}{% asset ... %}{% endraw %}` template tag:
You can add asset images to the reports and labels by using the `{% raw %}{% asset ... %}{% endraw %}` template tag:
@ -11,17 +11,6 @@ Custom labels can be generated using simple HTML templates, with support for QR-
Simple (generic) label templates are supplied 'out of the box' with InvenTree - however support is provided for generation of extremely specific custom labels, to meet any particular requirement.
Simple (generic) label templates are supplied 'out of the box' with InvenTree - however support is provided for generation of extremely specific custom labels, to meet any particular requirement.
## Label Types
The following types of labels are available
| Label Type | Description |
| --- | --- |
| [Part Labels](./labels/part_labels.md) | Print labels for individual parts |
| [Location Labels](./labels/location_labels.md) | Print labels for individual stock locations
| [Build Labels](./labels/build_labels.md) | Print labels for individual build order line items |
## Label Templates
## Label Templates
Label templates are written using a mixture of [HTML](https://www.w3schools.com/html/) and [CSS](https://www.w3schools.com/css). [Weasyprint](https://weasyprint.org/) templates support a *subset* of HTML and CSS features. In addition to supporting HTML and CSS formatting, the label templates support the Django templating engine, allowing conditional formatting of the label data.
Label templates are written using a mixture of [HTML](https://www.w3schools.com/html/) and [CSS](https://www.w3schools.com/css). [Weasyprint](https://weasyprint.org/) templates support a *subset* of HTML and CSS features. In addition to supporting HTML and CSS formatting, the label templates support the Django templating engine, allowing conditional formatting of the label data.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.