2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-05-28 03:49:20 +00:00
Commit Graph

501 Commits

Author SHA1 Message Date
Oliver 27ca0836e7 [refactor] Attachment images (#11961)
* Add new Attachment model fields:

- is_image
- thumbnail

* Cache if the attachment is an image

* Add new setting for controlling max upload size

* Validate uploaded attachment file

* Add tqdm for progress bars

* Refactor migrations

- Don't need is_image field
- Can introspect from the thumbnail

* Data migration for existing attachments

* Bump API version

* Update tests and validators

* Add "is_image" field to the Attachment model

* Offload to background task

* Implement unit tests

* Docs

* Add unit test for data migration

* Additional unit test

* Omit migration tests from code coverage

* Additional unit tests
2026-05-22 23:37:32 +10:00
Jacob Felknor 74d9ab6d11 Transfer Order (#11281)
* initial skel commit for transfer orders

* initial transfer order backend model

* add some serializers, rename PLACED to ISSUED for TransferOrders

* adding from admin console works

* simple table list almost working, but we need to add order line items....

* add other cols to table

* add Transfer Order from table view

* moving towards a detail view

* wip: adding detail view

* add take from and destination serializer details

* add other detail grid items

* edit/duplicate transfer order

* more action buttons

* first crack at adding line items

* add to line item

* add filters

* starting work on row actions

* more action buttons for line items

* fix copy lines in duplicate

* basic allocation works

* allocations table actions

* allocate serials

* allocated serial row expansion

* add transferred qty to serializers

* move items on complete, show in tracking

* change panel to transferred stock upon complete

* allow incomplete line items

* disable edit allocations when completed

* add ref pattern and to settings

* add admin to line item inline

* add calendar and parametric view

* basic transfer order report

* add transfer order ruleset

* starting allocation buisness logic throughout for TOs

* disable accept incomplete logic, which was incorrect, until I fix

* fix incomplete allocation option

* add transferred col to default report

* add transfer order to calendar ics view

* chain condition for readability

* add transfer order allocations table to stockitem view

* don't account TO allocations in availability

* add transfer orders table for a part

* 'consume' option by doing take_stock

* squash migrations

* starting to test transfer order

* more transfer order tests

* add transfer order consume test

* wip, more tests

* more transfer order tests

* had to refresh_from_db

* switch "to" to "transfer-order" in url paths

* only select non-virtual parts from transfer order

* add transfer order docs

* deconflict migrations

* fix frontend build error

* fix validation on transfer order reference pattern

* add oath2 scope for transfer order

* fix state test to include transfer order state

* add barcode_model_type_code for transfer order

* bump api version

* check view role for transfer order, remove debug/commented out lines

* add serialized allocation test

* Fix migrations

* Frontend fixes

* Implement required 'company' attribute

* transfer order report context

* attempt to fix tests

* delete transfer order allocations on cancel

* add a few playwright tests, more incoming

* more playwright

* add source and destination locations to table

* deconflict migrations

* Fix build issue

* attempt to fix flaky transfer order test

* duplicate transfer order before running tests

* Adjust playwright tests

* Fix migration dependency order

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2026-05-22 17:08:40 +10:00
Matthias Mair 9908870a81 realign user API endpoints (#11963)
* realign user API endpoints to make it clearer which one are only applicable to the current user

* fix name

* bump api

* fix test

* fix reference

* fix test exception

* update ref

* reduce breakage

* re-add legacy urls till next `breaking`
2026-05-22 09:44:24 +10:00
Matthias Mair f27b9b5443 feat(frontend): Add option for plugins to add header actions (#9570)
* [FR] PUI - Add option for plugins to add header actions
Fixes #8593

* fix parsing

* fix merge

* reduce diff

* fix sample implementation

* add support for icons and colors in primary actions

* add changelog entry

* add docs

* add more detailed sample text

* pass location into context

* fix test

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-05-22 08:20:07 +10:00
Oliver 9cac925e91 Prevent edit serial (#11964)
* Add new global setting

* Run serial number validation check

* Disable field in frontend

* Add unit test

* Docs tweak
2026-05-19 17:06:05 +10:00
Oliver 99358eb4e7 Remove image download support (#11962)
* Remove image download support

- Helper function remains (it is used in the supplier plugin mixin)
- No longer available to user
- Close massive security hole entirely
- Will be defunct soon anyway (moving to generic attachments)

* Update CHANGELOG.md

* Bump API version

* Fix for unit tests
2026-05-19 07:02:05 +10:00
Oliver acc2786e44 [feature] Rename attachments (#11920)
* Implementation

* Update API and CHANGELOG

* Annotate response type

* Simplify attachment renaming

- Use the existing API endpoint

* Capture the actual saved path

* Tweak attachment table fields

* Use built-in validation

* Update docs

* Unit testing

* Ignore some lines from coverage

* Check if file exists before deleting
2026-05-18 20:02:46 +10:00
Aditya Kumar Mishra 582013e51c Feature: Auto-select items tab for final stock locations (#11766) (#11955)
* Enhance: Auto-select items tab for final stock locations/categories

* Fix biome formatting in PanelGroup.tsx

* Change default setting to False per review

* Refactor: Rename setting to DISPLAY_ITEMS_FINAL_LEVEL to apply generically to both locations and categories per review

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-05-17 19:06:00 +10:00
Oliver d0acbf1191 [UI] Adjust week start date (#11934)
* Adjust week start date

Co-authored-by: Copilot <copilot@github.com>

* Change to global setting

---------

Co-authored-by: Copilot <copilot@github.com>
2026-05-13 17:32:59 +10:00
Oliver 727ca62883 External order checks (#11935)
* Add new global settings

Co-authored-by: Copilot <copilot@github.com>

* Validation logic

Co-authored-by: Copilot <copilot@github.com>

* Remove one setting

- Already covered if build order requires validation

* Add unit test

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-05-13 15:16:34 +10:00
Oliver b6a304e553 Block SO allocation until tests pass (#11915)
* Add new global setting

* Check item before allocating

* add unit test
2026-05-11 20:09:34 +10:00
Oliver 35aa4d33d3 Maximum stock level (#11914)
* Add "maximum_stock" field

* Add API filter

* Update API version

* Update CHANGELOG

* Frontend updates

* Add dashboard widget

* docs

* Add API tests
2026-05-10 20:55:05 +10:00
Oliver bb2a72a6fb Support physical units for BOM lines (#11631)
* Add new "raw_amount" field to BomItem model

* Batch process data migration

* Update migration

* Calculate 'quantity' from 'raw_amount' field

* Improve decimal formatting in migration

* Allow raw_amount in serializer

* Adjust frontend form

* API validation and unit tests

* Additional playwright tests

* Update API version and CHANGELOG

* Updated docs

* Fix docstring

* Better handling of empty values

* Tweak unit tests

* Tweak unit test

* Fix unit test

* Adjust form field text

* Adjust migration file

* Tweak playwright tests

* Fix unit test

* Adjust serializers / import-export / playwright

* Fix migration

* Fix validation

* Loosen comparison

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-05-10 15:32:34 +10:00
Matthias Mair 0d4fe366ef feat(frontend): bump node build enviroment to 24 (#11893)
* feat(frontend): bump node build enviroment to 24

* update docs

* add changelog
2026-05-08 08:48:53 +10:00
Oliver 18e3c5a0e9 Prevent delete serialized stock (#11872)
* Add setting to prevent deletion of serialized stock

Co-authored-by: Copilot <copilot@github.com>

* Add unit test

Co-authored-by: Copilot <copilot@github.com>

* Update CHANGELOG

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-05-05 10:43:02 +10:00
DanielDango c68fda9916 Fix typo in develop.md from 'Feliver' to 'Deliver' (#11868) 2026-05-05 09:30:37 +10:00
Oliver 00d6f1c3ab [feature] Bulk replace (#11861)
* Allow bulk replace of BOM items

* Add "locked" filter for UsedIn table

* Add playwright tests

* docs

* Bump API version

* Update CHANGELOG

* Update api_version.py

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-05-04 23:13:23 +10:00
Oliver f4b7999f0f Update BOM compare screenshot (#11857)
- Ref: https://github.com/inventree/InvenTree/pull/11853#issuecomment-4365807990
2026-05-03 21:07:48 +10:00
Oliver 24ce51c5ca [UI] BOM compare (#11853)
* Refactor existing components

* Select assembly for comparison

* Rough BOM comparison table

* Select  display mode

* Layout tweaks

* Reset secondary part when drawer is closed

* Responsive grids

* Documentation

* Update CHANGELOG.md

* Add playwright tests

* Update wording

* Allow specification of secondary part with URL search params

* Update URL params when value changes

* Clearer display using icons

* Improve diff  layout

* Adjust playwright tests
2026-05-03 12:18:44 +10:00
Oliver 7269b0c21f Adjust app docs (#11849) 2026-05-02 10:04:35 +10:00
Oliver 768184e4f0 Update installer docs (#11846)
- Fix information on supported distros
2026-05-02 09:14:02 +10:00
Oliver 2b6952eabd BOM Ruleset (#11825)
* Add BOM role

* Adjust UI permissions

* Adjust docs

* Add data migratoin

* Specify role for BOM validation

* Tweak old migrati

* Fix role_required

* Update API version and CHANGELOG

Co-authored-by: Copilot <copilot@github.com>

* Update unit tests

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-28 12:29:57 +10:00
Oliver f271725def [UI] BOM row expand (#11809)
* Add subassembly expansion

Co-authored-by: Copilot <copilot@github.com>

* Enable multi-level subassembly display

Co-authored-by: Copilot <copilot@github.com>

* Adjust padding

* Adds user setting to enable / disable subassembly view

Co-authored-by: Copilot <copilot@github.com>

* Add icon

* Additional playwright tests

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-26 16:32:58 +10:00
Oliver ffe6c13edf [UI] BOM Editing (#10210)
* Support minimum column width

* Adjust DescriptionColumn and StatusColumn

* Column refactoring

* Refactor PartColumn

* Refactor LineItemsProgerssColumn

* Tweaks

* Ensure "can_build" value is not negative

* Render row expansion icon

* Add subassembly table for BOM

* Add controls for BOM editing

* Fix row click context

* Improve rendering for BOM sub-rows

* Hide BOM actions unless editing

* Disable row expansion for now

* Revert gitleaks changes

* Remove gitleaks tags

* Remove dead code

* Remove commented code

* Adjust playwright tests

Co-authored-by: Copilot <copilot@github.com>

* Update docs

Co-authored-by: Copilot <copilot@github.com>

* Further playwright fixes

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-26 12:49:21 +10:00
Oliver 2129e3338a Add docs for build order support in app (#11774) 2026-04-25 10:01:48 +10:00
Oliver 03508cd15b Boundary updates (#11794)
* Boundary updates

* Add error code
2026-04-24 10:52:17 +10:00
Oliver b686cc1327 Model permission tweaks (#11788)
* Model permission tweaks

* Update CHANGELOG

* Update plugin docs

* Add warning
2026-04-23 11:25:43 +10:00
Oliver d81a87225c Ensure configuration settings are documented (#11674)
* Export configuration keys to JSON

* Support rendering of config options in docs

* Check for missing config settings

* Simplify macro

* Initial tests

* Fix collisions

* Updates

* Ensure values are stringified

* Ensure null values are exported correctly

* Refactor database config

- Observability on the config settings

* More docs updates

* Updates

* Add observability of cache settings

* More updates

* Observability

* Set env config for RTD

* Revert RTD config file

- Handled by ENV VAR on RTD account

* Visibility on background worker settings

* Tweaks

* Tweaks

* Split tracing settings out into separate file

- Improved discovery
- declutter settings.py

* Cleanup LDAP settings

* Social providers docs

* More updates

* Refactor ldap setup into own module

* Tweaks

* Formatting tweaks

* Tweak logic

* Fix INVENTREE_SESSION_COOKIE_SECURE setting

* Fix wrapping

* Add custom default
2026-04-21 12:23:53 +10:00
ZhangzrJerry 1ab0182e92 Update docker_install.md (#11746) 2026-04-15 09:11:52 +10:00
Oliver 23f43ffd33 [plugin] Render tables (#11733)
* Move useFilterSet state to the @lib

* Refactor useTable hook into @lib

* Refactor string helper functions

* Refactor constructFormUrl func

* Refactor Boundary component

* Refactor StoredTableState

* More refactoring

* Refactor CopyButton and CopyableCell

* Pass table render func to plugins

* Provide internal wrapper function, while allowing the "api" and "navigate" functions to be provided by the caller

* Adds <InvenTreeTable /> component which is exposed to plugins

* Update frontend versioning

* Update docs

* Handle condition where UI does not provide table rendering function

* Move queryFilters out of custom state

* Fix exported type

* Extract searchParams

- Cannot be used outside of router component
- Only provide when the table is generated internally

* Bump UI version

* Fix for right-click context menu

- Function needs to be defined with the context menu provider
2026-04-13 20:36:29 +10:00
Dään fc06aa354a Add redis database index support (#11732) 2026-04-13 09:19:34 +10:00
Oliver fffc55c764 Catch keyboard interrupts (#11720) 2026-04-11 13:46:55 +10:00
Oliver 62588a62a3 Additional report tags (#11718)
* Add some more convenience functions for report helpers

* Add "reverse" tag

* Add unit tests

* Add lstrip and rstrip

* Fix unit tests
2026-04-11 12:03:58 +10:00
gunstr 16310617be Worker debugging (#11677)
* Add debugging info for background workers to the devcontainer docs

* Add debugging info the the EventMixin docs

* Add an option to set sync=True to launch.json
2026-04-10 11:38:35 +10:00
Oliver 01bb113396 [UI] Adjust "superuser warning" banner (#11696)
* Fix typo

- evelevated -> elevated

* Add playwright test

* Add new control settings
2026-04-10 11:37:37 +10:00
Oliver 9965ebcfa1 Selection lists updates (#11705)
* Add search capability to selection list entry endpoint

* Use API lookup for selection entries

* Add renderer func

* Allow API filtering

* Fetch selectionentry data related to the selected data item

* remove now unneeded entry

* add missing modelinfo

* fix ref

* add api bump

* Provide optional single fetch function to API forms

- Useful if we need to perform a custom API call for initial data

* django-admin support for SelectionList

* Docstring improvements

* Apply 'active' filter

* Tweak api version entry

* Playwright tests

* Tweak docs wording

* Fix incorrect docstring

* Adjust playwright tests

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-04-10 09:22:12 +10:00
Oliver cdb8ad4c30 Update report example (#11704)
* Update report example

* Fix typo
2026-04-09 13:31:25 +10:00
Oliver 4d2ed8fcba Update parameter report helper (#11690)
* Update parameter report helper

- Fallback to case insensitive lookup

* Add default value in case parameter is not found

* Add new report helper func
2026-04-08 14:14:44 +10:00
Oliver b8ec300fbf Merge commit from fork
* Add note to plugin docs.

* Adjust logic for PluginListTable

* Add superuser scope to PluginInstall API endpoint

* Update unit test for API endpoint

* Explicitly set PLUGINS_INSTALL_DISABLED if PLUGINS_ENABLED = False

* Check for superuser permission in installer.py

* Additional user checks

* Sanitize package name to protect against OS command injection
2026-04-08 08:16:07 +10:00
Matthias Mair e91f306245 feat(frontend): improve comms around danger of staff users (#11659)
* docs: add more details around staff / superuser roles and their dangers

* make clear that staff users are dangerous

* make distinction clearer in API

* add error code and frontend warning about running with staff / admin user

* fix test

* bump api

* adapt banner warning

* make banner locally disableable

* add global option to disable elevated user alert
2026-04-05 22:51:46 +10:00
Oliver a721a0fe35 Add documentation on background worker configuration options (#11673) 2026-04-04 12:41:55 +11:00
Oliver bb3293ef31 Updates to part revision support (#11670)
* Update revision validation

* Refactor UI display

* Fix for usePartFields

* Rearrange part settings

* Better visuals

* Update docs

* use 'full_name' field

* Update playwright tests

* Adjust unit test

* Fix playwright tests
2026-04-04 00:10:25 +11:00
Oliver 9c1d8c1b1d Docs updates (#11669)
- Add notes about optional BOM items
2026-04-03 14:40:43 +11:00
Oliver 5c55f4f4c0 Migrate plugin tables (#11648)
* Prevent creation of PluginConfig during migrations

* Refactor data import process

- Split into multiple separate steps

* Load plugins during data load / dump

- Required, otherwise we cannot dump the data

* Refactor export_records

- Use temporary file
- Cleanup docstring

* Force apps check on second validation step

* Improve import sequencing

* Update CI script

* Update migration docs

* CI pipeline for running import/export test

* Fix workflow naming

* Fix env vars

* Add placeholder script

* Fix matrix env vars

* Fix missing env var

* Install required packages

* Fix typo

* Tweak tasks.py

* Install dummy plugin as part of the

* Updated CI workflow

* Validate exported data

* Additional CI process

* Log mandatory plugins to INFO

* Force global setting

* Refactor CI pipeline

* Tweak file test

* Workflow updates

* Enable auto-update

* Test if import/export test should run

* Trigger if tasks.py changes
2026-04-02 21:26:34 +11:00
Matthias Mair a8cef43484 docs: add more details around staff / superuser roles and their dangers (#11658) 2026-04-02 10:40:10 +11:00
gunstr e4ac02a840 [Doc] Clarify Stocktake date (#11644) 2026-03-31 19:54:24 +11:00
Oliver 5c07ef2847 Add docs regarding copy button (#11636)
- Closes https://github.com/inventree/InvenTree/issues/11634
2026-03-31 07:11:48 +11:00
Oliver 77744aeeac Enhancements for recort import/export (#11630)
* Add management command to list installed apps

* Add metadata to exported data file

* Validate metadata for imported file

* Update CHANGELOG.md

* Update docs

* Use internal codes

* Refactor and add more metadata

* Adjust github action workflow

* Run with --force option to setup demo dataset
2026-03-31 00:18:48 +11:00
Jan Krajdl 9cd0b520c2 Added keep open boolean field to Stock Location modal form (#11074)
* Added keep open boolean field to Stock Location modal form

* Rewrite keep form open field feature to avoid calling methods in form field definitions

* Rewrite keep form open feature as common form property

* Removed unused artefact from previous implementation

* keepOpenOption removed as default option for all create forms. Instead it's enabled on selected forms.

* keepOpenOption field speed improvement

- using useRef instead of useState
- keepOpenSwitch moved to own component

* Added keep form open feature to changelog

* Updated documentation: keep form open feature added to concepts/user_interface docs

* Added test case for "keep form open" feature

* Changed switch selector in keep form open feature test

---------

Co-authored-by: spm <jan.krajdl@cecolo.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2026-03-29 15:09:47 +11:00
Matthias Mair 08e8b43cd4 docs:clear up admin access (#11595) 2026-03-23 07:11:48 +11:00