2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00
Commit Graph

736 Commits

Author SHA1 Message Date
2738d286de fix(backend): change notification for INVE-W10 (#9864)
implements changes requested in
https://github.com/inventree/InvenTree/pull/9769#issuecomment-3004193476
2025-06-26 09:23:52 +10:00
bc2dbfa0c2 [bug] Custom state fix (#9858)
* Set status correctly when returning from customer

* Fix for stock item status change

- Reduced set of changes from #9781

* Handle API updates

* Fix variable shadowing

* More intelligent comparison

* Remove debug statement
2025-06-26 07:42:06 +10:00
1a51c4a3dd Fix for tracing init (#9860)
- Circular include means that settings.DB_ENGINE may not be available
2025-06-26 07:41:44 +10:00
be99b645ad [API] Return stock item list when creating multiple items (#9857)
* Return stock item information when serializing an existing item

* Handle stock item creation

* Commonize response

* Provide build items in response

* Formalize returned data type

* Fix unit test
2025-06-26 00:43:42 +10:00
6811132e30 Change logger.info in labelTemplate.print to use f-string, correct the order of arguments (#9855) 2025-06-25 21:10:23 +10:00
6915ed52c9 Enable 'units' field for plugin settings (#9856)
* Enable 'units' field for plugin settings

* Bump API version
2025-06-25 20:30:39 +10:00
73d463d84e Adjust "child_items" annotation for stockitem (#9842)
* Adjust "child_items" annotation for stockitem

- Show the direct children only

* Remove unused func
2025-06-25 18:34:57 +10:00
bbe94ee9c2 refactor (backend): move config files out of the source directories (#9769)
* moving config files out of the source directories
Fixes #9756

* add folder for config

* fix lookup paths

* reorder ignores

* reduce diff

* better error message

* fix paths

* Update tests.py

* save global warning to db

* fix import

* more import fixes / docs

* fix default

* fix default

* ensure secret_key/get_config_file is tested fully

* try fixing path on docker

* try to make it work on GitHub CI

* refactor testfolder path into config var

* fix test path

* fix test

* do not test on docker

* more tests

* add testing for global warning dict

* fix error handling
2025-06-25 08:12:24 +10:00
8e8b61033c Fix for stock item duplication bug (#9846)
* Omit "serial" field

* Ignore 'serial' field on item creation
2025-06-25 06:54:12 +10:00
0b451dc085 Tweak plugin load error messages (#9839)
* Tweak plugin load error messages

* Update unit tests
2025-06-24 21:01:06 +10:00
5bb6db704b Plugin url fix (#9833)
* Handle error when loading plugin URLs

- Error separation between plugins
- Format plugin URLs outside the plugin code
- Add "catch-all" URL

* Attempt to resolve URL

* Accept 404 error

* Cleanup

* Tweak unit tests
2025-06-24 19:31:37 +10:00
3c2997ece5 refactor(backend) rename barcode plugins (#9829)
* refactor(docs): restructure barcode plugin section

* rename doc files

* add barcode index

* add missing link

* refactor(backend): rename barcode plugins

* fix ref

* revert name change

* fix name ref
2025-06-24 19:15:12 +10:00
4d029b0d54 [bug] Fixes for plugin loading mechanism (#9826)
* Fix logic for registry mutex lock

* Handle potential errors during UsersConfig launch

* Remove debug statement

* Revert to_raise value

* Clear plugin errors on reload

* Better method of avoiding duplicates
2025-06-22 12:40:07 +10:00
785bda26c4 Refactor mixin_enabled calls (#9825)
- Ensure the enumerated values are used
2025-06-22 11:28:48 +10:00
cc40af6199 Fix missing context items (#9819)
* Fix missing context items

* Fix typo in docstring
2025-06-21 17:27:39 +10:00
ab9c6bae3e chore(backend): update-osv-file (#9821) 2025-06-21 07:42:05 +10:00
499e48cdd8 Company reports (#9817)
* Support report generation against company

* Add "print report" to Company table

* Add printing button to Company detail page

* Bump API version
2025-06-20 17:52:07 +10:00
b4f3fd46f9 [Breaking] Remove part scheduling feature (#9811)
* Remove frontend code

* Remove references to setting

* Remove API endpoint

* Docs updates

* Bump API version

* Remove check for old tab
2025-06-20 17:17:44 +10:00
c90fc2feda Improve handling of plugin metadata reading (#9816)
* Improve handling of plugin metadata reading

* Accessor fix
2025-06-20 15:15:40 +10:00
786b52d016 Report merge (#9532)
* Report merge

* Remove auto-generated file

* Remove pre-commit file

* Revert "Remove pre-commit file"

This reverts commit 00d80bae2a.

* Update API version

* Reduced duplicated logic

* reset pre-commit config

* Added migration files

* Added unit test

* Removed redundant migration

* Updated migration file

* Added a default report template with merge enabled

* Unit test to ensure a single page is generated

* Added docs to support merge feature

* Clean up

* Clean up

* Fixed unresolved link

* Updated API version

* Fixed test report path issue

* Add plugin context for each instance

* merge in master

* Fixed formating

* Added more detailed user guide

* Updated docs

* Added assert to ensure test html output exists

* Updated docs

* Fixed report test path

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2025-06-20 14:06:28 +10:00
45daef8442 feat: more mail sending backends and plugability (#9608)
* [FR] Improve Email handeling
Fixes #7950

* extend implementation of email thread and message models

* add missing args

* add unit test

* increase test coverage

* make key not necessary

* do not consider in coverage

* add email apis

* Add email admin

* fix email configuration check

* improve rendering

* squash migrations

* add config value overview

* log if mails were send

* add additional headers

* fix api unit test

* fix url resolving

* add InvenTree specific task to issue mails
required to extend sending options (prio, reply to)

* use internal sending task to keep telemetry cleaner

* add prio handling

* add plugin handling

* add setting

* factor plugin method out

* add typing

* move function

* bump version

* fix import path

* add a test for the test endpoint

* fix checking logic

* Add anymail sending / tracking handling

* add more ordering fields to api

* remove unneeded assingment

* add basic docs

* handle incoming emails with anymail

* Add inbox handling
Closes https://github.com/inventree/InvenTree/issues/7951

* add list of supported ESPs

* add better error transparency when sending fails

* add missing migration

* combine migrations back down

* fix todos

* fix qc export

* fix missing model props

* add tests

* ensure things are passed as a list

* fix list formatting

* fix deps

* move tests

* add testing with anymail

* allow handling of priority and headers

* add test for events

* add test for inbound messages

* rename variable

* increase coverage

* fix format

* add setting doc

* fix link

* rename fnc

* disable pro test

* make messages clearer

* fix doc syntax

* fix assign

* fix test

* revert test disablement

* add enum

* disable check for now

* try changing test around

* add incoming mail processing

* fix import

* add docs

* Fix mail.md

* bump deps

* fix api version
2025-06-20 11:49:02 +10:00
797b5f57b0 feat(backend): improve worker tracing (#9808)
* feat(backend): improve worker log

* refactor tracing details

* add tracing to gunicorn setup

* add sqlite tracing

* add system metrics

* instument wsgi

* make dbengine better accessible

* fix instruction

* instrument worker

* track task scheduling

* trace common tasks

* patch in support for django q

* trace various tasks

* add trcing for other dbs

* ignore coverage on tracing stuff

* more ignorance
2025-06-20 09:47:28 +10:00
00c974b629 feat: add cluster monitor task (#9812) 2025-06-20 09:45:25 +10:00
38cf8141fc New Crowdin translations by GitHub Action (#9801)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-20 09:05:29 +10:00
0bbc020a95 Schema: Add possible order fields to 'ordering' field description (#9803)
* Make optional build order reference nullable

* Add valid choices to ordering field description

* Bump API version
2025-06-19 13:05:02 +10:00
f7c8788ad5 chore(deps): bump urllib3 from 2.4.0 to 2.5.0 in /src/backend (#9809)
* chore(deps): bump urllib3 from 2.4.0 to 2.5.0 in /src/backend

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.4.0 to 2.5.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.4.0...2.5.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.5.0
  dependency-type: indirect
...

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

* fix req

* bump all instances

---------

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-06-19 10:37:53 +10:00
d5fa609275 feat: improve user/group management actions (#9602)
* feat: improve user management actions
add "open profile" actions

* add lock / unlock action

* add actions for password reset

* submit coverage info to codecov
no idea why this was turned off

* bump api version

* add frontend test

* add backend test

* fix test state

* move test

* fix style

* fix name

* hide password change if not superuser

* bump playwright
see https://github.com/microsoft/playwright/issues/35183

* fix test

* fix test order

* simplify test

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2025-06-19 09:14:59 +10:00
62aef238f0 [UI] Add "can build" part info (#9798)
* Add proper serializer to PartRequirements API endpoint

* Add API endpoint

* Display "can_build" quantity

* Add simple playwright tests

* Bump API version

* Updated docs

* Fix formatting

* Consolidate field names

- Match field names to the PartSerializer

* Adjust frontend

* Add "can_build" to BuildDetail page

* Tweak BuildDetail

* Hide until load

* serializer fixes
2025-06-18 10:17:39 +10:00
fe4038205f New Crowdin translations by GitHub Action (#9780)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-18 08:08:59 +10:00
e7b24cca64 various small fixes (#9797) 2025-06-17 08:18:25 +10:00
b02bc3842e Remove function call from translated string (#9778) 2025-06-14 12:15:20 +10:00
eb445be770 New Crowdin translations by GitHub Action (#9771)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-14 12:15:10 +10:00
ba4a23757e Fix task group (#9777)
* Fix group for offload_task

* Add group labels
2025-06-14 12:15:02 +10:00
c027a7cf7d [Plugin] Auto-create builds (#9574)
* Remove existing "create child builds" functionality

- Remove API fields
- Remove background task definition

* Basic plugin structure

* Bump API version

* Bump API version

* Bug fix

* working on plugin event handling

* Add new stub method

* Implement functionality

* Fix conflicts in api_version

* Docs

* Fix docs

* Fix event type
2025-06-14 11:26:48 +10:00
b465900344 [UI] Fix serial and batch code generators (#9772)
* Tweak stock item form

- Fix batch code placeholder
- Fix serial number placeholder

* Tweak build output form

* More cleanup

* Fix for PurchaseOrderForm

* Refactoring placeholder values
2025-06-13 20:02:30 +10:00
c70583097c New Crowdin translations by GitHub Action (#9726)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-12 23:31:16 +10:00
c6848b8e87 [Feature] External build order (#9312)
* Add BuildOrder reference to PurchaseOrderLineItem

* Add setting to enable / disable external build orders

* Fix for supplier part detail

* Update forms

* Filter build list by "external" status

* Add "external" attribute to BuildOrder

* Filter by external build when selecting against purchase order line item

* Add frontend elements

* Prevent creation of build outputs

* Tweak related model field

- Send filters when fetching initial data

* Fix migrations

* Fix some existing typos

* Add build info when receiving line items

* Logic fix

* Bump API version

* Updated relationship

* Add external orders tab for order

* Display table of external purchase orders against a build order

* Fix permissions

* Tweak field definition

* Add unit tests

* Tweak api_version.py

* Playwright testing

* Fix discrepancy in 'building' filter

* Add basic documentation

( more work required )

* Tweak docs macros

* Migration fix

* Adjust build page tabs

* Fix imports

* Fix broken import

* Update playywright tests

* Bump API version

* Handle DB issues

* Improve filter

* Cleaner code

* Fix column ordering bug

* Add filters to build output table

* Documentation

* Tweak unit test

* Add "scheduled_for_production" field

* Add helper function to part model

* Cleanup
2025-06-12 18:27:15 +10:00
e30c4e7cdd Part copy test (#9764)
* Add functionality to copy part test templates when duplicating a part instance

* Bug fixes

* Tweak part duplication fields

* Add simple playwright test

* Updated unit test for part duplication

* Bump API version
2025-06-12 12:56:16 +10:00
1818757b79 chore(deps): bump requests from 2.32.3 to 2.32.4 in /src/backend (#9752)
* chore(deps): bump requests from 2.32.3 to 2.32.4 in /src/backend

Bumps [requests](https://github.com/psf/requests) from 2.32.3 to 2.32.4.
- [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.3...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: indirect
...

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

* fix req

---------

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-06-11 07:11:04 +10:00
6b261e122d Param filters 2 (#9749)
* Filter updates

- Split code
- Allow multiple simultaneous filters against a given parameter
- Bug fixes

* Refactoring

* Cleanup

* fix for operator selection

* Backend fix

* Additional filtering options

* Updated documentation

* Impove filtering logic

* Tweak playwright tests

* Remove debug statements

* Tweak for login test
2025-06-08 22:03:50 +10:00
25d13b4201 chore(backend): remove constraints (#9748)
* remove constraints

* general dep bump

* bump opentelemetry
2025-06-08 09:22:10 +10:00
4b71130ebe [Feature] Override global settings (#9718)
* Provide mechanism for config to override global settings

* Ensure overrides are observed on save

* Refactor

* Add "read_only" field to serializer

* Prevent editing for read_only settings

* Bump API version

* Update docs

* Secure logs

* Override applies to default_value

* override get_setting method

* Add unit test

* Utilize new approach to override SITE_URL

* Docs updates

* Docs tweaks

* Shortcut for get_global_setting

* Remove previous change

- Allow validation to be performed within the InvenTreeSetting class

* Override INVENTREE_BASE_URL setting

* Handle error on worker boot

* Tweak unit test
2025-06-07 20:08:34 +10:00
12677ccf22 Add barcode actions for SalesOrderShipment (#9746)
* Add barcode actions for SalesOrderShipment

* Handle error on worker boot
2025-06-07 20:08:20 +10:00
4660b9477b [UI] Adjustable column width (#9744)
* Add prop to column def

* Enable resizable columns

* Enable cell wrapping if required

* Tweak CompanyTable

* Remove old setting

* Tweak for PartTable
2025-06-07 19:15:33 +10:00
66db58bb36 Add barcode to salesordershipment (#9745)
* Add InvenTreeBarcodeMixin to SalesOrderShipment

* Barcode model type code method added for SalesOrderShipment class

* Add barcode data to SalesOrderShipment serializer

* Bump API version

---------

Co-authored-by: meenaraj22 <meena@blaze.ws>
Co-authored-by: Matthias Mair <code@mjmair.com>
2025-06-07 15:51:05 +10:00
9138bad8bc [Feature] Filter by parameter (#9739)
* Add shell task

* Filter parts by parameter value

* Allow more operation types

* Working on table filtering

* Filter improvements

* Update on enter key

* Improved query logic

* Enable filter for "generic" parameter types

* Placeholder text

* Documentation updates

* Fix typo

* Fix for boolean part parameter field

* Add API unit testings

* Cleanup

* add playwright tests
2025-06-06 15:06:11 +10:00
71abd489ae chore(backend): bump allauth version (#9714)
* bump allauth

* add trust

* add device trust handling

* fix style

* Update api_version.py

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2025-06-05 13:27:52 +10:00
ee67c4f099 Refactor error logging (#9736)
- Ensure plugin slug is correctly attached
- Consistent format
- Logic fixes
2025-06-04 11:36:47 +10:00
11ab0203b1 [plugin] Auto issue orders (#9565)
* Add builtin plugin for auto-issuing orders

* Add plugin to auto-issue orders

* Add placeholder documentation

* Fix typo

* Adds image macro

- To replace img.html
- includes checking if file exists

* Fix tooltips

* More docs

* Adjust plugin settings filters

* docs

* More docs

* More docs

* Updates

* Less restrictive URL checking

* Refactor build order page

* Fix typo

* Allow 429

* Debug output

* More debug

* Construct assets dir

* Cleanup

* Update docs README

* Refactoring more pages

* Fix image link

* Fix SSO settings

* Add hook to check for missing settings

- Ensure that all settings are documented!

* Add missing user settings

* Update docstring

* Tweak SSO.md

* Image updates

* More updates

* Tweaks

* Exclude orders without a target_date

* Fix for issuing build orders

* Further refactoring

* Fixes

* Image refactoring

* More refactoring

* More refactoring

* Refactor app images

* Fix pathing issues

* Suppress some openapidocs warnings in logs

(much easier to debug docs build issues)

* Fix image reference

* Reduce error messages

* Fix image links

* Fix image links

* Reduce docs log output

* Ensure settings are loaded before displaying them

* Fix for UI test

* Fix unit test

* Test tweaks
2025-06-03 17:07:12 +10:00
89f8f132e1 Handle case where owner is null (#9732) 2025-06-03 15:57:10 +10:00