2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-14 06:31:27 +00:00
Commit Graph

867 Commits

Author SHA1 Message Date
Oliver
945cb46f32 [bug] Logic fix for plugins (#9934)
* Logic fix for plugins

- Prevent tasks being run for disabled plugins

* Adjust default value for "get_plugin" method

* Fix return type

* Update typing

* Tweak unit test

* Update unit tests

* More test updates
2025-07-06 10:15:33 +10:00
Oliver
82dfe561ee [feature] Disable pricing task (#9730)
* Add setting to control pricing auto-update

* Auto pricing updates depend on global setting

* Tweak menu layout

* Fix typo

* Skip pricing task

* Tweak serializer

* Updated docs

* Update logic around automatic pricing updates

* Logic fix

* Remove daily holdoff
2025-07-05 11:16:42 +10:00
github-actions[bot]
925807e06b New Crowdin translations by GitHub Action (#9919)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-04 17:21:56 +10:00
Oliver
383925de4e Logic fix for LOCK_SETTING (#9948)
* Logic fix for LOCK_SETTING

- Because the setting is to "allow editing", it is really an UNLOCK setting
- This setting had to be DISABLED (false) to allow editing of completed orders

* Updated logic

* Tweak unit tests
2025-07-04 11:44:33 +10:00
Oliver
6453abb974 User token table (#9954)
* Tweak layout of Token dialog

* Render user details in API token table

* Bump API version
2025-07-04 11:38:21 +10:00
Oliver
e7b27c9e2f [UI] Location filter (#9939)
* Filter incomplete outputs by location

* Filter build allocated stock by location

* Filter sales order allocations by location

* Bump API version

* Fix API version

* Fix annotations
2025-07-04 10:24:12 +10:00
Oliver
4307e6d170 Allocation search by IPN (#9944)
* Fix for "has_ipn" filter

* Enable filtering and sorting by IPN in SalesOrderAllocation table

* Bump API version
2025-07-03 16:53:46 +10:00
Oliver
d9f71ca20f [UI] Refactor stock adjustment actions (#9937)
* Refactor stock actions into a hook

* Cleanup hooks

* Allow transfer of "incomplete" outputs

* Simplify even further

* Enable transfer of stock allocated to build order

* Remove StockItemBriefSerializer entirely

* stock actions for items allocated to sales order

* Refactor <PartDetail> page

* Refactor <StockDetail>

* Refactor <LocationDetail>

* Bump API version

* Control serializer arguments
2025-07-03 16:15:06 +10:00
Oliver
5e9a8f7cb2 [UI] Sales order button (#9938)
* Refactor stock actions into a hook

* Cleanup hooks

* Allow transfer of "incomplete" outputs

* Simplify even further

* Enable transfer of stock allocated to build order

* Remove StockItemBriefSerializer entirely

* stock actions for items allocated to sales order

* Refactor <PartDetail> page

* Refactor <StockDetail>

* Refactor <LocationDetail>

* Bump API version

* SO button text

- Observe the "SALESORDER_SHIP_COMPLETE" value

* Fix palywright tests
2025-07-03 15:22:23 +10:00
Oliver
cdd977abaa Tweak "auto_allocate" serial numbers (#9942)
- Allow "in production" items
- Enables allocation of child builds
2025-07-03 14:25:02 +10:00
dependabot[bot]
2ce7e225ad chore(deps): bump pillow from 11.2.1 to 11.3.0 in /src/backend (#9929)
* chore(deps): bump pillow from 11.2.1 to 11.3.0 in /src/backend

Bumps [pillow](https://github.com/python-pillow/Pillow) from 11.2.1 to 11.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/11.2.1...11.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 11.3.0
  dependency-type: direct:production
...

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-07-02 17:55:49 +10:00
Matthias Mair
dea8b4f0ad fix(backend) : use correct settings patching (#9910)
* fix(backend): use correct settings patching

* and more fixes

* fix context in test

* add better test for cors
2025-07-02 10:35:27 +10:00
Oliver
e6f91517c3 Log errors during tree rebuild (#9927)
* Log errors during tree rebuild

* Ensure stock tree is rebuilt

* Update models.py

Fix call to rebuild_stock_tree

* Update models.py

style fixes
2025-07-02 00:07:54 +10:00
Oliver
e96e78cf0d Fix for URL redirect (#9914)
- Need leading / to ensure absolute path
2025-07-01 11:22:11 +10:00
github-actions[bot]
3482ab4956 New Crowdin translations by GitHub Action (#9903)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-01 10:51:22 +10:00
Matthias Mair
92c92d60e7 [FR] Add proactive system check for site_url (#9895)
* [FR] Add proactive system check for site_url
Fixes #7847

* fix enviroment for tests

* fix admin tests and make them more robust

* improve tests for admin actions

* add test for all scenarios

* use right http error code

* fix error code

* remove dependency on bundle

* fix test
2025-07-01 09:12:48 +10:00
Oliver
83b524f808 Negative annotations (#9909)
* Fix for "annotated_scheduled_to_build_quantity"

* Further annotation updates

* Add unit testing for annotation

* Tweak unit test

* Cast annotated expression

* Specific fields required to work

* Refactor other instances

* Update API docs
2025-07-01 08:57:27 +10:00
github-actions[bot]
c6d53b8c57 New Crowdin translations by GitHub Action (#9885)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-30 08:12:45 +10:00
Oliver
ab5765685a Add title when creating child build (#9893) 2025-06-28 12:09:26 +10:00
Oliver
4b70a6e4ca Error tweaks (#9891)
* Wrap model import in try/except

* Fix circular imports

* Adjust exception handling
2025-06-28 10:25:24 +10:00
Oliver
ff6d4bfb8f [Bug] Report fix (#9887)
* Improved mechanisms for data output

- Log errors against output
- Properly catch rendering errors

* Updated error handling

* Fix "render_date" tag

* Update default report template

- Make sure the helper is used

* Bug fixes
2025-06-28 08:23:12 +10:00
gitbock
b3feebb53b Add stale stock email notifications (#9861)
* Add stale stock email notifications

Implement automated email notifications for stock items approaching
their expiry dates. Users receive consolidated daily emails for all
their subscribed parts that are within the configured stale threshold.

Fixes #7866

* Fix for tracing init (#9860)

- Circular include means that settings.DB_ENGINE may not be available

* [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

* fix syntax again (#9863)

* fix(backend): change notification for INVE-W10 (#9864)

implements changes requested in
https://github.com/inventree/InvenTree/pull/9769#issuecomment-3004193476

* Tweak for tracing setup (#9865)

- DB_ENGINE is of the form "django.db.backends.postgresql", not "postgesql"

* Update README.md (#9867)

Update sponsors list

* Remove sleep call (#9866)

* New Crowdin translations by GitHub Action (#9813)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Table default cols (#9868)

* Work in progress

- Seems to reset the columns on page refresh
- Probably related to the useLocalStorage hook

* Do not overwrite until the tablestate is loaded

* Prevent table fetch until data has been loaded from localStorage

* Improved persistance

* Adjust default column visibility

* Adjust playwright test

* Clear data tweak (#9870)

* Tweaks for config path checks

* Update delete-data task

* Tweaks for config path checks (#9869)

* fix instrumentation code (#9872)

* [UI] About tweak (#9874)

* Cleanup server info modal

* Sort package info

* De-sync useLocalStorage (#9873)

* [UI] Fix thumbnail rendering (#9875)

- Fix typo which caused full image to be rendered
- This could cause significant network loading time

* Add stale stock email notifications

Implement automated email notifications for stock items approaching
their expiry dates. Users receive consolidated daily emails for all
their subscribed parts that are within the configured stale threshold.
Revert django.po

Fixes #7866

* fixed pull request issues #9875)

* unit test notifications for stale stock items

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-28 08:21:04 +10:00
Oliver
486838b7e7 Tweaks to fix circular imports (#9888) 2025-06-27 17:10:06 +10:00
github-actions[bot]
040d1c1073 New Crowdin translations by GitHub Action (#9871)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2025-06-27 13:14:00 +10:00
Oliver
9a2097ddd0 Plugin install errors (#9876)
* Log plugin install errors

* Log more errors

* Format pip errors

* Update error messages

* Control if plugins file gets installed

* Error handling

* Fix typo

* Logic fix for loading plugins

* Adjust unit test

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2025-06-27 07:56:22 +10:00
Oliver
791f7797cb [UI] About tweak (#9874)
* Cleanup server info modal

* Sort package info
2025-06-26 20:53:23 +10:00
Matthias Mair
370baeff8b fix instrumentation code (#9872) 2025-06-26 16:51:50 +10:00
Oliver
73e2532058 Clear data tweak (#9870)
* Tweaks for config path checks

* Update delete-data task
2025-06-26 16:29:12 +10:00
github-actions[bot]
8b4f9efa44 New Crowdin translations by GitHub Action (#9813)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-26 12:16:45 +10:00
Oliver
81113dcd99 Remove sleep call (#9866) 2025-06-26 09:52:35 +10:00
Oliver
1b0de3610f Tweak for tracing setup (#9865)
- DB_ENGINE is of the form "django.db.backends.postgresql", not "postgesql"
2025-06-26 09:29:03 +10:00
Matthias Mair
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
Oliver
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
Oliver
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
Oliver
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
miggland
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
Oliver
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
Oliver
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
Matthias Mair
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
Oliver
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
Oliver
0b451dc085 Tweak plugin load error messages (#9839)
* Tweak plugin load error messages

* Update unit tests
2025-06-24 21:01:06 +10:00
Oliver
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
Matthias Mair
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
Oliver
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
Oliver
785bda26c4 Refactor mixin_enabled calls (#9825)
- Ensure the enumerated values are used
2025-06-22 11:28:48 +10:00
Oliver
cc40af6199 Fix missing context items (#9819)
* Fix missing context items

* Fix typo in docstring
2025-06-21 17:27:39 +10:00
Matthias Mair
ab9c6bae3e chore(backend): update-osv-file (#9821) 2025-06-21 07:42:05 +10:00
Oliver
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
Oliver
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
Oliver
c90fc2feda Improve handling of plugin metadata reading (#9816)
* Improve handling of plugin metadata reading

* Accessor fix
2025-06-20 15:15:40 +10:00