2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 19:46:46 +00:00

256 Commits

Author SHA1 Message Date
github-actions[bot]
abddfb0b04
Docs updates: (#8951) (#8953)
* Docs updates:

- Fix error related to key access
- Fix rendering of settings tables
- Add setting key as mouseover text

* Revert config

(cherry picked from commit 640d5852e479f411120c2ec876e7476d30bc8337)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2025-01-26 11:26:23 +11:00
Oliver
99f9a3271b
Ignore RTD version check (#8884)
* Ignore RTD version check

- Handled internally by readthedocs

* Add link ignore
2025-01-12 13:56:05 +11:00
github-actions[bot]
0a522709b1
Add FAQ on cookie setting change (#8805) (#8807)
(cherry picked from commit 741994430156ca34e4871b8510e07e2bb51b238e)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-12-31 14:44:10 +11:00
github-actions[bot]
c32362456b
Add documentation on transferring media files (#8803) (#8806)
(cherry picked from commit c917c64aa18f82ae20b4440c4fec664674eb900d)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-12-31 14:43:54 +11:00
github-actions[bot]
4d07a49dfd
Caddyfile documentation (#8798) (#8800)
* basic mixin file

* Add basic check for model type support

* Enhanced documentation for Caddyfile

* Additional documentation around proxy server

* Remove code from other PR

(cherry picked from commit ecc1c937ed5ea91058cb87c09dc2f8f58a77f84a)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-12-31 13:47:07 +11:00
github-actions[bot]
ef5fd93207
[Setup] Support X-Forwarded-Proto header (#8790) (#8797)
* Remove use_x_forwarded_port setting

- As per the docs, this is ignored in favour of use_x_forwarded_host
- So, is not being used anyway

* Add note on x_forwarded_host option

* Add warning message if SITE_URL not provided

* Add support for SECURE_PROXY_SSL_HEADER

* Update configuration template file

* Update SITE_URL docs

* Remove line

* Re-add use_x_forwarded_port

* Docs tweak

* Improve wording

* Fix broken link

(cherry picked from commit 23e4f2f2a23ec0e17c392187ddc351711d434011)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-12-31 12:50:51 +11:00
github-actions[bot]
df7204a334
[Docs] Update FAQ (#8777) (#8778)
* Update FAQ

* Add links to FAQ

* Extra info

* Extend documentation for debug options

(cherry picked from commit b0ce67fcd7f20dbd5ba2a8369dda36d91d1d0436)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-12-27 19:13:56 +11:00
Michael
1bd51fc8a2
Add a more complex example the the plugin unit test docs. (#8664)
* Add a more complex example to plugin unit test doc

* Minor changes to the doc
2024-12-15 07:53:09 +11:00
Michael
5aae93e635
Added first example to plugin unit test (#8636)
* Start documentation chapter for plugin tests

* Added env variables to the doc

* Fix style errors

* Further style bugs

* Reformat environment variables

* Reformat environment variables

* Add comments from wolflu05

* Add text to the intro

* Added first example the plugin unit test

* Addred line it function

* Typo

* Typo

* Typo
2024-12-11 07:27:44 +11:00
Michael
8ac852728e
Added a comment on database creation for local testing (#8603)
* New pic

* Marked external icon in picture

* Added a comment on database creation for unittest

* Update contributing.md

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-12-02 09:47:49 +11:00
Oliver
dd9a6a8a2d
Event enum (#8573)
* Add enumeration for stock events

* Update function def

* Refactor build events

* Plugin events

* Update order events

* Overdue order events

* Add documentation

* Revert mkdocs.yml

* Stringify event name

* Enum cleanup

- Support python < 3.11
- Custom __str__

* Add unit tests

* Fix duplicated code

* Update unit tests

* Bump query limit

* Use proper enums in unit tests
2024-11-29 12:05:05 +11:00
Matthias Mair
af39189e7e
Add SelectionList concept (#8054)
* Add SelectionList model, APIs and simple tests

* Add managment entries

* Add field to serializer

* add more tests for parameters

* Add support for SelectionList to CUI

* Add selection option to PUI

* fix display

* add PUI admin entries

* remove get_api_url

* fix modeldict

* Add models for meta

* Add test for inactive lists

* Add locking and testing for locking

* ignore unneeded section

* Add PUI testing for adding parameter

* Add selectionList admin

* also allow creating entries

* extend tests

* force click

* and more testing

* adapt test?

* more assurance?

* make test more robust

* more retries but shorter runs

* Update playwright.config.ts

* Add docs

* Add note regarding administration

* Adapt to https://github.com/inventree/InvenTree/pull/8093

* make help text more descriptive

* fix migration

* remove unneeded UI entries

* add lables and describtions to TableFields

* factor out selectionList forms

* add key to button

* cleanup imports

* add editable fields

* Add function to add row

* fix render warning

* remove dead parameter

* fix migrations

* fix migrations

* fix format

* autofix

* fix migrations

* fix create / update loop

* fix addition of empty lists

* extend tests

* adjust changelog entry

* fix updating loop

* update test name

* merge migrations

* simplify request

* - Add entry count to list
- Move parameter table to default accordion

* fix test

* fix test clearing section

---------

Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
2024-11-27 13:30:39 +11:00
Oliver
20fb1250f8
Add new report filters for accessing database tables (#8560)
* Add new report filters for accessing database tables

* Simplify

* Handle exception

* Add docs

* Update docstrings
2024-11-27 07:51:27 +11:00
Matthias Mair
0f194af585
Fix spelling of InvenTree in code base (#8561)
* fix spelling of InvenTree in code

* fix spelling in frontend
2024-11-26 08:29:47 +11:00
Michael
5e762bc7f7
Change picture for external stock location (#8543)
* New pic

* Marked external icon in picture
2024-11-25 12:40:55 +11:00
Oliver
f6124fc4a1
Add info on --skip-backup (#8541) 2024-11-24 15:50:23 +11:00
Jacob Felknor
94089c94b7
Add PO wildcard default setting (#8532)
* add PO wildcard default setting

* Revert "add PO wildcard default setting"

This reverts commit 6cc577fa733709fe6b38f2f63244ebcb9a1fb8e5.

* use custom format spec for "wildcard with default" reference pattern

* add wildcard with default to docs

* add test for wildcard with default
2024-11-22 09:27:06 +11:00
Oliver
db70597755
Add empty context menu (#8519)
* Add empty context menu

- For tables without "row actions"
- Show an "empty" menu
- For UX consistency across all tables

* Fix for playwright tests

- Recent changes to the demo dataset...

* Fix typo
2024-11-20 00:01:19 +11:00
Oliver
70f5fe8c97
Update react-frontend.md (#8520)
Add info on how to debug missing tests in playwright
2024-11-19 23:08:21 +11:00
Matthias Mair
e4a39692ff
Add structlog (#7937)
* Add structlog
Closes #3960

* fix formatting

* make log writing optional

* ignore logfiles

* fix variable naming
2024-11-19 19:48:20 +11:00
Oliver
88bb06e75a
Env var docs (#8499)
- Add example for specifying a list value
- Closes https://github.com/inventree/InvenTree/issues/8410
2024-11-16 16:15:28 +11:00
Oliver
8f4e76b10f
Update UI plugin docs (#8497) 2024-11-16 15:04:13 +11:00
Jacob Felknor
f9d3f43b02
configurable ldap group classes (#8475)
* configurable ldap group classes

* remove accidental duplicate line

* fix style issues

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2024-11-16 09:08:27 +11:00
Oliver
ac63b10197
Update faq.md (#8489) 2024-11-15 22:51:46 +11:00
Oliver
da112211e5
Format number (#8482)
* Add extra options for 'format_number' helper

* Update documentation

* Improved typing hints and docs cleanup

* Fix link
2024-11-14 16:11:01 +11:00
Oliver
ff562118ed
More playwright docs (#8471) 2024-11-12 22:16:31 +11:00
Michael
9fb93b899c
Add doc on external stock locations (#8457)
* Add example for INVENTREE_CUSTOMIZE environment variable

* Search also for IPN in allocated parts for build

* Changed example

* Added doc about external stock locations
2024-11-09 00:36:53 +11:00
Oliver
00bd92e27c
Add docs on running playwright tests (#8424) 2024-11-04 21:23:30 +11:00
Oliver
18e5b0df58
[PUI] Dashboard refactor (#8278)
* Refactor plugin components into <RemoteComponent />

* Clean up footer

* Allow BuildOrder list to be sorted by 'outstanding'

* Fix model name

* Update BuildOrderTable filter

* Add StockItemTable column

* Working towards new dashboard

* Cleanup unused imports

* Updates: Now rendering some custom widgets

* Define icons for model types

* Add icon

* Cleanup / refactor / delete

- Complete transfer of files into new structure

* Follow link for query count widgets

* Add some more widgets to the library

* Remove old dashboard link in header

* Remove feedback widget

* Bump API version

* Remove test widget

* Rename "Home" -> "Dashboard"

* Add some more widgets

* Pass 'editable' property through to widgets

* Cleanup

* Add drawer for selecting new widgets

* Allow different layouts per user on the same machine

* Fixes

* Add ability to *remove* widgets

* Add helpful button

* Add a keyboard shortcut

* Refactoring

* Add backend code for serving custom dashboard items

* Load dashboard items from plugins

* Tweak for dashboard item API query

- Refetch if user changes
- Tweak "loaded" value
- Prevent refetchOnMount

* Add message if no dashboard widgets are displayed

* Refactoring main navigation menu

- Group into sections
- Cleanup / consolidation
- General refactoring

* Remove playground

* Add backend field for storing dashboard layout

* Add extra type definitions for UseInstance

* Manual labels for builtin dashboard items

- Otherwise they will change with translation locale

* Shorten labels for more plugins

* Adjust DashboardMenu

* Reduce stored data

* Add widget filter by text

* Remove back-end settings

* Update playwright tests for dashboard

* Updated tests

* Refactor backend API for fetching plugin features

* Further fixes for back-end code

* More back-end fixes

* Refactor frontend:

- Custom panels
- Custom dashboard items

* Further backend fixes

* Yet more backend fixes

- Improve error handling

* Fix for custom plugin settings rendering

* Enable plugin panels for part index and stock index pages

* Cleanup

* Fix nav menu

* Update typing

* Helper func to return all plugin settings as a dict

* Update API version date

* Fix for UseInstancea

* typing fix

* Tweak layout callbacks

* Pass query parameters through to navigation functions

* Improve custom query display

* Add "news" widget

* Ensure links are prepended with base URL on receipt

* Update NewsWidget

* Bug fix

* Refactor template editor tests

* Refactor unit testing for test_ui_panels

* Unit test for dashboard item API endpoint

* Update comment

* Adjust playwright tests

* More playwright fixes

* Hide barcode scanning options if disabled

* Tweak dashboard widget

* Fix custom panel title

* Update documentation around UIMixin class

* Cleanup

* Additional docs

* Add icon def for 'error' ModelType

* Add error boundary to TemplateEditor component

* Fix so that it works with template editors and previews again

* Tweak error messages

* API unit test fixes

* Unit test fix

* More unit test fixes

* Playwright test tweaks

* Adjust error messages
2024-11-02 08:48:29 +11:00
Oliver
c4031dba7f
Purchase Order Destination (#8403)
* Add "destination" field to PurchaseOrder

* Add 'destination' field to API

* Add location to PurchaseOrderDetail page

* Display "destination" on PurchaseOrderDetail page

* Pre-select location based on selected "destination"

* Fix order of reception priority

* Auto-expand the per-line destination field

* Add "Purchase Order" detail to StockItemDetail page

* Bug fix in PurchaseOrderForms

* Split playwright tests

* Docs updates

* Bump API version

* Unit test fixes

* Fix more tests

* Backport to CUI

* Use PurchaseOrder destination when scanning items
2024-11-01 11:10:25 +11:00
Oliver
801b32e4e3
Prevent multiple background workers without global cache (#8401)
* Prevent multiple background workers without global cache

* Documentation updates

- New page dedicated to InvenTree process stack
- Update links
- Consolidate information

* Update mkdocs.yml
2024-11-01 07:23:08 +11:00
Oliver
178f939e42
Update docker_install.md (#8387) 2024-10-29 09:33:07 +11:00
Michael
6fc9c7b0ec
Add example for INVENTREE_CUSTOMIZE environment variable (#8314)
* Add example for INVENTREE_CUSTOMIZE environment variable

* Search also for IPN in allocated parts for build

* Changed example
2024-10-29 09:07:58 +11:00
Oliver
21ab1a184d
Invoke docs (#8373)
* Add separate docs page for invoke

* More info on available tasks

* More info

* Strict mode is strict
2024-10-27 10:51:51 +11:00
Oliver
15cf8591b3
Fix dev docs (#8357) 2024-10-25 09:37:50 +11:00
Oliver
e219b7c914
Add documentation about user management (#8321) 2024-10-21 10:05:23 +11:00
Oliver
914f59c4cc
[Breaking] Samesite Cookie Fix (#8269)
* Adjust samesite cookie behaviour:

- In DEBUG mode, turn off entirely
- Allow False value (note: *not* a string)
- Force insecure cookie in DEBUG mode

* Change default value in config file template

* Update docs

* Adjust COOKIE_SECURE based on SAMESITE setting
2024-10-10 20:18:14 +11:00
Oliver
c914d1c5af
Add additional information on demo dataset (#8243) 2024-10-06 21:30:09 +11:00
Joe Rogers
7e7cfb8ee1
Add missing namespaces to contributing page (#8239) 2024-10-06 07:59:10 +11:00
Dean
fe7bbc2436
Shipment Reports (#8194)
* Shipment Reports

* bump api version due to changed enums

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
2024-10-01 10:30:52 +10:00
Lukas
35362347a7
UI plugins custom features (#8137)
* initial implementation to let plugins provide custom ui features

* provide exportable types

* refactor ref into renderContext to make it more generic and support template preview area ui plugins

* rename 'renderContext' -> 'featureContext' as not all features may render something

* allow to specify the function name via the source file string divided by a colon

* Bump api version

* add tests

* add docs

* add docs

* debug: workflow

* debug: workflow

* fix tests

* fix tests hopefully

* apply suggestions from codereview

* trigger: ci

* Prove that coverage does not work

* Revert "Prove that coverage does not work"

This reverts commit 920c58ea6fbadc64caa6885aebfd53ab4f1e97da.

* potentially fix test???
2024-09-26 19:59:37 +10:00
Oliver
0faa507a14
Fix typo (#8181)
direction -> directory
2024-09-25 11:53:12 +10:00
Oliver
6002103129
Barcode logging (#8150)
* Add model for recording barcode scan results

* Add "admin" interface for new model

* Add API endpoints for barcode scan history

* Add global setting to control barcode result save

* Add frontend API endpoint

* Add PUI table in "admin center"

* Add API filter class

* Enable table filtering

* Update model definition

* Allow more characters for barcode log

* Log results to server

* Add setting to control how long results are stored

* Table updates

* Add background task to delete old barcode scans

* Add detail drawer for barcode scan

* Log messages for BarcodePOReceive

* Add warning message if barcode logging is not enabled

* Add "context" data to BarcodeScanResult

* Display context data (if available)

* Add context data when scanning

* Simplify / refactor BarcodeSOAllocate

* Refactor BarcodePOAllocate

* Limit the number of saved scans

* Improve error message display in PUI

* Simplify barcode logging

* Improve table

* Updates

* Settings page fix

* Fix panel tooltips

* Adjust table

* Add "result" field

* Refactor calls to "log_scan"

* Display result in PUI table

* Updates

* Fix typo

* Update unit test

* Improve exception handling

* Unit test updates

* Enhanced unit test

* Ensure all database key config values are upper case

* Refactor some playwright helpers

* Adds playwright test for barcode scan history table

* Requires some timeout

* Add docs
2024-09-23 23:30:50 +10:00
Oliver
8514970da5
[PUI] Panels plugin fix (#8147)
* Rename "get_custom_panels" method

- So that PUI plugin does not conflict with CUI plugin

* Update docstrings

* Rename "get_ui_panels" -> "ui_panels"

* Docs fix

* rename "ui_panels" -> "get_ui_panels"
2024-09-19 17:23:09 +10:00
Matthias Mair
0c1edf101f
Bug: Remove old setting (#8139)
* remove old setting

* another one was missing
2024-09-18 07:44:44 +10:00
Oliver
d75ef7c9c9
Revert int.worker to worker (#8126)
- Prevent existing docker compose installs from breaking
2024-09-16 11:07:24 +10:00
Oliver
12d2865b59
PUI Plugin Panels (#7470)
* Adds basic API endpoint for requesting plugin panels

* Split PanelType out into own file

* Placeholder for a plugin panel loaded dynamically

* Add some dummy data for the plugin panels

* Example of plugin panel selection based on page

* Expose some global window attributes

* Add new setting

* Disable panel return if plugin integration is not enabled

* Update hook to auto-magically load plugin panels

* Allow custom panel integration for more panel  groups

* Remove debug call

* Tweak query return data

* async fn

* Adds <PluginPanel> component for handling panel render

* Cleanup

* Prevent API requests before instance ID is known

* Pass instance data through

* Framework for a sample plugin which implements custom panels

* offload custom panels to sample plugin

* Load raw HTML content

* Expand custom panel rendering demo

* Adjust API endpoints

* Add function to clear out static files which do not match installed plugin(s)

* Update static files when installing plugins from file

* Update static files when installing or uninstalling a plugin

* Update static files on config change

* Pass more information through to plugin panels

* Prepend hostname to plugin source

* Pass instance detail through

* Cleanup code for passing data through to plugin panels

- Define interface type
- Shorten variable names

* Update docs requirements

* Revert "Update docs requirements"

This reverts commit 63a06d97f58ae15d837babb799b9ed8b22c3802b.

* Add placeholder for documentation

* Fix imports

* Add a broken panel which tries to load a non-existent javascript file

* Render error message if plugin does not load correctly

* Only allow superuser to perform plugin actions

* Code cleanup

* Add "dynamic" contnt - javascript file - to example plugin

* Remove default values

* Cleanup unused code

* PanelGroup updates

* Cleanup hooks for changing panel state

* More work needed...

* Code cleanup

* More updates / refactoring

- Allow dynamic hiding of a particular panel
- Pass target ref as positional argument
- Better handling of async calls

* Documentation

* Bump API version

* Provide theme object to plugin context

* Adjust sample plugin

* Docs updates

* Fix includefile call in docs

* Improve type annotation

* Cleanup

* Enable plugin panels for "purchasing index" and "sales index" pages

* Fix for plugin query check

* Improvements to panel selection

- Code refactor / cleanup
- Ensure that a valid panel is always displayed
- Allow plugin panels to persist, even after reload

* Playwright test fixes

* Update src/frontend/src/hooks/UsePluginPanels.tsx

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>

* Update src/frontend/src/components/plugins/PluginPanel.tsx

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>

* Update src/frontend/src/components/plugins/PluginContext.tsx

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>

* Fix context

* Add more context data

* Docs updates

* Reimplement local state

* Fix mkdocs.yml

* Expose 'colorScheme' to plugin context

* Define CustomPanel type definition

* Add unit testing for user interface plugins

* Add front-end tests for plugin panels

* Add new setting to plugin_settings_keys

* Adds helper function for annotating build line allocations

* Improve query efficiency

- Especially around unit testing
- Ensure all settings are generated
- Do not auto-create settings during registry load

* Improve query efficiency for build order operations

* Reduce max query count for specific test

* Revert query count limit

* playwright test updates

---------

Co-authored-by: Lukas <76838159+wolflu05@users.noreply.github.com>
2024-09-16 10:36:27 +10:00
Oliver
7fbc1fba72
[PUI] User settings panel updates (#7944)
* Simplify user theme settings

* Cleanup

* Fix permission on user list endpoint

* Update AccountDetailPanel to use modal form

* Update components

* UI updates

* Implement default colors

* Display more user details (read only)

* Add specific "MeUserSerializer"

- Prevent certain attributes from being adjusted

* Add <YesNoUndefinedButton>

* Allow role checks to be bypassed for a given view

- Override the 'get_permission_model' attribute with None

* Enable 'GET' metadata

- Required for extracting field information even if we only have 'read' permissions
- e.g. getting table columns for users without write perms
- use 'GET' action when reading table cols

* Add info on new user account

* Fix boolean expression wrapper

* Ruff fixes

* Adjust icon

* Update unit test

* Bummp API version

* Table layout fix
2024-09-14 12:30:46 +10:00
Oliver
9b272bd60f
Add option for controlling test result uploads (#8076)
* Fix typo

* Add new setting

* Gate creation of new test result template

* Refactor test result template validation

* Update API unit testing
2024-09-05 14:47:22 +10:00
Matthias Mair
e3205184be
Add namespaces to tasks (#7904)
* Namespaces for invoke tasks
Fixes #7852

* adjust various places that call re-namespaced tasks

* use full invoke command
easier for future refactors

* fix call name

* move worker to int

* adapt calls in tasks

* fix changed path

* ignore localhost links

* Avoid using internal names
2024-09-05 13:04:57 +10:00