* Improve prefetch fields for API
* Cache ContentType queryset for getModelsWithMixin
- Called a LOT of times for an options request
- Store the list in the session cache
- Much faster than redis - and expires after the session is complete
* Skip optional prefetch for options requests
* Custom implementation of DjangoModelPermission
- Cache the queryset against the view
- Prevents multiple hits for OPTIONS request
- Saves > 100ms on /stock/ options request
* Optimize printing actions
- Don't fire API request until dialog is opened
- This prevents a lot of unnecessary API calls from the UI
* Do not fire export options query until required
* Automatic prefetch of related fields for enable_filter
- Allows us to *not* prefetch fields (expensive) when they are not going to be used
- Enables re-usable components for common detail fields
* Refactor "project_code_detail" filter into common component
- Automatically apply correct prefetch fields
* Refactor 'parameters' annotation
- add 'enable_parameters_filter' function
- Prefetch parameters only when needed
- Refactor / consolidate code
* Refactor SupplierPartSerializer
- Make fields switchable
- Ensure correct prefetch_related
* Refactor serializer for ManufacturerPart
* Refactor BuildSerializer
* Refactor PurchaseOrderSerializer
* Refactor SalesOrderSerializer
* Refactor ReturnOrderSerializer
* Remove debug statements
* Tweaks
* Simplify custom filterable fields
* Bump API version
* Fix for data export
* Additional unit tests
* Remove unused "prefetch_func" option
* Refactor PurchaseOrderLineItemList
* Refactor SalesOrderLineItemList
* Refactor ReturnOrderLineItem
* Cleanup "pretty_name"
* Fix for build list
* Refactoring StockItem API endpoint
- Needs significant work still
* Refactoring for BuildLineSerializer
* Keep all optional fields when exporting data
* Improve "UserRoles" API endpoint
- Prefetch roles
- Prevents significant number of db hits
* Prefetch Parameter API list
* Bug fix for exporting logic
* Specify InvenTreeOutputOption
* Optional prefetch for primary_address
* Fix typing
* Fix unit test
* fixes for playwright tests
* Update Part API
- Improved prefetching
* Fix for prefetch
* Refactor primary_address annotation
- Remove SerializerMethodField
- Better cache introspection
* Allow address detail to be optional
* Refactor address caching
* Fix primary_address annotation
* Remove "address_count" field
- Pointless annotation which is not used anywhere
* Update API version
* Tweak docs page
* Tweak unit tests
* Fix docs formatting
* [refactor] cache custom states
- Generic state API endpoint executed query for each state type
- We can run a single database query and cache these in memory
- Reduces query time by ~50%
* Add barcode buttons to related fields
- Only field types which support barcodes
* Add per-user settings for barcode support
* Fill form field with scanned data
* Updated docs
* Fix duplicate setting
* Add playwright tests
* Fix duplicate setting in docs
* Fix broken link
* Fix memo deps
* Fix typo
* Remove setting
* Updated playwright tests
* Improved typing
* Enable input controls in PDF reports
Modify options passed to WeasyPrint.
* Changelog update for issue #10969.
* Add usage notes for PDF forms to report docs (#10969).
* Fix for string form fields
- replace null values with empty strings
* Expose more serializer metadata
* Check if null values are not allowed
* Fix type
* Try removing feature
* Reduce deltas
* Remove extra field attrs entirely (for testing)
* Comment out changes
* Tweak form values
* Fix for form validation
* Update version checks:
- Add error code for old python version
- Fix min python version in docs
- Various spelling fixes in docs
* Fix docs link
* Revert change to docs version string
* Bug fix
* Add ParameterTemplate model
- Data structure duplicated from PartParameterTemplate
* Apply data migration for templates
* Admin integration
* API endpoints for ParameterTemplate
* Scaffolding
* Add validator for ParameterTemplate model type
- Update migrations
- Make Parameter class abstract (for now)
- Validators
* API updates
- Fix options for model_type
- Add API filters
* Add definition for Parameter model
* Add django admin site integration
* Update InvenTreeParameterMixin class
- Fetch queryset of all linked Parameter instances
- Ensure deletion of linked instances
* API endpoints for Parameter instances
* Refactor UI table for parameter templates
* Add comment for later
* Add "enabled" field to ParameterTemplate model
* Add new field to serializer
* Rough-in new table
* Implement generic "parameter" table
* Enable parameters for Company model
* Change migration for part parameter
- Make it "universal"
* Remove code for ManufacturerPartParameter
* Fix for filters
* Add data import for parameter table
* Add verbose name to ParameterTemplate model
* Removed dead API code
* Update global setting
* Fix typos
* Check global setting for unit validation
* Use GenericForeignKey
* Add generic relationship to allow reverse lookups
* Fixes for table structure
* Add custom serializer field for ContentType with choices
* Adds ContentTypeField
- Handles representation of content type
- Provides human-readable options
* Refactor API filtering for endpoints
- Specify ContentType by ID, model or app label
* Revert change to parameters property
* Define GenericRelationship for linking model
* Refactoring some code
* Add a generic way to back-annotate and prefetch parameters for any model type
* Change panel position
* Directly annotate parameters against different model serializers
* remove defunct admin classes
* Run plugin validation against parameter
* Fix prefetching for PartSerializer
* Implement generic "filtering" against queryset
* Implement generic "ordering" by parameter
* Make parametric table generic
* Refactor segmented panels
* Consolidate part table views
* Fix for parametric part table
- Only display parameters for which we know there is a value
* Add parametric tables for company views
* Fix typo in file name
* Prefetch to reduce hits
* Add generic API mixin for filtering and ordering by parameter
* Fix hook for rebuilding template parameters
* Remove serializer
* Remove old models
* Fix code for copying parameters from category
* Implement more parametric tables:
- ManufacturerPart
- SupplierPart
- Fixes and enhancements
* Add parameter support for orders
* Add UI support for parameters against orders
* Update API version
* Update CHANGELOG.md
* Add parameter support for build orders
* Tweak frontend
* Add renderer
* Remove defunct endpoints
* Add migration requirement
* Require contenttypes to be updated
* Update migration
* Try using ID val
* Adjust migration dependencies
* fix params fixture
* fix schema export
* fix modelset
* Fixes for data migration
* tweak table
* Fix for Category Parameters
* Use branch of demo dataset for testing
* Add parameteric build order table
* disable broken imports
* remove old model from ruleset
* correct test
* Table tweaks
* fix test
* Remove old model type
* fix test
* fix test
* Refactor mixin to avoid specifying model type manually
* fix test
* fix resolve name
* remove unneeded import
* Tweak unit testing
* Fix unit test
* Enable bulk-create
* More fixes
* More unit test tweaks
* Enhancements
* Unit test fixes
* Add some migration tests
* Fix admin tests
* Fix part tests
* adapt expectation
* fix remaining typecheck
* Docs updates
* Rearrange models
* fix paramater caching
* fix doc links
* adjust assumption
* Adjust data migration unit tests
* docs fixes
* Fix docs link
* Fixes
* Tweak formatting
* Add doc for setting
* Add metadata view for parameters
* Add metadata view for ParamterTemplate
* Update CHANGELOG file
* Deconflict model_type fields
* Invert key:value
* Revert "Invert key:value"
This reverts commit d555658db2.
* fix assert
* Update API rev notes
* Initial unit tests for API
* Test parameter create / edit / delete via the API
* Add some more unit tests for the API
* Validate queryset annotation
- Add unit test with large dataset
- Ensure number of queries is fixed
- Fix for prefetching check
* Add breaking change info to CHANGELOG.md
* Ensure that parameters are removed when deleting the linked object
* Enhance type hinting
* Refactor part parameter exporter plugin
- Any model which supports parameters can use this now
- Update documentation
* Improve serializer field
* Adjust unit test
* Reimplement checks for locked parts
* Fix unit test for data migration
* Fix for unit test
* Allow disable edit for ParameterTable
* Fix supplier part import wizard
* Add unit tests for template API filtering
* Add playwright tests for purchasing index
* Add tests for manufacturing index page
* ui tests for sales index
* Add data migration tests for ManufacturerPartParameter
* Pull specific branch for python binding tests
* Specify target migration
* Remove debug statement
* Tweak migration unit tests
* Add options for spectacular
* Add explicit choice options
* Ensure empty string values are converted to None
* Don't use custom branch for python checks
* Fix for migration test
* Fix migration test
* Fix reference target
* Remove duplicate enum in spectactular.py
* Add null choice to custom serializer class
* [UI] Edit shipment details
- Pass "pending" status through to the form
* New migration strategy:
part.0144:
- Add new "enabled" field to PartParameterTemplate model
- Add new ContentType fields to the "PartParameterTemplate" and "PartParameter" models
- Data migration for existing "PartParameter" records
part.0145:
- Set NOT NULL constraints on new fields
- Remove the obsolete "part" field from the "PartParameter" model
* More migration updates:
- Create new "models" (without moving the existing tables)
- Data migration for PartCataegoryParameterTemplate model
- Remove PartParameterTemplate and PartParameter models
* Overhaul of migration strategy
- New models simply point to the old database tables
- Perform schema and data migrations on the old models first (in the part app)
- Swap model references in correct order
* Improve checks for data migrations
* Bug fix for data migration
* Add migration unit test to ensure that primary keys are maintained
* Add playwright test for company parameters
* Rename underlying database tables
* Fixes for migration unit tests
* Revert "Rename underlying database tables"
This reverts commit 477c692076.
* Fix for migration sequencing
* Simplify new playwright test
* Remove spectacular collision
* Monkey patch the drf-spectacular warn function
* Do not use custom branch for playwright testing
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Fix for currency functions
- Prevent database access until after the 'common' app has loaded
* Add decorator to selectively ignore warnings
* Add reference to PR
* Fix variable assignment
* Use functools.wraps
* Add wrapper for loading machine registry
* Move decorator to ready.py
* Add missing code
* Set backup values to match default currency codes
* Bump API version
* [plugin] Add printing delay to sample machines
- Useful for testing
- Default is zero
* Add backup_value to MachineSetting.get_setting
* Fix call to machine.get_setting
* Fix for printing logic
* Simplify code
* Refactor NumberField into separate component
* Add helper func to ensure a number is a number
* Use placeholder value for suggested sale price
* Fix for auto-fill
* Tweak price calculation
* Add UI testing for sales order price breaks
* Fix aria label name
* Annotate price breaks to supplier part
* Fetch price break data
* Support price breaks for purchase order pricing
* Fix required to prevent circular imports
* Add playwright tests for purchase order price breaks
* Bump API version
* Re-add output options for SupplierPriceBreakList
* Revert change
* Simplify unit test
* Bug fix for getMediaUrl
- Proper check for file type
- Fix "fully_qualified_url" for Attachment model
* Add unit test
* Fix typo
* Fix unit test
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Additional checks for virtual parts in sales order process
* Prevent allocation against virtual parts
* Fix order of operations
* Adjust part form fields based on selections
* Prevent order locking
* Updated playwright tests
* Add unit test
* [UI] Fix for form OPTIONS query
- Fetch OPTIONs each time form is opened
- Ensure default values are filled correctly
- Prevent issues with latching form state
* Add comment
* Add playwright test
- Check that the reference field increments properly
* Fix other Playwright tests
* Fix for setting custom status
* Fix for setting custom status when receiving stock items
* Allow caching for set_status
* Updated code and unit tests
* Auto-fill supplier parts in order wizard
* Copy supplier part SKU from order parts wizard
* Add "on_order" filter to BuildLine table
* Allow ordering by production and ordering quantities
* Allow specification of purchase price
* Bump API version
* Adjust UI testings
* feat(backend): bump to 5.2 lts / python 3.11
This will give us support till 2027-10 (PEP 664)
* bump dependencies
* fix dflt version
* remove 3.9 precaution
* changes for 5.2
* changes for py 3.10
* debug command
* lower crypto again
* another lowering
* fix version string
* lower minimum version to 3.11
* update refs
* fix text
* reaking: remove now unsupported OS
* disable break
* remove temp changes
* fix ruff call
* fix remaining ruff warnings
* remove old arg
* lower allauth reqs
* replace old method
* fix issue with args passing beeing depreceated
* add changelog entries
* bump dependencies a bit further
* fix broken image init for now
might need a refactor
* fix another test
* refactor image name lookup
* mroe refactoring
* ensure str does not cause an issue
* update referenced function
* fix cal sig
* simplify method and add test
* refactor
* ignore wrong typings
* fix deprecated feature
* simplify
* ensure image tests do their job
* simplify
* re-add type check
* fix test
* fix assertations - wonder how long this was broken
* bump to newer versions
* bump deps
* fix assertation
* simplify
* fix return type
* handle token (app access)
* reduce lookup amount
* add positive test again
* add poisitive test
* move out settings
* add tests for Check2FAMiddleware
* add test for auth_request
* add a reverse name for auth_request
* auth tests refactors
* move test
* disable check for things that do not trigger
* fix typing for python 3.9
* make names clearer and add comments
* finish tests
* fix call
* re-enable mfa test without the timing component
* cleanup helper
* ignore easy out
* ignore scenario that can not happen
* Add "Category" column to BOM Table
* Enable sorting by category in BOM table
* Add Category column to Buildline table
* Add Category filter to BuildLineTable
* Adjust queryset prefetch
* Bump API version and update CHANGELOG
* New report functions:
- create_currency: Create a new Money object
- convert_currency: Convert from one currency to another
* docs
* More checking on report tags
* Better formatting of report errors
* Add unit tests
* Remove error message
* Fix pathing for docs
* Add type hints
* Adjust unit tests
Fixes#10701
The issue was that the table row key was using 'props.item.pk', but the
API returns 'id' instead. This caused React to not properly render the
rows with their values.
Changed the key to use 'props.item.id' with a fallback to 'props.idx'
for new rows that don't have an ID yet.
Signed-off-by: Akhil Singh <singhakhil69@gmail.com>
* add option to set leftMargin
* Add home tab and action button
* make home button actually go to home
* Add general info text
* Add dependeant quick action section
* Add Quickaction to home page
* use Carousel
* style check
* small fixes
* add permanent alerts to Admin Center Home
* also show inactive alerts
* fix order of alerts
* simplify attrs
* remove security section for now
* bring quick actions alive
* adjust text
* Use StylishText
* Make alert columns reactive
* Adjust text formatting
* Refactor <QuickActions />
- Use responsive grid instead of carousel
- Add icons
- Translate text
---------
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
* bump vers
* fix ssl?
Added build dependencies for libbz2, libffi, and libssl.
* try empty buildpack
* clean up
* fix ref
* remove things we now do not need anymore
* add 22.04 as a target
* cleanup installer
* add changelog entry
* add dotenv
* update skript
* make task more robust for package usage
* ensure we have a site-url set
* fix style
* fix syntax
* Enhancement for metadata OPTIONS checks
- Handle case where custom `role_required` attribute is set
- Allows integration for plugin views not associated with an internal model
* Cleanup logic
* Display PendingShipments panel
- Overview of all outstanding shipments
* Update UI tests
* add separate page for troubleshooting
* Restructure menus a bit
* Fix top-level page for mobile app
* Add option to override default value in docs
* Update global.md
* Formatting updates
* Update sales pages
* Move order images to "purchasing"
* Small tweaks
* Make "Concepts" a top-level documentation item
* Update image
* Cleaner handling of inputs
* Fix for frontend form:
- Fix typo in field
- Better option defaults
* Tweak part category delete form
* Add frontend tests
* remove duplicate template tag
* Add "multiplier" argument to render_currency
* Improve render_currency
- Enable conversion of non-money values to a Money instance
* Improve maths tags
- Convert values to Decimal
- Ability to cast result to different type
* Updated docs
* Improved feedback from maths tags
* Updated unit testing
* Improved rendering of printing errors
* Add extra test for render_currency tag
* Enfoce multiplier type
* Fix docstrings
* Improved error handling
* Remove defunct unit test
* Fix unit tests
* Add project code to line items
* Refactor AbstractOrderSerialiazer
* Refactor AbstractOrderLineItem serializer
* Refactoring for AbstractExtraLineSerializer
* UI elements for extra line item project code
* UI for ReturnOrderLineItems
* UI elements for SalesOrderLineItem
* UI elements for PurchaseOrderLineItem
* Docs updates
* Update API version and CHANGELOG
* Add "checked" column to SalesOrderStatus table
* Add API filter for "checked" status
* Add Checked / Not Checked badge
* Add actions to check / uncheck shipment
* Add modal for changing checked_by status
* Display checked_by user
* Tweak wording
* Bump API version
* Update CHANGELOG file
* Update docs
* Add new global setting
- Prevent shipment completion which have not been checked
* Test if shipment has been checked
* Updated unit tests
* Updated type hinting
(may as well while I'm here)
* Adjust shipment icon
* Add "order_outstanding" filter for SalesOrderShipment table
* Adds "shipment_address" attribute to the SalesOrderShipment model:
- Allows different addresses for each shipment
- Defaults to the order shipment address (if not specified)
* Add unit testing for field validation
* Update SalesOrderShipment serializer
* Edit shipment address in UI
* Render date on shipment page
* Improve address rendering
* Update docs
* Bump API version
* Update CHANGELOG.md
* Fix API version
* Remove 'project_code' from optional fields
- enable_filter overrides field options
- Field does not auto-describe as a related field any more
- Breaks front-end forms
* Unit tests
* Include fix for currency
- Ref: https://github.com/inventree/InvenTree/pull/10645
* Cleanup import
* Adjust unit tests
* move filtering of serializer fields out of functions into mixin
* fix def
* temp fix
* rollback rollback
* more adoption
* fix many serializer behaviour
* optimize mro
* set many serializer
* adjust default filtering
* fix import
* add missed field
* make can_filter suppport more complex scenarios:
- different filtername from fieldname
- multiple fields with one filtername
* fix removal
* fix schema?
* add missing def
* add test
* fix schema fields
* fix another serializer issue
* further fixes
* extend tests
* also process strings
* fix serializer for schema
* ensure popped values are persisted
* move test around
* cleanup
* simplify tests
* fix typo
* fix another test
* var tests
* disable additional tests
* make application of PathScopedMixin more intentional -> more efficient
* make safer to use with various sanity checks
* fix list serializer
* add option to ignore special cases
* generalize addition
* remove generalize addition
* re-add missing schema generation exception
* remove new duplication
* fix style
* adjust naming and docs, add typing to clean stuff up
* simplify more
* fix ref calc
* Add generic test for serializer
* enable query based filtering
* enable previously disabled filters
* test failure modes
* reduce diff
* make check more robust
* add more INVE-I2 checks
* improve check
* make check and test more robust
* enable controlling query parameters per field
* ignore in coverage
* Remove project_code filter from BuildSerializer
Removed project_code filter from BuildSerializer.
* fix style
* Revert "Remove project_code filter from BuildSerializer"
This reverts commit 504eff0fd7.
* Revert "fix style"
This reverts commit 8e31db95d3.
* [docker] Allow HTTPS port to be specified for Caddy proxy
* Fix naming collision for INVENTREE_WEB_PORT
* Push InvenTree version first
* Adjust Caddyfile
- Change backup server
* Fix docstring
* Tweak for site URL check:
- Ignore port if SITE_LAX_PROTOCOL_CHECK is set
- Invert logic for readability
* Additional checks for port mismatch
* Adjust middleware checks
- Allow for less strict checking of CSRF_TRUSTED_ORIGINS
* Slight refactor
* updated part api mixin and part serializer to include salepricebreaks when explicitly queried
* fixed bug in ApiForm that prevents form field value from updating correctly
* CreateSalesOrderLineItem form now automatically applies price break based on currency and quantity for a part
* bumped API version due to PartsList api price_breaks query param
* fixed incorrect field names
* Remove whitespace
* Increase database query limit from 20 to 25
* updated ApiForm to propagate false and 0 as values to their respective fields, updated ApiFormField to eagerly apply AdjustValue to apply adjustments when onChange does not fire (when the value does not truly change)
* updated pagination number check to a range instead of discreet values.
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Form Field updates:
- Allow spec of leftSection prop
- Allow spec of rightSection prop
* Add ability to auto-fill text input with placeholder value
* Simplify stock form
* Better serial number placeholders
* Update other generator fields
* Add default placeholder to DateInput
* Enhance TextField
* Remove serial_numbers field for non-creation forms
* Update playwright tests
* Adjust playwright tests
* Further playwright adjustments
* Fix project code field for build serializer
* move filtering of serializer fields out of functions into mixin
* fix def
* temp fix
* rollback rollback
* more adoption
* fix many serializer behaviour
* optimize mro
* set many serializer
* adjust default filtering
* fix import
* add missed field
* make can_filter suppport more complex scenarios:
- different filtername from fieldname
- multiple fields with one filtername
* fix removal
* fix schema?
* add missing def
* add test
* fix schema fields
* fix another serializer issue
* further fixes
* extend tests
* also process strings
* fix serializer for schema
* ensure popped values are persisted
* move test around
* cleanup
* simplify tests
* fix typo
* fix another test
* var tests
* disable additional tests
* make application of PathScopedMixin more intentional -> more efficient
* make safer to use with various sanity checks
* fix list serializer
* add option to ignore special cases
* generalize addition
* remove generalize addition
* re-add missing schema generation exception
* remove new duplication
* fix style
* adjust naming and docs, add typing to clean stuff up
* simplify more
* fix ref calc
* Update django-dbbackup version
* Specify STORAGES option for dbbackup
* Add more backup configuration
* Support custom date formats
* Add connector options
* Extend functionality of invoke backup
* Add extra options for restore task
* Add invoke task for finding additional backups
* Small tweaks
* Add docs around backup / restore
* Fix typo
* Add example for GCS storage
* More docs
* commit initial draft for supplier import
* complete import wizard
* allow importing only mp and sp
* improved sample supplier plugin
* add docs
* add tests
* bump api version
* fix schema docu
* fix issues from code review
* commit unstaged changes
* fix test
* refactor part parameter bulk creation
* try to fix test
* fix tests
* fix test for mysql
* fix test
* support multiple suppliers by a single plugin
* hide import button if there is no supplier import plugin
* make form submitable via enter
* add pui test
* try to prevent race condition
* refactor api calls in pui tests
* try to fix tests again?
* fix tests
* trigger: ci
* update changelog
* fix api_version
* fix style
* Update CHANGELOG.md
Co-authored-by: Matthias Mair <code@mjmair.com>
* add user docs
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Add filters for manufacturer parts table
* Refactor <ManufacturerPartTable />
* Fix typo
* Additional filter options for StockList:
- Filter by ManufacturerPart ID
* Stock table view for ManufacturerPart
* Bump API version
* Adjust config template
- Don't hard-code cookie mode into template
- Revert to the "default" values (which are the same)
* [ui] better feedback on login error
- Show error code, at least
* Revert removed code
* Adjust playwright tests
* show warning text
* fix formatting
* try to gather site-url correctly
* protect envs that are set in the config
* raise issue if they appear
* prefer app setting over file config
* preserve setting if injected via envs
* Handle partial completion of build output
* Add 'quantity' field to BuildOutputComplete API endpoint
* Allow partial scrapping of build outputs
* Adjust column text
* Adjust "complete build output" form
* Change order of operations when completing build output
- Run validation checks *before* potentially splitting stock item
* Extract quantity from serializer
* Documentation
- Update screenshots
- Add note on partial completion
- Add note on partial scrapping
* Update CHANGELOG.md
* Update API version
* Add unit test for partial scrapping
* Tweak text
* Unit test for partial output completion
* Fix validation check for quantity field
* Adjust playwright tests
* add output options for PurchaseOrder, SalesOrder, and ReturnOrder endpoints
* add output options for PurchaseOrder, SalesOrder, and ReturnOrder endpoints
* add serializer context handling and update sales order fixture with additional line item
* bump API version to 398 and update output options tests for PurchaseOrder endpoint
* refactor(backend): move serializer context enrichtment to mixin
* cleanup other get_serializer instances
* add output options tests for SalesOrder and ReturnOrder detail endpoints
* fix typo
* fix api
---------
Co-authored-by: Silver <reza.sh.7798@gmail.com>
* Add serializer fields to fix missing return types in schema
* Bump api version
* Fix api version bump
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* add output options for PurchaseOrder, SalesOrder, and ReturnOrder endpoints
* add output options for PurchaseOrder, SalesOrder, and ReturnOrder endpoints
* add serializer context handling and update sales order fixture with additional line item
* bump API version to 398 and update output options tests for PurchaseOrder endpoint
* add output options tests for SalesOrder and ReturnOrder detail endpoints
* fix typo
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* feat: add output options to Stock API and corresponding tests
* feat: update API version text with recent refactor details
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* fix mysql apply order
* improve error message capabilites for InvenTreeAPITestCase
* Revert "fix mysql apply order"
This reverts commit ef6d9bd99d.
* fix message
* add output options for StockLocation and StockItemTestResult endpoints
* add output options tests for StockLocation and StockItemTestResult endpoints
* add filters for include_installed and stock_item in StockItemTestResultFilter; update tests for new filter options
* update stock test.py
* update api_version.py
* fix test_installed_tests
* Enhance error handling and add tests for stock_item and include_installed filters
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
* refactor(api): cascade and category filters in PartList
* Refactor exclude and relate parts in PartFilter
* add output options for Part and BOM endpoints
* add NumericInFilter for excluding parts by ID and related parts
* refactor: clean up unused code and improve output options in API
* Bump API version to 395 and update changelog with recent endpoint refactors
* Fix formatting of API version history in api_version.py
* Update API version history dates in api_version.py
* Enhance NumericInFilter tests: add handling for non-existent IDs, empty strings, and invalid inputs
* feat: add output options for BuildLine and BuildItem endpoints
* enhance output options for BuildLine and BuildItem endpoints with detailed descriptions and tests
* update test
* .
* update API version to v394 and modify related build fixtures and tests
* create separate build_line.yaml fixture
* .
* roll back context in BuildLineMixin
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Enhance Owner model filtering with optimized search and active status filtersI
* enhance output options for Group API endpoints and add tests for GroupDetail
* update api_version
* Fix "unallocated_quantity" calculation
- Take "consumed" quantity into account also
* Account for consumed quantity in:
- build.is_fully_allocated
- build.is_overallocated
* Additional unit tests
- Ensure the new calculations work properly
* Adjust API filter
* Try splitting query
* Another fix
* Try ExpressionWrapper
* Change order of operations?
* Refactor
* Adjust filtering strategy
* Change ordering
* Use Max wrapper
* Add comments
* Re-Add About link to main nav dropdown
Closes#10392
* disable text selection on most of version dialog - maybe that helps ppl. copying the right section
* highlight the correct copy button
* refactor output options for SupplierPart endpoints
* Add output options schema generation and corresponding tests for SupplierPart
* Bump API version to 392 and update version history; remove unused parameters in SupplierPartMixin
* Update API version to 392 and adjust version history with new release date
* Enhance output options handling in SupplierPart API
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* feat: speed up docker publishing
by spliting tests tasks for docker publishing into paralell
also makes releasing safer as no tests are run in the then published image and the permissions are slimer
* add update
* add names
* prepare image
* add dev setup
* remove migration stage
* merge unit test
* fix(backend): simplify siteurl testing
* add multi-site test
* pass off site_url check if more than one trusted origin is set
* split up testing
* add temporary debug info
* fix test enviorment
* Add ty for type checking
* fix various typing issues
* fix req
* more fixes
* and more types
* and more typing
* fix imports
* more fixes
* fix types and optional statements
* ensure patch only runs if it is installed
* add type check to qc
* more fixes
* install all reqs
* fix more types
* more fixes
* disable container stuff for now
* move typecheck to seperate job
* try to use putput for path
* use env instead
* fix typo
* add missing install
* remove unclear imports - not sure why this was done
* add kwarg names
* fix introduced issue in url call
* ignore import
* fix broken typing changes
* fix filter import
* reduce change set
* remove api-change
* fix dict
* ignore typing errors
* fix more type issues
* ignore errors
* style fix
* fix type
* bump ty
* fix more
* type fixes
* update ignores
* fix import
* fix defaults
* fix ignore
* fix some issues
* fix type
* Update software version to 1.1.0 dev
Bump master branch to 1.1.0 dev version
* Update MAX_VERSION to '2.0.0' in version.py
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Enhance version check regex
* Refactor version_check.py
- Account for non-standard release tags (rc / dev / etc)
- Refactor code for extracting version info
- Add argparse support
- Update qc_checks.yaml
* Enhanced debug output
* Stringify and strip
* Display version tuple in log
* Tweak CI logs
* https://github.com/inventree/InvenTree/pull/6293
* refactor to a shared component
* refactoring container stuff to a wrapper
* move title to wrapper
* move logoff and loader to wrapper
* mvoe functions to general auth
* seperate login and register into seperate pages
* unify auth styling
* rename component
* adapt to new look
* check if registration is enabled
* feat(frontend):add authentication debug window
* clear state on logout
* add reload button
* reduce diff
* export helper
* move hover out
* only show to superusers
* fix state args
* fix merge
* fix merge
* clean up diff
* reduce diff
* re-diff
* fix shallow loading
* fix test
* fix umport
* Move session info to user settings panel
* Restrict to superuser accounts
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* remove unneeded helper
* remove unnecessary coverage
* ignore catch-all pervisions in app setup
* remove unused function
* this was replaced by get_model_permission_string
* Prevent virtual parts from being linked in a BuildOrder
* Hide "stock" tab for virtual parts
* Filter out virtual parts when creating a new stock item
* Support virtual parts in sales orders
* Add 'virtual' filter for BomItem
* Hide stock badges for virtual parts
* Tweak PartDetail page
* docs
* Adjust completion logic for SalesOrder
* Fix backend filter
* Remove restriction
* Adjust table
* Fix for "pending_line_items"
* Hide more panels for "Virtual" part
* Add badge for "virtual" part
* Bump API version
* Fix docs link
* add output filter to BuildItemFilter and optimize queryset retrieval
* add NumberOrNullFilter to handle filtering by numeric values or 'null'; update BuildItemFilter to use new filter and add tests for output filtering
* update api_version
* fix(tests): Add missing stock fixture to build tests
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* fix remove mfa task
* add test for command
* clean up after schema test
* add assert to esure authenticators are really present/removed
* simplify handler
* improve error message
* make more readable
* Add wrapper function for machine registry
* Decorate entrypoint functions
* Docstrings
* Fix for boolean setting
* Add playwright tests
* Use proper entrypoints
* Ensure settings are fetched correctly
* Prevent recursion of machine registry decorator
* Fix machine status display
* Enhanced warning msg
* Add simple machine sample printer
* Adds playwright tests for machine UI
* re-throw exception
* Define 'machine' plugin mixin class
* Adjust machine discovery
* Use plugin mixins for registering machine types and drivers
* Adjust unit test
* Remove plugin static files when deactivating
* Force machine reload when plugin registry changes
* Add plugins specific to testing framework
* Add test for plugin loading sequence
* Add session caching
- Significantly reduce DB hits
* Enhanced unit testing and test plugins
* Refactor unit tests
* Further unit test fixes
* Adjust instance rendering
* Display table of available drivers
* Cleanup
* ADjust unit test
* Tweak unit test
* Add docs on new mixin type
* Tweak machine overview docs
* Tweak playwright tests
* Additional unit test
* Add unit test for calling machine func
* Enhanced playwright tests
* Account for database not being ready
* fix remove mfa task
* add test for command
* clean up after schema test
* add assert to esure authenticators are really present/removed
* simplify handler
* Add field to "update" existing records
* Ensure the ID is first
* Prevent editing of "ID" field
* Extract db instance
* Bump API version
* Prevent edit of "id" field
* Refactoring
* Enhanced playwright tests for data importing
* Update docs
* Update src/backend/InvenTree/importer/models.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/frontend/src/forms/ImporterForms.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix silly AI mistake
* Fix for table pagination
- Ensure page does not exceed available records
* Bug fix for playwright test
* Add end-to-end API testing
* Fix unit tests
* Adjust table page logic
* Ensure sensible page size
* Simplify playwright test
* Simplify test again
* Tweak unit test
- Importing has invalidated the BOM?
* Adjust playwright tests
* Further playwright fixes
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds "consumed" field to BuildLine model
* Expose new field to serializer
* Add "consumed" column to BuildLineTable
* Boolean column tweaks
* Increase consumed count when completing allocation
* Add comment
* Update migration
* Add serializer for consuming build items
* Improve build-line sub-table
* Refactor BuildItem.complete_allocation method
- Allow optional quantity to be specified
- Adjust the allocated quantity when consuming
* Perform consumption
* Add "BuildConsume" API endpoint
* Implement frontend form
* Fixes for serializer
* Enhance front-end form
* Fix rendering of BuildLineTable
* Further improve rendering
* Bump API version
* Update API description
* Add option to consume by specifying a list of BuildLine objects
* Add form to consume stock via BuildLine reference
* Fix api_version
* Fix backup colors
* Fix typo
* Fix migrations
* Fix build forms
* Forms fixes
* Fix formatting
* Fixes for BuildLineTable
* Account for consumed stock in requirements calculation
* Reduce API requirements for BuildLineTable
* Docs updates
* Updated playwright testing
* Update src/frontend/src/forms/BuildForms.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/frontend/src/tables/build/BuildLineTable.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add unit test for filters
* Add functional tests
* Tweak query count
* Increase max query time for testing
* adjust unit test again
* Prevent consumption of "tracked" items
* Adjust playwright tests
* Fix table
* Fix rendering
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Enhance CompanySerializer to use Prefetch for for better performance
* Refactor CompanySerializer to improve address handling and add schema fields
* implement changes suggested by joe
Co-authored-by: Joe Rogers <1337joe@users.noreply.github.com>
* Update src/backend/InvenTree/company/serializers.py
Co-authored-by: Joe Rogers <1337joe@users.noreply.github.com>
* Update src/backend/InvenTree/company/serializers.py
Co-authored-by: Joe Rogers <1337joe@users.noreply.github.com>
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Joe Rogers <1337joe@users.noreply.github.com>
* Enhance 'count_queries' helper
* Add threshold
* Update typing
* Better rendering
* Improve StockItem
- Make model operations more efficient
* improve with_mixin
- Cache config map against the session cache
* Refactor receive_line_item
- Pass multiple line items in simultaneously
- DB query optimization
- Use bulk_create and bulk_update operations
* Remove extraneous save call
* Fix for unit tests
* Fix return type
* Fix serializer return type
* Refactor part pricing updates
* UI tweaks
* Use bulk_create
* Refactor API and endpoints
* Bump API version
* Fix unit tests
* Fix playwright tests
* Remove debug msg
* Fix for table filter hover
* Adjust unit test
* Run full docker build if full_run specified
* Debugging
* Update migration test
* Fix migration test
* Fix typo
* Debug logging
* Add log info
* Disable the test in docker
* Remove debug prints
* Revert docker ci test
* Fix annotations/pagination on StockApi itemSerialize and BuildApi outputCreate
* Add (to schema) field to specify serial numbers on create for stock item
* Return list on StockItem creation
* Update api version
* Update test to expect list return when creating stock items
* Add note about breaking changes to api version
* Add handling for stockitem list return on creation
* Update api version
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
* add warning that the log is useless by default
* Add setting to enhance email log again
* add missing test for #10109
* add test for delete protections
* add error code
* Update email.md
* Update email.md
* Bulk creation of test results
- Add BulkCreateMixin class
- Add frontend support
* Refactor test result serializer
- Allow lookup by template name
* Updated unit test
* Add unit tests
* Add row actions
* Docs
* Fix failing tests
* Bump API version
* Fix playwright tests
* Enhance stock item rendering
- Show location in forms
- Allow differentiation between items
* Unit test fixes
- Account for longer query time in docker mode
* Cast to string
* Improved rendering
* Add "StockReturn" API endpoint
- Provide multiple items
- Provide quantity for each item
* Add frontend form
* update frontend forms
* Refactor frontend
* Allow splitting quantity
* Refactoring backend endpoints
* cleanup
* Update unit test
* unit tests
* Bump API version
* Fix unit test
* Add tests for returning build items to stock
* Playwright tests
* Enhanced unit tests
* Add docs
* Fix value type for settings API endpoints
- Cast to 'native' value
* Check for numerical type casting
* Additional unit tests
* Tweak unit tests
* Fix 'to_native_value' funcs
* Refactor native value casting
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* chore(backend): increase coverage
* add a full api based install / uninstall test
* fix asserted code
* delete unreachable code
* clean up unused code
* add more notification tests
* fix test
* order currencies
* Remove STOCKTAKE ruleset
* Adjust wording of settings
* Cleanup
* Improve text for global settings
* Add BulkDeleteMixin to "stocktake" endpoint
* Frontend updates
* Migrations
- Remove field 'last_stocktake' from Part model
- Remove fields 'user' and 'note' from PartStocktake model
- Remove model PartStocktakeReport
* Frontend cleanup
* Rename global setting
* Rewrite stocktake functionality
* Cleanup
* Adds custom exporter for part stocktake data
* Frontend cleanup
* Bump API version
* Tweaks
* Frontend updates
* Fix unit tests
* Fix helper func
* Add docs
* Fix broken link
* Docs updates
* Adjust playwright tests
* Add unit testing for plugin
* Add unit testing for stock history creation
* Fix unit test
* Adds error code for transition handler issues #10088
* Adds error codes for mandatory plugins #10094
* add more links
* Add error code for global overrides
* disable coverage for a case that can not happen
* Improve formatting for <ConfigValueList>
- Only used for email settings currently
* API updates:
- Allow delete operations of email record
- Allow bulk delete operations of email record
* Table updates:
- Improved table rendering
- Allow delete ops
* Display timestamp in email table
* Add setting to control email cleanup interval
* Add scheduled task to delete old emails
* Bump API version
* feat(cache): Add support for cache password in Redis configuration
* Add cache password configuration option to documentation
* Fix the complaints from CI checks
* Format <BuildLineTable />
* More formatting
* Add helper function for running playwright tests
* Fix playwright test
* Further formatting updates
* Adjust order tables
* Add setting for "mandatory" plugins
* Add 'is_active' method to PluginConfig model
* Check against plugin config object by priority
* Prevent plugin from reporting its own 'active' status
* Refactor get_plugin_class for LabelPrint endpoint
* Fix typo
* Mark internal plugin methods as "final"
- Prevent plugins from overriding them
* Enhanced checks for bad actor plugins
* Enhanced unit test for plugin install via API
* Playwright tests for plugin errors
* Test that builtin mandatory plugins are always activated
* Force mandatory plugins to be marked as active on load
* API unit tests
* Unit testing for plugin filtering
* Updated playwright tests
- Force one extra plugin to be mandatory in configuration
* Adjust unit tests
* Updated docs
* Tweak unit test
* Another unit test fix
* Fix with_mixin
- Checking active status first is expensive...
* Make with_mixin call much more efficient
- Pre-load the PluginConfig objects
- Additional unit tests
- Ensure fixed query count
* Fix the 'is_package' method for PluginConfig
* Tweak unit test
* Make api_info endpoint more efficient
- with_mixin is now very quick
* Run just single test
* Disable CI test
* Revert changes to CI pipeline
* Fix typo
* Debug for test
* Style fix
* Additional checks
* Ensure reload
* Ensure plugin registry is ready before running unit tests
* Fix typo
* Add debug statements
* Additional debug output
* Debug logging for MySQL
* Ensure config objects are created?
* Ensure plugin registry is reloaded before running tests
* Remove intentional failure
* Reset debug level
* Fix CI pipeline
* Fix
* Fix test mixins
* Fix test class
* Further updates
* Adjust info view
* Test refactoring
* Fix recursion issue in machine registry
* Force cache behavior
* Reduce API query limits in testing
* Handle potential error case in with_mixin
* remove custom query time code
* Prevent override of is_mandatory()
* Prevent unnecessary reloads
* Tweak unit tests
* Tweak mandatory active save
* Tweak unit test
* Enhanced unit testing
* Exclude lines from coverage
* (final)? cleanup
* Prevent recursive reloads
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Enhanced permission checks for API
- Ensure user is authenticated
- Raise PermissionDenied
* Add unit test for unauthenticated user
* Exclude lines from coverage
* Refactor notification concept
- Notifications handled by plugins
* Cleanup
* Only send email if template provided in context
* Logic cleanup
* Fix log_error call
* Refactor error logging
- Ensure plugin slug is correctly attached
- Consistent format
- Logic fixes
* More robust plugin lookup
* Refactor calls to tringger_notification
* Tweak for build stock notification
* Low stock notification refactor
- Actually *use* the notification system
- Fix for email template
* Check stock only when build is issued
* Updated documentation
* Add PluginUserSetting class
- Allows plugins to define per-user settings
* Add API endpoints for PluginUserSetting model
* Placeholder for user-plugin-settings page
* Refactoring frontend code
* Placeholder panel
* Adds user interface for changing user-specific plugin settings
* Tweaks
* Remove old model
* Update documentation
* Playwright tests
* Update API version
* Fix unit test
* Fix removed arg
* Fixes for email notifications
- Track status of sending notifications
- Add helper "activate" method for plugin class
- Update unit tests
* Fix barcode tests
* More unit test fixes
* Test fixes
* Fix for settings models with extra fields
* Enhance unit test
* Remove old test file
* Check for null target_fnc
* Improve DB query efficiency
- Provide a flat list of active keys to plugin.is_active
- Prevents DB fetching (in certain circumstances)
- Add registry.active_plugins() method
* Bump query limit up for test
- In practice, this API endpoint is ~10 queries
* Handle potential errors
* Increase query limit for API test
* Increase query limit for some tests
* Bump API version
* Tweak unit test
* Tweak unit test
* Increased allowed queries
* fix user plugin settings
* Fix for unit test
* Update debug msg
* Tweak API
* Fix endpoint
* Remove "active plugin keys" code
* Restore previous behaviour
* Fix unit tests
* Tweak unit test
* Update src/backend/InvenTree/build/tasks.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/backend/InvenTree/plugin/base/integration/NotificationMixin.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Func updates
* Format
* Add notification settings
* Refactor plugin settings groups
* Fix func type
* Adjust message
* Additional unit tests
* Additional playwright tests
* Additional playwright test
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Expose lingui modules to plugins
* Add i18n object to plugin context
* Expose form types
* Update package.json requirements
* Externalize react and mantine when building @inventreedb/ui components
* Externalize lingui packages too
* Extern <AddItemButton />
* Enable form auto-fill
- If a single value is available, pre-fill
- Must be enabled per-field
* Tweak playwright tests for increased reliability
* Fix deps
* Fix rendering glitch in tables
- Table render could glitch based on cached column order
- React does not handle array dependencies well sometimes
- Change when column order is recalculated
* Simplify effect chain
- Memoize columns order
- Simply overwrite with columns order
* Tweak SalesOrderAllocations table
* Refactor "include_variants" filter
* Improved API filtering for "SalesOrderLineItem" endpoint
* Fetch part detail for table
* Fix email template
- Referenced template which does not exist
* Refactor the "requirements" endpoint
- Include variant part requirements too
* Updated starred notifications
* Adjust column name
* Update PartDetail
- Extract information from partRequirements query first
* Cache BOM items
* Improve PartDetail page
* Enhance isGeneratingSchema
- Call inspect as late as possible
* Adjust PartDetail
* Improve BuildOrderAllocations table
* Exclude common.newsfeedentry when exporting
* Updated playwright tests
* Bump API version
* Add mixin for storing user who last updated an instance
* Add mixin to "PartParameter" model
* Fix typo
* Fix strings
* Refactor mixin class
* Update part parameter table:
- Add "user" filter
- Add "updated_by" column
- Add "update" column
- Add "note" column
* Fix for updating date
* Add user information when saving parameter
* small refactors
* Bump API version
* Add unit test for "updated" and "updated_by" fields
* Check for 'note' field
* Update docs image
* Hide "consumed stock" panel if not required
* Docs updates
* Hide allocation fields if the build has no required parts
* Additional serializer options
* More efficient call
* Tree save fix
- Do not rebuild tree when not required
- Reduce DB count for API test
* Reduce query count even further
* Reduce query limit for other tests
* Fix for parent getter
* Added condition
* Remove duplicate check
* Don't pre-fill tree values
* perform atomic delete
* Adjust unit tests
* feat: add tax_id field to Company model and related forms
* Update 0075_company_tax_id.py to fix typo
* Update models.py to fix typo
* Update tests.py to increment 'column_mappings.count()' to 15
* Update api_version.py
* Add --keepdb option for unit test
* Reduce server launch overhead
- isGeneratingSchema was EXPENSIVE
- Running a single unit test reduced from 30s to 3s
* Option to disable check
* Better item extraction
* Improve query efficiency
* Further queryset improvements
* Return correct data format
* Test with hugh number of serials
* Improve serialization UX
* Revert changes to unit tests
* Refactor InvenTreeTree model structure
- Allow for tree with null items
* Refactor pathstring
* Factor pathstring out into a separate mixin
- Keep tree operations separate (in InvenTreeTree)
- Pathstring operations are now in PathStringMixin
* throw error
- Ensure that this func gets removed in future commit
* Fix node delete code
* Migrate "Build" model to new structure
* Add unit tests for Build tree structure
* Refactor StockLocationTreeTest
* Implement tree rebuild test for StockItem model
* Add unit test for stock item serialization
* Refactor "Part" model to use mixin
* Add unit tests for part variant tree
* Add test for node deletion
* Adjust unit tests
* Ensure items are not created with null tree_id
* Further unit tests and updates
* Fix unit tests
* Remove duplicate check
* Adjust build fixture
* Remove rebuild call
* Fixing more tests
* Remove calls to rebuild part tree
* Add test for tree fixtures
* Report tree rebuild errors to sentry
* Remove helper func
* Updates for splitStock
* Cleaner inheritance
* Simpilfy test
- tree_id is somewhat ephemeral
* Handle null parent
* Enforce partial rebuild if parent changes
* Fix
* Remove hard-coded "parent" references
* Fix order of delete operations
* Fix unit test
* Unit test tweaks
* Improved handling for deleting a root node
* Only set tree_id if not already specified
* Only rebuild valid tree_id values
* Cast to list
* Adjust unit test
- Test values were wrong, due to bad data in fixtures
* Do not bulk delete
- mysql no likey
* Enhanced rebuild logic
* Fix for unit test
* Improve logic for _create_serial_numbers
* Unit test fix
* Remove unused function
* use better email check
* add error code for missing email settings
* Add note when not registration is enabled
* fix wrong call
* fix tests - might be worth checking if the blank check for testing is a good idea
* capture issues and print to find out what the duck is going on
* exend log
* fix context check
* Better handling of URLs when loading plugin source
- Handle complex URLs more cleanly
- Support loading from actual external host
- Support loading with specified port
* Fix URL rendering - handle "local" and "remote" components
* Use default host if not provided
* Simplify code
* Add "category" filter for BomItem API endpoint
* Filter BOM table by part category
* Tweak filter label
* Bump API version
* Schema annotation
* Fix playwright test
* Add setting to show location path as plain text in tables
* Use the Location Path setting also for Default Location in the PartTable
* Add setting to show PartCategoty as plain text
* Set DefaultLocationColumn defaultVisible to false
* Fix typo
* Simplify settings keys
* Simplify the name attribute
* Fix typo
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Add "serialize" form to build output table
* Fix dependencies for useGenerator hook
* Improve serializing of stock
- Copy test results
- Ensure fields get copied across
* Fix rendering for StockItemTestResultTable
* Enhanced playwright test
* Fix code
* Fix for unit test
* Logic fix for plugins
- Prevent tasks being run for disabled plugins
* Adjust default value for "get_plugin" method
* Fix return type
* Update typing
* Tweak unit test
* Update unit tests
* More test updates
* Logic fix for LOCK_SETTING
- Because the setting is to "allow editing", it is really an UNLOCK setting
- This setting had to be DISABLED (false) to allow editing of completed orders
* Updated logic
* Tweak unit tests
* Filter incomplete outputs by location
* Filter build allocated stock by location
* Filter sales order allocations by location
* Bump API version
* Fix API version
* Fix annotations
* Refactor stock actions into a hook
* Cleanup hooks
* Allow transfer of "incomplete" outputs
* Simplify even further
* Enable transfer of stock allocated to build order
* Remove StockItemBriefSerializer entirely
* stock actions for items allocated to sales order
* Refactor <PartDetail> page
* Refactor <StockDetail>
* Refactor <LocationDetail>
* Bump API version
* Control serializer arguments
* Refactor stock actions into a hook
* Cleanup hooks
* Allow transfer of "incomplete" outputs
* Simplify even further
* Enable transfer of stock allocated to build order
* Remove StockItemBriefSerializer entirely
* stock actions for items allocated to sales order
* Refactor <PartDetail> page
* Refactor <StockDetail>
* Refactor <LocationDetail>
* Bump API version
* SO button text
- Observe the "SALESORDER_SHIP_COMPLETE" value
* Fix palywright tests
* Adjust UI wording
- Separation between "items" and "stock"
* Add info panel if build order has no required items
* Fixes for playwright testing
- Ensure cookies are completely cleaned between sessions
- Fix base URL based on vite command
- Fix samesite cookie mode
- Prevent /static/ files being served by web server on :8000
* Remove gunicorn option
* Fix unit test
* Readjust base URL
* Simplify doCachedLogin
* Adjust text
* Ensure translations are extracted
- Otherwise, playwright will not find the right strings...
* Make admin test more reliable
* Remove asynciness
* Fix <AttachmentLink>
- Allow null "attachment" value
* Better implementation
* Cleanup
* Fixes for playwright testing
- Ensure cookies are completely cleaned between sessions
- Fix base URL based on vite command
- Fix samesite cookie mode
- Prevent /static/ files being served by web server on :8000
* Remove gunicorn option
* Readjust base URL
* Simplify doCachedLogin
* Fix logic func
* Revert webserver cmd
* Set base URL in playwrightconfig file
* Fix URL checks
* Fix URL definitions
* adjust playwright base URL
* Tweak for URL helper
* Further login tweaks
* Tweak test
* wait for API before starting tests
* Handle error
* Adjust login functions
* Don't use gunicorn
- But still use the webserver to serve static files in CI
* Enhanced login functions
* Tweak login tests
* Fix broken test
* Flipped the flippies
* UI improvement for column selection in tables
- Limit max height of dropdown
* Allow retry for instance query
* Prevent flickering when reloading instance
- Don't hide the children
- Just put a loading overlay on top
* Enhanced rendering for <InstanceDetail>
* Refactor other pages
* remove unused attributes
* [FR] Add proactive system check for site_url
Fixes#7847
* fix enviroment for tests
* fix admin tests and make them more robust
* improve tests for admin actions
* add test for all scenarios
* use right http error code
* fix error code
* remove dependency on bundle
* fix test
* Fix for "annotated_scheduled_to_build_quantity"
* Further annotation updates
* Add unit testing for annotation
* Tweak unit test
* Cast annotated expression
* Specific fields required to work
* Refactor other instances
* Update API docs
* Add useStoredTableState zustand
* Store table page size in the zustand state
* Store tablesorting data in zustand state
* Actually provide records...
* Transfer table names state
* Store hidden columns too
- This task is used for syncing translations with crowdin
- However, it has been broken for some time, and does not *extract* translations
- Thus, no *new* translations have been uploaded to crowdin recently
* rename states to better fit naming conv
* fix name
* ensure splashscreen only loads after login check
this reduces a short splash of the splashscreen even if logged in
* move loader to the middle of the screen and remove fallback on a view screens
* Improved mechanisms for data output
- Log errors against output
- Properly catch rendering errors
* Updated error handling
* Fix "render_date" tag
* Update default report template
- Make sure the helper is used
* Bug fixes
* Add stale stock email notifications
Implement automated email notifications for stock items approaching
their expiry dates. Users receive consolidated daily emails for all
their subscribed parts that are within the configured stale threshold.
Fixes#7866
* Fix for tracing init (#9860)
- Circular include means that settings.DB_ENGINE may not be available
* [bug] Custom state fix (#9858)
* Set status correctly when returning from customer
* Fix for stock item status change
- Reduced set of changes from #9781
* Handle API updates
* Fix variable shadowing
* More intelligent comparison
* Remove debug statement
* fix syntax again (#9863)
* fix(backend): change notification for INVE-W10 (#9864)
implements changes requested in
https://github.com/inventree/InvenTree/pull/9769#issuecomment-3004193476
* Tweak for tracing setup (#9865)
- DB_ENGINE is of the form "django.db.backends.postgresql", not "postgesql"
* Update README.md (#9867)
Update sponsors list
* Remove sleep call (#9866)
* New Crowdin translations by GitHub Action (#9813)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Table default cols (#9868)
* Work in progress
- Seems to reset the columns on page refresh
- Probably related to the useLocalStorage hook
* Do not overwrite until the tablestate is loaded
* Prevent table fetch until data has been loaded from localStorage
* Improved persistance
* Adjust default column visibility
* Adjust playwright test
* Clear data tweak (#9870)
* Tweaks for config path checks
* Update delete-data task
* Tweaks for config path checks (#9869)
* fix instrumentation code (#9872)
* [UI] About tweak (#9874)
* Cleanup server info modal
* Sort package info
* De-sync useLocalStorage (#9873)
* [UI] Fix thumbnail rendering (#9875)
- Fix typo which caused full image to be rendered
- This could cause significant network loading time
* Add stale stock email notifications
Implement automated email notifications for stock items approaching
their expiry dates. Users receive consolidated daily emails for all
their subscribed parts that are within the configured stale threshold.
Revert django.po
Fixes#7866
* fixed pull request issues #9875)
* unit test notifications for stale stock items
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Work in progress
- Seems to reset the columns on page refresh
- Probably related to the useLocalStorage hook
* Do not overwrite until the tablestate is loaded
* Prevent table fetch until data has been loaded from localStorage
* Improved persistance
* Adjust default column visibility
* Adjust playwright test
* Set status correctly when returning from customer
* Fix for stock item status change
- Reduced set of changes from #9781
* Handle API updates
* Fix variable shadowing
* More intelligent comparison
* Remove debug statement
* add anchor element to tabs to enable opening in new tab
* simplify
* use unstyled button instead
* also enable linking on nav panels
* make sure metakey also works (reduces duplication)
* remove headers changes
* move check for modified key to lib
* render nav items as link
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Return stock item information when serializing an existing item
* Handle stock item creation
* Commonize response
* Provide build items in response
* Formalize returned data type
* Fix unit test
* moving config files out of the source directories
Fixes#9756
* add folder for config
* fix lookup paths
* reorder ignores
* reduce diff
* better error message
* fix paths
* Update tests.py
* save global warning to db
* fix import
* more import fixes / docs
* fix default
* fix default
* ensure secret_key/get_config_file is tested fully
* try fixing path on docker
* try to make it work on GitHub CI
* refactor testfolder path into config var
* fix test path
* fix test
* do not test on docker
* more tests
* add testing for global warning dict
* fix error handling
* Report merge
* Remove auto-generated file
* Remove pre-commit file
* Revert "Remove pre-commit file"
This reverts commit 00d80bae2a.
* Update API version
* Reduced duplicated logic
* reset pre-commit config
* Added migration files
* Added unit test
* Removed redundant migration
* Updated migration file
* Added a default report template with merge enabled
* Unit test to ensure a single page is generated
* Added docs to support merge feature
* Clean up
* Clean up
* Fixed unresolved link
* Updated API version
* Fixed test report path issue
* Add plugin context for each instance
* merge in master
* Fixed formating
* Added more detailed user guide
* Updated docs
* Added assert to ensure test html output exists
* Updated docs
* Fixed report test path
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* [FR] Improve Email handeling
Fixes#7950
* extend implementation of email thread and message models
* add missing args
* add unit test
* increase test coverage
* make key not necessary
* do not consider in coverage
* add email apis
* Add email admin
* fix email configuration check
* improve rendering
* squash migrations
* add config value overview
* log if mails were send
* add additional headers
* fix api unit test
* fix url resolving
* add InvenTree specific task to issue mails
required to extend sending options (prio, reply to)
* use internal sending task to keep telemetry cleaner
* add prio handling
* add plugin handling
* add setting
* factor plugin method out
* add typing
* move function
* bump version
* fix import path
* add a test for the test endpoint
* fix checking logic
* Add anymail sending / tracking handling
* add more ordering fields to api
* remove unneeded assingment
* add basic docs
* handle incoming emails with anymail
* Add inbox handling
Closes https://github.com/inventree/InvenTree/issues/7951
* add list of supported ESPs
* add better error transparency when sending fails
* add missing migration
* combine migrations back down
* fix todos
* fix qc export
* fix missing model props
* add tests
* ensure things are passed as a list
* fix list formatting
* fix deps
* move tests
* add testing with anymail
* allow handling of priority and headers
* add test for events
* add test for inbound messages
* rename variable
* increase coverage
* fix format
* add setting doc
* fix link
* rename fnc
* disable pro test
* make messages clearer
* fix doc syntax
* fix assign
* fix test
* revert test disablement
* add enum
* disable check for now
* try changing test around
* add incoming mail processing
* fix import
* add docs
* Fix mail.md
* bump deps
* fix api version
* feat: improve user management actions
add "open profile" actions
* add lock / unlock action
* add actions for password reset
* submit coverage info to codecov
no idea why this was turned off
* bump api version
* add frontend test
* add backend test
* fix test state
* move test
* fix style
* fix name
* hide password change if not superuser
* bump playwright
see https://github.com/microsoft/playwright/issues/35183
* fix test
* fix test order
* simplify test
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Fix for stockOperationModal
* Re-check when opened status changes
* rename stockOperationModal -> useStockOperationModal
* Fix enabled status of query
* Add option to specify modalId
* Track modal state when open / close
* Prevent generators from running until forms are open
* Prevent double loading of tables
* Fix useQuery
* Fix queryKey
* Revert API change
* feat(docs): Add architecture overview
* add strucutre for rough roadmap
* add stable reference
* document stable links
* test mermaid again
* fix loading
* fix format to reduce warnings
* use local js
* add architecture ovierview
* add more sub-points
* more structure
* add general backend text
* add sme bqsic docs for frontend
* fix list syntax
* fix typo
* Add BuildOrder reference to PurchaseOrderLineItem
* Add setting to enable / disable external build orders
* Fix for supplier part detail
* Update forms
* Filter build list by "external" status
* Add "external" attribute to BuildOrder
* Filter by external build when selecting against purchase order line item
* Add frontend elements
* Prevent creation of build outputs
* Tweak related model field
- Send filters when fetching initial data
* Fix migrations
* Fix some existing typos
* Add build info when receiving line items
* Logic fix
* Bump API version
* Updated relationship
* Add external orders tab for order
* Display table of external purchase orders against a build order
* Fix permissions
* Tweak field definition
* Add unit tests
* Tweak api_version.py
* Playwright testing
* Fix discrepancy in 'building' filter
* Add basic documentation
( more work required )
* Tweak docs macros
* Migration fix
* Adjust build page tabs
* Fix imports
* Fix broken import
* Update playywright tests
* Bump API version
* Handle DB issues
* Improve filter
* Cleaner code
* Fix column ordering bug
* Add filters to build output table
* Documentation
* Tweak unit test
* Add "scheduled_for_production" field
* Add helper function to part model
* Cleanup
* Add functionality to copy part test templates when duplicating a part instance
* Bug fixes
* Tweak part duplication fields
* Add simple playwright test
* Updated unit test for part duplication
* Bump API version
* Update mantine-datatable
* Improve table hook
* Fix for table name
- Table names must be unique
- Otherwise stored column data gets corrupted
* Click through on table
* Tweak unit tests
* Render whole stock location path
- Render location pathstring, not just name
- Brings tables into line with how location is displayed elsewhere
- Closes https://github.com/inventree/InvenTree/issues/9627
* Handle error on worker boot
* Provide mechanism for config to override global settings
* Ensure overrides are observed on save
* Refactor
* Add "read_only" field to serializer
* Prevent editing for read_only settings
* Bump API version
* Update docs
* Secure logs
* Override applies to default_value
* override get_setting method
* Add unit test
* Utilize new approach to override SITE_URL
* Docs updates
* Docs tweaks
* Shortcut for get_global_setting
* Remove previous change
- Allow validation to be performed within the InvenTreeSetting class
* Override INVENTREE_BASE_URL setting
* Handle error on worker boot
* Tweak unit test
* Add InvenTreeBarcodeMixin to SalesOrderShipment
* Barcode model type code method added for SalesOrderShipment class
* Add barcode data to SalesOrderShipment serializer
* Bump API version
---------
Co-authored-by: meenaraj22 <meena@blaze.ws>
Co-authored-by: Matthias Mair <code@mjmair.com>
* add hidden field and logic to reduce clicks for mfa logins
* refactor to seperate function to reduce complexity
* fix missing imports
* fix style
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Add shell task
* Filter parts by parameter value
* Allow more operation types
* Working on table filtering
* Filter improvements
* Update on enter key
* Improved query logic
* Enable filter for "generic" parameter types
* Placeholder text
* Documentation updates
* Fix typo
* Fix for boolean part parameter field
* Add API unit testings
* Cleanup
* add playwright tests
* feat(frontend): Add control character handling to barcode text input.
Ports part of 8059fb1e05 to Platform UI.
Fixes#7529.
* feat(frontend): Submit barcode scan on EOT character.
Automatically submits 2D barcode scans when end of transmission character is input.
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* feat(frontend): Add grouping in the admin center
* fix name
* make sections more distinct
* re-arrange sections
* ensure plugin panels work
* fix missing key issue
* fix test name
* refactor
* rename functions
* move checking for a package install out
* [FR] Add check to cli tools to confirm the right commands for deployment method are used
Fixes#9684
* also log pkg enviroment detection
* vendor is_true
* ensure content is loaded in pkg enviroment
* fix tests and imporve error message
* cleanup
* simplify
* ensure runs in misconfed enviroment
* fix(backend): ensure deps are coupled
* bump deps
* more constraints
* run dep resolver
* expand resolve even more
* lower lxml / xmlsec
* lower allauth
Added clarification on how to change the timezone correctly. The documentation -- if carefully read -- explains how to change the timezone but it can be easily missed. I also explicitly mentioned the specific variable that must be set to change the timezone from UTC
* refactor(doc): only use one command
* restructure
* move all generated helpers to a dedicated directory
* move to pathlib
* and more pathlib
* add empty generated folder
* add stable links for external docs
this is usefull for the CII best practices badge and other sites where we might need stable links; assuming we maintain control of docs.inventree.org seems like a stable bet with current structures
* fix checking logic
* fix link target
* Update SECURITY.md with link
* restructure headers and add hall of fame
* add cpe/cve policy
* add CoC and Security Policy links in readme
* update contributing link
* add link to Threat Model
* update dead links
* Ensure pagination limit is set on schema list queries
* Bump api version
* Update api_version.py
* Bump version again
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Provide callback function for barcode scan dialog
* Adds hook for barcode scan dialog
* Fix callback processing
* Add function to extract API URL for a model instance
* Tweak page titles
* Extract instance data when scanning a barcode
* Scan item into location
* Scan in stock location
* Remove notYetImplemented func
* Revert "Remove notYetImplemented func"
This reverts commit a35408380e.
* Add stock item action
* Add playwright tests
* feat(backend): better warning on missing migrations
* add debug info to some tasks
* ensure db would even be accessed before raising concerns
* add more markers
* Add decorator to log flow
* reduce calls
* reduce fnc down
* Fix for email sending
- Extract valid email for user
- Do not send if email not configured for user
* Improve email address filtering logic
* Fix return type hint
* Pass more stuff to window
* Expose form functions to plugin context
* Breaking: Render plugin component in context tree
- Required due to createRoot function
- Adds necessary context providers
* Fix context
* Provide MantineThemeContext
* Bundle mantine/core
* Hack for useNavigate within ApiForm
- Errors out if called within plugin context
- Workaround to catch the error
* Update build cmd
* Define config for building "Library" mode
* Update package.json
* Add basic index file
* Factor out ApiEndpoints
* factor out ModelType
* Factor out role enums
* Further refactoring
* More refactoring
* Cleanup
* Expose apiUrl function
* Add instance data to plugin context type def
* Tweaks for loading plugin components
- LanguageContext must be on the inside
* Tweak StylishText
* Externalize notifications system
* Update lingui config
* Add functions for checking plugin interface version
* Extract package version at build time
* Enhance version checking
* Revert variable name change
* Public package
* Add README.md
* adjust packge name
* Adjust name to include org
* Update project files
* Add basic changelog info
* Refactoring to expose URL functions
* Refactor navigation functions
* Update package and README
* Improve navigateToLink function
* Refactor stylish text
- Move into ./lib
- Do not require user state
* Revert changes
- StylishText throws error in plugin
- Low priority, can work out later
* expose function to refresh page index
* Provide RemoteComponent with a method to reload itself
* Bump version
* Cleanup tests
* Prevent duplicate --emptyOutDir arg
* Tweak playwright tests
* Expose role and permission enums
* Fix imports
* Updated docs
* Fix spelling, typos, etc
* Include more package version information
* Expose more version context
* Cleanup
* Probably don't need hooks
* Fix links
* Docs updates
* Fix links
* Add checkClose function to forms
- Allow custom check for whether form should be closed
* Add form to jump to serial number
* Tweak stock detail display
* Remove dead field
(might fix later, but it's hard with the current API)
* Add some icons
* Enhance extract_int functionality
* Add API endpoint for "next" and "previous" serials for a given stock item
* Add serial number navigation on stock item page
* Add playwright tests
* Bump API version
* Fix for serial number clipping
* Another tweak
* Fix AllUnitList schema operation and serializer to match actual response
* Fix LicenseViewSerializer to match actual response
* Remove references to credits page (removed in #8811)
* Allow null commit_branch for detatched HEAD state
* Fix version formatting, add test, clean up parser
* Fix schema mapping and return type for VersionTextView
* Fix and test version off-by-one bug
* API version bump
* Merge version tests, enforce more formatting constraints for parsing
* Cleanup UserDetail page
* Cleanup display
* Re-use UserTable
* Add 'users' permission role
* Check user roles in "admin center"
* Revert "Add 'users' permission role"
This reverts commit 35b047b2f9.
* Improve display logic
* Expose group rule-sets to API
* Prefetch rule_sets
* Add 'label' to RuleSetSerializer
* Add basic RuleSet table
* Add API endpoints for RuleSet model
* Edit group roles via table
* Refactor user permissions checks
- Remove duplicate function calls
- Refactor permission checks into new file
* Further refactoring
* Even more refactoring
* Fix user settings permission
* Add TransferList component
* Tweak GroupDrawer
* Tweak UserDrawer
* adjust user groups via API / UI
* Allow "users" detail on Group API
* Bump API version
* Enumeration of RuleSet name
* Update
* Add permission check
* Update src/frontend/src/pages/Index/Settings/AdminCenter/UserManagementPanel.tsx
Co-authored-by: Matthias Mair <code@mjmair.com>
* uncomment warning
* Extend enum usage
* More checks
* Bug fix
* Fix permission checks
* Additional testing for user roles endpoint
* Updated permission classes
- RolePermission with read-only fallback
- RolePermission with additional staff requirement
* Do not allow creation of new RuleSet objects
* Cleanup permission checks and unit tests
* Cleanup UI permission checks
* Updated class dostrings
* Cleanup
* Cleanup permission checks for UserTable
* Add playwright tests for "permission" checks
- Basic for now
- Can be extended in the future
* Tweak unit tests
* Adjust layout of warning / error messages
* Tweak group table logic
* Table cleanup
* Display roles associated with a particular group
* Cleanup
* Tweak user detail page
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Remove hardcoded currency enum from schema
* Convert schema custom key enums to int to allow customized keys to validate
* Convert stock status key enums to int to allow customizations to
validate in schema
* api version bump
* fix remaining operationId errors
* fix errors
* fix another error
* fix missing model
* ensure we do not ignore warnings anymore
* Restore enumerated help text for currencies
* Remove commented block of old code
* Restore custom key enumerated values to schema documentation
* Restore status key enumeration to schema documentation
* fix more enums
* Add debug definitions for schema generation
* fix schema generation for PluginRelationSerializer
* add migrations
* fix enum names for allauth schema duplications
* bump api version
---------
Co-authored-by: Joe Rogers <1337joe@gmail.com>
* Remove hardcoded currency enum from schema
* Convert schema custom key enums to int to allow customized keys to validate
* Convert stock status key enums to int to allow customizations to
validate in schema
* api version bump
* Restore enumerated help text for currencies
* Remove commented block of old code
* Restore custom key enumerated values to schema documentation
* Restore status key enumeration to schema documentation
* Updated type hints
* Fix tooltip bug
* Check user when sending notification
* Fix test
* Update unit test
* More unit test fixes
* Tweak playwright tests
* add search notes and tie user search settings to checkboxes in search drawer
* add user setting to optionally search the notes of objects
* add search filter test
* add PR link
* add limit parameter
* typo, meant to check part result
* resolve api_version.py conflict
* don't use search_whole and search_regex together
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* refactor(frontend): seperate Alerts into own component
* refactor debug mode info
* add error code for debug mode and render help links in alerts
* add error message for background worker
* add error code for server restart required
* Add error code for missing email settings
* fix various typings
* add error code for missing migrations
* Add default metadata model for schema generation
* Add type hints and annotations where needed for schema generation
* Bump api version
* Fix version bump
* Add request body to schema for bulk delete operations, deconflict list
vs single delete operation ids
* API version bump
* Fix variable name conflict
* Switch from post-processing hook to AutoSchema extension
* Loosen typing on filter dict, correct expected code in tests
* Filter by view class instead of path
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Pass extra options through to data export plugins
* Add PartParameterExporter plugin
- Useful for including part parameter data in exporter
* Fix bug in InvenTreeTableHeader
* enable export for partparametertable
* Simplify tests
* Add typing hints
* Add part full name to supplier part table
* Add context variables for sales order report to the docs
* Added more context variables on orders to the docs
* fixed small bug in doc report sample templates
* Allow port 4173 (vite preview)
* Change 'base' attr based on vite command
* Allow api_host to be specified separately
* Harden API host functionality
* Adjust server selections
* Cleanup vite.config.ts
* Adjust playwright configuration
- Allow to run in "production" mode
- Builds the code first
- Runs only the backend web server
- Not suitable for coverage
* Tweak github actions
* Tweak QC file
* Reduce number of steps
* Tweak CI file
* Fix typo
* Ensure translation before build
* Fix hard-coded test
* Test tweaks
* uncomment
* Revert some changes
* Run with gunicorn, single worker
* Reduce log output in DEBUG mode
* Update deps
* Add global-setup func
* Fix for .gitignore file
* Cached auth state
* Tweak login func
* Updated tests
* Enable parallel workers again
* Simplify config
* Try with a single worker again
* Single retry mode
* Run auth setup first
- Prevent issues with parallel test doing login
* Improve test setup process
* Tweaks
* Bump to 3 workers
* Tweak playwright settings
* Revert change
* Revert change
* Improve custom maintenance mode backend
- Utilizing global settings functions
- Will use global cache if available
- Fewer DB hits per request
* Twaeak query limits
* Add part full name to supplier part table
* Add context variables for sales order report to the docs
* Added more context variables on orders to the docs
* Update node version
* Install nvm
* Use n instead of nvm
* Use same approach in devcontainer
* nvm -> npm
* Split commands
* Fix typo
* Workaround : install bash
* Tweak playwright tests
* Bump number of retries
* Update deps
* Only one worker
* SEcurity fix
* Adjust
* Refactor variable name
* Add part information when allocating serial numbers
- Easier identification of which part is being allocated
* Fix for part stock rendering
* add docs for governance and security
* fix formatting
* rename page
* add thread modell info
* fix list rendering
* Add links to the thread modell throughout the docs
* add link to devsecops
* fix thread / threat
* fix path
* text fixes
* Add function to star / unstar a part
* Also use with category
* Email notification when a part is changed
Fixes#7834
* enable disabling of recent checks
* Add error handler
* remove unneeded function
* Define which builtin plugins are always-active
* Adds 'mandatory' property to PluginConfig
* Update API / frontend
* Fix form method
* Tweaks
* Bump API version
* Tweak unit tests
* [UI] Change default web prefix
- Adjust default from "platform" to "web"
- Much more standard prefix
* Cleanup
* Fixes for playwright tests
* Fix unit tests
* Refactor base_url into getBaseUrl
* Move data export code out of "importer" directory
* Refactoring to allow data export via plugin
* Add brief docs framework
* Add basic DataExportMixin class
* Pass context data through to the serializer
* Extract custom serializer
* Refactoring
* Add builtin plugin for BomExport
* More refactoring
* Cleanup for UseForm hooks
* Allow GET methods in forms
* Create new 'exporter' app
* Refactor imports
* Run cleanup task on boot
* Add enumeration for plugin mixin types
* Refactor with_mixin call
* Generate export options serializer
* Pass plugin information through
* Offload export functionality to the plugin
* Generate output
* Download generated file
* Refactor frontend code
* Generate params for downloading
* Pass custom fields through to the plugin
* Implement multi-level export for BOM data
* Export supplier and manufacturer information
* Export substitute data
* Remove old BOM exporter
* Export part parameter data
* Try different app order
* Use GET instead of POST request
- Less 'dangerous' - no chance of performing a destructive operation
* Fix for constructing query parameters
- Ignore any undefined values!
* Trying something
* Revert to POST
- Required, other query data are ignored
* Fix spelling mistakes
* Remove SettingsMixin
* Revert python version
* Fix for settings.py
* Fix missing return
* Fix for label mixin code
* Run playwright tests in --host mode
* Fix for choice field
- Prevent empty value if field is required
* Remove debug prints
* Update table header
* Playwright tests for data export
* Rename app from "exporter" to "data_exporter"
* Add frontend table for export sessions
* Updated playwright testing
* Fix for unit test
* Fix build order unit test
* Back to using GET instead of POST
- Otherwise, users need POST permissions to export!
- A bit of trickery with the forms architecture
* Fix remaining unit tests
* Implement unit test for BOM export
- Including test for custom plugin
* Fix unit test
* Bump API version
* Enhanced playwright tests
* Add debug for CI testing
* Single unit test only (for debugging)
* Fix typo
* typo fix
* Remove debugs
* Docs updates
* Revert typo
* Update tests
* Serializer fix
* Fix typo
* Offload data export to the background worker
- Requires mocking the original request object
- Will need some further unit testing!
* Refactor existing models into DataOutput
- Remove LabelOutput table
- Remove ReportOutput table
- Remove ExportOutput table
- Consolidate into single API endpoint
* Remove "output" tables from frontend
* Refactor frontend hook to be generic
* Frontend now works with background data export
* Fix tasks.py
* Adjust unit tests
* Revert 'plugin_key' to 'plugin'
* Improve user checking when printing
* Updates
* Remove erroneous migration file
* Tweak plugin registry
* Adjust playwright tests
* Refactor data export
- Convert into custom hook
- Enable for calendar view also
* Add playwright tests
* Adjust unit testing
* Tweak unit tests
* Add extra timeout to data export
* Fix for RUF045
* Allow bulk selection of sales order shipment
* Tweaks
* Support bulk-edit for location parent and category parent
* Allow more login attempts for playwright
* Refactor BulkDeleteMixin
* Implement BulkUpdateMixin class
* Refactor NotificationsTable
- Use common bulkdelete operation
* Update successMessage
* Update metadata constructs
* Add bulk-edit support for PartList endpoint
* Implement set-category for part table
* Cleanup old endpoint
* Improve form error handling
* Simplify translated text
* Add playwright tests
* Bump API version
* Fix unit tests
* Further test updates
* https://github.com/inventree/InvenTree/pull/6293
* refactor to a shared component
* refactoring container stuff to a wrapper
* move title to wrapper
* move logoff and loader to wrapper
* mvoe functions to general auth
* seperate login and register into seperate pages
* unify auth styling
* rename component
* adapt to new look
* check if registration is enabled
* feat(frontend):show if redirecting
* reduce diff
* fix missing import
* remove double warning
* Add deps for @fullcalendar
* Basic calendar setup
* Add locale support
* Add custom <SegmentedIconControl> component
* optional 'control' for panel
* Scaffolding out build index page
* Fetch build orders based on calendar dates
* Display builds
* Click to navigate to build
* Working on custom header
* Implement button functionality
* Display current month name
* Implement datepicker dropdown
* Adjust layout
* Custom rendering
* Include part detail
* Implement hook to track calendar state
* Clearing search causes immediate update
* Offload core functionality into hook
- Adds search input
* Spread props correctly
* Cleanup
* Allow build orders to be edited directly from calendar view
* Cleanup
* Fix for InvenTreeCalendarProps
* Improve date range filtering for Build model
* Simplify BuildFilter
* Refactoring
* PurchaseOrder calendar implementation
* Allow edit of purchase orders
* Refactor and implement for all order types
- Add missing "issue_date" field for SalesOrder
- Refactor API for other order types
- Fix rendering issues
* Bump API version
* Add playwright tests for calendar (simple)
* Fix migrations
* Simplify notifications
* Refactor filter components
- Make them more generic
* Enable custom filters for calendars
* Custom filters per table
* Display status label
* Refactoring
* Update playwright tests
* Update build order docs
* Bug fix for order date editing
* Update purchase order docs
* Return Order docs
* Update date formatting
* Ensure notes are not removed when generating schema
* Skip remaining conditional field removals when generating schema, remove removable fields from required lists
* Update API version, add schema gen state check for api-doc endpoint
* Add test for generate schema state
* Add test for schema postprocessing function
* Filter nullable + read_only fields out of schema required lists
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Caddyfile: Redirect asset requests
- Ensure the static asset files are served by the proxy
- Reduce gunicorn / python load
- Significant server performance increase
* Allow CORS requests to 'assets' path
* Update static assets path for vite build
* Remove RedirectAssetView
* Specify relative base path
Ref: https://vite.dev/guide/build.html#relative-base
* Revert settings.py
* Revert caddyfile
* Remove defunct unit test
* Add timeout to test
* Add attributes to TableFilter type def
* Refactoring
* Refactor ProjectCodeFilter
* Provide simple string rendering of a dynamic filter
* Refactor ResponsibleFilter
* Further refactoring
* More refactoring
* Fix placeholder value
* [Bug] Fix search for StockTrackingList
- Removed invalid field
* Add unit test coverage for failing condition
* Fix 'notes' field for extra line item API
* increase character limits on all link fields to 2000
* update test to still trigger
* Don't fail when diff is too big for echo (#9205)
* Reduce severity of error message (#9209)
- Currently flooding sentry.io with reports
* Disable pagination for ConfigList class (#9210)
* [API] Auth login error (#9212)
Fixes#9211
* [UI] Table Update (#9220)
- Retain user selection for pageSize
* renumber migrations after merge from master
* Remove quick actions (#9222)
* Remove placeholder components
- No function
- Cleanup for 1.0.0
* Remove Placeholder.tsx
* feat(backend): Add user profile (#9116)
* Add user profile
* fix choice set
* ensure primary_group is valid
* add missing migrations
* fix tests
* merge migrations
* add migration test
* add new model to ruleset
* ensure changed to the m2m conenction also validate primary grups
* move signals
* fix import?
* patch user language through
* use set methods correctly
* bump api
* refactoring to make debugging and extending easier
* fix dum recurrsion problem
* fix user pk lookup
* rename migration
* add user and group page
* cleanup
* add hoverCard for user / owner / group render
* include owner_model in owner responses
* move user serializers to users
* add profile to list
* add brief serializer for profiles
* ensure profile is present in most apis
* extend rendered data
* store and observe langauge in profile
* reduce unneeded complexity
* enable access to full profle (including internal fields) in me serializer
* move theme to a single object
* persist theme settings
* fix radius lookup
* remove debug message
* fix filter
* remove unused field
* remove image fields
* add setting to control showing profiles
* fix settings
* update test
* fix theme reload
* Add contact UI
* Add profile edit screen
* fix test
* Add testing for user theme panel
* fix var name
* complete coverage of theme
* Add test for new pages
* make test more reliable in strict mode
* remove step
* fix ref
* add verbose names
* fix used setting
* extend tests
* fix permissions
* fix lookup
* use lookup to enuse ursls stay valid
* update migrations
* Add position field
* fix permissions
* Fix font size in location column (#9230)
* [WIP] Background reports (#9199)
* Update report generation progress
* Add shim task for offloading report printing
* Cleanup
* Add detail endpoints for label and report outputs
* Display report printing progress in UI
* Implement similar for label printing
* Reduce output for CI
* Add plugin slug
* Bump API version
* Ensure it works with machine printing
* Fix null comparison
* Fix SKU link
* Update playwright tests
* Massively reduce log output when printing
* handle null values in existing db data
* fix test to pass at max character limit again
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Joe Rogers <1337joe@users.noreply.github.com>
* Add user profile
* fix choice set
* ensure primary_group is valid
* add missing migrations
* fix tests
* merge migrations
* add migration test
* add new model to ruleset
* ensure changed to the m2m conenction also validate primary grups
* move signals
* fix import?
* patch user language through
* use set methods correctly
* bump api
* refactoring to make debugging and extending easier
* fix dum recurrsion problem
* fix user pk lookup
* rename migration
* add user and group page
* cleanup
* add hoverCard for user / owner / group render
* include owner_model in owner responses
* move user serializers to users
* add profile to list
* add brief serializer for profiles
* ensure profile is present in most apis
* extend rendered data
* store and observe langauge in profile
* reduce unneeded complexity
* enable access to full profle (including internal fields) in me serializer
* move theme to a single object
* persist theme settings
* fix radius lookup
* remove debug message
* fix filter
* remove unused field
* remove image fields
* add setting to control showing profiles
* fix settings
* update test
* fix theme reload
* Add contact UI
* Add profile edit screen
* fix test
* Add testing for user theme panel
* fix var name
* complete coverage of theme
* Add test for new pages
* make test more reliable in strict mode
* remove step
* fix ref
* add verbose names
* fix used setting
* extend tests
* fix permissions
* fix lookup
* use lookup to enuse ursls stay valid
* update migrations
* Add position field
* fix permissions
* Force label printing to background worker
* Refactor "check_reload" state of machine registry
- In line with plugin registry
- More work can be done here (i.e. session caching)
* Better handling of call_plugin_function
* Wrapper for calling machine function
* Use AttributeError instead
* Simplify function offloading
* Check plugin registry hash when reloading machine registry
* Cleanup
* Fixes
* Adjust unit test
* Cleanup
* Allow running in foreground if background worker not running
* Simplify call structure
* Add type hints for name, address, expired, and active
* Add nullable to various fields that return null in the test dataset
* Removed nullable type hint, add default boolean value instead of nullable
* Bump schema version
* Add schema version notes, add localized tags for doc string
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* https://github.com/inventree/InvenTree/pull/6293
* refactor to a shared component
* refactoring container stuff to a wrapper
* move title to wrapper
* move logoff and loader to wrapper
* mvoe functions to general auth
* seperate login and register into seperate pages
* unify auth styling
* rename component
* adapt to new look
* check if registration is enabled
* reduce diff
* reduce diff
* fix import
* add aria label to make more reliable
* make cap match
* ensure that confirm only works with valid inputs
* leave error for non-matching pwd to API
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Remove 'url' field from serializers
- Not used in any official client
- Inconsistent use across models
* Bump API version
* Adjust unit tests
* Fix API version
* use ref pattern on PO duplicate
* use ref patterns on duplicate for other types of orders
* revert unintentional change to pre-commit
* add playwright tests
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Remove legacy SettingsContentMixin
- Only used for rendering into old UI
- No longer useful
* Refactor path for NavigationMixin
* Fix typos
* Fix borked import
* Harden playwright tests
* Refactor search drawer
- Allow result groups to collapse
* Add tooltip
* Fix menu position
* Navigate through to complete list of results
* Refactor table headers
* Add index pages for SupplierPart and ManufacturerPart models
* backend: allow split search by company type
* Fix panel naming bug
* Fix model URLs
* Split company results by company type
- Allows better routing to results list
* Remove debug msg
* Fix 'button within button' issue
* Additional playwright tests
* Fix logic for adding items to SalesOrder
* Same thing for purchase orders
* Update serializers.py
Revert typo fix
- Otherwise, we need to do an API bump and the PR can't be back-ported!
* Fix default values for pricing override
* Fix broken calculation for sale pricing
- Was previously excluding COMPLETED orders
* Fix for PricingOverviewPanel
* Fix for InvenTreeMoneySerializer
- Numbers should be represented as numbers!
* Front-end wrangling too
* Fix unit test
* Revert to alpine3:20 / postgres:16
* Remove old hack
- No longer needed as we are using python 3.11
* Update package requirements for devcontainer
Also fixes some docker warnings from the alpine Dockerfile
* Specify SITE_URL
* Reduce log output during docker image testing
* Remove blocking steps from devcontainer setup
* Ensure postCreateCommand.sh fails
* Mount postgres db to separate dir
- Avoid ownership issues of 'dev' dir
* Bump devcontainer docs
* move version tests
* factor out read_license_file
* add testing for license file
* ignore special case when we create the schema
* extent no found api tests
* extend info view tests
* try fixing test?
* fix?
* test user create api
* measure impact of removing bom import
* remove dead code
* Revert "measure impact of removing bom import"
This reverts commit bb31db05e3.
* remove dead code
* remove plugin tags that were made for CUI
* add testing for filters
* add test for config delete
* add more api tests
* adjust tests
* fix test
* use superuser
* adapt error code
* Add test for https://github.com/inventree/InvenTree/pull/9077
* add mixin_available mixin
* make check_reload more observable
* test check_reload too
* test clean_barcode
* reset after testing
* extend datamatrix testing
* debug print
* fix assertation
* Update docker image
- Move from alpine 3.19 to alpine 3.21
- Move from postgres13_client to postgres17_client
* Update docker-compose file
- Move from postgres:13 to postgres:16
- Move from redis:7.0 to redis:7-alpine
* Update docs
* Update docker docs
* Separate Dockerfile for devcontainer
- Debian based (python3.11-bookworm)
- Install essential system packages
* Instal postgres client
* Further devcontainer updates
- Bump postgresql image from 13 to 15
- Store psql data in the dev/psql directory
- Install required frontend packages
* Use --host mode for frontend server
* Tweak devcontainer docs
* Bump pre commit config file
* Revert "Bump pre commit config file"
This reverts commit bbfd875ac8.
* [UI] Settings to contrl editing of "completed" orders
Fixes#8976
* only check for completness if locking is enabled
* also lock lines
* allow editing of status to get an order "free" again
* adjust breadcrumbs to include current item
* Add last breacdrumb to various pages
* Add user settings for last breadcrumb
* add breacrumbs to company subpages
* use getDetailUrl instead
* set default
* change description
* fix styles
* fix merge
* rename to camelCase
---------
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
* Set up CI with Azure Pipelines
[skip ci]
* update used tasks and python
* Update test_stats.yml for Azure Pipelines
* fix install command
* fix uv system setting
* Update test_stats.yml for Azure Pipelines
* Update test_stats.yml for Azure Pipelines
* Update test_stats.yml for Azure Pipelines
* ignore test
* remove old test
* remove comments
* update triggers
* Update README.md
* fix style
* Revert "ignore test"
This reverts commit f96f8caf4e.
* remove dead link to credits
* ignore azure issues
* lower runtime to fix dependabot resolution
* Revert "split up python updates and assign to @matmair for manual fixes where necessary (#8772)"
This reverts commit 04d7a96dde.
* Add new global setting
* Convert to base currency on receipt
* Fix total price rendering in PO table
* Fix for tasks.py
* Update .gitignore
- Ignore auto-generated files
* Update docs
Improved documentation for pricing/currency support
* Updates
* Fix caching for default currency
- Now managed better by session caching
* Add unit test for new feature
* Playwright test fixes
* Validate copying of media files
* Validate media files
* Adjust playwright setup
* Allow multiple attempts to fetch release information
* Tweak unit tests
* Revert changes to .gitignore file
- Just trying stuff at this point
* Add debug msg
* Try hard-coded paths
* Remove debug prints
* Abs path for database
* More debug
* Fix typos
* Revert change to db name
* Remove debug statements (again)
* Cleanup playwright tests
* More test tweaks
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Better handling of request object in serializers
* Pass request object through
- Required to extract user information
* Strip column header during import
- Prevent mismatch due to whitespace
* Fix for "minimum stock" field
* Fix for part serializer
* Extract default values on import
* Remove outdated migration message
* Bump API version
* Refactor label printing
- Move "print" method to template
- Allows for internal calls to printing (e.g. plugins)
* Generate dummy request
- Required to trick WeasyPrint
* Refactor reportprinting
* Add timeout for unit test
* More unit tests
* Tweak unit test
* Updated comment
* remove preference-view
* bump api
* move tag test to seperate file
* extend tests
* make tags more robust
* Revert "remove preference-view"
This reverts commit b95aaaff3c.
* Revert "bump api"
This reverts commit 8fc29186cf.
* more coverage
* re-enable test
* even more tests
* just ignore it
* moa test
* crude debugging
* more debugging
* adapt test
* reduce debugging
* fix test_part_image
* remove TemplatePrintBase
* fix style
* fix code
* fix check
* ensure none exsisting image to not cause issue
* reduce tags more
* remove splashscreen usage
* fix test
* reintroduce inventree_logo
* re-add splashscreen fnct
* re-add needed tag
* re-add date renderer
* simplify away user specific stuff - there are no users in reports
* and simplify a bit more
* increase coverage
* fix format
* and more coverage
* fix render_date
* more coverage
* Extend api to also include customize functions
* [FR] Re-Implement customize options
Fixes#8818
* re-implement header
* add splashscreen customisation
* make simpler
* fix rendering
* bump api
* add admindocs
* add tag export command
* add filter export
* switch to yaml
* upload meta info to artifacts
* format workflow file
* fix creation command
* keep all artifacts in schema repo
* fix namespace
* use one command for export
* include tags and filters in docs
* change default filename
* fix call
* fix itteration syntax
* clean up rendering
* fix formatting
* simple escape
* Unit test for SalesOrder data migration
* make field checks more stable
* Adjust migration strategy
* Fix for data migration
* Simplify login test for playwright
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Middleware for caching against request
* Create helpers for setting / getting session cache
* Settings objects check session cache first
* Ensure setting is removed from session cache when updated
* Cleaner implementation
* Fix cache cleanup
- ONLY allow access if there is a request object
- Ensure cache is deleted once session is over
* Skip plugin registry reload check
* Add 'start_date' to Build model
* Add to serializer
* Add filtering and ordering
* Update BuildOrderTable
- Add new column
- Add new filtering options
* Add sanity check for start_date
* Add 'start_date' field to BuildOrder form
* Update docs
* Bump API version
* Tweak unit testing
* Display 'start_date' on build page
* Refactor UI tests
* Fix for 'date' field in forms
* Add additional unit tests
* Fix helper func
* Remove debug msg
* Increase upload timeout for attachments
* Increase default API timeout
- To account for distant connections
* Use longer timeout when uploading files
* Debug for RTD testing
* Adjust commit extraction
* Cleanup debug output
* Include more vars in output
* Move debug output to top of file
* Add useful link
* Slight tweak to <DetailsTable>
* Responsive layout for user settings
* Make menu links responsive
* Update <FactCollection />
* Update part pricing panels
* Adapt details column count
- Based on element width
* Pin minimum size of thumbnail
* Cleaner implementation
* Revert again
- Use element size, not screen size
* Add expiry on line item receive from PO
* add backend test
* reset pre-commit
* increment inventree api version
* use None as default expiry date
* check global setting STOCK_ENABLE_EXPIRY
* check for default expiry in line item receive
* use dayjs
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Add 'created_by' field to order API endpoints
* Add 'created_by' filter
* Allow ordering by 'created_by' field
* Update UI tables
- Show "Created By" column
- Column sorting
- Column filtering
* Cleanup order detail pages
* Bump API version
* Refactor table filters
* Fix BuildOrderTable filters
* Create ApiContext provider
* Utilize new context
* Remove api from global context
* Refactor <InvenTreeTable>
- No longer need hard-coded API constant
* Refactor useInstance hook
* Refactoring
- QueryCountDatshboardWidget
- NotesEditor
- RenderInstance
* Refactor multiple tables
* Fix typos
* Refactor useFilters hook
- Allow plugins to use this hook!
* Further refactoring
* Refactor API forms
* Cleanup context routing
* Fix provision order
* Fix server command in Dockerfile
* Ensure invoke is installed into the venv
* Run extra check in docker build step
* Improve documentation
* Intercept ModuleNotFoundError
- Clear error message
* Docs updates
* Add extra check to dev docker build
* Cleanup tasks.py
* Prevent double activation of venv
* Change order of operations
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* basic mixin file
* Add basic check for model type support
* Enhanced documentation for Caddyfile
* Additional documentation around proxy server
* Remove code from other PR
* Remove use_x_forwarded_port setting
- As per the docs, this is ignored in favour of use_x_forwarded_host
- So, is not being used anyway
* Add note on x_forwarded_host option
* Add warning message if SITE_URL not provided
* Add support for SECURE_PROXY_SSL_HEADER
* Update configuration template file
* Update SITE_URL docs
* Remove line
* Re-add use_x_forwarded_port
* Docs tweak
* Improve wording
* Fix broken link
* Update page permissions
- Add permission check to <InstanceDetail>
- HIde breadcrumbs and tree for part
- Hide breadcrumbs and tree for stock
* Additional permissions checks
* Enhancements for "custom state" form
- More intuitive form actions
* Improve back-end validation
* Improve table rendering
* Fix lookup for useStatusCodes
* Fix status display for SockDetail page
* Fix SalesOrder status display
* Refactor get_custom_classes
- Add StatusCode.custom_values method
* Fix for status table filters
* Cleanup (and note to self)
* Include custom state values in specific API endpoints
* Add serializer class definition
* Use same serializer for AllStatusView
* Fix API to match existing frontend type StatusCodeListInterface
* Enable filtering by reference status type
* Add option to duplicate an existing custom state
* Improved validation for the InvenTreeCustomUserStateModel class
* Code cleanup
* Fix default value in StockOperationsRow
* Use custom status values in stock operations
* Allow custom values
* Fix migration
* Bump API version
* Fix filtering of stock items by "status"
* Enhance status filter for orders
* Fix status code rendering
* Build Order API filter
* Update playwright tests for build filters
* Additional playwright tests for stock table filters
* Add 'custom' attribute
* Fix unit tests
* Add custom state field validation
* Implement StatusCodeMixin for setting status code values
* Clear out 'custom key' if the base key does not match
* Updated playwright testing
* Remove timeout
* Refactor detail pages which display status
* Update old migrations - add field validator
* Remove dead code
* Simplify API query filtering
* Revert "Simplify API query filtering"
This reverts commit 06c858ae7c.
* Fix save method
* Unit test fixes
* Fix for ReturnOrderLineItem
* Reorganize code
* Adjust unit test
* Add <ChangePassword> page
* Rename Set-Password to ResetPassword
* Add unit testing
* Ensure user is properly logged into page
* Update playwright tests
* Small tweaks
* Re-add html account base
Fixes#8690
* fix base template
* override dj-rest-auth pattern to fix fixed token model reference
* pin req
* fix urls.py
* move definition out to separate file
* fix possible issues where email is not enabled but UI shows that registration is enabled
* fix import order
* fix token recovery
* make sure registration redirects
* fix name change
* fix import name
* adjust description
* cleanup
* bum api version
* add test for registration
* add test for registration requirements
* Remove django-import-export requirement
* Update settings.py
* Clean up admin files
* Remove much of the old BOM exporter framework
* Add note for future self
* Remove dead unit test files
* Remove defunct AjaxView classes
* Remove InvenTreeRoleMixin
* Update docs for data import
* Export docs
* Refactor form fields
- Allow error message to be passed through via field definition
- Return error information to onFormError
* Fix debounce issue for text fields
* Fix for useForm hook
* Badge fix
- Fix badge rendering for SalesOrderShipment
* Cleanup unit test
* Use LABEL_ENABLE and REPORT_ENABLE settings in PUI
* Cleanup base.html
- Should reduce db hits slightly
* Remove defunct homepage settings
* Cleanup old settings
* Adjust unit test
* Remove custom context processors
- Only merge after 0.17.0 release
- Remove code which injects custom context variables into CUI requests
- Not needed for new API-based PUI code
- Speeds up requests - remove unnecessary DB hits
* Remove broken import
* Remove custom staticfile processing
- No longer needed as CUI is gone
* Add zimor to checks
* fix format
* use same version of checkout everywhere
* do only persist credentials if needed
* remove duplicate clones
* fix pin syntax
* fix pins
* fix template injection
* another injection fix
* Revert "remove duplicate clones"
This reverts commit 9a00ae2bbb.
* Add GH token for further rules
label:"Please verify that this bug has NOT been raised before."
description:"Search in the issues sections by clicking [HERE](https://github.com/inventree/inventree/issues?q=) and read the [Frequently Asked Questions](https://docs.inventree.org/en/latest/faq/)!"
description:"Search in the issues sections by clicking [HERE](https://github.com/inventree/inventree/issues?q=) and read the [Frequently Asked Questions](https://docs.inventree.org/en/latest/sref/faq)!"
options:
- label:"I checked and didn't find a similar issue"
required:true
@@ -37,15 +37,15 @@ body:
label:"Expected behaviour"
description:"A clear and concise description of what you expected to happen."
placeholder:"..."
- type:checkboxes
- type:dropdown
id:deployment
attributes:
label:"Deployment Method"
options:
- label:"Docker"
- label:"Package"
- label:"Bare metal"
- label:"Other - added info in Steps to Reproduce"
- Docker
- Package
- Bare metal
- Other - added info in Steps to Reproduce
- type:textarea
id:version-info
validations:
@@ -54,13 +54,25 @@ body:
label:"Version Information"
description:"The version info block."
placeholder:"You can get this by going to the `About InvenTree` section in the upper right corner and clicking on the `copy version information` button"
- type:checkboxes
id:can-reproduce
- type:dropdown
id:tried-reproduce
attributes:
label:"Please verify if you can reproduce this bug on the demo site."
description:"You can sign in at [InvenTree Demo](https://demo.inventree.org) with admin:inventree. Note that this instance runs on the latest dev version, so your bug may be fixed there."
label:Try to reproduce on the demo site
description:You can sign in at [InvenTree Demo](https://demo.inventree.org) with admin:inventree. Note that this instance runs on the latest dev version, so your bug may be fixed there.
options:
- label:"I can reproduce this bug on the demo site."
All notable changes to this project will be documented in this file (starting with 1.0.0).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased - YYYY-MM-DD
### Breaking Changes
- [#10699](https://github.com/inventree/InvenTree/pull/10699) removes the `PartParameter` and `PartParameterTempalate` models (and associated API endpoints). These have been replaced with generic `Parameter` and `ParameterTemplate` models (and API endpoints). Any external client applications which made use of the old endpoints will need to be updated.
### Added
- Adds "Category" columns to BOM and Build Item tables and APIs in [#10722](https://github.com/inventree/InvenTree/pull/10772)
- Adds generic "Parameter" and "ParameterTemplate" models (and associated API endpoints) in [#10699](https://github.com/inventree/InvenTree/pull/10699)
- Adds parameter support for multiple new model types in [#10699](https://github.com/inventree/InvenTree/pull/10699)
- Allows report generator to produce PDF input controls in [#10969](https://github.com/inventree/InvenTree/pull/10969)
- UI overhaul of parameter management in [#10699](https://github.com/inventree/InvenTree/pull/10699)
### Changed
-
### Removed
- Removed python 3.9 / 3.10 support as part of Django 5.2 upgrade in [#10730](https://github.com/inventree/InvenTree/pull/10730)
- Removed the "PartParameter" and "PartParameterTemplate" models (and associated API endpoints) in [#10699](https://github.com/inventree/InvenTree/pull/10699)
- Removed the "ManufacturerPartParameter" model (and associated API endpoints) [#10699](https://github.com/inventree/InvenTree/pull/10699)
## 1.1.0 - 2025-11-02
### Added
- Added `order_queryset` report helper function in [#10439](https://github.com/inventree/InvenTree/pull/10439)
- Added `SupplierMixin` to import data from suppliers in [#9761](https://github.com/inventree/InvenTree/pull/9761)
- Added much more detailed status information for machines to the API endpoint (including backend and frontend changes) in [#10381](https://github.com/inventree/InvenTree/pull/10381)
- Added ability to partially complete and partially scrap build outputs in [#10499](https://github.com/inventree/InvenTree/pull/10499)
- Added support for Redis ACL user-based authentication in [#10551](https://github.com/inventree/InvenTree/pull/10551)
- Expose stock adjustment forms to the UI plugin context in [#10584](https://github.com/inventree/InvenTree/pull/10584)
- Allow stock adjustments for "in production" items in [#10600](https://github.com/inventree/InvenTree/pull/10600)
- Adds optional shipping address against individual sales order shipments in [#10650](https://github.com/inventree/InvenTree/pull/10650)
- Adds UI elements to "check" and "uncheck" sales order shipments in [#10654](https://github.com/inventree/InvenTree/pull/10654)
- Allow assigning project codes to order line items in [#10657](https://github.com/inventree/InvenTree/pull/10657)
- Added support for webauthn login for the frontend in [#9729](https://github.com/inventree/InvenTree/pull/9729)
- Added support for Debian 12, Ubuntu 22.04 and Ubuntu 24.04 in the installer and package in [#10705](https://github.com/inventree/InvenTree/pull/10705)
- Support for S3 and SFTP storage backends for media and static files ([#10140](https://github.com/inventree/InvenTree/pull/10140))
- Adds hooks for custom UI spotlight actions in [#10720](https://github.com/inventree/InvenTree/pull/10720)
- Support uploading attachments against SupplierPart in [#10724](https://github.com/inventree/InvenTree/pull/10724)
### Changed
- Changed site URL check to allow protocol mismatches if `INVENTREE_SITE_LAX_PROTOCOL` is set to `True` (default) in [#10454](https://github.com/inventree/InvenTree/pull/10454)
- Changed call signature of `get_global_setting` to use `environment_key` instead of `enviroment_key` in [#10557](https://github.com/inventree/InvenTree/pull/10557)
## 1.0.0 - 2025-09-15
The first "stable" release following semver but not extensively other than the previous releases. The use of 1.0 indicates the stability that users already expect from InvenTree.
An overarching theme of this release is the complete switch to a new UI framework and paradigm (PUI). The old templating based UI (CUI) is now removed. This makes major improvements in the security and portability of InvenTree possible.
Our blog holds [a few articles](https://inventree.org/blog/2024/09/23/ui-roadmap) on the topic. This journey started in [March 2022](https://github.com/inventree/InvenTree/issues/2789) and was announced [in 2023](https://inventree.org/blog/2023/08/28/react).
Specific entries to the changelog will be kept for all stable channel minor releases, for changes in 1.0 please refer to the [blog posts](https://inventree.org/blog/2025/09/15/1.0.0) and the [milestone](https://github.com/inventree/InvenTree/milestone/17)
[](https://bestpractices.coreinfrastructure.org/projects/7179)
@@ -52,10 +53,10 @@ Want to see what we are working on? Check out the [roadmap tag](https://github.c
InvenTree is designed to be **extensible**, and provides multiple options for **integration** with external applications or addition of custom plugins:
@@ -138,7 +130,7 @@ Refer to the [getting started guide](https://docs.inventree.org/en/latest/start/
<!-- Mobile App -->
## :iphone: Mobile App
InvenTree is supported by a [companion mobile app](https://docs.inventree.org/app/) which allows users access to stock control information and functionality.
InvenTree is supported by a [companion mobile app](https://docs.inventree.org/en/latest/app/) which allows users access to stock control information and functionality.
<div align="center"><h4>
<a href="https://play.google.com/store/apps/details?id=inventree.inventree_app">Android Play Store</a>
@@ -146,10 +138,17 @@ InvenTree is supported by a [companion mobile app](https://docs.inventree.org/ap
The InvenTree project team is committed to providing a safe and welcoming environment for all users. Please read our [Code of Conduct](CODE_OF_CONDUCT.md) for more information.
InvenTree is following industry best practices for security. Our security policy is included [in this repo](SECURITY.md). We provide dedicated security pages on [our documentation site](https://docs.inventree.org/en/latest/security/).
<!-- Contributing -->
## :wave: Contributing
Contributions are welcomed and encouraged. Please help to make this project even better! Refer to the [contribution page](CONTRIBUTING.md).
Contributions are welcomed and encouraged. Please help to make this project even better! Refer to the [contribution page](https://docs.inventree.org/en/latest/develop/contributing/).
<!-- Translation -->
## :scroll: Translation
@@ -165,7 +164,7 @@ If you use InvenTree and find it to be useful, please consider [sponsoring the p
## :gem: Acknowledgements
We want to acknowledge [PartKeepr](https://github.com/partkeepr/PartKeepr) as a valuable predecessor and inspiration.
Find a full list of used third-party libraries in [our documentation](https://docs.inventree.org/en/latest/credits/).
Find a full list of used third-party libraries in the license information dialog of your instance.
## :heart: Support
@@ -181,17 +180,26 @@ Find a full list of used third-party libraries in [our documentation](https://do
<a href="https://depot.dev?utm_source=inventree"><img src="https://depot.dev/badges/built-with-depot.svg" alt="Built with Depot" /></a>
<a href="https://inventree.org/digitalocean">
<img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="201px" alt="Servers by Digital Ocean">
</a>
<a href="https://www.netlify.com"> <img src="https://www.netlify.com/v3/img/components/netlify-color-bg.svg" alt="Deploys by Netlify" /> </a>
<a href="https://crowdin.com"> <img src="https://crowdin.com/images/crowdin-logo.svg" alt="Translation by Crowdin" /> </a>
<a href="https://crowdin.com"> <img src="https://crowdin.com/images/crowdin-logo.svg" alt="Translation by Crowdin" /> </a> <br>
The InvenTree team take all security vulnerabilities seriously. Thank you for improving the security of our open source software.
We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
The general project security policies and processes are documented in [our documentation](https://docs.inventree.org/en/stable/security/).
## Reporting a Vulnerability
@@ -11,7 +13,13 @@ Please report security vulnerabilities by emailing the InvenTree team at:
security@inventree.org
```
Someone from the InvenTree development team will acknowledge your email as soon as possible, and indicate the next steps in handling your security report.
Someone from the InvenTree development team will acknowledge your email as soon as possible (normally within a week), and indicate the next steps in handling your security report.
The team will endeavour to keep you informed of the progress towards a fix for the issue, and subsequent release to the stable and development code branches. Where possible, the issue will be resolved within 90 days of reporting.
### Public Disclosure
Using GitHub's security advisory system, we will publish a public disclosure of the issue once it has been acknowledged, reproduced and resolved.
We support assigning CVEs to security issues where appropriate.
The project can be identified by the CPE code ``cpe:2.3:a:inventree_project:inventree:``.
echo"# POI07| No python environment found - using environment variable: ${SETUP_PYTHON}"
fi
# Try to detect a python between 3.9 and 3.12 in reverse order
# Try to detect a python between lowest and highest supported in reverse order
if[ -z "$(which ${SETUP_PYTHON})"];then
echo"# POI07| Trying to detecting python3.${PYTHON_FROM} to python3.${PYTHON_TO} - using newest version"
for i in $(seq $PYTHON_TO -1 $PYTHON_FROM);do
@@ -79,7 +79,7 @@ function detect_python() {
echo"${On_Red}"
echo"# POI07| Python ${SETUP_PYTHON} not found - aborting!"
echo"# POI07| Please ensure python can be executed with the command '$SETUP_PYTHON' by the current user '$USER'."
echo"# POI07| If you are using a different python version, please set the environment variable SETUP_PYTHON to the correct command - eg. 'python3.10'."
echo"# POI07| If you are using a different python version, please set the environment variable SETUP_PYTHON to the correct command - eg. 'python3.11'."
echo"${Color_Off}"
exit1
fi
@@ -120,6 +120,18 @@ function detect_local_env() {
echo"# POI02| Printing local envs - after #++#"
printenv
fi
# Print branch and dir from VERSION file
if[ -f "${APP_HOME}/VERSION"];then
echo"# POI02| Loading environment variables from VERSION file"
echo -e "This InvenTree install uses nginx, the settings for the webserver can be found in"
echo -e "${SETUP_NGINX_FILE}"
echo -e "Try opening InvenTree with either\nhttp://localhost/ or http://${INVENTREE_IP}/\n"
echo -e "Admin user data:"
echo -e" Email: ${INVENTREE_ADMIN_EMAIL}"
echo -e " Username: ${INVENTREE_ADMIN_USER}"
echo -e "Password: ${INVENTREE_ADMIN_PASSWORD}"
echo -e "Try opening InvenTree with any of \n${INVENTREE_SITE_URL} , http://localhost/ or http://${INVENTREE_IP}/\n"
# Print admin user data only if set
if[ -n"${INVENTREE_ADMIN_USER}"];then
echo -e "Admin user data:"
echo -e "Email: ${INVENTREE_ADMIN_EMAIL}"
echo -e " Username: ${INVENTREE_ADMIN_USER}"
echo -e " Password: ${INVENTREE_ADMIN_PASSWORD}"
else
echo -e "No admin set during this operation - depending on the deployment method a admin user might have been created with an initial password saved in `$SETUP_ADMIN_PASSWORD_FILE`"
This repository hosts the [official documentation](https://inventree.readthedocs.io/) for [InvenTree](https://github.com/inventree/inventree), an open source inventory management system.
To serve this documentation locally (e.g. for development), you will need to have Python 3 installed on your system.
## Prerequisites
## Setup
InvenTree uses [MkDocs](https://www.mkdocs.org/) to convert [Markdown](https://www.mkdocs.org/user-guide/writing-your-docs/#writing-with-markdown) format `.md` files into HTML suitable for viewing in a web browser.
Run the following commands from the top-level project directory:
!!! info "Prerequisites"
To build and serve this documentation locally (e.g. for development), you will need:
* Python 3 installed on your system.
* An existing InvenTree installation containing the virtual environment that was created during installation.
These instructions assume you followed the [InvenTree bare metal installation instructions](./docs/start/install.md), so you'll have an `inventree` user, a home directory at `/home/inventree`, the InvenTree source code cloned from [GitHub](https://github.com/inventree/inventree) into `/home/inventree/src`, and a virtual environment at `/home/inventree/env`. If you installed InvenTree some other way, this might vary, and you'll have to adjust these instructions accordingly.
!!! warning "Your InvenTree install will be updated!"
Some of the commands that follow will make changes to your install, for example, by running any pending database migrations. There's a small risk this may cause issues with your existing installation. If you can't risk this, consider setting up a separate InvenTree installation specifically for documentation development.
## Building the documentation locally
To build the documentation locally, run these commands as the `inventree` user:
InvenTree provides a powerful REST API for interacting with inventory data on the server. Low-level data access and manipulation is available, with integrated user authentication and data validation.
!!! info "Django REST Framework"
The InvenTree API is based on the powerful and flexible [Django REST Framework](https://www.django-rest-framework.org/).
## Documentation
The API is self-documenting, and the documentation is provided alongside any InvenTree installation instance. If (for example) you have an InvenTree instance running at `http://127.0.0.1:8000` then the API documentation is available at `http://127.0.0.1:8000/api-doc/`
{% with id="api_doc", url="api/api_doc.png", description="API documentation" %}
{% include 'img.html' %}
{% endwith %}
### Schema Description
The API schema is also documented in the [API Schema](./schema.md) page.
### Generating Schema File
If you want to generate the API schema file yourself (for example to use with an external client, use the `invoke dev.schema` command. Run with the `-help` command to see available options.
```
invoke dev.schema -help
```
## Authentication
Users must be authenticated to gain access to the InvenTree API. The API accepts either basic username:password authentication, or token authentication. Token authentication is recommended as it provides much faster API access.
!!! warning "Permissions"
API access is restricted based on the permissions assigned to the user.
### Basic Auth
Users can authenticate against the API using basic authentication - specifically a valid combination of `username` and `password` credentials.
### Tokens
Each user is assigned an authentication token which can be used to access the API. This token is persistent for that user (unless invalidated by an administrator) and can be used across multiple sessions.
!!! info "Token Administration"
User tokens can be created and/or invalidated via the Admin interface.
### Requesting a Token
If a user does not know their access token, it can be requested via the API interface itself, using a basic authentication request.
To obtain a valid token, perform a GET request to `/api/user/token/`. No data are required, but a valid username / password combination must be supplied in the authentication headers.
!!! info "Credentials"
Ensure that a valid username:password combination are supplied as basic authorization headers.
Once a valid token is received from the server, subsequent API requests should be performed using that token.
If the supplied user credentials are validated, the server will respond with:
```
HTTP_200_OK
{
token: "usertokendatastring",
}
```
### Using a Token
After reception of a valid authentication token, it can be subsequently used to perform token-based authentication.
The token value sent to the server must be of the format `Token <TOKEN-VALUE>` (without the `<` and `>` characters).
While deleting items individually via the API is supported, it can prove inefficient (time consuming) when multiple items are to be deleted sequentially.
For example, if the user wishes to delete a large number items (such as lines from a [Bill of Materials](../build/bom.md)), these items are deleted sequentially, with each `DELETE` separate request requiring network transfer, database access, cleanup, etc.
For example, if the user wishes to delete a large number items (such as lines from a [Bill of Materials](../manufacturing/bom.md)), these items are deleted sequentially, with each `DELETE` separate request requiring network transfer, database access, cleanup, etc.
A much more efficient approach is to allow for "bulk deletion" of multiple database items in a single transaction. This means that only one network request is required, and only a single database access request.
InvenTree provides a powerful REST API for interacting with inventory data on the server. Low-level data access and manipulation is available, with integrated user authentication and data validation.
!!! info "Django REST Framework"
The InvenTree API is based on the powerful and flexible [Django REST Framework](https://www.django-rest-framework.org/).
## Documentation
The API is self-documenting, and the documentation is provided alongside any InvenTree installation instance. If (for example) you have an InvenTree instance running at `http://127.0.0.1:8000` then the API documentation is available at `http://127.0.0.1:8000/api-doc/`
If [debug mode](../start/index.md#debug-mode) is enabled, the API can be browsed directly from the web interface. This provides a simple way to explore the API and test out different endpoints. Simply navigate your web browser to any API endpoint, and the API will be displayed in a human-readable format.
### Schema Description
The API schema is also documented in the [API Schema](./schema.md) page.
### Generating Schema File
If you want to generate the API schema file yourself. For example, to use with an external client, use the `invoke dev.schema` command. Run with the `-help` command to see available options.
```
invoke dev.schema -help
```
## Authentication
Users must be authenticated to gain access to the InvenTree API. The API accepts either basic username:password authentication, or token authentication. Token authentication is recommended as it provides much faster API access.
!!! warning "Permissions"
API access is restricted based on the permissions assigned to the user or scope of the application.
### Basic Auth
Users can authenticate against the API using basic authentication - specifically a valid combination of `username` and `password` credentials.
### Tokens
Each user is assigned an authentication token which can be used to access the API. This token is persistent for that user (unless invalidated by an administrator) and can be used across multiple sessions.
!!! info "Token Administration"
User tokens can be created and/or invalidated via the user settings, [Admin Center](../settings/admin.md#admin-center) or admin interface.
#### Requesting a Token
If a user does not know their access token, it can be requested via the API interface itself, using a basic authentication request.
To obtain a valid token, perform a GET request to `/api/user/token/`. No data are required, but a valid username / password combination must be supplied in the authentication headers.
!!! info "Credentials"
Ensure that a valid username:password combination are supplied as basic authorization headers.
Once a valid token is received from the server, subsequent API requests should be performed using that token.
If the supplied user credentials are validated, the server will respond with:
```
HTTP_200_OK
{
token: "usertokendatastring",
}
```
#### Using a Token
After reception of a valid authentication token, it can be subsequently used to perform token-based authentication.
The token value sent to the server must be of the format `Token <TOKEN-VALUE>` (without the `<` and `>` characters).
This is an experimental feature that needs to be specifically enabled. See [Experimental features](../settings/experimental.md) for more information.
InvenTree has built-in support for using [oAuth2](https://oauth.net/2/) and OpenID Connect (OIDC) for authentication to the API. This enables using the instance as a very limited identity provider.
A default application using a public client with PKCE enabled ships with each instance. Intended to be used with the python api and configured with very wide scopes this can also be used for quick tests - the client_id is `zDFnsiRheJIOKNx6aCQ0quBxECg1QBHtVFDPloJ6`.
#### Managing applications
Superusers can register new applications and manage existing ones using a small application under the subpath `/o/applications/`.
It is recommended to:
- read the spec (RFC 6749 / 6750) and/or best practices (RFC 9700) before choosing client types
- chose scopes as narrow as possible
- configure redirection URIs as exact as possible
#### Scopes
InvenTree's oAuth scopes are strongly related to the [user roles](#user-roles).
Names consist of 1. type, 2. kind and 3. (opt) role, separated by colons.
There are 3 types:
- a: administrative scopes - used for administrating the server - these can be staff or superuser scopes
- g: general scopes - give wide access to the basic building blocks of InvenTree
- r: role scopes - map to specific actions (2) and roles (3)
Examples:
```bash
a:superuser
g:read
r:change:part
r:delete:stock
```
!!! info "Read the API docs"
The API [documentation](#documentation) and [schema](./schema.md) list the required scopes for every API endpoint / interaction in the security sections.
## Authorization
### User Roles
Users can only perform REST API actions which align with their assigned [role permissions](../settings/permissions.md#roles).
Once a user has *authenticated* via the API, a list of the available roles can be retrieved from:
`/api/user/roles/`
For example, when accessing the API from a *superuser* account:
The API is *self describing* in that it provides metadata about the various fields available at any given endpoint. External applications (such as the [python interface](../api/python/python.md)) can introspect the API to determine information about the model fields.
The API is *self describing* in that it provides metadata about the various fields available at any given endpoint. External applications (such as the [python interface](../api/python/index.md)) can introspect the API to determine information about the model fields.
!!! tip "API Forms"
The various forms implemented in the InvenTree web interface make heavy use of this metadata feature
@@ -13,11 +13,9 @@ The API is *self describing* in that it provides metadata about the various fiel
To request metadata about a particular API endpoint, simply perform an `OPTIONS` method request against the API URL.
For example, to view the metadata available for creating a new [Part Category](../part/part.md#part-category), an `OPTIONS` request to `/api/part/category/` yields:
For example, to view the metadata available for creating a new [Part Category](../part/index.md#part-category), an `OPTIONS` request to `/api/part/category/` yields:
{% with id="api_cat_options", url="api/api_category_options.png", description="Part category options" %}
InvenTree provides native support for multiple currencies, which can mean that data require conversion between these currencies, at defined exchange rates.
The InvenTree server maintains a set of exchange rates, which are updated periodically. These exchange rates are available via the [InvenTree API](../api.md), and can be used by the Python bindings.
The InvenTree server maintains a set of exchange rates, which are updated periodically. These exchange rates are available via the [InvenTree API](../index.md), and can be used by the Python bindings.
Each [part](../../part/part.md) can have multiple [parameters](../../part/parameter.md). For the example of the sofa (above) *length* and *weight* make sense. Each parameter has a parameter template that combines the parameter name with a unit. So we first have to create the parameter templates and afterwards add the parameter values to the sofa.
Each [part](../../part/index.md) can have multiple [parameters](../../concepts/parameters.md). For the example of the sofa (above) *length* and *weight* make sense. Each parameter has a parameter template that combines the parameter name with a unit. So we first have to create the parameter templates and afterwards add the parameter values to the sofa.
A [Python module](https://github.com/inventree/inventree-python) is provided for rapid development of third party scripts or applications using the REST API. The python module handles authentication and API transactions, providing an extremely clean interface for interacting with and manipulating database data.
### Features
- Automatic authentication management using token-based authentication
- Pythonic data access
- Native file uploads
- Powerful functions for accessing related model data
### Installation
The inventree python interface can be easily installed via the [PIP package manager](https://pypi.org/project/inventree/):
```
pip3 install inventree
```
!!! tip "Upgrading"
To upgrade to the latest version, run `pip install --upgrade inventree`
Alternatively, it can downloaded and installed from source, from [GitHub](https://github.com/inventree/inventree-python).
### Authentication
Authentication against an InvenTree server is simple:
Alternatively, if you already have an access token:
```python
api=InvenTreeAPI(SERVER_ADDRESS,token=MY_TOKEN)
```
#### Environment Variables
Authentication variables can also be set using environment variables:
-`INVENTREE_API_HOST`
-`INVENTREE_API_USERNAME`
-`INVENTREE_API_PASSWORD`
-`INVENTREE_API_TOKEN`
And simply connect as follows:
```python
api=InvenTreeAPI()
```
### Retrieving Data
Once a connection is established to the InvenTree server, querying individual items is simple.
#### Single Item
If the primary-key of an object is already known, retrieving it from the database is performed as follows:
```python
frominventree.partimportPartCategory
category=PartCategory(api,10)
```
#### Multiple Items
Database items can be queried by using the `list` method for the given class. Note that arbitrary filter parameters can be applied (as specified by the [InvenTree API](../index.md)) to filter the returned results.
```python
frominventree.partimportPart
frominventree.stockimportStockItem
parts=Part.list(api,category=10,assembly=True)
items=StockItem.list(api,location=4,part=24)
```
The `items` variable above provides a list of `StockItem` objects.
#### Filtering by parent
In tree based models the child items could be filtered by using the parent keyword:
```python
frominventree.partimportPartCategory
child_categories=PartCategory.list(api,parent=10)
```
The top level items can can be queried by passing empty string as a parent filter:
The available model attributes are determined by introspecting [API metadata](../metadata.md). To view the fields (attributes) available for a given database model type within the python interface, use the `fieldNames` and `fieldInfo` methods, as below:
assembly -> {'type': 'boolean', 'required': True, 'read_only': False, 'label': 'Assembly', 'help_text': 'Can this part be built from other parts?', 'default': False, 'max_length': None}
component -> {'type': 'boolean', 'required': True, 'read_only': False, 'label': 'Component', 'help_text': 'Can this part be used to build other parts?', 'default': True, 'max_length': None}
default_expiry -> {'type': 'integer', 'required': True, 'read_only': False, 'label': 'Default Expiry', 'help_text': 'Expiry time (in days) for stock items of this part', 'min_value': 0, 'max_value': 2147483647, 'default': 0, 'max_length': None}
You can determine the available methods by either [reading the source code](https://github.com/inventree/inventree-python) or using the `dir()` function in an interactive terminal.
### Further Reading
The [InvenTree Python Interface](https://github.com/inventree/inventree-python) is open source, and well documented. The best way to learn is to read through the source code and try for yourself!
A [Python module](https://github.com/inventree/inventree-python) is provided for rapid development of third party scripts or applications using the REST API. The python module handles authentication and API transactions, providing an extremely clean interface for interacting with and manipulating database data.
### Features
- Automatic authentication management using token-based authentication
- Pythonic data access
- Native file uploads
- Powerful functions for accessing related model data
### Installation
The inventree python interface can be easily installed via the [PIP package manager](https://pypi.org/project/inventree/):
```
pip3 install inventree
```
!!! tip "Upgrading"
To upgrade to the latest version, run `pip install --upgrade inventree`
Alternatively, it can downloaded and installed from source, from [GitHub](https://github.com/inventree/inventree-python).
### Authentication
Authentication against an InvenTree server is simple:
Alternatively, if you already have an access token:
```python
api=InvenTreeAPI(SERVER_ADDRESS,token=MY_TOKEN)
```
#### Environment Variables
Authentication variables can also be set using environment variables:
-`INVENTREE_API_HOST`
-`INVENTREE_API_USERNAME`
-`INVENTREE_API_PASSWORD`
-`INVENTREE_API_TOKEN`
And simply connect as follows:
```python
api=InvenTreeAPI()
```
### Retrieving Data
Once a connection is established to the InvenTree server, querying individual items is simple.
#### Single Item
If the primary-key of an object is already known, retrieving it from the database is performed as follows:
```python
frominventree.partimportPartCategory
category=PartCategory(api,10)
```
#### Multiple Items
Database items can be queried by using the `list` method for the given class. Note that arbitrary filter parameters can be applied (as specified by the [InvenTree API](../api.md)) to filter the returned results.
```python
frominventree.partimportPart
frominventree.stockimportStockItem
parts=Part.list(api,category=10,assembly=True)
items=StockItem.list(api,location=4,part=24)
```
The `items` variable above provides a list of `StockItem` objects.
#### Filtering by parent
In tree based models the child items could be filtered by using the parent keyword:
```python
frominventree.partimportPartCategory
child_categories=PartCategory.list(api,parent=10)
```
The top level items can can be queried by passing empty string as a parent filter:
The available model attributes are determined by introspecting [API metadata](../metadata.md). To view the fields (attributes) available for a given database model type within the python interface, use the `fieldNames` and `fieldInfo` methods, as below:
assembly -> {'type': 'boolean', 'required': True, 'read_only': False, 'label': 'Assembly', 'help_text': 'Can this part be built from other parts?', 'default': False, 'max_length': None}
component -> {'type': 'boolean', 'required': True, 'read_only': False, 'label': 'Component', 'help_text': 'Can this part be used to build other parts?', 'default': True, 'max_length': None}
default_expiry -> {'type': 'integer', 'required': True, 'read_only': False, 'label': 'Default Expiry', 'help_text': 'Expiry time (in days) for stock items of this part', 'min_value': 0, 'max_value': 2147483647, 'default': 0, 'max_length': None}
You can determine the available methods by either [reading the source code](https://github.com/inventree/inventree-python) or using the `dir()` function in an interactive terminal.
### Further Reading
The [InvenTree Python Interface](https://github.com/inventree/inventree-python) is open source, and well documented. The best way to learn is to read through the source code and try for yourself!
The InvenTree Mobile App brings stock control to your pocket. Integrating seamlessly with the [InvenTree API](../api/api.md), the app provides immediate access to inventory data without requiring physical access to a computer.
Native barcode support provides a multitude of context-sensitive stock control actions, allowing streamlined inventory management at your fingertips. The app has been optimized for speed, providing instant access to stock knowledge and handy on-site functionality.
## Features
- View and edit part and stock information with a blazingly fast interface
- Perform stock control actions on the go
- Barcode integrations simply stock operations
- Receive purchase orders and check in stock items
- And many more!
## Download
The InvenTree app can be downloaded from either the Android or Apple app stores, or accessed via the links below:
### Android
<span class='fab fa-android'></span> [Android Play Store](https://play.google.com/store/apps/details?id=inventree.inventree_app).
@@ -8,27 +8,20 @@ Use of the InvenTree app assumes that you (the user) have access to an InvenTree
When first running the app, no profile has been configured. The *server* icon in the top-right corner of the home screen is <span style='color: red'>red</span>, indicating that there is no connection to an InvenTree server:
{% with id="no_server", url="app/initial.png", maxheight="240px", description="No server configured" %}
{% include "img.html" %}
{% endwith %}
{{ image("app/initial.png", "No server configured") }}
Press on the server icon to navigate to the server selection view:
{% with id="no_profiles", url="app/no_profiles.png", maxheight="240px", description="No server configured" %}
{% include "img.html" %}
{% endwith %}
{{ image("app/no_profiles.png", "No server configured") }}
### Create Server
!!! success "Server Profiles"
The app supports multiple server profiles, providing simple switching between different InvenTree servers and/or account profiles.
Press the <span class='fas fa-plus-circle blue'></span> button in the bottom-right corner of the screen to create a new server profile.
Press the {{ icon("circle-plus", color="blue") }} button in the bottom-right corner of the screen to create a new server profile.
{% with id="add_profile", url="app/add_server_profile.png", maxheight="240px", description="Add server" %}
{% include 'img.html' %}
{% endwith %}
{{ image("app/add_server_profile.png", "Add server profile") }}
Enter the required server details:
@@ -45,24 +38,18 @@ Once the server profile is created, you need to connect to the server. Simply sh
Alternatively, long press on the server profile to activate the context menu, then select *Connect to Server*.
When the app successfully connects to the server, a success message is briefly displayed at the bottom of the screen. A green <span class='fas fa-check-circle green'></span> icon next to the server profile indicate that the profile is currently *selected* and also the connection was successful.
When the app successfully connects to the server, a success message is briefly displayed at the bottom of the screen. A green {{ icon("circle-check", color="green") }} icon next to the server profile indicate that the profile is currently *selected* and also the connection was successful.
{% with id="connected", url="app/connected.png", maxheight="240px", description="Connected to server" %}
{% include 'img.html' %}
{% endwith %}
{{ image("app/connected.png", "Connected to server") }}
### Connection Failure
If (for whatever reason) the app does not successfully connect to the InvenTree server, a failure message is displayed, and a red <span class='fas fa-times-circle red'></span> icon is displayed next to the server profile.
If (for whatever reason) the app does not successfully connect to the InvenTree server, a failure message is displayed, and a red {{ icon("circle-x", color="red") }} icon is displayed next to the server profile.
{% with id="failed", url="app/unauthorized.png", maxheight="240px", description="Connection failure" %}
The InvenTree Mobile App brings stock control to your pocket. Integrating seamlessly with the [InvenTree API](../api/index.md), the app provides immediate access to inventory data without requiring physical access to a computer.
Native barcode support provides a multitude of context-sensitive stock control actions, allowing streamlined inventory management at your fingertips. The app has been optimized for speed, providing instant access to stock knowledge and handy on-site functionality.
## Features
- View and edit part and stock information with a blazingly fast interface
- Perform stock control actions on the go
- Barcode integrations simply stock operations
- Receive purchase orders and check in stock items
- And many more!
## Download
The InvenTree app can be downloaded from either the Android or Apple app stores, or accessed via the links below:
### Android
<span class='fab fa-android'></span> [Android Play Store](https://play.google.com/store/apps/details?id=inventree.inventree_app).
The <span class='fas fa-list'></span> action opens the *Drawer Menu*, which is a quick-access menu for global navigation:
The {{ icon("list") }} action opens the *Drawer Menu*, which is a quick-access menu for global navigation:
{% with id="drawer", url="app/drawer.png", maxheight="240px", description="Open drawer menu" %}
{% include 'img.html' %}
{% endwith %}
{{ image("app/drawer.png", "Open drawer menu") }}
The *Drawer Menu* can be accessed in the following ways:
@@ -44,19 +36,17 @@ The *Drawer Menu* can be accessed in the following ways:
### Search
The <span class='fas fa-search'></span> action opens the [Search](./search.md) screen
The {{ icon("search", title="Search") }} action opens the [Search](./search.md) screen
### Scan Barcode
The <span class='fas fa-qrcode'></span> action opens the [barcode scan](./barcode.md#global-scan) window, which allows quick access to the barcode scanning functionality.
The {{ icon("barcode", title="Scan") }} action opens the [barcode scan](./barcode.md#global-scan) window, which allows quick access to the barcode scanning functionality.
## Context Actions
Within a given view, certain context actions may be available. If there are contextual actions which can be performed, they are displayed in the bottom right corner:
{% with id="drawer", url="app/context_actions.png", maxheight="240px", description="Context actions" %}
@@ -10,9 +10,7 @@ From the *home screen*, select *Parts* to open the top-level part category view.
The *Details* tab shows information about the selected part category. In particular, it shows the name and description of the category, a link to the parent category (if available) and a list of subcategories.
{% with id="part-category", url="part_category_detail.png" %}
New attachments can be uploaded by tapping on the icons in the top right of the screen.
@@ -117,9 +97,7 @@ Select a particular attachment file to downloaded it to the local device.
The *Stock* tab displays all the stock items available for this part. Tap on a particular stock item to navigate to a detail view for that item.
{% with id="part-stock", url="part_stock.png" %}
{% include "app_img.html" %}
{% endwith %}
{{ image("app/part_stock.png", "Part Stock") }}
The list of available stock items can be filtered using the input box at the top of the screen.
@@ -131,17 +109,13 @@ The *Actions* tab displays the available actions for the selected part:
Create a new stock item for this part:
{% with id="part-stock-new", url="new_stock_item.jpg" %}
{% include "app_img.html" %}
{% endwith %}
{{ image("app/new_stock_item.jpg", "New Stock Item") }}
### Edit Part
To edit the part details, select the *Edit* button in the top right corner of the screen:
{% with id="part-edit", url="part_edit.jpg" %}
{% include "app_img.html" %}
{% endwith %}
{{ image("app/part_edit.jpg", "Edit Part") }}
!!! info "Permission Required"
If the user does not have permission to edit part details, this button will be hidden
@@ -150,8 +124,6 @@ To edit the part details, select the *Edit* button in the top right corner of th
Tap the image of the part (displayed at the top left of the screen) to launch the part image view:
{% with id="part-image", url="part_image.jpg" %}
{% include "app_img.html" %}
{% endwith %}
{{ image("app/part_image.jpg", "Part Image") }}
A full-screen view of the image is displayed. The user can also upload a new image for the part, either selecting an image from the device, or taking a new picture with the device's camera.
The global search screen provides quick search functionality across the connected InvenTree database. Entering a search term will return multiple search results, as shown in the examples below:
{% with id="search_1", url="app/search_1.png", maxheight="240px", description="Search results" %}
{% include 'img.html' %}
{% endwith %}
{% with id="search_2", url="app/search_2.png", maxheight="240px", description="Search results" %}
Select the *Count Stock* action to validate the current number of items in stock. Use this option to perform a quick stocktake!
{% with id="stock-count", url="stock_count.png" %}
{% include "app_img.html" %}
{% endwith %}
{{ image("app/stock_count.png", "Count Stock") }}
!!! info "Serialized Stock"
The *count stock* action is not available for serialized stock items, as they have a fixed quantity of 1
#### Remove Stock
Select this action to remove a certain quantity from the selected stock item. For example, if there are 12 items available, and you take 3 items, the listed quantity will be reduced to 9 itemes.
Select this action to remove a certain quantity from the selected stock item. For example, if there are 12 items available, and you take 3 items, the listed quantity will be reduced to 9 items.
{% with id="stock-remove", url="stock_remove.png" %}
Select this action to add a certain quantity to the selected stock item. For example, if there are 12 items available, and you add 3 items, the listed quantity will be increased to 15 items.
{% with id="stock-add", url="stock_add.png" %}
{% include "app_img.html" %}
{% endwith %}
{{ image("app/stock_add.png", "Add Stock") }}
#### Transfer Stock
Transfer (move) the stock item to a new location:
{% with id="stock-transfer", url="stock_transfer.png" %}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
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.