* Added more languages
* Added translation stumps for PUI
* Exclude PUI translations from deepsource analysis
* Added comments to deepsource exlusions
* Modified language selection to use language names
* Refactored language mappings to be more efficient
following advice of @wolflu05
* Removed pseudo language from selection
* Translation cleanup
* Switched t/Trans useage
* switched back due to rendering limitations
* Revert "Merge branch 'master' of https://github.com/inventree/InvenTree into matmair/issue5729"
This reverts commit 9b6e8fff88, reversing
changes made to 481cd70aca.
* Revert "Revert "Merge branch 'master' of https://github.com/inventree/InvenTree into matmair/issue5729""
This reverts commit 143a531c1e.
* add translations back in
* add translations back in
* update translation postitions
* move language initialisation after loading
this means only en-gb for now
* update positions
* updated translation base
* 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 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 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 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 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 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 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 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 messages.po from Crowdin
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* added deepsource coverage settings
* Ignore missing coverage
* trigger full CI run
* typo
* Added general status lookup endpoint
* Bumped API version
* cleaned up branch
* Fixed PlaygroundArea accordion behaviour
* Added dummy area for status labels
* Added StatusRenderer skeleton
* Fetch data from server
* Made server api state session persistant
* cleanup
* Added StatusLabel lookups based on ModelType
* Made use of translated status fields
* Added new ModelTypes
* Used new StatusRenderer
* Simplified renderer
* style fixes
* revert style change
* Squashed commit of the following:
commit 5e8ea099068475fd257d8c172348dc6f3edf9bcf
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 09:22:38 2023 +0200
Update ui_plattform.spec.ts
commit 49da3312beff7fd6837ea741e621df221c445d19
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 07:56:25 2023 +0200
more logging
commit 5337be4c3990051b805a6fce2e79ca4030b4afe5
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 07:56:11 2023 +0200
added filter method for undefined settings that overwrite defaults
commit 5df8a0b3e77cd5dcf04c39ad7638ac845df75e4c
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 03:05:06 2023 +0200
you do not need to string a string
commit 0650d3b3a0132889c2a76de38db38224e974d205
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 03:04:34 2023 +0200
fix things that were borken for no good reason
commit a40dbfd1364cf01465037350184f59d2a2a8afab
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 02:39:34 2023 +0200
reduce unneeded blocking timeouts
commit bf9046a5361ae919e70662e717d6156434b6fe43
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 02:34:10 2023 +0200
catch server fetching errors
commit aa01e67e8c8e789fdf755ac4481e730fe5ea4183
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 02:33:29 2023 +0200
move init as things are now plugged together different
commit 290c33bd3125d50779497d6fc5981d5813b58f5d
Author: Matthias Mair <code@mjmair.com>
Date: Tue Oct 24 01:49:32 2023 +0200
do not log a failed automatic login try - why would you?
* Update ApiToken model
- Add metadata
- Remove unique_together requirement
- Add last_seen field
* Update admin page for token
* Store metadata against token on creation
* Track last-seen date
* Allow match against existing valid token
- If token is expired or revoked, create a new one
- Prevents duplication of tokens
* Update unit tests
* Fix default server
* Improve functionality for extracting frontend settings
* Update default server list
* Use f-strings
* Revert logger name
* Remove mark_safe warning
* Add "responsible_owner" field to part model
- Will replace "responsible" field
* Data migration
- Adds 'responsible_owner' value for parts which have 'responsible' set
- Selects correct content type
- Performs reverse migratoin
* Update part serializer
- Point to the new field
- Rename to preserve compatibility
- OPTIONS metadata will take care of the rest
* Remove old 'responsible' field
* Bump API version
* Fix typo
* Fix serializer field
* Update ApiToken model
- Add metadata
- Remove unique_together requirement
- Add last_seen field
* Update admin page for token
* Store metadata against token on creation
* Track last-seen date
* Allow match against existing valid token
- If token is expired or revoked, create a new one
- Prevents duplication of tokens
* Update unit tests
* Create new APIToken model
- Has custom 'name' field
- Has custom expiry date
* Add data migration to port across any existing user tokens
* Adds 'revoked' field - tokens can be manually revoked
* Update API token - allow multiple tokens per user
* Custom token auth handler
- Correctly handles revoked tokens
- Correctly handles expired tokens
* Update AuthRequiredMiddleware
- Check for token active status
* Token API endpoint improvements
- Can return tokens with custom names
- Return more information on the token too
* Consolidate migrations
* When requesting a token, overwrite inactive token for authenticated user
- An authenticated user must receive a token
- Unauthenticated users cannot do this
* Fix
* Use token name for frontend
* Force token expiry, and generate default expiry date
* Force generation of a new token when requested
* Reduce data exposed on token API endpoint
* Display redacted token in admin site
* Log when new token is created for user
* Add default value for token
- Allows raw token to be viewed in the admin interface when created
- After created, no longer visible
- Also provides ability to generate token with static prefix
* Fixes for admin interface
- Prevent user and expiry from being edited after creation
* Implement unit tests for token functionality
* Fix content exclude for import/export
* Fix typo
* Further tweaks
- Prevent editing of "name" field after creation
- Add isoformat date suffix to token
* Longer token requires longer database field!
* Fix other API tokens
* Remove 'delete' method from token API endpoint
* Bump API version
* updated translation base
* 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 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
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add CompanyDetail page
* Add "edit company" button (and associated form)
* Implement dropdown actions for company page
* Update actions for PartDetail
* Adds overlay while modal is loading
- Lets the user know that something is at least happening in the background
* Update panels
* Implement separate pages for different company types
- Mostly for better breadcrumbs
* Placeholder actions for build detail
* Add stock table to company page
* typescript linting
* Fix unused variables
* remove dodgy improt
* Add support for scanning digikey and mouser barcodes
* added small fixes if no part is found
* made small style cleanups
* Separate out ecia 2d barcode parser, Add quantity, PO number to response
* Use model instead of name for mouser supplier, add auto detection magic
* Add lcsc barcode support
* Move barcode plugins to new suppliers subdirectory
* Add get_supplier_part helper, Refactor plugins in preparation for #3791
* Add __init__.py to suppliers directory
* Improve formatting
* Add barcode integration tests
* Add api-barcode-po-receive endpoint
* Refactor supplier_barcode.py helpers into BarcodeMixin
* Implement the api-barcode-po-receive endpoint for all suppliers
* Always include lineitem in api response
* Fix location in response, only include quantity and location if set
* Check if barcode has already been assigned, Fix tests
* FIx quantity and location not being in lineitem reponse
* Use part.get_default_location() instead of part.default_location
* Fix fomatting again
* Fix type annotations for python 3.8
* Add get_supplier_part helper, check for barcode_data being a str
* Fix naming clash
* Clarify return type for scan_receive_item
* Improve model access using first() in two places
* Refactor a bunch of checks
* Improve selection of line item, if multiple line items match the SKU
* Add new api version for this PR
* Fix error if no line item exists
* Add debug print to investigate why tests are failing
* Remove the test print again
* Fix pre formatted log messages
* Test removing all plugins
* Test only with digikey plugin
* Test with all plugins, but without mouser "model" setting
* Test again without tests
* Test with simple tests
* Test with simple receive test
* Test with even more receive tests
* Test second receive test
* Test third receive test
* Test 4th receive test with debug prints
* Try deleting the stock item and stock locations
* Disable the test again
* Add SupplierBarcodeMixin to minimize shared code between plugins
* Add TME supplier barcode plugin
* Remove the TME tests again
* If this works the tests are broken, if this doesn't work the tests are broken too
* Add TME tests again
* Add back all tests again
* Fix TME purchase order number
* Fix TME qrcode regex
* Add documentation for this feature
* Fix TME qrcode regex
* Use Decimal instead of int for quantity
* Refactor get_supplier_parts, Add get_supplier method
* Improve docstrings
* Fix None type access
* FIx TME barcode detection, Improve supplier barcode handling
* Try to retrigger pipeline
* Refactor get_supplier_parts to not use lists
* Add DEFAULT_SUPPLIER_NAME to mouser plugin
* Add SUPPLIER_ID setting to other suppliers
* Fix supplier plugins not inheriting from settings mixin
---------
Co-authored-by: Matthias Mair <code@mjmair.com>
* Logout user if user query fails
* login / logout improvements
- Add timeout to request (otherwise hangs indefinitely)
* Improve "checking login" page
* Update login form
- Disable button if logging in
- Show loader
* Fixed unused vars
* Remove read_only field from API OPTIONS
- 'read_only' is a reserved field for some Mantine components
* Fixing further errors for related field model
* Handle bad values for numericalValue
* Fix for default values for API forms
* Fix for choice field
- Do not set form default value when constructing element
* Tweak for PartDetail page
The use of `else` or `elif` becomes redundant and can be dropped if the last statement under the leading `if` / `elif` block is a `return` statement.
In the case of an `elif` after `return`, it can be written as a separate `if` block.
For `else` blocks after `return`, the statements can be shifted out of `else`. Please refer to the examples below for reference.
Refactoring the code this way can improve code-readability and make it easier to maintain.
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
To check if a variable is equal to one of many values, combine the values into a tuple and check if the variable is contained `in` it instead of checking for equality against each of the values.
This is faster, less verbose, and more readable.
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
There shouldn't be any blank lines after the function docstring.
Remove the blank lines to fix this issue.
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
* Implement simple "PartVariantTable" component
- Not yet nested
- More work needed for table nesting
* Fix issue rendering same image multiple times
- Use useId hook to generate random key
* Update PartParameter list API endpoint
- Allow part_detail extra field
- Add FilterSet class
- Allow filter to include variants
* Update PartParameterTable
- Display part column
- Allow returned parts to include templates of base part
- Hide actions for templated parameters
* Fix some code smells
- Until the new frontend is fully ready to be shipped, adding this option only serves to confuse users (and break the install process potentially)
- Remove this option entirely from the invoke script
- Update documentation accordingly
- Only update or create tasks if necessary
- Perform bulk_create and bulk_update operations
- Reduce to N(1) - independent of how many tasks we add in the future
Ref: https://github.com/inventree/InvenTree/issues/5586
- Reduces number of calls to currency_code_defaults()
- Thus reducing number of database hits
(cherry picked from commit 15ff99a24d2a4dcbe38cf4f2c7b886c8820952e8)