Commit Graph

17799 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
Oliver 5489656016 [UI] Fix settings rendering (#11987)
- Do not duplicate global plugin settings
2026-05-22 15:19:01 +10:00
Oliver 5718b49bf1 Fix text size in build line table (#11986) 2026-05-22 14:37:48 +10:00
Oliver 8ae0a5ea66 Tree delete API (#11979)
* Add API serializer for deleting a location

* Add serializer for part category delete

* Bump API version

* Fix unit tests

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-05-22 14:37:36 +10:00
Oliver 8b9ea43b5b [UI] Lock action (#11981)
- Toggle part lock directly from existing icon
2026-05-22 10:21:23 +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
dependabot[bot] 65d15a5945 chore(deps): bump idna from 3.13 to 3.15 in /contrib/dev_reqs (#11970)
* chore(deps): bump idna from 3.13 to 3.15 in /contrib/dev_reqs

Bumps [idna](https://github.com/kjd/idna) from 3.13 to 3.15.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](https://github.com/kjd/idna/compare/v3.13...v3.15)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.15'
  dependency-type: indirect
...

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-05-22 08:19:01 +10:00
Oliver e392348654 [UI] Calendar tooltips (#11980)
* Allow tooltips for calendar entries

* Render tooltip for purchase order calendar

* Calendar tooltip renderers

* Add tooltip for build calendar

* Add key to filter list

* Display responsible owner
2026-05-22 00:17:11 +10:00
Oliver 3f3433685d Normalize BomItem quantity (#11975)
- Limit decimal places before save
- Prevents error in BomItem validation
2026-05-21 16:43:49 +10:00
dependabot[bot] f768bb38a0 chore(deps): bump pymdown-extensions from 10.21.2 to 10.21.3 in /docs (#11968)
* chore(deps): bump pymdown-extensions from 10.21.2 to 10.21.3 in /docs

Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 10.21.2 to 10.21.3.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/10.21.2...10.21.3)

---
updated-dependencies:
- dependency-name: pymdown-extensions
  dependency-version: 10.21.3
  dependency-type: indirect
...

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-05-21 07:11:44 +10:00
github-actions[bot] 53d78be7f7 New Crowdin translations by GitHub Action (#11919)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-21 00:31:37 +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
dependabot[bot] cd5bd3c245 chore(deps): bump the dependencies group with 4 updates (#11965)
Bumps the dependencies group with 4 updates: [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer), [oasdiff/oasdiff-action](https://github.com/oasdiff/oasdiff-action), [CodSpeedHQ/action](https://github.com/codspeedhq/action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `sigstore/cosign-installer` from 4.1.1 to 4.1.2
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003...6f9f17788090df1f26f669e9d70d6ae9567deba6)

Updates `oasdiff/oasdiff-action` from 0.0.45 to 0.0.47
- [Release notes](https://github.com/oasdiff/oasdiff-action/releases)
- [Commits](https://github.com/oasdiff/oasdiff-action/compare/e7609f171f253c3e2be2a2e5c508f749ca476a07...6147a58e5d1249a12f42fc864ab791d571a30015)

Updates `CodSpeedHQ/action` from 4.15.0 to 4.15.1
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codspeedhq/action/compare/c381be0bfd20e844fb45594f6aa182ffcd94545c...3194d9a39c4d46684cb44bf7207fc56626aad8fd)

Updates `github/codeql-action` from 4.35.3 to 4.35.4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/e46ed2cbd01164d986452f91f178727624ae40d7...68bde559dea0fdcac2102bfdf6230c5f70eb485e)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: oasdiff/oasdiff-action
  dependency-version: 0.0.47
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: CodSpeedHQ/action
  dependency-version: 4.15.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-version: 4.35.4
  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-05-19 17:03:59 +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
Oliver 73c7820ac0 Fix for dashboard item logic (#11960)
- Render cached value
2026-05-17 20:21:08 +10:00
Oliver 9f78e994c2 [UI] Mantine 9 (#11947)
* Update mantine deps

* Get it to compile

* Update QueryCount widgets

- use new RollingNumber component

* Table updates

- Remove "hack" for column ordering

* "Fix" the column pinning bug (maybe?)

* Fix ColumnRenderers.tsx

* Fix login code for playwright

* Remove hashing requirement

* Fix build tests

* More fixes

* More test fixes

* Fix playwright test for dashboard item

* Update frontend version

* Update changelog

* Reduce query repeats

* More playwright fixes

* Further playwright fixes

* Fix for useFilterSet hook

* Fix unique key error

* Fix rendering issues when opening edit forms

* reduce console errors

* Fix unique key issues in search drawer

* Update frontend CHANGELOG.md

* More form tweaks

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-05-17 19:26:37 +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 c09848422c [UI] Panel indicator badges (#11956)
* Refactor panel indicator dots

- Allow indicator status to be fetched async

* Add indicator dot for attachments

* Support parameters panel

* Refactor

- Expose more types to @lib
- Define new PanelIndicatorType type
- Support old interface
2026-05-17 10:58:23 +10:00
Robert Silén d732f35e5c Add MariaDB link to database section in README (#11950)
* Add MariaDB link to database section in README

* Update MariaDB link in README.md

link to mariadb.org
2026-05-16 08:19:29 +10:00
Matthias Mair 038dcc9c74 remove unused statements (#11949) 2026-05-16 07:57:33 +10:00
Matthias Mair e3a22762e8 refactor(backend): various SAST fixes (#11952)
* optimize asserts

* ensure redirect is safe

* sanatize token in log
2026-05-16 07:53:37 +10:00
Matthias Mair 2abaaff543 pin test install (#11953) 2026-05-16 07:52:11 +10:00
Joe Rogers 7655dc3819 Update schema to match server responses for SelectionList and TreePath (#11948)
* Annotate default list selection to allow nullable and ensure entry_count is never null

* Add icon (nullable) to TreePath schema

* Bump api version
2026-05-15 23:24:39 +10:00
Oliver d6f257dc58 Receive items requrires the "add" role - POST action (#11946) 2026-05-15 11:51:58 +10:00
Oliver c931ab6815 [bug] Bulk edit fix (#11945)
* Prevent editing of items which do not point directly to the part

* Allow table to define which records can be selected
2026-05-15 00:24:22 +10:00
Matthias Mair 701a788a6e feat(frontend): custom model render registration (#11928)
* refactor RenderInstance

* add custom mode renderer

* add optional custom_model api form arg

* switch to fallback mechanism

* remove warning

* fix imports

* adress sonarque rules
2026-05-14 13:18:52 +10:00
Oliver 6e2a867c92 [bug] Fix for report generation context (#11941)
* Provide explicit user information to report context

* Pass user information through to offloaded task

* Pass user information back to the plugin

* Fix user passing

* Add more complex unit test for report printing

- Test debug ON / OFF
- Test merge ON / OFF
- Check generated data output

* Unit testing for label generation

* Further refactoring

- Remove "request" from printing context entirely

* Simplify argument drilling

* Robustify unit tests
2026-05-14 11:25:20 +10:00
Oliver 3d2577b411 [UI] Refactor order table filters (#11939)
* Refactor build order filters

- Common set of filters for build order views

* Refactor PurchaseOrder filters

* Update company table

* Refactor SalesOrder filters

* Refactor common filters

* Refactor ReturnOrder table filters
2026-05-13 20:24:40 +10:00
Oliver 573c82f98d Refactor part table filters (#11938)
- Expose extended filters to the parameteric table
2026-05-13 18:08:28 +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
dependabot[bot] fc2cd3bea1 chore(deps): bump the dependencies group with 3 updates (#11929)
Bumps the dependencies group with 3 updates: [oasdiff/oasdiff-action](https://github.com/oasdiff/oasdiff-action), [CodSpeedHQ/action](https://github.com/codspeedhq/action) and [github/codeql-action](https://github.com/github/codeql-action).


Updates `oasdiff/oasdiff-action` from 0.0.43 to 0.0.45
- [Release notes](https://github.com/oasdiff/oasdiff-action/releases)
- [Commits](https://github.com/oasdiff/oasdiff-action/compare/c002f996c3d084acf62ea6dd4f2e7a57b7bc2a35...e7609f171f253c3e2be2a2e5c508f749ca476a07)

Updates `CodSpeedHQ/action` from 4.14.0 to 4.15.0
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codspeedhq/action/compare/658a901452bb54c799643e060733b7afe9121b8d...c381be0bfd20e844fb45594f6aa182ffcd94545c)

Updates `github/codeql-action` from 4.35.2 to 4.35.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/95e58e9a2cdfd71adc6e0353d5c52f41a045d225...e46ed2cbd01164d986452f91f178727624ae40d7)

---
updated-dependencies:
- dependency-name: oasdiff/oasdiff-action
  dependency-version: 0.0.45
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: CodSpeedHQ/action
  dependency-version: 4.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action
  dependency-version: 4.35.3
  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-05-13 16:18:55 +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 5d72eb4f1d [API] Role fix (#11932)
- Allow users to view BOM validation information with bom.view role
2026-05-12 14:39:40 +10:00
Matthias Mair 34a9f1e10c feat(frontend): expose inline render helpers (#11917)
* expose RenderInlineModel

* expose Thumbnail

* add changelog / lib entry

* move thumbnail back; use context

* move to context

* reduce diff

* add better type

* reduce diff more
2026-05-12 13:46:58 +10:00
Matthias Mair 98f1ae53a3 bump urlib3 (#11925)
* chore(deps): bump urllib3 from 2.6.3 to 2.7.0 in /src/backend

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.6.3...2.7.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.7.0
  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>
2026-05-12 13:12:09 +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
github-actions[bot] 95fd997d9c New Crowdin translations by GitHub Action (#11913)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-11 14:22:44 +10:00
Matthias Mair 5d059fe725 fix(CI): adress zimor warnings in the release workflow (#11916)
* adress zimor warnings

- https://github.com/inventree/InvenTree/security/code-scanning/346
- https://github.com/inventree/InvenTree/security/code-scanning/345
- https://github.com/inventree/InvenTree/security/code-scanning/344
- https://github.com/inventree/InvenTree/security/code-scanning/343

* adress https://github.com/inventree/InvenTree/security/code-scanning/232

* fix template injection

* revert change

* collected improvements

* use native action
2026-05-11 11:58:13 +10:00
Matthias Mair d29361fded remove dead function InstanceFromUrl (#11918) 2026-05-11 11:51:20 +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
github-actions[bot] 29027c1cf2 New Crowdin translations by GitHub Action (#11904)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-10 14:23:21 +10:00
Matthias Mair b47091f388 chore(backend): bump dev tooling, switch to prek (#11905)
* update names

* update tooling

* update files to new style

* swich to prek

* remove autoupdate to make newbie PRs cleaner
2026-05-10 10:15:30 +10:00
Matthias Mair 69c11d106c chore(backend): bump django-q2 (#11910)
* bump django-q2

* API bump
2026-05-10 09:12:01 +10:00
Oliver 9a2b82d582 Fix lazy loading of context modals (#11911) 2026-05-10 09:11:39 +10:00
Matthias Mair 1aed591c2f chore(backend): bump django (#11907)
* bump django

* add  comment regarding GHSA-5h8x-9c6f-2j8m

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-05-10 08:39:00 +10:00
Matthias Mair 39b43288bb fix test assertation (#11908)
follow up to https://github.com/inventree/InvenTree/pull/11896
2026-05-09 23:52:41 +10:00