Commit Graph

14823 Commits

Author SHA1 Message Date
Oliver
a566ac67a7
BOM Table - Fix pricing when subassembly is open (#5721)
- Ignore pricing for sub-items
- Fixes https://github.com/inventree/InvenTree/issues/5286
2023-10-17 14:12:32 +11:00
Oliver
c74368f805
Fix typo (#5715)
* Fix typo

getSpashScren -> getSplashScreen

* Cleanup docs
2023-10-17 12:12:22 +11:00
Peter Kopias
40fb1329bb
add /static/ relative comment and update splash image path in config_template.yaml (#5433)
* add /static/ relative comment and update splash image path in config_template.yaml

* Update config_template.yaml

Fix paths

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
2023-10-17 11:25:05 +11:00
Matthias Mair
40ff0e1060
Add deepsource for more security testing (#5714)
* Added deepsource for SAST testing and more
Closes https://github.com/inventree/org/issues/41

* Add deepsource badges to Readme
2023-10-17 11:23:19 +11:00
Oliver
8bc750bc06
[React] Settings interface (#5679)
* Add some dummy pages for settings

* Add some placeholder pages for settings

* Refactor 'useInstance' hook

- Allow use without a pk

* Make response status code available

* Cleanup user settings page

* Fill out (empty) panels for system settings

* Update URLs

* Add more user information to "me" API endpoint

* Implement global user context

- User information available globally
- Add placeholder page for plugin settings

* remove debug entry

* Add first-pass implementation of plugins table

* Add icon to plugin table

* plugin table improvements

* Add SettingsContext component

- Allows list of settings to be drilled down through props
- Also provides a way of reloading the settings list

* Update settings page

* Update settings detail API endpoints

- No longer case sensitive

* Display boolean values, and allow them to be edited

- Still some work to be done here
- Need to pass the base URL down through useContext

* Allow editing of non-boolean settings too

- Required some adjustment to existing forms interface

* Fix rendering of choice field within modal

* Display correct value for choice fields

* Expose settings units to API

* Updates

- Display units for setting (if available)
- Rename fieldType to field_type
- React does not like snakeCase props

* Improve form handling

* Add global server settings keys

* Add table for project codes

* Use cache to ensure that settings are not rebuilt too often

* Update api version notes

* Add username helper function to user state

* Remove SettingsContext

- Replace with global state manager
- Does not currently refresh properly

* Remove UserContext

* Update BaseContext

* Cleanup to match master

- Integrated many improvements from current master

* Get settings items working again

- Now integrates nicely with userSettingsState and globalSettingsState

* Improve generation of user name

* Handle user settings too

* url endpoint fix

* Add new table for custom unit management

* Update global settings
2023-10-17 10:28:46 +11:00
Michael
f409cd6894
Added example for barcode plugin (#5670)
* Added example for barcode plugin

* Add some words in stock location reports

* Correct error in link

* Correct error in link

* Typo in link

* Style in code example
2023-10-17 10:24:05 +11:00
Oliver
d98b1bb2c7
Fix <YesNoButton> (#5711)
- Add missing destructuring
2023-10-17 00:54:55 +11:00
Oliver
80a170d93c
Improve useInstance hook (#5710)
- Allow use without primary key
- Allow default value to be customizedr
2023-10-16 23:54:28 +11:00
Oliver
9705521cd2
[React] Part parameters table (#5709)
* Track current panel selection in local storage

* Simplify part detail tabs

* Fix <PanelGroup> instances

* Handle missing model type for rendering

* Add some more API endpoints

* Add PartParameter table

* Add callback to create new part parameter

* Allow PartParameter list API endpoint to be searched

* More PanelGroup collapse tweaks

- Still requires more attention

* Fix logic for related part table

- Need to rebuild columns when part id changes

* Further fixes for related part table

* Re-implement change to PanelGroup

- useLocalStorage
- Change got clobbered in recent merge conflict

* Add part thumbnail to StockItemTable

* Add simple <YesNo> button

- Can be improved later

* Fix for PartTable

* Allow CORS requests to /static/ endpoint

* Updates to other existing tables

* Update URLs for dashboard items
2023-10-16 23:34:16 +11:00
Oliver
a9d18ba28f
Improved implementation of panel collapse (#5708)
* Improved implementation of panel collapse

* Slight tweaks
2023-10-16 20:34:21 +11:00
Oliver
fa39ce8524
Fix API URLs for related fields (#5707) 2023-10-16 20:00:57 +11:00
Oliver
5b57685ae3
Adds toggle for text elements in panel tabs (#5706)
- Placeholder for now, UX could be better
- Just showing functionality for now
2023-10-16 19:44:28 +11:00
Oliver
4de51f4f4f
[React] API Image Functionality (#5696)
* Improvements to API handling on react UI

- Do not force "/api/" prefix to the base URL of the server
- We will need to fetch media files from the server (at /media/)
- Extend API URL helper functions

* Update some more hard-coded URLs

* Fix search API endpoint

* Fix div for panel tab

* Fix debug msg

* Allow CORS request to /media/

* Add ApiImage component

- Used to fetch images from API which require auth
- Requires some tweaks to back-end CORS settings
- Otherwrise, image loading won't work on new API

* Update build order table

* Remove debug code

* Update part detail page
2023-10-16 19:44:09 +11:00
Oliver
65e9ba0633
Platform URL fixes (#5705)
* Fix API endpoints for attachment tables

* Fix API URLs for notifications

* Valid PK required for attachment table
2023-10-16 19:13:40 +11:00
Oliver
59efae0bfc
Sentry: ignore NotAuthenticated errors (#5702)
- Causes a lot of unnecessary error reports
2023-10-16 14:37:13 +11:00
Oliver
01f30222eb
Update docker production guide (#5701)
- Fixes https://github.com/inventree/InvenTree/issues/5655
2023-10-16 12:43:10 +11:00
Oliver
a547d6e064
New Crowdin updates (#5641)
* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations messages.po from Crowdin

* Fix: New translations django.po from Crowdin
2023-10-16 12:06:36 +11:00
Oliver
1fcb259c1a
Improve sentry.io integration (#5700)
- Add "environment" string (required for release tracking)
- Add extra tags
2023-10-16 12:00:53 +11:00
Oliver
4ecd49e3eb
Catch potential exception when performing unit conversion (#5699) 2023-10-16 12:00:44 +11:00
Oliver
598f0a5021
Improved BOM import process (#5698)
- Prevent issues due to query within @atomic block
- Speed up import using bulk_create
2023-10-16 10:53:31 +11:00
Oliver
814322e512
Api tweaks (#5690)
* Improvements to API handling on react UI

- Do not force "/api/" prefix to the base URL of the server
- We will need to fetch media files from the server (at /media/)
- Extend API URL helper functions

* Update some more hard-coded URLs

* Fix search API endpoint

* Fix div for panel tab

* Fix debug msg
2023-10-12 23:25:17 +11:00
Oliver
0c519c6b98
Add new "location_type" column to stock location table (#5688)
Ref: https://github.com/inventree/InvenTree/pull/5588
2023-10-12 01:06:19 +11:00
Oliver
0925fbbad2
[React] Settings state manager (#5687)
* Add interface definition for settings

* Fetch global and user settings as state object

* Cleanup dead code

* Fetch settings when performing token login
2023-10-12 00:36:53 +11:00
Oliver
bf7c1b43bd
[React] Use typed paths (#5686)
* Use typed paths for all tables

* Refactor usage of useInstance hook

* Refactor URLs for existing forms

* More URL fixes

* Further URL fixes
2023-10-12 00:13:37 +11:00
Oliver
149e5c3696
User roles state (#5685)
* Update for useApiState

- Rename to useUserState
- Include role information

* Adds state method for checking user roles
2023-10-11 22:58:42 +11:00
Oliver
89faf8e59d
Update settings API endpoints: (#5684)
* Update settings API endpoints:

- Use cache to prevent unnecessary hits to db
- Make settings detail endpoints case insensitive
- Update API version

* Remove is_admin and is_superuser

- Contaminated from other commit

* revert seralizers.py

* Revert breaking change to users/api.py
2023-10-11 22:58:11 +11:00
Lukas
e8e0b57cea
Feature/location types (#5588)
* Added model changes for StockLocationTypes

* Implement icon for CUI

* Added location type to location table with filters

* Fix ruleset

* Added tests

* Bump api version to v136

* trigger: ci

* Bump api version variable too
2023-10-11 16:34:38 +11:00
Oliver
6f2dca729d
Report orientation (#5678)
* Add helper functions for report generation

* Add new fields to Report model:

- page_size (default = A4)
- landscape (default = False)

* Add migration for InvenTree reports

* Enable landscape printing
2023-10-09 13:25:53 +11:00
Oliver
e9e505edd4
Import export fix (#5677)
* Update django-import-export

* Add custom handler to ensure data import is not too excessive
2023-10-09 11:48:17 +11:00
Matthias Mair
608ca75763
Type model information in SearchDrawer (#5597)
* moved search query to strongly typed model reference

* move title and link to reusable typed section

* typed ApiFormFieldType.model too

* renamed symbol

* switched to lookup
2023-10-08 20:20:32 +11:00
Kenneth Lorthioir
e76fa11e63
Open External Links in new window (#5674)
* Update clip_link.html

* Update item_base.html

* Add new_window to all external links
2023-10-07 15:41:33 +11:00
Joe Rogers
a779aa3a99
Add whitespace to fix markdown table rendering (#5675) 2023-10-07 15:41:10 +11:00
Oliver
7ab5ddcd7d
Plugin auto migrate (#5668)
* Improved handling of race condition when saving setting value

* Improvements for managing pending migrations

- Inform user if there are outstanding migrations
- reload plugin registry (if necessary)

* Increase django-q polling time

According to this thread, should reduce multiple workers taking the same task:

https://github.com/Koed00/django-q/issues/183#issuecomment-239676084

* Revert default behavior

* Better logging

* Remove comment

* Update unit test

* Revert maintenance mode behaviour

* raise ValidationError in settings
2023-10-06 11:38:01 +11:00
Oliver
c7eb90347a
Exchange rate plugin (#5667)
* Add plugin mixin class for supporting exchange rates

* Split some mixin classes out into their own files

- mixins.py is becoming quite bloated!

* Add some new settings for controlling currency updates

* Adds basic plugin implementation

* Refactor existing implementation

- Builtin plugin uses frankfurter.app API
- Better error / edge case handlign

* Add sample plugin for currency exchange

* Allow user to select which plugin to use for plugin updates

* Observe user-configured setting for how often exchange rates are updated

* Updates for some of the sample plugins

* Fix plugin slug

* Add doc page

* Document simple example

* Improve sample

* Add blank page for currency settings info

* More info in "config" page

* Update docs again

* Updated unit tests

* Fill out default settings values when InvenTree runs

* Add log messages

* Significant improvement in default settings speed

- Use bulk create
- Be efficient
- Dont' be inefficient

* More strict checks

* Refactor default values implementation

- Don't run at startup
- Run on list API
- Implement generic @classmethod
2023-10-05 21:19:28 +11:00
Matthias Mair
f5e8f27fcd
Bump deps (#5666)
* bumped deps

* bumped frontend deps

* fixed reqs file for py 3.9
2023-10-05 09:48:53 +11:00
dependabot[bot]
25babf617c
Bump postcss from 8.4.29 to 8.4.31 in /src/frontend (#5665)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.29 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.29...8.4.31)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-04 23:13:12 +02:00
Lukas
8ec04028d5
Native LDAP support (#5226)
* Added basic ldap support

* Added new settings to config template

* Added missing apk dependency to dockerfile

* update requirements.txt

* Remove requirements and added docs

* Update advanced.md

* Added more ldap options

* allow direct bind
* add ldap debug mode
* add ldap global_options
* add start_tls
* use get_boolean_setting

* Update advanced.md to use a warning box

* fix: style

* Update advanced.md

* Remove ldap install instructions for non docker installs
2023-10-05 07:52:36 +11:00
Oliver
a6dbe185c6
Allow reload of plugin registry when config changes (#5662)
* Allow reload of plugin registry when config changes

- Any global settings which control plugin behaviour trigger reload
- Plugin registry hash includes the value of these settings
- Plugin registry hash is now cached

* typo
2023-10-05 00:38:40 +11:00
Oliver
4b13f3b0de
Fix location priority when receiving items (#5661)
* Fix location priority when receiving items

Fixes POReceiveBarcodeHandler

* Unit test adjustment
2023-10-05 00:31:50 +11:00
Lukas
9b4e1743c7
Feature/Tree picker (#5595)
* Show only the current modal over the backdrop, move others behind

* Added initial draft for tree picker

* Added filters to tree picker

* Added tree picker to more location fields

* Fixed bug with missing input group and filters side effect

* Added tree picker to part category inputs

* Added missing picker for part category parent input

* Fixed disabled items

* Fix js linting errors

* trigger: ci

* Bump api_version.py

* Update api_version.py
2023-10-05 00:11:49 +11:00
Oliver
3d8e3f1625
Bug fix for plugin reload mechanism (#5660)
- Save updated hash after reload
- Use actual *value* of active, not the function object!
2023-10-04 23:05:48 +11:00
Oliver
ffda700244
Improve unit conversion (#5658)
- In previous implementation, could not have a value "10k" for a unit of "m"
- Now, correct result is obtained (10k [m] = 10[km])
- Still passes all previous unit tests
- Simpler code, too
2023-10-04 17:28:20 +11:00
Joe Rogers
c18bc4e1d1
Fix: Allow allocation of variants to sales order lines (#5656)
* Add tests for allocating a variant to a sales order line

* Add check for variants to match template allocation

* Tweak fixtures for inventree-python, improve test checks

* Optimize check for item variants
2023-10-04 10:39:22 +11:00
Oliver
06eb948528
Plugin reload mechanism (#5649)
* Plugin reload mechanism

- Wrap reload_plugins with mutex lock
- Add methods for calculating plugin registry hash

* Perform plugin reload at critical entry points to the registry

- Background worker will correctly reload registry before performing tasks
- Ensures that the background worker plugin regsistry is up  to date
2023-10-04 09:00:11 +11:00
Oliver
78905a45c7
Plugin missing fix (#5653)
* Add 'is_installed' property to PluginConfig model

- Allow us to show users which plugins are "outdated"

* Cleanup plugin table

- Display clearly if a plugin is no longer installed

* Fixes for plugin table

* Revert change due to failing CI
2023-10-03 19:44:10 +11:00
Oliver
88314da7b3
Fix for plugin installation via web interface (#5646)
* Fix for plugin installation via web interface

- Previous implementation did not correctly catch error output
- Refactored into new file plugin.installer.py
- Provides better "output" when plugin does install correctly

* Remove unnecessary debug output

* Update unit test

* Remove placeholder code
2023-10-03 18:47:55 +11:00
Oliver
6521ce5216
Prevent plugin URL routing if ENABLE_PLUGINS_URL setting is disabled (#5648)
* Prevent plugin URL routing if ENABLE_PLUGINS_URL setting is disabled

* Fix for unit test

* Improve unit testing
2023-10-03 12:58:39 +11:00
Matthias Mair
30cf97d85b
Exchange rate emergency fix (#5632)
* fixed LOG style errors

* Disabled exchange rate checks
See https://github.com/inventree/InvenTree/issues/5631

* Implement frakfurter.app as new exchange host
Closes #5631

* Revert "Disabled exchange rate checks"

This reverts commit 8ed7fbcba5.

* Revert "fixed LOG style errors"

This reverts commit 578da01a67.

* switched to requests

* Revert "Revert "fixed LOG style errors""

This reverts commit 78e5eb0e69.

* Revert "Revert "Revert "fixed LOG style errors"""

This reverts commit d21838959f.

* Revert "Revert "Revert "Revert "fixed LOG style errors""""

This reverts commit 3881923c0b.

* re-enable checks

* extended debug message

* add base cur

* reverted name change
2023-10-03 12:12:33 +11:00
Oliver
352fb4f6ff
Allow plugin list to be filtered by "sample" or "builtin" status (#5647) 2023-10-03 10:39:24 +11:00
Oliver Lippert
6a48eaeec8
Don't ignore parts without stock in stocktake (#5627)
* don't ignore parts without stock in stocktake

#5621

* after including 0 stock parts, expect 14 parts to be in stocktake

---------

Co-authored-by: Oliver Lippert <oliver@lipperts-web.de>
2023-10-02 18:24:41 +11:00