Commit Graph
100 Commits
Author SHA1 Message Date
Oliver Walters 7e6d3d81b9 Update dockerfile to 3.14 2022-05-16 21:47:09 +10:00
Oliver Walters 206da02328 Skip some git hash checks if running tests under docker 2022-05-16 00:21:05 +10:00
Oliver Walters 47269a88d2 Ensure unit tests are run within a docker context as part of CI builds 2022-05-15 23:37:01 +10:00
Oliver Walters 55f87033b2 Add unit tests for .webp support 2022-05-15 23:36:41 +10:00
Oliver Walters 495798dc98 Install libwebp-dev as part of dockerfile 2022-05-15 23:20:12 +10:00
OliverandGitHub 9c1e266628 Merge pull request #2985 from matmair/dead-code-owner
remove duplicate code
2022-05-15 21:51:57 +10:00
OliverandGitHub db026c935b Merge pull request #2990 from matmair/matmair/issue2989
Remove static label tests
2022-05-15 21:28:16 +10:00
OliverandGitHub 55dacd891e Merge pull request #2984 from matmair/matmair/issue2980
Unit tests for auth stack
2022-05-15 21:27:43 +10:00
OliverandGitHub c2dd8afea6 Merge pull request #2981 from SchrodingersGat/model-setting-reference
Add settings which reference *model instances* allowing better lookup of models
2022-05-12 17:59:56 +10:00
Oliver c4fa72e54c PEP style fixes 2022-05-12 17:30:52 +10:00
Oliver a81ea01e8e Model introspection
- Find the class registered to the model (or log an error)
- Pass the api_url through to the frontend
2022-05-12 17:28:55 +10:00
Oliver e112d555d4 Simplify the various settings objects, to improve retrieval of 'parameters' from the base class
- Remove the GenericReferencedSettingsClass mixin
- Each subclass defines a very simple get_kwargs() method
- Now, at object level *and* class level we can perform lookup of settings and actually get proper data back
- Adds "model" option to setting (precursor of things to come)
2022-05-12 16:45:27 +10:00
OliverandGitHub a68db90240 Merge pull request #2978 from SchrodingersGat/convert-to-variant-fix
Convert to variant fix
2022-05-12 15:42:22 +10:00
Oliver 59cf9825fe Update comment 2022-05-12 15:16:26 +10:00
Oliver 47ddafb728 Fix edge case when converting stock item to variant
- If the stock item had been created as part of a Build Order, and subsequently "converted" to a variant part, the conversion operation will fail
- Patch allows the build reference to be linked based on either the base part, or any conversion options
2022-05-12 15:15:51 +10:00
OliverandGitHub 56f36d4b4b Merge pull request #2977 from SchrodingersGat/table-downloader
Adding "download" buttons for more tables
2022-05-12 13:27:11 +10:00
Oliver 8edc0cc893 PEP fixes 2022-05-12 12:47:25 +10:00
Oliver a83c3289b7 Merge remote-tracking branch 'inventree/master' into table-downloader 2022-05-12 12:44:26 +10:00
Oliver c89547f58c Adds exporter and download functionality for BuildOrder table 2022-05-12 12:44:15 +10:00
OliverandGitHub e3508f99d9 Merge pull request #2976 from SchrodingersGat/auth-middleware-fix
Do not redirect requests for media / static / api / js files
2022-05-12 12:05:02 +10:00
Oliver d0ddb47b1f Adds exporter and download button for sales orders 2022-05-12 11:44:05 +10:00
Oliver 1b1f7634b7 Adds exporter and download button for PurchaseOrder table 2022-05-12 11:41:25 +10:00
Oliver 465e69c254 Refactor exporters for:
- Part
- PurchaseOrderLineItem
2022-05-12 11:33:17 +10:00
Oliver a77d4b97b4 Refactor stock_list endpoint to use the new mixin 2022-05-12 11:29:33 +10:00
Oliver 650d082eca Bump API version 2022-05-12 11:23:58 +10:00
Oliver 774bfdb9e7 Adds APIDownloadMixin class to implement common behaviour 2022-05-12 11:22:34 +10:00
Oliver 21d2b54afe Fix CI step 2022-05-12 11:00:43 +10:00
Oliver aa9ee15fb4 Fix CI pipeline for python checks
- Recently updated the python binding test framework
2022-05-12 10:52:53 +10:00
Oliver 151f2cae6f Do not redirect requests for media / static / api / js files
- For these paths, just return a 401
- This is necessary to stop unauthorized calls to the API or to request media files from redirecting to the login page
2022-05-12 10:45:30 +10:00
OliverandGitHub 2652c75bda Merge pull request #2972 from SchrodingersGat/user-create-auto-fix
Do not try to create a new admin user if one already exists
2022-05-11 23:29:16 +10:00
OliverandGitHub 362bc55479 Merge pull request #2966 from matmair/add-report-check
Add code128 template
2022-05-11 21:50:08 +10:00
Oliver Walters f00c3639c0 PEP fxi 2022-05-11 21:04:36 +10:00
Oliver Walters e1609c50db Typo fix 2022-05-11 20:57:42 +10:00
Oliver Walters d7eab8e1a3 Improve log output 2022-05-11 20:48:26 +10:00
Oliver Walters 20fa72e36f Do not try to create a new admin user if one already exists with that name 2022-05-11 20:46:44 +10:00
OliverandGitHub f4e3abd44e Merge pull request #2968 from SchrodingersGat/ci-simplification
postgresql and mysql checks only run on push
2022-05-11 14:41:57 +10:00
Oliver a6815c8334 if != on 2022-05-11 14:16:39 +10:00
Oliver 37ce9f351d postgresql and mysql checks only run on push
- sqlite and coverage still runs on pull_request
- should speed up CI checks / reduce redundant CI server load
2022-05-11 14:15:44 +10:00
OliverGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
96ee235563 L10 crowdin (#2967)
* updated translation base

* 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 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 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 django.po from Crowdin

* Fix: New translations django.po from Crowdin

* Fix: New translations django.po from Crowdin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-11 14:08:06 +10:00
OliverandGitHub 6c52d0b8dc Merge pull request #2965 from SchrodingersGat/docker-git
Mark inventree home directory as safe for git.
2022-05-10 23:35:11 +10:00
Oliver Walters bb5d6815df Mark inventree home directory as safe for git.
Ref: https://github.blog/2022-04-12-git-security-vulnerability-announced/
2022-05-10 23:24:32 +10:00
OliverandGitHub 28123ef9bc Merge pull request #2964 from SchrodingersGat/barcode-validation-fix
Fix error response in barcode API
2022-05-10 23:10:29 +10:00
Oliver Walters 9658f47e93 PEP fix 2022-05-10 22:32:44 +10:00
Oliver Walters a6703df3c7 More fixes and unit tests 2022-05-10 22:10:56 +10:00
Oliver Walters 235954af18 Add unit test for invalid item 2022-05-10 22:08:23 +10:00
Oliver Walters 6766343f8f Update API version 2022-05-10 22:05:59 +10:00
Oliver Walters 5a978f07a5 Fix error response in barcode API 2022-05-10 22:05:08 +10:00
OliverandGitHub 0461661139 Merge pull request #2961 from SchrodingersGat/build-test-fix
Order test results by decreasing date for build order
2022-05-10 14:15:45 +10:00
Oliver db018af0ce Prevent some model based events from triggering during data import 2022-05-10 13:43:16 +10:00
Oliver 5af4629163 Order test results by decreasing date for build order
- This means that "newer" results will be found first
- Thus a newer "true" will beat an older "false"
2022-05-10 11:54:51 +10:00
OliverandGitHub 188c55e17f Merge pull request #2959 from matmair/fix-tag
Fix usage of old html tags
2022-05-10 08:14:19 +10:00
OliverandGitHub 583f8faf66 Merge pull request #2956 from SchrodingersGat/settings-api-fix
Fix permissions for global settings API
2022-05-09 22:13:51 +10:00
Oliver Walters 30d799dbc6 Fix permissions for global settings API 2022-05-09 21:43:12 +10:00
OliverandGitHub cfaef06b9c Merge pull request #2955 from liamsegura/patch-2
docs(README.md): linked Twitter and Reddit #2954
2022-05-09 21:30:12 +10:00
OliverandGitHub a590efe0e8 Merge pull request #2951 from SchrodingersGat/barcode-webcam-setting
Adds global setting to enable or disable webcam support for barcodes
2022-05-09 21:29:07 +10:00
Oliver Walters db8396564c Further unit test fixes 2022-05-09 20:47:44 +10:00
OliverandGitHub 6aab365448 Merge pull request #2953 from liamsegura/patch-1
Added link to License.txt
2022-05-09 20:14:59 +10:00
Oliver Walters b0d2ece263 Unit test fixes 2022-05-09 20:11:02 +10:00
Oliver Walters 037e057c53 Adds global setting to enable or disable webcam support for barcode scanning 2022-05-09 19:46:11 +10:00
OliverandGitHub 77eb978c25 Merge pull request #2944 from SchrodingersGat/settings-by-key
Settings by key
2022-05-09 19:38:46 +10:00
OliverandGitHub 931081cb4f Merge pull request #2948 from SchrodingersGat/column-extraction-fix
Check for empty column name in data importer
2022-05-09 08:15:00 +10:00
Oliver Walters b3c1d6b603 Fix plugin registry function so tests pass 2022-05-09 07:59:01 +10:00
Oliver Walters 3db09156ed Check for empty column name in data importer
Ref: https://github.com/inventree/InvenTree/issues/2940
2022-05-09 07:53:10 +10:00
Oliver Walters aed02f6f0f PEP fixes 2022-05-08 22:53:49 +10:00
Oliver Walters e78a5dc104 Keep existing behaviour for notification settings (at least for now) 2022-05-08 22:52:08 +10:00
Oliver Walters 3a9bacb27c Implement new approach for plugin settings
- URL specifies plugin slug and setting key
2022-05-08 22:48:47 +10:00
Oliver Walters f733e23b65 Update serializer for plugin settings API
- Use string key rather than pk for plugin
- Allow filtering by 'enabled' status of the plugin
- Allow filtering by the plugin key
2022-05-08 17:46:19 +10:00
Oliver Walters 5cd2c20a11 PEP style fixes 2022-05-08 17:32:23 +10:00
Oliver Walters 6415a20e6e Update api_version.py 2022-05-08 13:33:28 +10:00
Oliver Walters 9e872d283b Update unit tests to match new format
- Add more unit tests for global settings
- Add more unit tests for user settings
2022-05-08 13:31:53 +10:00
Oliver Walters 5560706c33 User settings are now accessed via unique KEY 2022-05-08 10:58:31 +10:00
Oliver Walters dd017f36c7 Augment existing frontend code to allow adjustment of notification settings 2022-05-08 10:50:57 +10:00
Oliver Walters cd6a6b9196 Access global settings via the API using the <key> of the setting, rather than the <PK>
- Allows us to access settings even if they have not been 'created' yet
- Settings are created with default values if not found
2022-05-08 10:39:14 +10:00
OliverandGitHub 64e2234159 Merge pull request #2937 from SchrodingersGat/panel-plugin
[Feature] UI Plugins
2022-05-08 09:01:43 +10:00
Oliver Walters ada1eeeb35 Remove 'no cover' 2022-05-08 07:53:21 +10:00
Oliver Walters 50d8f242bb Fix for unit test 2022-05-07 23:50:41 +10:00
OliverGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
52bae1feef Translation updates (#2924)
* updated translation base

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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-07 23:25:54 +10:00
Oliver Walters b2689b943e Specific call to super() was actually needed 2022-05-07 23:22:54 +10:00
Oliver Walters e57a3870c6 Fix build index template 2022-05-07 22:47:48 +10:00
Oliver Walters 06e79ee91b Move view mixin to plugin.views 2022-05-07 22:34:03 +10:00
Oliver Walters 9f15dd8e2a Custom panels can now be rendered from a template 2022-05-07 22:32:26 +10:00
Oliver Walters 103921f5c4 Rename plugin.loader to plugin.template
- Add helper function for rendering a template
2022-05-07 19:59:59 +10:00
Oliver Walters 44c4e88646 Add a configurable setting to the demo plugin 2022-05-07 02:17:20 +10:00
Oliver Walters 96f61dfcdb Add plugin description 2022-05-06 23:48:24 +10:00
Oliver Walters bcf6e41b48 Add some example docs 2022-05-06 23:43:54 +10:00
Oliver Walters 5ed0128435 PEP style fixes 2022-05-06 23:34:34 +10:00
Oliver Walters 60f799c90a Add plugin view support for most of the remaining views 2022-05-06 23:32:42 +10:00
Oliver Walters 243e3ff37d Fix calls to super() 2022-05-06 23:32:09 +10:00
Oliver Walters 12c58b14d6 Improvements for panel mixin sample 2022-05-06 23:19:47 +10:00
Oliver Walters 0797e9ebf0 Simplify the new template rendering
- No extra template code is required for any new page
- All loaded in base.html or page_base.html
- Oh, so clean!
2022-05-06 23:19:21 +10:00
Oliver Walters 71128a1c8e Refactor the plugin javascript template
- Can appear in "base.html"
- Only renders anything if there are actually plugins available for the page
2022-05-06 22:57:15 +10:00
Oliver Walters c80b36fc2f Adds a new InvenTreePluginMixin mixin class for enabling custom plugin rendering on a page
- Any view which needs custom plugin code must implement this mixin
- Initially implement for the PartDetail page
2022-05-06 22:52:52 +10:00
Oliver Walters 7b8a10173d Adds a new "Panel" mixin which can render custom panels on given pages
- Adds item to sidebar menu
- Adds panel content
- Runs custom javascript when the page is loaded
2022-05-06 22:49:51 +10:00
Oliver Walters 28e16616e5 Adds a PanelMixin plugin mixin class
Intended to allow rendering of custom panels on pages
2022-05-06 21:32:11 +10:00
Oliver Walters 170cb54490 Sort urls.py 2022-05-06 21:30:27 +10:00
Oliver Walters b80ff5e460 Tweak display of plugin badges 2022-05-06 21:03:30 +10:00
OliverandGitHub 9e1d8e52f3 Merge pull request #2805 from matmair/matmair/issue2385
Plugins for notifications
2022-05-06 20:00:56 +10:00
OliverandGitHub 1b7172b57e Merge pull request #2936 from matmair/test_tags
Test more templatetags
2022-05-06 12:16:14 +10:00
OliverandGitHub eb1aad71ea Merge pull request #2935 from matmair/fix-anon-static
fix error with anon connections and language check
2022-05-06 09:16:57 +10:00
OliverandGitHub 943dc7886e Merge pull request #2932 from matmair/so_fix_clean
Use full names consistently
2022-05-05 23:01:33 +10:00