2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-03-31 16:41:03 +00:00
Commit Graph

17577 Commits

Author SHA1 Message Date
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
Oliver
67d6026637 Remove duplicate entries in the API version list (#11629) 2026-03-30 19:58:57 +11:00
Oliver
dab4319033 Receive virtual parts (#11627)
* Handle receive of virtual parts

- Update line item quantity
- Do not add any stock

* Add unit test

* Additional unit test

* UI form improvements

* Add playwright test

* Updated playwright tests
2026-03-30 19:10:56 +11:00
dependabot[bot]
b4f230753f chore(deps): bump cryptography from 46.0.5 to 46.0.6 in /src/backend (#11619)
* chore(deps): bump cryptography from 46.0.5 to 46.0.6 in /src/backend

Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.5 to 46.0.6.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/46.0.5...46.0.6)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-version: 46.0.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix style

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2026-03-30 09:24:07 +11:00
Oliver
2c7b2d27f9 Badge fix (#11624)
* Fix "in production" badge

- Use the total scheduled build quantity

* Add "Allocated" badge

* Tweak playwright tests
2026-03-30 08:38:53 +11:00
Oliver
79aa824c14 Keep allocation forms open (#11621)
- Following https://github.com/inventree/InvenTree/pull/11074
- Option to keep allocation forms open
2026-03-29 17:49:46 +11:00
github-actions[bot]
b4ab985e1e New Crowdin translations by GitHub Action (#11593)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-29 17:49:33 +11:00
Oliver
571b46c9ff Fix order of hooks for stabilizing table columns (#11482)
* Fix order of hooks for stabilizing table columns

Ref: https://github.com/icflorescu/mantine-datatable/issues/759

* Reset column ordering and widths when the component is mounted

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-03-29 15:21:53 +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
e3c9a35bae feat(backend): add inventree version to every response (#11611)
* feat(backend): add inventree version to every response

* add more info
2026-03-29 14:27:05 +11:00
HuaYangTian
7614973a04 fix(frontend): complete zh-Hans UI localization (#11612)
* fix(frontend): complete zh-Hans localization

* fix(frontend): address i18n review feedback
2026-03-29 14:25:27 +11:00
dependabot[bot]
100555c9db chore(deps): bump pypdf from 6.9.1 to 6.9.2 in /src/backend (#11608)
* chore(deps): bump pypdf from 6.9.1 to 6.9.2 in /src/backend

Bumps [pypdf](https://github.com/py-pdf/pypdf) from 6.9.1 to 6.9.2.
- [Release notes](https://github.com/py-pdf/pypdf/releases)
- [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/py-pdf/pypdf/compare/6.9.1...6.9.2)

---
updated-dependencies:
- dependency-name: pypdf
  dependency-version: 6.9.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix style

* add playwright test

* Revert "add playwright test"

This reverts commit f0c661d6eb.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2026-03-27 07:29:54 +11:00
dependabot[bot]
d2e8c75de4 chore(deps): bump requests from 2.32.5 to 2.33.0 in /src/backend (#11609)
* chore(deps): bump requests from 2.32.5 to 2.33.0 in /src/backend

Bumps [requests](https://github.com/psf/requests) from 2.32.5 to 2.33.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.5...v2.33.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.33.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* style fix

* reduce diff

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2026-03-27 07:29:32 +11:00
Matthias Mair
8b67fe5e99 fix(frontend): Template Editor Rendering Issues (#11601)
* fix order

* general bump

* allign @codemirror

* fix style

* add playwright test

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-03-27 07:29:03 +11:00
dependabot[bot]
7e18555a6b chore(deps): bump yaml from 1.10.2 to 1.10.3 in /src/frontend (#11607)
Bumps [yaml](https://github.com/eemeli/yaml) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](https://github.com/eemeli/yaml/compare/v1.10.2...v1.10.3)

---
updated-dependencies:
- dependency-name: yaml
  dependency-version: 1.10.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 11:59:40 +11:00
Oliver
a1ec46a6b8 isGeneratingSchema fix (#11606)
- Ignore sqlflush command
2026-03-25 01:09:00 +11:00
Oliver
8ec61aca0a Update DataExport functionality (#11604)
* Update DataExport functionality

- Chunk queryset into memory

* Allow larger number of queries for chunked database fetching

* Handle possible exception in unit testing
2026-03-25 00:35:08 +11:00
dependabot[bot]
953b77bed9 chore(deps): bump the dependencies group with 4 updates (#11599)
Bumps the dependencies group with 4 updates: [dorny/paths-filter](https://github.com/dorny/paths-filter), [actions/download-artifact](https://github.com/actions/download-artifact), [svenstaro/upload-release-action](https://github.com/svenstaro/upload-release-action) and [crowdin/github-action](https://github.com/crowdin/github-action).


Updates `dorny/paths-filter` from 3.0.2 to 4.0.1
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](de90cc6fb3...fbd0ab8f3e)

Updates `actions/download-artifact` from 8.0.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](70fc10c6e5...3e5f45b2cf)

Updates `svenstaro/upload-release-action` from 2.11.4 to 2.11.5
- [Release notes](https://github.com/svenstaro/upload-release-action/releases)
- [Changelog](https://github.com/svenstaro/upload-release-action/blob/master/CHANGELOG.md)
- [Commits](b98a3b12e8...29e53e9178)

Updates `crowdin/github-action` from 2.15.0 to 2.15.2
- [Release notes](https://github.com/crowdin/github-action/releases)
- [Commits](8818ff65bf...ce33ce793a)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-version: 4.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: svenstaro/upload-release-action
  dependency-version: 2.11.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: crowdin/github-action
  dependency-version: 2.15.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-24 23:40:10 +11:00
Oliver
b98fc9c7a0 Restrict queryset for DataImportSession (#11602)
* Restrict queryset for DataImportSession

- Only allow non-staff users to see their own sessions

* Add unit test

* raise PermissionDenied if no user info available
2026-03-24 23:28:58 +11:00
Miklós Márton
4865a2b2a0 Remove unnecessary semicolon passed to FontFace constructor (#11603)
Fixes #11583
2026-03-24 22:15:44 +11:00
Matthias Mair
ae593bd7c4 chore(backend): full backend/image bump (#11571)
* full bump

* bump base image

* update comment

* fix ty errors

* lower allauth
2026-03-23 21:46:45 +11:00
Miklós Márton
7100569e45 Support image upload from clipboard (#11577)
* Support image upload from clipboard

* Suffix the image upload dialog message with the clipboard paste capability
2026-03-23 21:45:36 +11:00
Matthias Mair
08e8b43cd4 docs:clear up admin access (#11595) 2026-03-23 07:11:48 +11:00
Oliver
1e0a0aa79d Add option to "asset" tag to control error raising (#11591) 2026-03-22 17:15:14 +11:00
github-actions[bot]
0feba9fbfb New Crowdin translations by GitHub Action (#11498)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-22 13:31:14 +11:00
Oliver
8e289a3208 [API] Category star fix (#11588)
* [API] Bug fix for PartStar and PartCategoryStar

- Logic refactor and fixes

* Add playwright tests

* Remove debug statements

* Revert API string changes
2026-03-21 23:47:11 +11:00
Bradley Zylstra
cf619b4184 [Bug] Import-records fix when importing from older InvenTree+Postgres version (#10862)
* Fixed issue where importing data from older versions of InvenTree+Postgres would fail

* Update tasks.py

Changed .startswith to exact matching for users.userprofile.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update tasks.py

Added validation checks to user primary key pairing dict.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Reverted tasks.py, disabled signals in user model when importing data

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-21 22:46:03 +11:00
Oliver
3a3816307e Make WAL mode configurable for sqlite (#11585) 2026-03-21 19:46:22 +11:00
Oliver
6d8606bbe4 Refactoring for report helper functions (#11579)
* Refactoring for media file report helper functions

* Updated unit tests

* Improved error handling

* Generic path return for asset

* Fix return type annotations

* Fix existing test

* Tweaked unit test

* Collect static files in CI

* Run static step for all DB tests

* Update action.yaml

* Fix for action.yaml

* Updated unit tests
2026-03-21 17:38:41 +11:00
Oliver
5adf33d354 Improvements for get_bulk_queryset (#11581)
* Improvements for get_bulk_queryset

- Limit scope to base view queryset
- Remove ability to provide arbitrary filters
- Remove feedback if zero items are found

* Adjust unit test

* Remove filter test

* Update CHANGELOG.md
2026-03-21 17:17:35 +11:00
Oliver
c5bf915d10 Adjust DataOutput API endpoint (#11580)
* DataOutput API fix

- Prevent non-staff users from accessing unrelated DataOutput instances

* Add unit tests
2026-03-21 15:14:59 +11:00
Oliver
5f9972e75e [plugin] Cache busting for plugin static files (#11565)
* Add helper to check the existence of a static file

* Log error if plugin static file does not exist

* Support cache busting for plugin files

* Use Pathlib instead

* Improve generic URL resolution

* Add unit test
2026-03-20 15:42:15 +11:00
Oliver
fc730b9af7 Save user info (#11572)
* Record user info when creating stock item

* Add unit test

* Add playwright test
2026-03-20 15:41:44 +11:00
Oliver
8c2592b3c2 Fix parent field for StockItemSerializer (#11573)
* Fix parent field for StockItemSerializer

- Closes https://github.com/inventree/InvenTree/issues/11507

* Bump API version
2026-03-20 15:41:35 +11:00
dependabot[bot]
a64b15af76 chore(deps): bump pypdf from 6.8.0 to 6.9.1 in /src/backend (#11556)
* chore(deps): bump pypdf from 6.8.0 to 6.9.1 in /src/backend

Bumps [pypdf](https://github.com/py-pdf/pypdf) from 6.8.0 to 6.9.1.
- [Release notes](https://github.com/py-pdf/pypdf/releases)
- [Changelog](https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/py-pdf/pypdf/compare/6.8.0...6.9.1)

---
updated-dependencies:
- dependency-name: pypdf
  dependency-version: 6.9.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix style

* fix style

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2026-03-20 10:39:10 +11:00
Oliver
7f0610502d Build line fix (#11566)
* Fix for RenderBuildLine

* Simple playwright test
2026-03-20 08:51:21 +11:00
Matthias Mair
9c993d1c22 bump drf (#11559) 2026-03-20 07:18:27 +11:00
Oliver
ef2f05a418 [API] Bug fix for PartCategory cascade filter (#11562)
* Bug fix for PartCategory cascade filter

* Additional unit test
2026-03-19 23:40:44 +11:00
Oliver
4599edd375 [UI Update image fix (#11557)
* Improve thumbnail selector

- Center image
- Better descriptive text

* Updated playwrigth testing
2026-03-19 16:56:13 +11:00
Matthias Mair
16103379c9 chore(backend): Bump ty (#11537)
* bump ty - there is better django support now

* more fixes

* fix usage of types

* add missing type

* fix access

* ensure itteration is safe

* fix uncombat decimal usage

* ?potential breaking: change access key

* remove now obsolete igtnore

* ignore errors on StdImageField

* remove usage of unkonw parameter

* fix diff error

* fix schema creation

* fix coverage quirk

* those are unneeded now?

* this seem to have been an issue with 3.12; not occuring on 3.14

* ignore pydantiics

* ignore edge cases for now

* include isGenerating fix

* make typing python 3.11 compatible

* fix more errors
2026-03-18 18:25:50 +11:00
Oliver
865ec47a3b Fix error generation on failed background task (#11552)
* Fix error generation on failed background task

* Tweak unit test
2026-03-18 18:23:47 +11:00
nino-tan-smartee
468f0f9c3b fix(plugin): use app_name instead of plugin_path when deregistering models (#11536)
* fix(plugin): use app_name instead of plugin_path when deregistering models

_deactivate_mixin uses plugin_path (the full dotted module path) as the
key into Django's apps.all_models when removing plugin models during
reload. However, Django registers models under the app_label (the short
app_name), not the full plugin_path.

For plugins with nested module paths (e.g. "myplugin.myplugin"),
plugin_path != app_name. Since apps.all_models is a defaultdict, looking
up plugin_path silently creates an empty OrderedDict, then .pop(model)
raises KeyError because the model was never in that dict — it was
registered under app_name.

This causes recurring KeyError crashes every plugin reload cycle
(~1 minute) for any external plugin with a nested package structure.

The fix:
- Use app_name (already computed at line 98) instead of plugin_path
- Add default None to .pop() for defensive safety
- Consistent with line 123 which already correctly uses app_name

* test(plugin): add unit test for nested plugin path model deregistration

Ensures _deactivate_mixin uses app_name (last path component) instead
of the full plugin_path when looking up models in apps.all_models,
preventing KeyError for external plugins with nested module structures.

* style: fix ruff format for context manager parenthesization
2026-03-18 13:45:40 +11:00
Oliver
488bd5f923 Fix complete_sales_order_shipment task (#11525)
* Fix complete_sales_order_shipment task

- Perform allocation *before* marking shipment as complete
- Ensure task is not marked as complete before it is actually done

* Add unit test

* Provide task status tracking for shipment completion

* Add integration testing

* Address unit test issues

* Bump API version

* Enhance playwright test
2026-03-18 08:05:16 +11:00
Oliver
b10fd949d3 Remove error handling for complete_build_allocations task (#11551)
- We *want* this to fail, and run again
- It is handled by the background task manager
2026-03-18 07:07:25 +11:00
Oliver
756c0be0b5 [db] Backend setting improvements (#11500)
* Refactor database engine options

- Move to setting/db_backend.py
- Cleanup settings.py

* Fix documentation for postgres settings

* docs updates

* Add transaction_mode options for sqlite

* Update CHANGELOG with breaking changes

* Remove hard-coded database config

* Raise error on invalid backend

* Fix typos

* Fix broken redis link

* Limit to single worker thread for sqlite

* Update docs

* Add verbosity switch to dev.test task

* Add test timeout - kill hanging tests after 120s

* Set WAL mode for sqlite

* Use IMMEDIATE mode for background worker thread

* Use config to set WAL rather than custom hook

* Tweak pyproject settings

* Tweak code

* Increase timeouts

* Reset requirements to master
2026-03-18 00:01:17 +11:00
dependabot[bot]
34b7a559d7 chore(deps): bump the dependencies group with 7 updates (#11544)
Bumps the dependencies group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3.7.0` | `4.0.0` |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.12.0` | `4.0.0` |
| [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `4.0.0` | `4.1.0` |
| [docker/login-action](https://github.com/docker/login-action) | `3.7.0` | `4.0.0` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `5.10.0` | `6.0.0` |
| [CodSpeedHQ/action](https://github.com/codspeedhq/action) | `4.5.2` | `4.11.1` |
| [anchore/sbom-action](https://github.com/anchore/sbom-action) | `0.22.2` | `0.23.1` |


Updates `docker/setup-qemu-action` from 3.7.0 to 4.0.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](c7c5346462...ce360397dd)

Updates `docker/setup-buildx-action` from 3.12.0 to 4.0.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](8d2750c68a...4d04d5d948)

Updates `sigstore/cosign-installer` from 4.0.0 to 4.1.0
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](faadad0cce...ba7bc0a3fe)

Updates `docker/login-action` from 3.7.0 to 4.0.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](c94ce9fb46...b45d80f862)

Updates `docker/metadata-action` from 5.10.0 to 6.0.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](c299e40c65...030e881283)

Updates `CodSpeedHQ/action` from 4.5.2 to 4.11.1
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](dbda7111f8...281164b0f0)

Updates `anchore/sbom-action` from 0.22.2 to 0.23.1
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](28d71544de...57aae52805)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: docker/login-action
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: docker/metadata-action
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: CodSpeedHQ/action
  dependency-version: 4.11.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: anchore/sbom-action
  dependency-version: 0.23.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-18 00:00:53 +11:00
Matthias Mair
ab116309b3 chore(backend): fix isGenerating detection (#11548) 2026-03-18 00:00:33 +11:00
Oliver
84cd81d9a8 Build consume fix (#11529)
* Add new build task

* Refactor background task for consuming build stock

- Run as a single task
- Improve query efficiency

* Refactor consuming stock against build via API

- Return task_id for monitoring
- Keep frontend updated

* Task tracking for auto-allocation

* Add e2e integration tests:

- Auto-allocate stock
- Consume stock

* Bump API version

* Playwright test fixes

* Adjust unit tests

* Robustify unit test

* Widen test scope

* Adjust playwright test

* Loosen test requirements again

* idk, another change :|

* Robustify test
2026-03-17 20:51:12 +11:00
Matthias Mair
97aec82d33 bump PyJWT (#11532)
fixes https://github.com/inventree/InvenTree/security/dependabot/386
2026-03-15 22:03:45 +11:00
Oliver
609a3f4a36 [UI] Library fix (#11530)
* Ensure "lib" is built as part of CI

* Fix useMonitorBackgroundTask hook
2026-03-15 15:37:56 +11:00