Skip to content

Switch order/build FSM to django-fsm-2 - #721

Closed
matmair with Copilot wants to merge 32 commits into
masterfrom
copilot/feature-fully-covered-implementation
Closed

matmair with Copilot wants to merge 32 commits into
masterfrom
copilot/feature-fully-covered-implementation

Conversation

Copilot AI commented Jul 6, 2026

Copy link
Copy Markdown

Replaces InvenTree's hand-rolled FSM mechanism across order and build models with django-fsm-2, eliminating the repetitive 3-method pattern (can_X + _action_X + X_method) per transition (~200 lines removed).

Infrastructure

  • BaseEnum.__hash__ — Python silently sets __hash__ = None when __eq__ is overridden; django-fsm needs enum members hashable as dict keys.
  • InvenTreeCustomStatusModelField now extends FSMFieldMixin alongside PositiveIntegerField. deconstruct() strips the added protected kwarg so no migration is generated.
  • inventree_transition decorator (generic/states/transition.py) wraps @transition with @transaction.atomic and auto-save(). Catches TransitionNotAllowed → returns False to preserve backward-compatible call sites that check the return value.
  • Plugin hooks wired via the pre_transition signal (_plugin_pre_transition_handler), replacing explicit handle_transition() calls. ValidationError raised by plugins propagates normally; it is not swallowed.

Model refactoring

Each transition collapses to a single decorated method:

# Before: 3 methods, ~25 lines each
@property
def can_issue(self) -> bool:
    return self.status == PurchaseOrderStatus.PENDING.value

def _action_place(self, *args, **kwargs):
    self.status = PurchaseOrderStatus.PLACED.value
    self.save()
    ...

@transaction.atomic
def place_order(self):
    return self.handle_transition(self.status, PurchaseOrderStatus.PLACED.value, self, self._action_place)

# After: 1 method
@inventree_transition(field=status, source=PurchaseOrderStatus.PENDING, target=PurchaseOrderStatus.PLACED)
def place_order(self):
    trigger_event(PurchaseOrderEvents.PLACED, id=self.pk)

@property
def can_issue(self) -> bool:
    return can_proceed(self.place_order)

Refactored: all 4 PurchaseOrder, 5 SalesOrder, 4 ReturnOrder, 4 TransferOrder, and 4 Build transitions.

SalesOrder.ship_order/complete_order use RETURN_VALUE for the dynamic SHIPPED/COMPLETE target based on the SALESORDER_SHIP_COMPLETE setting.

Source state notes

  • SalesOrder.ship_order and complete_order include PENDING as a valid source — the original code had no source restriction and existing callers invoke these directly on pending orders, gated by the can_complete() business logic check.
  • Build.complete_build includes PENDING and ON_HOLD as valid sources for the same reason.
  • handle_transition() is retained for backward compatibility with any direct callers.

Tests

New InvenTreeTransitionTests class covers: _django_fsm metadata presence, can_proceed() accuracy, full PENDING→PLACED→ON_HOLD→PLACED→CANCELLED lifecycle, invalid-transition returns False (backward compat), and can_issue property delegation.

@matmair

matmair commented Jul 8, 2026

Copy link
Copy Markdown
Owner

@copilot fix issues in ci

@matmair

matmair commented Jul 25, 2026

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 25, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@matmair, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4aaf0553-8798-400e-8de5-af4ce02cd08f

📥 Commits

Reviewing files that changed from the base of the PR and between 753660f and eb45ac8.

📒 Files selected for processing (12)
  • src/backend/InvenTree/build/models.py
  • src/backend/InvenTree/generic/states/__init__.py
  • src/backend/InvenTree/generic/states/fields.py
  • src/backend/InvenTree/generic/states/states.py
  • src/backend/InvenTree/generic/states/test_transition.py
  • src/backend/InvenTree/generic/states/transition.py
  • src/backend/InvenTree/order/models.py
  • src/backend/requirements-3.14.txt
  • src/backend/requirements-dev-3.14.txt
  • src/backend/requirements-dev.txt
  • src/backend/requirements.in
  • src/backend/requirements.txt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch copilot/feature-fully-covered-implementation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

matmair and others added 9 commits July 27, 2026 16:57
* Unable to install plugins through web UI using custom registry and/or Python wheel files.
Fixes inventree#11460

* use more fitting variable name

* add typing

* clean up logic flow - make easier to understand

* make check easier to understand

* reduce complexity

* ensure user is tested

* add more tests

* add user validation

* move test

* disable uninstall in test

* Update test_api.py

* style fix

* fix typing

* check if pip exsists

* fix gate

* fix typo

* reference pip instead

* make test more tolerant

* revert permission check change

* remove new test

---------

Co-authored-by: Oliver <[email protected]>
)

* chore(deps): bump the dependencies group with 7 updates

Bumps the dependencies group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `7.0.0` | `7.0.1` |
| [actions/setup-python](https://github.com/actions/setup-python) | `6.3.0` | `7.0.0` |
| [j178/prek-action](https://github.com/j178/prek-action) | `2.0.5` | `2.0.6` |
| [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) | `0.5.7` | `0.6.0` |
| [actions/attest](https://github.com/actions/attest) | `4.1.1` | `4.2.0` |
| [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) | `4.37.0` | `4.37.1` |
| [crowdin/github-action](https://github.com/crowdin/github-action) | `2.16.3` | `2.16.4` |


Updates `actions/checkout` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@9c091bb...3d3c42e)

Updates `actions/setup-python` from 6.3.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@ece7cb0...5fda3b9)

Updates `j178/prek-action` from 2.0.5 to 2.0.6
- [Release notes](https://github.com/j178/prek-action/releases)
- [Commits](j178/prek-action@e98a699...5337cb9)

Updates `zizmorcore/zizmor-action` from 0.5.7 to 0.6.0
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](zizmorcore/zizmor-action@192e21d...6599ee8)

Updates `actions/attest` from 4.1.1 to 4.2.0
- [Release notes](https://github.com/actions/attest/releases)
- [Changelog](https://github.com/actions/attest/blob/main/RELEASE.md)
- [Commits](actions/attest@a1948c3...f7c74d2)

Updates `github/codeql-action/upload-sarif` from 4.37.0 to 4.37.1
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@99df26d...7188fc3)

Updates `crowdin/github-action` from 2.16.3 to 2.16.4
- [Release notes](https://github.com/crowdin/github-action/releases)
- [Commits](crowdin/github-action@52aa776...e0c8f73)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: actions/setup-python
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: j178/prek-action
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: actions/attest
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.37.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: crowdin/github-action
  dependency-version: 2.16.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix pin

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <[email protected]>
…entree#12466)

Bumps [postcss](https://github.com/postcss/postcss) from 8.5.15 to 8.5.23.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.5.15...8.5.23)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthias Mair <[email protected]>
…pdates (inventree#12485)

Bumps the dependencies group with 14 updates in the /src/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@fortawesome/fontawesome-svg-core](https://github.com/FortAwesome/Font-Awesome) | `7.3.0` | `7.3.1` |
| [@fortawesome/free-regular-svg-icons](https://github.com/FortAwesome/Font-Awesome) | `7.3.0` | `7.3.1` |
| [@fortawesome/free-solid-svg-icons](https://github.com/FortAwesome/Font-Awesome) | `7.3.0` | `7.3.1` |
| [@fortawesome/react-fontawesome](https://github.com/FortAwesome/react-fontawesome) | `3.4.0` | `3.5.0` |
| [@sentry/react](https://github.com/getsentry/sentry-javascript) | `10.65.0` | `10.67.0` |
| [@tabler/icons-react](https://github.com/tabler/tabler-icons/tree/HEAD/packages/icons-react) | `3.44.0` | `3.45.0` |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.101.2` | `5.101.3` |
| [mantine-contextmenu](https://github.com/icflorescu/mantine-contextmenu) | `9.3.1` | `9.4.0` |
| [mantine-datatable](https://github.com/icflorescu/mantine-datatable) | `9.3.1` | `9.4.0` |
| [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.81.0` | `7.82.0` |
| [recharts](https://github.com/recharts/recharts) | `3.9.2` | `3.10.0` |
| [styled-components](https://github.com/styled-components/styled-components) | `6.4.3` | `6.4.4` |
| [undici](https://github.com/nodejs/undici) | `8.7.0` | `8.8.0` |
| [@vanilla-extract/vite-plugin](https://github.com/vanilla-extract-css/vanilla-extract/tree/HEAD/packages/vite-plugin) | `5.2.4` | `5.2.5` |



Updates `@fortawesome/fontawesome-svg-core` from 7.3.0 to 7.3.1
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/7.x/CHANGELOG.md)
- [Commits](FortAwesome/Font-Awesome@7.3.0...7.3.1)

Updates `@fortawesome/free-regular-svg-icons` from 7.3.0 to 7.3.1
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/7.x/CHANGELOG.md)
- [Commits](FortAwesome/Font-Awesome@7.3.0...7.3.1)

Updates `@fortawesome/free-solid-svg-icons` from 7.3.0 to 7.3.1
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/7.x/CHANGELOG.md)
- [Commits](FortAwesome/Font-Awesome@7.3.0...7.3.1)

Updates `@fortawesome/react-fontawesome` from 3.4.0 to 3.5.0
- [Release notes](https://github.com/FortAwesome/react-fontawesome/releases)
- [Changelog](https://github.com/FortAwesome/react-fontawesome/blob/main/CHANGELOG.md)
- [Commits](FortAwesome/react-fontawesome@v3.4.0...v3.5.0)

Updates `@sentry/react` from 10.65.0 to 10.67.0
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@10.65.0...10.67.0)

Updates `@tabler/icons-react` from 3.44.0 to 3.45.0
- [Release notes](https://github.com/tabler/tabler-icons/releases)
- [Commits](https://github.com/tabler/tabler-icons/commits/v3.45.0/packages/icons-react)

Updates `@tanstack/react-query` from 5.101.2 to 5.101.3
- [Release notes](https://github.com/TanStack/query/releases)
- [Changelog](https://github.com/TanStack/query/blob/main/packages/react-query/CHANGELOG.md)
- [Commits](https://github.com/TanStack/query/commits/@tanstack/[email protected]/packages/react-query)

Updates `mantine-contextmenu` from 9.3.1 to 9.4.0
- [Changelog](https://github.com/icflorescu/mantine-contextmenu/blob/main/CHANGELOG.md)
- [Commits](https://github.com/icflorescu/mantine-contextmenu/commits)

Updates `mantine-datatable` from 9.3.1 to 9.4.0
- [Changelog](https://github.com/icflorescu/mantine-datatable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/icflorescu/mantine-datatable/commits)

Updates `react-hook-form` from 7.81.0 to 7.82.0
- [Release notes](https://github.com/react-hook-form/react-hook-form/releases)
- [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md)
- [Commits](react-hook-form/react-hook-form@v7.81.0...v7.82.0)

Updates `recharts` from 3.9.2 to 3.10.0
- [Release notes](https://github.com/recharts/recharts/releases)
- [Changelog](https://github.com/recharts/recharts/blob/main/CHANGELOG.md)
- [Commits](recharts/recharts@v3.9.2...v3.10.0)

Updates `styled-components` from 6.4.3 to 6.4.4
- [Release notes](https://github.com/styled-components/styled-components/releases)
- [Commits](https://github.com/styled-components/styled-components/compare/[email protected]@6.4.4)

Updates `undici` from 8.7.0 to 8.8.0
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](nodejs/undici@v8.7.0...v8.8.0)

Updates `@vanilla-extract/vite-plugin` from 5.2.4 to 5.2.5
- [Release notes](https://github.com/vanilla-extract-css/vanilla-extract/releases)
- [Changelog](https://github.com/vanilla-extract-css/vanilla-extract/blob/master/packages/vite-plugin/CHANGELOG.md)
- [Commits](https://github.com/vanilla-extract-css/vanilla-extract/commits/@vanilla-extract/[email protected]/packages/vite-plugin)

---
updated-dependencies:
- dependency-name: "@fortawesome/fontawesome-svg-core"
  dependency-version: 7.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@fortawesome/free-regular-svg-icons"
  dependency-version: 7.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@fortawesome/free-solid-svg-icons"
  dependency-version: 7.3.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: "@fortawesome/react-fontawesome"
  dependency-version: 3.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@sentry/react"
  dependency-version: 10.67.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@tabler/icons-react"
  dependency-version: 3.45.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@tanstack/react-query"
  dependency-version: 5.101.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mantine-contextmenu
  dependency-version: 9.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: mantine-datatable
  dependency-version: 9.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: react-hook-form
  dependency-version: 7.82.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: recharts
  dependency-version: 3.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: styled-components
  dependency-version: 6.4.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: undici
  dependency-version: 8.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: "@vanilla-extract/vite-plugin"
  dependency-version: 5.2.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix concurrency issues for allocation

* Remove duplicate atomic call

* Reduce query count
* Unique constraint for serial numbers

* Revert unrelated changes

* Updated tests
* Remove serial number restriction when creating build outputs

* Updated docs

* additional docs
@matmair matmair closed this Jul 30, 2026
@matmair
matmair deleted the copilot/feature-fully-covered-implementation branch July 30, 2026 06:51
matmair added a commit that referenced this pull request Jul 31, 2026
SchrodingersGat pushed a commit to inventree/InvenTree that referenced this pull request Aug 11, 2026
* full fsm implementation

closes #12314

based on matmair#721

* update assertations

* refactor to reduce duplication

* move for cleaner diff

* more moving stuff around

* fix assingment

* remove skip

* merge test classes

* re-enable transition plugin tests

* fix docstrings

* add depreciation warning

* fix type

* nitpicks

* small cleanup

* ensure we alwas pass a str

* add backport

* fix marker position

* full fsm implementation

closes #12314

based on matmair#721

* update assertations

* refactor to reduce duplication

* move for cleaner diff

* more moving stuff around

* fix assingment

* remove skip

* merge test classes

* re-enable transition plugin tests

* fix docstrings

* add depreciation warning

* fix type

* nitpicks

* small cleanup

* ensure we alwas pass a str

* add backport

* fix marker position

* fix ty issue

* ignore this corner case

* ensure invalid transitions can raise a nice validation error

* compact code

* add depreciation mark

* make raise_error default (#754)

* fix merge

* adjust test as this is now not a no-op but a raised error

* fix assertations

* fix test to not take a broken path

* remove unused test statements

* converge

* add test branch for actually working transition

* reduce uneeded code

* ignore depreceated methods

* fix missing coverage

* add prefetch

* reduce diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants