2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-12-16 17:28:11 +00:00

1040 Commits

Author SHA1 Message Date
Matthias Mair
f3e8482469 fix(backend): auth check middleware for specific media access (#10784)
* simplify

* fix return type

* handle token (app access)

* reduce lookup amount

* add positive test again

* add poisitive test

* move out settings

* add tests for Check2FAMiddleware

* add test for auth_request

* add a reverse name for auth_request

* auth tests refactors

* move test

* disable check for things that do not trigger

* fix typing for python 3.9

* make names clearer and add comments

* finish tests

* fix call

* re-enable mfa test without the timing component

* cleanup helper

* ignore easy out

* ignore scenario that can not happen
2025-11-10 08:58:58 +11:00
dependabot[bot]
726e852b7b chore(deps): bump django from 4.2.25 to 4.2.26 in /src/backend (#10781)
* chore(deps): bump django from 4.2.25 to 4.2.26 in /src/backend

Bumps [django](https://github.com/django/django) from 4.2.25 to 4.2.26.
- [Commits](https://github.com/django/django/compare/4.2.25...4.2.26)

---
updated-dependencies:
- dependency-name: django
  dependency-version: 4.2.26
  dependency-type: direct:production
...

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

* fix style

* also bump docker version

---------

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>
2025-11-08 22:08:11 +01:00
Matthias Mair
2fc7c7eb54 improve docker dx with empty migration set (#10774)
* if we are in docker and empty - init db

* use structlog

* remove logging change

* reduce diff

* ignore in test mode

* add changes from review
2025-11-06 10:42:34 +11:00
Oliver
dbb799a0e0 [UI] BOM part category (#10772)
* Add "Category" column to BOM Table

* Enable sorting by category in BOM table

* Add Category column to Buildline table

* Add Category filter to BuildLineTable

* Adjust queryset prefetch

* Bump API version and update CHANGELOG
2025-11-05 10:04:28 +11:00
Oliver
fc3d130888 Refactor settings.py (#10766)
- Move drf-spectacular settings into separate file
- Cleanup settings.py core file
2025-11-05 07:00:58 +11:00
Oliver
7e943293c7 MFA middleware tweaks (#10768)
* MFA middleware tweaks

- Remove Check2FAMiddleware if MFA not enabled
- Refactor into middleware.py

* Update settings.py

- Disable MFA_SUPPORTED_TYPES if MFA_ENABLED is False

* Update docs
2025-11-05 07:00:42 +11:00
Oliver
901846272b Auth Improvements (#10752)
* Return more detail in MFA failure response

* Reject auth requests for users who are inactive

* Move markdown config out of settings.py
2025-11-04 10:08:04 +11:00
Lê Hoàng Nam
39f0054cd5 code (#10751)
Co-authored-by: Le Hoang Nam <lehoangnam040>
2025-11-03 21:14:38 +11:00
Oliver
153bcc1d5c Search stock items by supplier data (#10750)
* Search stock items by supplier data

* Search by MPN or Manufacturer

* Update API version
2025-11-03 15:03:50 +11:00
Oliver
551da5a51f Bump version number to 1.2.0 dev (#10734)
* Bump version number to 1.2.0 dev

* Add release tag to CHANGELOG.md

* Add entry for upcoming 1.2.0

* Cleanup

* Remove links
2025-11-02 10:01:16 +11:00
github-actions[bot]
9d6f30b802 New Crowdin translations by GitHub Action (#10685)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-01 14:54:42 +11:00
dependabot[bot]
67723ce142 chore(deps): bump the dependencies group across 2 directories with 14 updates (#10728)
* chore(deps): bump the dependencies group across 2 directories with 14 updates

Bumps the dependencies group with 2 updates in the /docs directory: [mkdocs-git-revision-date-localized-plugin](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) and [mkdocs-macros-plugin](https://github.com/fralau/mkdocs_macros_plugin).
Bumps the dependencies group with 11 updates in the /src/backend directory:

| Package | From | To |
| --- | --- | --- |
| [django](https://github.com/django/django) | `4.2.25` | `5.2.7` |
| [django-filter](https://github.com/carltongibson/django-filter) | `25.1` | `25.2` |
| [django-structlog](https://github.com/jrobichaud/django-structlog) | `9.1.1` | `10.0.0` |
| [dulwich](https://github.com/dulwich/dulwich) | `0.24.1` | `0.24.8` |
| [pint](https://github.com/hgrecco/pint) | `0.24.4` | `0.25` |
| [python-dotenv](https://github.com/theskumar/python-dotenv) | `1.1.1` | `1.2.1` |
| [sentry-sdk](https://github.com/getsentry/sentry-python) | `2.42.1` | `2.43.0` |
| [django-stubs](https://github.com/sponsors/typeddjango) | `5.1.3` | `5.2.7` |
| [django-test-migrations](https://github.com/wemake-services/django-test-migrations) | `1.4.0` | `1.5.0` |
| [django-types](https://github.com/sbdchd/django-types) | `0.20.0` | `0.22.0` |
| [isort](https://github.com/PyCQA/isort) | `6.1.0` | `7.0.0` |



Updates `mkdocs-git-revision-date-localized-plugin` from 1.4.7 to 1.5.0
- [Release notes](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/releases)
- [Commits](https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/compare/v1.4.7...v1.5.0)

Updates `mkdocs-macros-plugin` from 1.4.0 to 1.4.1
- [Release notes](https://github.com/fralau/mkdocs_macros_plugin/releases)
- [Changelog](https://github.com/fralau/mkdocs-macros-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fralau/mkdocs_macros_plugin/compare/v1.4.0...v1.4.1)

Updates `django` from 4.2.25 to 5.2.7
- [Commits](https://github.com/django/django/compare/4.2.25...5.2.7)

Updates `setuptools` from 80.9.0 to 
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/commits)

Updates `django-filter` from 25.1 to 25.2
- [Release notes](https://github.com/carltongibson/django-filter/releases)
- [Changelog](https://github.com/carltongibson/django-filter/blob/main/CHANGES.rst)
- [Commits](https://github.com/carltongibson/django-filter/compare/25.1...25.2)

Updates `django-structlog` from 9.1.1 to 10.0.0
- [Changelog](https://github.com/jrobichaud/django-structlog/blob/main/docs/changelog.rst)
- [Commits](https://github.com/jrobichaud/django-structlog/compare/9.1.1...10.0.0)

Updates `dulwich` from 0.24.1 to 0.24.8
- [Release notes](https://github.com/dulwich/dulwich/releases)
- [Changelog](https://github.com/jelmer/dulwich/blob/master/NEWS)
- [Commits](https://github.com/dulwich/dulwich/compare/dulwich-0.24.1...dulwich-0.24.8)

Updates `pint` from 0.24.4 to 0.25
- [Changelog](https://github.com/hgrecco/pint/blob/master/CHANGES)
- [Commits](https://github.com/hgrecco/pint/compare/0.24.4...0.25)

Updates `python-dotenv` from 1.1.1 to 1.2.1
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/theskumar/python-dotenv/compare/v1.1.1...v1.2.1)

Updates `sentry-sdk` from 2.42.1 to 2.43.0
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.42.1...2.43.0)

Updates `django-stubs` from 5.1.3 to 5.2.7
- [Commits](https://github.com/sponsors/typeddjango/commits)

Updates `django-test-migrations` from 1.4.0 to 1.5.0
- [Release notes](https://github.com/wemake-services/django-test-migrations/releases)
- [Changelog](https://github.com/wemake-services/django-test-migrations/blob/master/CHANGELOG.md)
- [Commits](https://github.com/wemake-services/django-test-migrations/compare/1.4.0...1.5.0)

Updates `django-types` from 0.20.0 to 0.22.0
- [Changelog](https://github.com/sbdchd/django-types/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sbdchd/django-types/commits)

Updates `isort` from 6.1.0 to 7.0.0
- [Release notes](https://github.com/PyCQA/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/PyCQA/isort/compare/6.1.0...7.0.0)

---
updated-dependencies:
- dependency-name: mkdocs-git-revision-date-localized-plugin
  dependency-version: 1.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: mkdocs-macros-plugin
  dependency-version: 1.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: django
  dependency-version: 5.2.7
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: setuptools
  dependency-version: 
  dependency-type: direct:production
  dependency-group: dependencies
- dependency-name: django-filter
  dependency-version: '25.2'
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: django-structlog
  dependency-version: 10.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: dependencies
- dependency-name: dulwich
  dependency-version: 0.24.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: pint
  dependency-version: '0.25'
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: python-dotenv
  dependency-version: 1.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: sentry-sdk
  dependency-version: 2.43.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: django-stubs
  dependency-version: 5.2.7
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: django-test-migrations
  dependency-version: 1.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: django-types
  dependency-version: 0.22.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: isort
  dependency-version: 7.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: dependencies
...

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>
2025-11-01 12:08:37 +11:00
Oliver
442a616432 Support attachments against SupplierPart (#10724)
* Support attachments against SupplierPart

* Update CHANGELOG.md

* API update
2025-10-31 21:23:23 +11:00
Oliver
0527d78ae6 Report helpers (#10726)
* New report functions:

- create_currency: Create a new Money object
- convert_currency: Convert from one currency to another

* docs

* More checking on report tags

* Better formatting of report errors

* Add unit tests

* Remove error message

* Fix pathing for docs

* Add type hints

* Adjust unit tests
2025-10-31 21:23:10 +11:00
Oliver
46ea541bc4 Push BOM validation to background worker (#10727)
- Can take a significant amount of time
- Closes https://github.com/inventree/InvenTree/issues/10725
2025-10-31 20:41:31 +11:00
Oliver
16a753bf59 [UI] Plugin actions (#10720)
* Add backend code for custom actions

* docs

* Add sample action code

* Fetch plugin features

* Load plugins and call function

* Support icons

* Alert message

* Update CHANGELOG.md

* Rename action type

* Update docs

* pdated playwright tests
2025-10-31 09:41:32 +11:00
Oliver
ec9b6e7f84 Fix default storage target value (#10718)
* Fix default storage target value

* Use enum values for comparison

* Fix typo
2025-10-30 14:45:45 +11:00
Matthias Mair
edd920e594 fix(backend): disable MFA test for now (#10717) 2025-10-30 11:34:02 +11:00
Matthias Mair
6581af7165 feat(backend): add storages to make usage of s3/sftp easier (#10140)
* feat(backend): add storages to make usage of S3 easy

* add S3/SFTP settings

* add changelog entry

* also configure static

* get it running on hetzner / exo

* doc additional settings

* fix style

* adress various review comments

* move setting files

* use enum for backends

* revert change

* split up storage settings

* fix comparison
2025-10-30 07:57:22 +11:00
Oliver
c1bbef1a4d Format number fix (#10710)
* Improvements for format_number func

- Prevent accidental rendering in scientific notation

* Add multiplier argument to format_number
2025-10-29 16:02:08 +11:00
Matthias Mair
5c556a2a80 use config (#10704) 2025-10-29 07:15:08 +11:00
Matthias Mair
2e4b1d65f7 feat(frontend): add passkey/webauthn for secondary MFA (#9729)
* bump allauth

* add trust

* add device trust handling

* fix style

* [FR] Add passkey as a factor
Fixes #4002

* add registration

* allow better testing

* add mfa context

* fix login

* add changelog entry

* fix registration

* remove multi device packages

* move to helper

* handle mfa trust

* simplify page fnc
2025-10-28 18:52:39 +11:00
Oliver
548f05e61c Enhancement for metadata OPTIONS checks (#10693)
* Enhancement for metadata OPTIONS checks

- Handle case where custom `role_required` attribute is set
- Allows integration for plugin views not associated with an internal model

* Cleanup logic
2025-10-28 11:23:24 +11:00
dependabot[bot]
ceb055d61a chore(deps): bump pip from 25.2 to 25.3 in /src/backend (#10690)
* chore(deps): bump pip from 25.2 to 25.3 in /src/backend

Bumps [pip](https://github.com/pypa/pip) from 25.2 to 25.3.
- [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/pip/compare/25.2...25.3)

---
updated-dependencies:
- dependency-name: pip
  dependency-version: '25.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>
2025-10-28 10:09:59 +11:00
dependabot[bot]
ac5909f943 chore(deps): bump the dependencies group across 3 directories with 5 updates (#10667)
* chore(deps): bump the dependencies group across 3 directories with 5 updates

Bumps the dependencies group with 1 update in the /contrib/dev_reqs directory: [jc](https://github.com/kellyjonbrazil/jc).
Bumps the dependencies group with 2 updates in the /docs directory: [mkdocs-material](https://github.com/squidfunk/mkdocs-material) and [mkdocs-mermaid2-plugin](https://github.com/fralau/mkdocs-mermaid2-plugin).
Bumps the dependencies group with 2 updates in the /src/backend directory: [grpcio](https://github.com/grpc/grpc) and [sentry-sdk](https://github.com/getsentry/sentry-python).


Updates `jc` from 1.25.5 to 1.25.6
- [Release notes](https://github.com/kellyjonbrazil/jc/releases)
- [Changelog](https://github.com/kellyjonbrazil/jc/blob/master/CHANGELOG)
- [Commits](https://github.com/kellyjonbrazil/jc/compare/v1.25.5...v1.25.6)

Updates `mkdocs-material` from 9.6.21 to 9.6.22
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.6.21...9.6.22)

Updates `mkdocs-mermaid2-plugin` from 1.2.2 to 1.2.3
- [Release notes](https://github.com/fralau/mkdocs-mermaid2-plugin/releases)
- [Changelog](https://github.com/fralau/mkdocs-mermaid2-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fralau/mkdocs-mermaid2-plugin/compare/v1.2.2...v1.2.3)

Updates `grpcio` from 1.75.1 to 1.76.0
- [Release notes](https://github.com/grpc/grpc/releases)
- [Changelog](https://github.com/grpc/grpc/blob/master/doc/grpc_release_schedule.md)
- [Commits](https://github.com/grpc/grpc/compare/v1.75.1...v1.76.0)

Updates `sentry-sdk` from 2.42.0 to 2.42.1
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/2.42.0...2.42.1)

---
updated-dependencies:
- dependency-name: jc
  dependency-version: 1.25.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mkdocs-material
  dependency-version: 9.6.22
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: mkdocs-mermaid2-plugin
  dependency-version: 1.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
- dependency-name: grpcio
  dependency-version: 1.76.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: dependencies
- dependency-name: sentry-sdk
  dependency-version: 2.42.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: dependencies
...

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>
2025-10-27 18:58:31 +11:00
Oliver
c54f3f4a30 [UI] Shipments table (#10675)
* Display PendingShipments panel

- Overview of all outstanding shipments

* Update UI tests

* Bump API version
2025-10-26 16:45:27 +11:00
Oliver
23d580c4a9 Delete locations fix (#10672)
* Cleaner handling of inputs

* Fix for frontend form:

- Fix typo in field
- Better option defaults

* Tweak part category delete form

* Add frontend tests
2025-10-26 11:40:22 +11:00
Oliver
8e1d621db9 Report tag fixes (#10668)
* remove duplicate template tag

* Add "multiplier" argument to render_currency

* Improve render_currency

- Enable conversion of non-money values to a Money instance

* Improve maths tags

- Convert values to Decimal
- Ability to cast result to different type

* Updated docs

* Improved feedback from maths tags

* Updated unit testing

* Improved rendering of printing errors

* Add extra test for render_currency tag

* Enfoce multiplier type

* Fix docstrings

* Improved error handling

* Remove defunct unit test

* Fix unit tests
2025-10-25 13:17:10 +11:00
Oliver
a2682a75e9 Backup opts tweak (#10663)
* backup: spread connection options

- Combine custom options with default options
- Provide ability to override defaults

* Adjust default value
2025-10-24 20:06:53 +11:00
github-actions[bot]
86b67f04f2 New Crowdin translations by GitHub Action (#10660)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2025-10-24 20:06:40 +11:00
Oliver
c4805504c0 Fix for 'price_breaks' field in PartSerializer (#10659)
* Fix for 'price_breaks' field in PartSerializer

- Revert change made in https://github.com/inventree/InvenTree/pull/10654

* Bump API version
2025-10-24 15:55:34 +11:00
Oliver
96dfee4018 [feature] Project code per line (#10657)
* Add project code to line items

* Refactor AbstractOrderSerialiazer

* Refactor AbstractOrderLineItem serializer

* Refactoring for AbstractExtraLineSerializer

* UI elements for extra line item project code

* UI for ReturnOrderLineItems

* UI elements for SalesOrderLineItem

* UI elements for PurchaseOrderLineItem

* Docs updates

* Update API version and CHANGELOG
2025-10-24 15:10:58 +11:00
Oliver
6df97e83f5 [UI] Implement "checked_by" for SalesOrderShipment (#10654)
* Add "checked" column to SalesOrderStatus table

* Add API filter for "checked" status

* Add Checked / Not Checked badge

* Add actions to check / uncheck shipment

* Add modal for changing checked_by status

* Display checked_by user

* Tweak wording

* Bump API version

* Update CHANGELOG file

* Update docs

* Add new global setting

- Prevent shipment completion which have not been checked

* Test if shipment has been checked

* Updated unit tests

* Updated type hinting

(may as well while I'm here)

* Adjust shipment icon

* Add "order_outstanding" filter for SalesOrderShipment table
2025-10-24 13:39:57 +11:00
Joe Rogers
435d34568b Add missing nullable annotation to optional field (#10651)
* Add missing nullable annotation to optional field

* Bump api version

* Fix merge mistake
2025-10-24 00:52:14 +11:00
dependabot[bot]
600d82426a chore(deps): bump pypdf from 6.1.1 to 6.1.3 in /src/backend (#10653)
* chore(deps): bump pypdf from 6.1.1 to 6.1.3 in /src/backend

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

---
updated-dependencies:
- dependency-name: pypdf
  dependency-version: 6.1.3
  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>
2025-10-23 19:31:46 +11:00
Oliver
ec33c57e85 SalesOrderShipment address (#10650)
* Adds "shipment_address" attribute to the SalesOrderShipment model:

- Allows different addresses for each shipment
- Defaults to the order shipment address (if not specified)

* Add unit testing for field validation

* Update SalesOrderShipment serializer

* Edit shipment address in UI

* Render date on shipment page

* Improve address rendering

* Update docs

* Bump API version

* Update CHANGELOG.md

* Fix API version
2025-10-23 16:37:43 +11:00
Oliver
6dfedead7c Order tests (#10649)
- Additional test coverage for order models
- Validate address
- Validate contact
- Validate date ranges
2025-10-22 14:32:26 +11:00
Oliver
19dfb51969 [bug] Remove 'project_code' from optional fields (#10646)
* Remove 'project_code' from optional fields

- enable_filter overrides field options
- Field does not auto-describe as a related field any more
- Breaks front-end forms

* Unit tests

* Include fix for currency

- Ref: https://github.com/inventree/InvenTree/pull/10645

* Cleanup import

* Adjust unit tests
2025-10-21 21:06:59 +11:00
Oliver
f8fd9f5f07 Default stock currency (#10641)
* Fix for useStockFields

- Use default currency

* Ensure default currency is observed

* Specify field default

* Improve import (for ty)

* Update migration files

- Point currency fields to the correct default method

* Unit tests

- Ensure stock item gets correct default currency

* Cleaner generation of default currency value

- Return empty string during migratoins

* Update existing migrations

* Reduce noise

* Ignore "no-matching-overload" rule for ty

* Tweak money_kwargs
2025-10-21 13:43:24 +11:00
Matthias Mair
6cd733a83a refactor(backend): add enums for ordering fields (#10629)
* Add enums for ordering fields

* add version bump
2025-10-21 10:13:32 +11:00
Matthias Mair
d71aae1ca9 refactor(backend): filtered endpoints - generic testing and small fixes (#10602)
* move filtering of serializer fields out of functions into mixin

* fix def

* temp fix

* rollback rollback

* more adoption

* fix many serializer behaviour

* optimize mro

* set many serializer

* adjust default filtering

* fix import

* add missed field

* make can_filter suppport more complex scenarios:
- different filtername from fieldname
- multiple fields with one filtername

* fix removal

* fix schema?

* add missing def

* add test

* fix schema fields

* fix another serializer issue

* further fixes

* extend tests

* also process strings

* fix serializer for schema

* ensure popped values are persisted

* move test around

* cleanup

* simplify tests

* fix typo

* fix another test

* var tests

* disable additional tests

* make application of PathScopedMixin more intentional -> more efficient

* make safer to use with various sanity checks

* fix list serializer

* add option to ignore special cases

* generalize addition

* remove generalize addition

* re-add missing schema generation exception

* remove new duplication

* fix style

* adjust naming and docs, add typing to clean stuff up

* simplify more

* fix ref calc

* Add generic test for serializer

* enable query based filtering

* enable previously disabled filters

* test failure modes

* reduce diff

* make check more robust

* add more INVE-I2 checks

* improve check

* make check and test more robust

* enable controlling query parameters per field

* ignore in coverage

* Remove project_code filter from BuildSerializer

Removed project_code filter from BuildSerializer.

* fix style

* Revert "Remove project_code filter from BuildSerializer"

This reverts commit 504eff0fd7.

* Revert "fix style"

This reverts commit 8e31db95d3.
2025-10-21 08:55:43 +11:00
Matthias Mair
a02d1011e7 chores(backend): bump various deps (#10624)
* bump various deps

* align helpers deps

* revert allauth change

* fix style

* bump allauth too

* bum api version as there is a small allauth change
2025-10-21 06:54:40 +11:00
Oliver
27f7b6ed55 [API] Bug fix for FilterableSerializerMixin (#10632)
- Handle case where data is being exported
2025-10-20 17:14:47 +11:00
Oliver
f9ce9e20b2 Fixes for SITE_URL validity checks (#10619)
* [docker] Allow HTTPS port to be specified for Caddy proxy

* Fix naming collision for INVENTREE_WEB_PORT

* Push InvenTree version first

* Adjust Caddyfile

- Change backup server

* Fix docstring

* Tweak for site URL check:

- Ignore port if SITE_LAX_PROTOCOL_CHECK is set
- Invert logic for readability

* Additional checks for port mismatch

* Adjust middleware checks

- Allow for less strict checking of CSRF_TRUSTED_ORIGINS

* Slight refactor
2025-10-20 16:05:37 +11:00
karan Lala
5425ace1fa CreateSalesOrderLineItem: auto-apply sales price based on part price_breaks, currency, and quantity (#10549)
* updated part api mixin and part serializer to include salepricebreaks when explicitly queried

* fixed bug in ApiForm that prevents form field value from updating correctly

* CreateSalesOrderLineItem form now automatically applies price break based on currency and quantity for a part

* bumped API version due to PartsList api price_breaks query param

* fixed incorrect field names

* Remove whitespace

* Increase database query limit from 20 to 25

* updated ApiForm to propagate false and 0 as values to their respective fields, updated ApiFormField to eagerly apply AdjustValue to apply adjustments when onChange does not fire (when the value does not truly change)

* updated pagination number check to a range instead of discreet values.

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2025-10-20 11:47:05 +11:00
Oliver
2cae87d138 Tweak for plugin loading (#10631)
Prevent plugin install on server launch under certain conditions
2025-10-20 11:45:41 +11:00
Matthias Mair
e3ef9e48f6 refactor(backend): Editorial changes to machine serializer descriptions (#10630)
* improve serializer text

* small type improvs

* more precise text (for API)

* bump api version

* more fixes
2025-10-20 09:20:15 +11:00
Oliver
73ca468ff7 [UI] Hide actions for completed orders (#10617)
* Adjust error message target

* Hide UI actions if order is locked

* Refactor salesorderdetail page

* Refactor PurchaseOrderDetail page

* Refactor ReturnOrderDetail
2025-10-19 11:34:04 +11:00
github-actions[bot]
2182fe42db New Crowdin translations by GitHub Action (#10614)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-19 11:03:46 +11:00
Oliver
72d127219f Generator updates (#10605)
* Form Field updates:

- Allow spec of leftSection prop
- Allow spec of rightSection prop

* Add ability to auto-fill text input with placeholder value

* Simplify stock form

* Better serial number placeholders

* Update other generator fields

* Add default placeholder to DateInput

* Enhance TextField

* Remove serial_numbers field for non-creation forms

* Update playwright tests

* Adjust playwright tests

* Further playwright adjustments

* Fix project code field for build serializer
2025-10-18 17:18:04 +11:00