Commit Graph
614 Commits
Author SHA1 Message Date
Matthias Mair afc88f56e8 refactor(backend): move mixins to generic (#13293)
* move mixins to generic

* fix imports

* fix import

* move InvenTreePermissionCheckMixin

* move base models

* move InvenTreeAuditMixin

* move PathStringMixin

* move ContentTypeMixin

* move MetadataMixin, PluginValidationMixin

* move ReferenceIndexingMixin

* fix import paths

* update doc paths

* fix imports

* internalize diff base

* add legacy imports

* rename metadata mixin

* rename PathStringMixin

* rename PluginValidationMixin

* rename ReferenceIndexingMixin

* add changelog entry

* document base clases

* add docs for model mixins

* add the rest of doc strings
2026-11-23 09:44:54 +11:00
Miguel Brandt f73208a402 [Feature] Add parameters to stock location types (#13339)
* Support parameters on stock location types

* Add stock location type details page

* Bump API version and document location type parameters

* Fix location type write queries and deletion rollback

* Preserve location type names and gate parameter actions

* Use standard navigation and actions for location types

* Add location type preview and detail page shortcuts
2026-11-22 09:50:41 +11:00
Oliver 7933454b89 [docs] database concurrency (#13341)
make a new concepts page for discussing database concurrency
2026-11-21 15:07:24 +11:00
Syogo-SuganoyaandClaude Opus 5.5 129cfe7383 Alert staff when active plugins rely on a disabled plugin integration (#13281)
* Alert staff when active plugins rely on a disabled plugin integration

- Report (plugin, mixin, setting) combinations in the 'system_state' of the info endpoint
- Add INVE-W22 alert to the alerts menu and admin center
- Document the new warning code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Respect global setting overrides when checking plugin integrations

A setting which is overridden via environment or config file takes priority over the stored value

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Fix plugin integration message for plugins with translated names

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Report a failed plugin integration check, and cover its edge cases

If the check raises an exception, report "Unable to check plugin
integrations" instead of "No issues detected".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Name the plugin settings which need to be enabled

List each affected plugin together with the settings which need to be
enabled, e.g. "Auto Create Builds (Enable event integration)".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-16 18:18:30 +11:00
Oliver b2a9218cfb [bug] API row locking (#13274)
* row locking on patch

* row-level locking on action endpoints

* apply row locking to barcode actions

* additional row-locking for build actions

* rename exception class

* updated docs

* Add specific error code

* Fix translated text

* Handle AttributeError
2026-11-15 15:26:47 +11:00
Matthias Mair f4f5caae2c feat(docs): preperation for plugin modeling documentation (#13077)
* update descriptions

* add subsections

* another section

* keep nultin seperate

* rename

* make readme easier to copy

* add a seperate overview section like machines

* update generated schema page

* add missing key

* make initial paragraph more objective

* add model doc stump

* fix typos

* fix caps

* adjust readme for easier copy paste

* update generate step

* remove additional doc item
2026-11-15 08:50:33 +11:00
Oliver 19dfb81bfb [docs] Zensical docs (#13253)
* add zensical workflow

* rebuild schema dynamically

* load in new module

* Use zensical for docs invoke tasks

* modern

* improved carousel layout

* Increased content width

* fix for app icons

* Ensure schema dir exists

* remove unused requirement

* update readthedocs process

* fix polar.sh link

* adjust link checker pattern

* Revert some of the original style

* remove legacy mkdocs requirements

* fix for ready.py

* reduce db warnings during schema generation

* Adjust padding

* fix index issues

* fix page title

* fix pages with broken or missing headers

* split data import API schema

* cleanup old carousel

* remove djlint link
2026-11-14 22:34:18 +11:00
OliverandCopilot Autofix powered by AI 12c16000d9 MFA workflow fixes (#13241)
* MFA workflow fixes

- Fixes https://github.com/inventree/InvenTree/issues/13238
- Verify email on successful password reset
- Invalidate password on account creation
- Fix MFA workflows
- Add regression tests

* Update docs

* Update OTP secret expectation to use exact match

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

* Attempt to fix flaky test

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-11-14 13:34:57 +11:00
OliverandMatthias Mair 790112013b Added generic MPN barcode scanning (#13266)
* Added generic MPN barcode scanning

- Provides generic lookup against MPN
- Runs with lower priority (fallback only)
- Barcode plugins are now ordered by decreasing priority

* Apply suggestion from @matmair

* Bump internal priority

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-11-13 21:53:35 +11:00
Matthias Mair 7e57196d76 Add import linter (#13248)
* add import-linter

* move machine imports to plugin space

* clean up samples

* extend scope

* extend checks

* move plugin internals into a seperat folder

* remove unneeded re-export

* adjust import

* update import checker

* update src ref

* fix mocks
2026-11-12 18:41:59 +11:00
Matthias Mair a8a867400d feat(backend): enable disabling of basic authentication (#13169)
* !feat(backend): disable basic authentication by default

* align PR

* add PR number

* fix schema creation/discovery

* mask basic auth

* fix error code

* reduce diff

* adjust changelog message

* fix test (needs basic auth which is now off by default)

* switch to default on; retain warning

* update test for new default

* fix assertation
2026-11-10 13:32:38 +11:00
Matthias Mair c54c69c1bc update logging setup to respect json setting (#13216)
* fix json_log to ensure we really only log json

* also control gunicorn

* reduce noise in action
2026-11-07 16:02:41 +11:00
Oliver d8f09fa078 Token fixes (#13175)
* Prevent junk token from bypassing MFA

* updated docs

* Fix read-only token fields

* Fix API version ref
2026-11-03 23:05:23 +11:00
Matthias Mair 4121d9a8a5 Merge commit from fork
* fix basic auth without mfa

* refactor order to use new basic auth class

* remove session auth taht would bybpass mfa (mfa thing fixed in another session)

* allign with other PRs

prep for merge with https://github.com/inventree/InvenTree/pull/13169/

* fix schema generation
2026-11-03 20:23:32 +11:00
Matthias Mair 16fa2ee5cd Merge commit from fork
* fix oauth scopes

* fix typing
2026-11-03 20:20:10 +11:00
Oliver 62d363a99d [UI] Context details for plugin actions (#13172)
* [UI] Context details for plugin actions

Adds additional target instance context when registering custom UI actions

* Add CHANGELOG entry

* Improve test
2026-11-03 17:22:26 +11:00
Oliver 461186bee9 [UI] Launch forms directly from plugin (#13174)
* [UI] Launch forms directly from plugin

Provide ability for plugins to dynamically launch modal forms, without specifying the underlying react components.

This allows (for example) a primary action on a detail page to launch a new native API form

* Add CHANGELOG entry
2026-11-03 16:41:33 +11:00
Oliver c3948f56ed Implement stock adjust barcode actions (#13170) 2026-11-03 12:03:33 +11:00
Matthias Mair b2c2f926e7 Fix doc links / setup (#13140)
* fix various doc links

* update generated start page

* switch to properdocs

* bump deps

* pin mkdocs before 2.0 so deps dont break

* fix link
2026-11-01 08:34:25 +11:00
Oliver 60db8a924e Updates for AutoCreateBuildPlugin (#13118) 2026-10-28 10:42:44 +11:00
OliverandCopilot Autofix powered by AI 3e55d413ec [report] Harden data access for reports (#13111)
* [report] Harden data access for reports

- Exclude sensitive data
- Prevent database writes during report generation

* Fix typo

* Add regression test against model traversal

* Add webhook endpoint and message to imports

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

* Remove some models from BLOCKED_MODELS

* Revert READ_ONLY requirement

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-10-28 01:06:45 +11:00
Oliver c4280c2a03 [Refactor] Stock tracking audit (#13101)
* Add "event_type" and "notes" support to AuditLog model

* Register history entries for stock items

* record stock edited events as normal updates

* Remove legacy tracking entry generation code

* Updated unit tests for all stock event types

* remove legacy endpoints

* remove legacy tables from UI

* Updated docs

* Data migration

* Remove old models

* Update docs

* Updated playwright tests

* Fix broken links

* Update CHANGELOG.md

* Cache CID value

* Fix migration tests

* Increase query threshold for unit test

* Fix bug and add regression test

* mark migration as one-way

* flush events in the correct order

* improve prefetch

* Adjust row rendering
2026-10-27 15:14:15 +11:00
Oliver 6c65d96ece Export escape fix (#13110)
* Allow numeric values to be exported unescapted

* Updated docs

* Explicit regression tests
2026-10-27 11:55:24 +11:00
Oliver c475e9bfcf [Feature] Changelog / Edit History (#13069)
* Initial app scaffolding

* Skeleton for AuditLogTable

* Add UI table

* Add audit history panel to admin center

* Add auditing for models in the 'company' app

* Gate API access of user staff status

* Display item history in UI

* Track 'attachment' history

* Track 'parameter' changes

* Audit support for "common" models

* Track changed for "build" models

* Track history for "order" models:

- PurchaseOrder
- SalesOrder
- SalesOrderShipment
- ReturnOrder

Also track changes against LineItem and ExtraLineItem objects

* Register custom admin class

* Support Part history

* BomItem changes

* Fix for BulkCreateMixin

* Tweak unit tests

* Use Viewset

* Adjust error code behavior

* Setting to keep summary entries

* Refactor helper for middlewares

* Tweak unit tests

* Fixes for ModelInformationDict

* Track pricing changes

* Add model type filter for auditlog table

* Specify filter field type

* Hide HistoryPanel if auding is disabled

* add docs

* Add "--summary" option to export_records task

* Playwright tests

* Track task responsible for data changes

* Updated unit tests

* record changes to global settings

* Update docs

* Ensure values are stringified

* Fix for globalsetting

* Patch unit test

* Tweak playwright tests

* playwright test fix

* use main branch for demo data

* Update CHANGELOG
2026-10-25 12:36:13 +11:00
Oliver 43956b9324 [bug] Can build fix (#13090)
* Fix 'can_build' calculation

- Take 'piece_count' into consideration
- Update queryset annotations
- Update quantity calculation call sites

* Updated docs
2026-10-24 17:28:07 +11:00
Oliver e57ee86c35 Cache config fix (#13080)
* Fix docs

* Adjust config template

* Tweak cache config code
2026-10-24 12:19:47 +11:00
Matthias Mair 5bd0036ee1 feat(backend): add a way to proof instance id without sharing id / making id available (#13030)
* add a way to proof instance identification without publicly sharing id

* fix test
2026-10-24 08:25:46 +11:00
OliverandMatthias Mair 4c948cda1b Pricing role (#13034)
* add 'pricing' role

* Create new 'pricing' app

- migrate existing pricing models

* bug fixes

* Move API endpoints to /api/pricing/

* Adjust target branch for playwright tests

* Fix permission checks for nested OptionalField entries

* Migrate existing background tasks

* Point to master branch demo data

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-10-21 15:00:50 +11:00
96d1d20b73 feat: Add Delivery Address field to Purchase Orders (#9768)
* Add delivery address to purchase order; migrate address field to Supplier Address (#9303)

* update model related_name and remove migrate file

* regenerate migration

* Fix migration ordering

* Bump API version

* add 'receiving_company' field

* UI updates

* Add regression tests

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
2026-10-17 08:13:26 +11:00
Oliver 839cd571f4 Supplier price note (#13027)
* add extra information to form

* Updated documentation

* Updated UI

* Fix broken link
2026-10-17 08:11:56 +11:00
Oliver 529a41f1fd override default value display (#13028) 2026-10-16 23:09:33 +11:00
Oliver c74523dcff Control backup count (#13025)
Enable control of how many historical backup entries to keep when running invoke backup --clean
2026-10-16 19:22:33 +11:00
OliverandMatthias Mair 9b8fdeb06d Internal company support (#13017)
* Add internal company flag

* Unit tests

* Add changelog entry and update API version

* add global company table

* Expose model_filters for internal settings

* Update API version

* Update CHANGELOG

* update assert

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-10-15 11:20:59 +11:00
Oliver 720ba157bb Shipment contact info (#13016)
* Add 'contact' field to SalesOrderShipment model

* add unit test

* Update shipment table

* improve UI form

* Add 'phone' and 'email' fields to Address model

* Bump API version

* Update CHANGELOG

* Updated docs
2026-10-14 19:33:33 +11:00
Oliver 99893f3453 [UI] Nested bom (#12952)
* [UI] Replace BOM subassembly table

- Do not render as a separate table
- Dynamically load and insert subassembly data
- Retains single table layout
- Observe same column setup

* Adjust alignment of icons

* Hide certain icons for nested rows

* Display subassembly quantity chain

* Display full multiplication chain

* Add nested pricing multipliers

* Display the multiplied "can-build" quantity

* Updated BOM docs

* Playwright tests

* Handle case where can_build is zero

* Refresh nested BOM when underlying records change

* Remove trunc for display

* fix playwright test
2026-10-13 22:59:51 +11:00
Oliver 788b291a21 Plugin reload limitations (#13007)
* Improve auto-reload of plugin

Ensure entire module is reloaded

* Add regression tests

* Updated docs

* Detect plugin reload loop - and report error
2026-10-13 20:46:02 +11:00
Oliver 55ad065a60 Add docs for font loading (#12998) 2026-10-13 13:01:20 +11:00
Matthias Mair 600dc1a75b feat(frontend): optional nav tree sidebyside (#12974)
* disable restriction (for now)

* add option for a permanent navigation tree

* revert unintended change

* adjust search text to be less confusing when pinned
2026-10-13 09:26:57 +11:00
Petr Ledvina 967f7a55d1 Add raise_error template tag (#12940) 2026-09-28 07:04:49 +10:00
d33d77d679 feat: add plugin support for custom page integration (#12900)
* Added plugin UI route functionality.

* Updated Sample UI plugin with route example.

* Added UI route tests.

* Plugin name added to UI Route URL.

* Updated docs.

* Docs fix.

* Updated sample_route text.

* Update src/backend/InvenTree/plugin/base/ui/mixins.py

Co-authored-by: Matthias Mair <code@mjmair.com>

* Fixed nav dynamic link highlighting.

* Added changelog entry.

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-09-27 08:13:54 +10:00
Oliver 979ddb3f06 Default receive location (#12911)
* Add global setting

* docs

* Dynamically set API field default

* UI elements

* regression testing

* Add CHANGELOG entry

* Fix unit test
2026-09-26 11:39:44 +10:00
Oliver a4518fb52b Allocate mixin (#12914)
* Create AllocateMixin plugin mixin class

* Add documentation

* Add hook-in points for the new code

* Add unit tests

* Add CHANGELOG entry

* Add loose typing
2026-09-23 06:39:26 +10:00
Oliver 2f91f9a068 [report] Add set_var and get_var helpers (#12901)
* [report] Add set_var and get_var helpers

* Add type hints

* Adjust helpers
2026-09-21 16:38:03 +10:00
Oliver bb195a77b8 Min db docs (#12897)
* Add minimum version information

* Update DB docs
2026-09-21 08:17:04 +10:00
Oliver 10422dc37b [db] Disable JIT for postgres (#12893)
* disable postgres JIT by default

* Update docs
2026-09-20 19:09:55 +10:00
lizerui1608-dev 417e93a012 docs: fix typos in development documentation (#12888) 2026-09-20 10:43:56 +10:00
Petr LedvinaandOliver f76d79baf1 Add SVG support to datamatrix (#12875)
* Extract Data Matrix rendering helpers

* Add SVG Data Matrix output

* Verify vector Data Matrix output in PDFs

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2026-09-18 18:14:50 +10:00
Matthias Mair dca516b318 feat(backend): switch API token storage to hmac digest (#12850)
* [FR] switch API token storage to hmac digest
Fixes #12027

* add pr number

* fix implementation details
allign token prefix and token end (add date issuance)

* fix missing re-issuance

* ensure we raise if not exsistant

* fix test

* add ignore

* extend test

* add information regarding v2 tokens

* add fields for:
- revocation details (reason, revoker)
- issueance
- version
- pepper

* bump apiversion

* make revocation mesagge clearer

* add missing update fields

* ensure this only triggers for v2

* move comment

* re-add v1 coverage

* add missing annotation to api schema
2026-09-16 10:35:12 +10:00
Matthias Mair 63a434c652 feat: Add facility to completely hide parts of the interface (#12842)
* fix typing issue for pylance engine

* add flags to mark rough function of setting

* update pr version

* fix settings serialisation

* render security warnings

* move Transfer Orders

* respect return order hiding

* almost all confirm texts will have a warning

* add settings for sales, purchase and buildorder deactivation

* make permission check also ensure gloablsetting for view is available; reduce number of chained gates

* document possible missing check

* ensure we can still show the sales tab

* add additional warning to group cleanup

* hide more ui parts conditionally

* add tests for new code and remove duplication

* fix test

* alternative approach to fix SSO path

* remove patch; now done in serializer

* ignore ldap section
2026-09-15 21:13:59 +10:00
wyyd-yxcandMatthias Mair 9181097194 Add user option to rotate table column headers (#12837)
* Add user option to rotate table column headers (#12558)

Wide column titles (e.g. "Temperature coefficient [±ppm/°C]") take a
lot of horizontal space for narrow data. Add a ROTATE_TABLE_HEADERS
user setting (Display Options) which renders table header titles
vertically via a scoped CSS class, following the implementation
sketch from the issue discussion.

* Format ROTATE_TABLE_HEADERS description per ruff-format

* add missing doc place

* Document ROTATE_TABLE_HEADERS setting in user settings docs

* docs: add changelog entry for rotated table headers option

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2026-09-12 14:12:39 +10:00