Commit Graph
100 Commits
Author SHA1 Message Date
Oliver ea3133be1d Combine docker-build and docker-test CI steps
- We are building anyway, may as well test
2022-05-18 15:11:37 +10:00
OliverandGitHub fd2ec03fab Merge pull request #2993 from SchrodingersGat/webp-support
webp image support
2022-05-18 14:43:28 +10:00
Oliver f53c8865ad Only run docker build on push 2022-05-18 14:14:40 +10:00
Oliver 810671f423 Yet another fix 2022-05-18 13:40:57 +10:00
Oliver 0f1dd3fe65 Same fix for config file test 2022-05-18 13:02:23 +10:00
Oliver e57087de63 Fix unit test 2022-05-18 12:19:10 +10:00
Oliver 3b53260d75 Allow some variation in unit test 2022-05-18 11:51:14 +10:00
Oliver 2cfa4c0a16 Merge remote-tracking branch 'matmair/webp-support' into webp-support
# Conflicts:
#	InvenTree/InvenTree/tests.py
2022-05-18 11:13:26 +10:00
OliverGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
db75c31f6d Translation merge (#3022)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-18 08:27:42 +10:00
OliverandGitHub a8eef0870c Merge pull request #3010 from SchrodingersGat/shipment-assign-fix
SalesOrderShipment allocation fix
2022-05-17 20:25:57 +10:00
OliverandGitHub d16a880417 Update README.md
Add link to coveralls badge
2022-05-17 20:19:12 +10:00
Oliver Walters f4b470c396 Merge remote-tracking branch 'inventree/master' into shipment-assign-fix 2022-05-17 18:48:57 +10:00
Oliver Walters dc2351748c Merge remote-tracking branch 'inventree/master' into webp-support 2022-05-17 18:48:19 +10:00
OliverandGitHub b08a98f7a4 Merge pull request #3018 from SchrodingersGat/remove-unicode-literals
Remove more python2 stuff
2022-05-17 17:26:55 +10:00
Oliver 9bcbaaa5f5 Remove more python2 stuff 2022-05-17 16:57:31 +10:00
OliverandGitHub c4dfb03fd2 Merge pull request #3017 from SchrodingersGat/build-output-delete-fix
Bug Fix: Build output delete API endpoint
2022-05-17 16:33:37 +10:00
Oliver e7b458978c More unit tests 2022-05-17 15:10:48 +10:00
Oliver 01a30935f0 Add unit tests for BuildOutputDelete serializer 2022-05-17 14:20:41 +10:00
Oliver 5a0acedce6 Add unit tests for BuildOutputCreate serializer 2022-05-17 13:00:53 +10:00
Oliver 256451d82b Fix context such that build output can be deleted 2022-05-17 11:52:42 +10:00
OliverandGitHub 334025b844 Merge pull request #3014 from matmair/matmair/issue3005
Add more tests for offload_task
2022-05-17 11:11:20 +10:00
Oliver Walters 825c50a438 Change import style 2022-05-17 08:40:43 +10:00
Oliver Walters aa7fcb3601 Remove status_code addition 2022-05-17 08:23:39 +10:00
Oliver Walters 027a7c88de Copy error implementation from django-error-report lib
Ref: https://github.com/mhsiddiqui/django-error-report/blob/master/error_report/middleware.py
2022-05-17 01:17:48 +10:00
OliverandGitHub 1b507d53d0 Merge pull request #3001 from matmair/devops-isort
Add isort
2022-05-17 01:06:48 +10:00
Oliver Walters 048f1ad601 Simplify DRF exception handler
- Check the default handler first
- If *any* other API requets throws an exception, will now pass through the custom handler
2022-05-17 01:03:02 +10:00
Oliver Walters 2509db2b88 JS linting 2022-05-17 00:52:01 +10:00
OliverandGitHub c51f052f25 Merge pull request #3011 from matmair/matmair/issue2996
Remove python 2 code
2022-05-17 00:51:31 +10:00
Oliver Walters 27930cd897 PEP style fixes 2022-05-17 00:41:03 +10:00
Oliver Walters 3373bb19f1 Remove unique_together requirement on SalesOrderAllocation model 2022-05-17 00:36:30 +10:00
Oliver Walters 263ac01727 Typo fix 2022-05-17 00:35:59 +10:00
Oliver Walters 6512c0061e Catch a 500 and make it a 400
While we are at it, convert __all__ to non_field_errors automatically
2022-05-17 00:35:24 +10:00
Oliver Walters ae50546ca6 Display API error information if available 2022-05-17 00:25:32 +10:00
Oliver Walters 1488a0e72f Adds a custom exception handler for DRF
- Handles common exceptions not captured by DRF
- Returns exeption data as a JSON object
2022-05-17 00:18:47 +10:00
OliverandGitHub 86c86bf446 Merge pull request #3006 from SchrodingersGat/bom-delete-fix
BOM delete fix
2022-05-16 23:30:22 +10:00
OliverandGitHub 31667020ae Merge pull request #3004 from SchrodingersGat/events-fix
Add required imports to plugin.events
2022-05-16 23:05:45 +10:00
OliverGitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ea2fb76a29 Translation merge (#3009)
* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-16 23:04:58 +10:00
OliverandGitHub 042cb021de Merge pull request #2957 from SchrodingersGat/locate-mixin
Adds plugin mixin to "locate" items
2022-05-16 22:57:20 +10:00
Oliver Walters 6658b89946 Refactor BOM item deletion
- Send delete requests sequentially, rather than simultaneously
- Prevents server overload
- Present a much cleaner dialog to the user
2022-05-16 22:51:34 +10:00
Oliver Walters 1903ac12cd Allow customization of button class in modal forms 2022-05-16 22:43:29 +10:00
Oliver Walters 7fa83d70ad Fix for broken unit test 2022-05-16 22:14:06 +10:00
Oliver Walters 2ed69f638a Fix error message 2022-05-16 22:08:58 +10:00
Oliver Walters 73413baa59 Add required imports to plugin.events 2022-05-16 22:01:34 +10:00
Oliver Walters 7e6d3d81b9 Update dockerfile to 3.14 2022-05-16 21:47:09 +10:00
Oliver Walters bd17458f37 Add metadata endpoints for SalesOrder and PurchaseOrder models 2022-05-16 21:40:10 +10:00
Oliver Walters 5582c8ba43 Add metadata endpoints for SalesOrder and PurchaseOrder models 2022-05-16 21:29:49 +10:00
Oliver Walters 21ebf562fd Adds metadata fields to PurchaseOrder and SalesOrder models 2022-05-16 21:21:32 +10:00
Oliver Walters a52ba05eb7 Add unit test for PartCategory API endpoints 2022-05-16 21:19:01 +10:00
Oliver Walters 37a74dbfef Adds a metadata serializer class for accessing instance metadata via the API
- Adds endpoint for Part
- Adds endpoint for PartCategory
- Adds endpoint for StockItem
- Adds endpoint for StockLocation
2022-05-16 20:59:09 +10:00
Oliver Walters cd68d5a80e Add metadata mixin to Part and PartCategory models 2022-05-16 19:14:46 +10:00
OliverandGitHub 8052d78311 Merge pull request #3002 from SchrodingersGat/order-form-fix
Fix "fields" attribute for PurchaseOrderLineItem edit form
2022-05-16 09:29:03 +10:00
Oliver 3614e09211 Fix "fields" attribute for PurchaseOrderLineItem edit form
- The 'order' field was not being included
2022-05-16 09:25:20 +10:00
OliverandGitHub 57d481a8b8 Merge pull request #2999 from matmair/fix-todos
Fix Todo texts
2022-05-16 09:16:34 +10:00
OliverandGitHub c3433128b5 Merge pull request #2975 from matmair/fix-boolean
Fix boolean comparator
2022-05-16 07:22:55 +10:00
OliverandGitHub 43669db783 Merge pull request #2998 from matmair/small-python-fixes-plugin
Small code smell fixes for plugin
2022-05-16 07:20:22 +10:00
OliverandGitHub 5bc748316d Merge pull request #2995 from matmair/fix-actions
Small action fixes
2022-05-16 00:52:01 +10:00
Oliver Walters 28b811d961 PEP style fixes 2022-05-16 00:47:00 +10:00
Oliver Walters 097afed78e Adds metadata mixin class for adding JSON field to internal tables
- Add metadata field to stocklocation
- Add metadata field to stockitem
2022-05-16 00:45:16 +10:00
Oliver Walters 818be32e31 Move location plugin sample into its own directory 2022-05-16 00:35:34 +10:00
OliverandGitHub 432fd9b8e6 Merge pull request #2994 from matmair/patch-1
Bump python version
2022-05-16 00:29:45 +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 eebdad154a PEP fixes 2022-05-16 00:12:33 +10:00
Oliver Walters 40513c556d Remove locate button from top-level stock location 2022-05-16 00:10:50 +10:00
Oliver Walters 95dbfa1958 Merge remote-tracking branch 'inventree/master' into locate-mixin
# Conflicts:
#	InvenTree/InvenTree/api.py
#	InvenTree/InvenTree/urls.py
#	InvenTree/plugin/base/integration/mixins.py
#	InvenTree/plugin/mixins/__init__.py
2022-05-16 00:10:38 +10:00
OliverandGitHub a26840d77f Merge pull request #2971 from matmair/plugin-app-refactor
Plugin app refactor
2022-05-15 23:45:42 +10:00
Oliver Walters fa954b3812 Merge remote-tracking branch 'inventree/master' into locate-mixin
# Conflicts:
#	InvenTree/InvenTree/api_version.py
#	InvenTree/InvenTree/urls.py
2022-05-15 23:44:07 +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