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

2100 Commits

Author SHA1 Message Date
github-actions[bot] 50ac52f09a chore(deps): bump cryptography from 46.0.5 to 46.0.6 in /src/backend (#11619) (#11625)
* 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
...



* fix style

---------




(cherry picked from commit b4f230753f)

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:40:50 +11:00
github-actions[bot] da1be76352 Fix order of hooks for stabilizing table columns (#11482) (#11622)
* 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

---------


(cherry picked from commit 571b46c9ff)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2026-03-29 15:39:20 +11:00
github-actions[bot] b19528b341 feat(backend): add inventree version to every response (#11611) (#11620)
* feat(backend): add inventree version to every response

* add more info

(cherry picked from commit e3c9a35bae)

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-03-29 14:45:22 +11:00
github-actions[bot] c5ff2f514f chore(deps): bump requests from 2.32.5 to 2.33.0 in /src/backend (#11609) (#11610)
* 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
...



* style fix

* reduce diff

---------




(cherry picked from commit d2e8c75de4)

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:47:08 +11:00
github-actions[bot] badd6e431b Restrict queryset for DataImportSession (#11602) (#11605)
* Restrict queryset for DataImportSession

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

* Add unit test

* raise PermissionDenied if no user info available

(cherry picked from commit b98fc9c7a0)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-03-24 23:51:20 +11:00
Oliver b810b47a4a [API] Category star fix (#11588) (#11589)
* [API] Bug fix for PartStar and PartCategoryStar

- Logic refactor and fixes

* Add playwright tests

* Remove debug statements

* Revert API string changes
2026-03-22 08:28:24 +11:00
Oliver 651e1c0dac Bump software version to 1.2.7 (#11587) 2026-03-22 00:06:42 +11:00
Oliver 2bc9e0f0d2 Security backport (#11584)
* 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

* 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 19:45:03 +11:00
github-actions[bot] 604f5fdb45 Adjust DataOutput API endpoint (#11580) (#11582)
* DataOutput API fix

- Prevent non-staff users from accessing unrelated DataOutput instances

* Add unit tests

(cherry picked from commit c5bf915d10)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-03-21 15:35:46 +11:00
github-actions[bot] ee3d01cf73 Save user info (#11572) (#11574)
* Record user info when creating stock item

* Add unit test

* Add playwright test

(cherry picked from commit fc730b9af7)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-03-20 15:53:33 +11:00
github-actions[bot] 3e447066c6 Build line fix (#11566) (#11570)
* Fix for RenderBuildLine

* Simple playwright test

(cherry picked from commit 7f0610502d)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-03-20 09:00:21 +11:00
Oliver 17fd3174fc Bump InvenTree software version to 1.2.6 (#11564) 2026-03-20 00:46:05 +11:00
github-actions[bot] c92f1c3413 [API] Bug fix for PartCategory cascade filter (#11562) (#11563)
* Bug fix for PartCategory cascade filter

* Additional unit test

(cherry picked from commit ef2f05a418)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-03-19 23:52:17 +11:00
github-actions[bot] 65f1a4bde5 fix(plugin): use app_name instead of plugin_path when deregistering models (#11536) (#11553)
* 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

(cherry picked from commit 468f0f9c3b)

Co-authored-by: nino-tan-smartee <nino.tan@smartsourcing.co>
2026-03-18 15:31:04 +11:00
Oliver 8077849fc5 Bump InvenTree software version to 1.2.5 (#11550) 2026-03-18 00:29:07 +11:00
Oliver 4789a202ee Disable broken unit test (#11549) 2026-03-17 22:40:11 +11:00
Oliver c173c4e051 Fix stuck-in-past expiry date filter (#11518) (#11523)
* fix stuck-in-past expiry date filter

* also fix OVERDUE_FILTER date problem

Co-authored-by: Jacob Felknor <jacobfelknor073@gmail.com>
2026-03-16 00:12:38 +11:00
github-actions[bot] e749ece58e fix: low-privilege user token creation (#11492) (#11521)
* [bug] Users cannot create their own API tokens
Fixes #11486

* fix detection of metadata

* make easier to read

* add handler for IsAuthenticated

* use correct method

* fix style see #11487

* add frontend test

* make test more reliable?

(cherry picked from commit fda3204e33)

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-03-14 12:35:28 +11:00
github-actions[bot] 5bf41f1463 [UI] Fix hook deps for BuildOutputTable (#11483) (#11495)
- Closes https://github.com/inventree/InvenTree/issues/11280

(cherry picked from commit aafda4bece)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-03-12 13:30:28 +11:00
github-actions[bot] 59f3b9f2f6 fix: wrap create_default_labels in transaction.atomic() savepoint to prevent PostgreSQL transaction abort (#11484) (#11490)
When the plugin registry reloads during an active HTTP request,
create_default_labels() raises ValidationError on duplicate template
inserts. On PostgreSQL this aborts the entire outer atomic() block,
causing TransactionManagementError on all stock operations in that request.

Fixes #11469


(cherry picked from commit a964d6682e)

Co-authored-by: tigger2000ttfn <tigger2000ttfn@gmail.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-03-11 22:28:22 +11:00
Matthias Mair f2fa65ff1d chore(deps): bump pypdf from 6.7.4 to 6.7.5 in /src/backend (#11454) (#11462)
* chore(deps): bump pypdf from 6.7.4 to 6.7.5 in /src/backend

Bumps [pypdf](https://github.com/py-pdf/pypdf) from 6.7.4 to 6.7.5.
- [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.7.4...6.7.5)

---
updated-dependencies:
- dependency-name: pypdf
  dependency-version: 6.7.5
  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>
(cherry picked from commit 3ed21e00cf)

# Conflicts:
#	src/backend/requirements-3.14.txt
#	src/backend/requirements.txt

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 09:44:49 +11:00
github-actions[bot] 9cfec02a69 [API] Enforce pk ordering for API endpoints (#11446) (#11447)
* Add unit test to detect unreliable pagination

* Enforce PK field ordering

- Append 'pk' ordering to InvenTreeOrderingFilter

* Use our ordering filter everywhere

* Simplify ordering options

* Enforce list

* Use last term for ordering checks

* Individual delete to fix mysql issue

(cherry picked from commit 3bbdddf51d)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-03-02 23:07:00 +11:00
github-actions[bot] c35ab145a4 Prevent exchange rate update during migration (#11429) (#11430)
(cherry picked from commit fb3b1189fd)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-02-27 09:36:53 +11:00
Oliver b611960d9f Bump software version to 1.2.4 (#11402) 2026-02-23 09:10:40 +11:00
Oliver 12da3b01fc Merge commit from fork (#11400)
- Change one renderer from jinja to django
- Move the other to a sandboxed environment
2026-02-22 23:25:31 +11:00
Oliver 2df9eb80ca [bug] Fix custom logo and splash (#11391) (#11399)
* Add custom logo and splash to playwright fixtures

* Render custom logo in frontend

* Add playwright tests for customization settings

* Separate playwright run for customization

* Update ci file

* Update playwright config file

* Do not call get_custom_file from withing settings.py

- django app not fully initialized yet
- can cause loops

* Disable default tests (for now)

* Re-enable normal tests

* Update qc checks

* Order of operations?

* Debug output

* Use env

* Add more debug info

* More debug

* Further debug

* Add collectstatic check

* Run normal tests too

* Remove debug prints
2026-02-22 22:46:25 +11:00
github-actions[bot] 44387f3bb4 [bug] Check for null plugin config (#11394) (#11395)
* Check for null plugin config

* Handle potential errors

(cherry picked from commit 2e675ee87a)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-02-22 12:56:57 +11:00
Oliver ed8331e26a Bump InvenTree software version to 1.2.3 (#11382) 2026-02-19 22:57:39 +11:00
Oliver 228577c871 [UI] Bug fix for stock column ordering (#11376) (#11380)
- Cannot have a blank accessor
2026-02-19 22:09:58 +11:00
github-actions[bot] fd7d0bda0f Batch update of records during migration (#11371) (#11373)
* Batch update of records during migration

Reduce issues with very large datasets

* Add short-circuit logic

* Filter and prefetch

(cherry picked from commit a4a399022f)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-02-19 12:07:16 +11:00
Oliver 90e5169283 Bump software version to 1.2.2 (#11360) 2026-02-18 10:51:42 +11:00
github-actions[bot] 198594d7d3 Prevent migration check if performing DB update operations (#11356) (#11358)
* Prevent migration check if performing DB update operations

* Prevent settings write during data imports

* Prevent exchange rate update during migration processes

* Allow exchange rate updates during tests or shell session

(cherry picked from commit 951586a698)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-02-18 00:27:32 +11:00
github-actions[bot] eb413bcc57 disable traceid gen in unsecure context (#11349) (#11350)
(cherry picked from commit b8cf2db68e)

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-02-17 10:47:32 +11:00
Oliver 9b11cd294e Bump software version to 1.2.1 (#11313)
* Bump software version to 1.2.1

* Fix style issues

* [CI] Allow more test time

* Disable performance testing

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-02-16 12:46:45 +11:00
github-actions[bot] ccf5b39bf1 [bug] FIx for data migration (#11329) (#11330)
* [bug] FIx for data migration

Prevent writing of default currency to database during migration or backup

* Ignore error

(cherry picked from commit 7a646946c3)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-02-15 22:44:21 +11:00
Oliver 3752b610c8 Bump version number to 1.2.0 (#11299)
* Bump version number to 1.2.0

* Update CHANGELOG.md
2026-02-12 19:53:08 +11:00
Oliver 1ade79398d [UI] Data import fixes (#11298)
- Refresh session and table after deleting rows
2026-02-12 17:41:45 +11:00
Matthias Mair b11bbfb92c feat(frontend): Add better frontend tracing (#11244)
* add better tracing through the frontend

* extend allowed headers

* add endpoint to end the trace

* end traces correctly in backend

* end trace

* early cop-out if not tracing is enabled

* Update API version link for v447
2026-02-12 15:53:58 +11:00
Matthias Mair 9fbc7ac40c feat(frontend): add warning to SO line calcs (#11296) 2026-02-12 13:05:12 +11:00
Matthias Mair fa32d5f0d2 chore(backend): allign dep pinning (#11292) 2026-02-12 09:26:04 +11:00
dependabot[bot] dee285133c chore(deps): bump pillow from 12.1.0 to 12.1.1 in /src/backend (#11290)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 12.1.0 to 12.1.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/12.1.0...12.1.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 12.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-12 07:27:29 +11:00
Oliver 3ebf27df36 Display more output information in "build allocated stock" table (#11276)
* Add "install_into_detail" to BuildItem serializer

* Enhance the "resolveItem" function

* Add "StockColumn" renderer

* Fix output column for BuildAllocatedStockTable

* Replace column in stock item table

* More column refactoring

* Bump API version

* Add InvenTreeOutputOption descriptions

* Prefetch for better API performance

* Updated playwright testing
2026-02-11 23:25:56 +11:00
Oliver e963b8219b [UI] Edit BOM item from "Used In" table (#11286)
- Allows editing BOM item from the "used in" table
- Useful for editing from the context of the component / subassembly
2026-02-11 21:46:54 +11:00
Oliver d24ba7965c [bug] Fix table ordering (#11277)
* Additional filtering options for stock list

* Fix ordering for stock table

* Ordering fix for build order table

* Ordering for supplier parts and manufacturer parts

* SalesOrderLineItem: Order by IPN

* ReturnOrderLineItem table:

- Order by part name
- Order by part IPN

* Update API version to 451

Increment API version to 451 and update changelog.

* Add playwright tests for column sorting

* Add backend tests for API ordering

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-02-11 17:52:21 +11:00
dependabot[bot] 384f8282fd chore(deps): bump cryptography from 46.0.3 to 46.0.5 in /src/backend (#11285)
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.3 to 46.0.5.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/46.0.3...46.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-11 15:24:21 +11:00
Oliver 1c1933b694 [enhancements] Stock tracking enhancements (#11260)
* Data migrations for StockItemTracking

- Propagate the 'part' links

* Enable filtering of stock tracking entries by part

* Enable filtering by date range

* Display stock tracking for part

* Table enhancements

* Bump API version

* Display stock item column

* Ensure 'quantity' is recorded for stock tracking entries

* Add new global settings

* Adds background task for deleting old stock tracking entries

* Docs updates

* Enhanced docs

* Cast quantity to float

* Rever data migration

* Ensure part link gets created

* Improved prefetch for API

* Playwright testing

* Tweak unit test thresholds

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-02-10 21:54:35 +11:00
Oliver 613ed40843 [UI] Build updates (#11274)
* Hide "child build orders" for builds without any subassemblies

* Hide "build stock" button for inactive build orders
2026-02-10 12:00:06 +11:00
Joe Rogers 3c44787dc0 Add missing part/stocktake nullable annotations for schema (#11266)
* Add missing nullable annotations for schema

* Bump schema version
2026-02-10 09:53:56 +11:00
Jacob Felknor 026011131e change role for allocation table multiselect (#11264) 2026-02-10 09:53:29 +11:00
Matthias Mair 232cc08ddc bump django due to... all the releases vulns (#11265) 2026-02-07 11:22:46 +11:00