* Create custom ModelResource subclass
- Strips illegal starting characters from string cells
- Prevents formula injection
* Update all existing ModelResource classes to base off InvenTreeResource
* Handle more complex case where an illegal char is hidden behind another one
* Adds a Part API filter to limit query to valid conversion options for the specified part
* Refactor 'exclude_tree' filter to use django-filter framework
* Refactor the 'ancestor' filter
* Refactoring more API filtering fields:
- variant_of
- in_bom_for
* Adds API endpoint / view / serializer for converting a StockItem to variant
* stock item conversion now perfomed via the API
* Bump API version
* Add unit tests for new filtering option on the Part list API endpoint
* Adds unit test for "convert" API endpoint functionality
* 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
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Revert "Remove stat context variables"
This reverts commit 0989c308d0.
* Add a caching framework for inventree settings
- Actions that use "settings" require a DB hit every time
- For example the part.full_name() method looks at the PART_NAME_FORMAT setting
- This means 1 DB hit for every part which is serialized!!
* Fixes for DebugToolbar integration
- Requires different INTERNAL_IPS when running behind docker
- Some issues with TEMPLATES framework
* Revert "Revert "Remove stat context variables""
This reverts commit 52e6359265.
* Add unit tests for settings caching
* Update existing unit tests to handle cache framework
* Fix for unit test
* Re-enable cache for default part values
* Clear cache for further unit tests
* Delete category via the API
* Delete StockLocation via the API
* Delete StockItem via the API
- Removes the final instance of AjaxDelete
* Remove URL path
* Add missing code
* Add flag to overwrite existing file when exporting records
* Remove temp. file at end of export process
* Run flake8 on tasks.py as well
* Fix style
* Change style of default text
* Add type bool
* dev-setup
* Revert "dev-setup"
This reverts commit 789356422a.
* Update tasks.py with new flags to allow choosing where permissions end up, and if temporary files are kept or not
* Adds new fields to the SupplierPart model:
- available
- availability_updated
* Allow availability_updated field to be blank
* Revert "Remove stat context variables"
This reverts commit 0989c308d0.
* Increment API version
* Adds availability information to the SupplierPart API serializer
- If the 'available' field is updated, the current date is added to the availability_updated field
* Add 'available' field to SupplierPart table
* More JS refactoring
* Add unit testing for specifying availability via the API
* Display availability data on the SupplierPart detail page
* Add ability to set 'available' quantity from the SupplierPart detail page
* Revert "Revert "Remove stat context variables""
This reverts commit 3f98037f79.
* 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
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Catch DoesNotExist error
* Move notificationtable function to js file
* Fix for custom metadata class
- Previously only worked if a POST or PUT action was available on the endpoint
- So, a ListAPIView endpoint would not actually work!
- Adding in a BulkDelete mixin to a ListAPIView caused failure
* Add unit test to ensure new OPTIONS metadata updates are checked
* Expand functionality of the existing BulkDelete mixin
- Allow deletion by custom filters
- Allow each implementing class to implement custom filters
- Adds more unit testing for BulkDelete mixin class
* Add bulk delete operation for Notification API
- Ensure users can only delete their *own* notifications
* Improve notification tables / buttons / etc
* Adds unit testing for bulk delete of notifications
- Fixed API permissions for notifications list endpoint
* Update BulkDelete operations for the StockItemTestResult table
* Use filters parameter in attachments table to ensure that only correct attachments are deleted
* JS linting
* Fixes for unit tests
* Ensure an error gets logged when a delivery method fails
- Refactor existing code to log a custom error to the database
- Limit error notifications to UI
* Adjust unit test
* Clear existing notifications before run
* Add some debug to work out what is going on
* Accommodate extra notification
* Simplify version_check script
- Allow 'x.x.x' or 'x.x.x dev' on master branch (because we need to be able to tag releases from master)
- Remove duplicate regex checks
- Fix docstrings
* Run version check on all branches
- Will ensure we cannot merge in duplicate tags
* Add requests package
* Add requests package
* Trigger a notification when a new SalesOrder is created
- Notify the "responsible" owners (excluding the creator)
- Add unit test for new notification
* Adds notification when a new PurchaseOrder is created
* Add notification when a new build order is created
- Includes unit tests
* Refactor order notification code
- Adds a "exclude users" option for sending notifications
* Fixes for notification refactoring
* make notification a helper
* reduce statements togehter
* make reuse easier
* Add docs
* Make context variables clearer
* fix assertation
* Fix set notation
Co-authored-by: Matthias <code@mjmair.com>
* Introduces a BulkDelete API mixin class
- Allows deletion of multiple items against a single API request
* Bump API version
* Adds BulkDelete mixin to StockItemTestResult API class
* refactor "multi BOM Item delete" to use new approach
* Refactor various attachment API endpoints
* Refactor multi delete for StockItem
* Convert remaining enndpoints over
* Fix for API test code
* Fix "polarity" of modal form submit button
(cherry picked from commit 0e4550f288)
* Use existing API functionality to delete all test results for a particular StockItem
* Remove outdated forms / views
It's possible for a part to have purchase price information, but not supplier
pricing (aka unit prices), but the current BOM price display logic will only
show the purchase prices when supplier prices are also available.
It seems reasonable to separate these two pieces of information - even when no
supplier pricing is available, seeing the purchase prices for BOM components is
useful on its own.
* Adds a background task to notify users when a PurchaseOrder becomes overdue
* Schedule the overdue purchaseorder check to occur daily
* Allow notifications to be sent to "Owner" instances
- Extract user information from the Owner instance
* add unit test to ensure notifications are sent for overdue purchase orders
* Adds notification for overdue sales orders
* Clean up notification display panel
- Simplify rendering
- Order "newest at top"
- Element alignment tweaks
* style fixes
* More style fixes
* Tweak notification padding
* Fix import order
* Adds task to notify user of overdue build orders
* Adds unit tests for build order notifications
* Refactor subject line for emails:
- Use the configured instance title as a prefix for the subject line
* Add email template for overdue build orders
* Fix unit tests to accommodate new default value
* Logic error fix
* Fix has_complete_bom_pricing logic errors
There are two logic errors in this property method that have been present since
c6fd228.
1) The get_setting method needs to be called on the InventTreeSetting class in
common.models, not on the module itself.
2) You cannot call a property method directly passing an argument in Python, so
the call to has_pricing_info is invalid and always fails. Given that
has_complete_bom_pricing is/was the only user of that property anyway, fix
this by just internalising the logic from that property in the method
directly.
* style nit: use implicit checking for bools
has_complete_bom_pricing is a boolean property, the preferred pythonic style
for if comparisons of this type is not to complete directly to == False, etc
and rely on the implicit truthiness of the type.
* 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
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Add new global setting to control auto-upload of test reports
* Adds callback to attach a copy of the test report when printing
* Fix for all attachment API endpoints
- The AttachmentMixin must come first!
- User was not being set, as the custom 'perform_create' function was never called
* Remove duplicated UserSerializer
* display uploading user in attachment table
* Add unit test to check the test report is automatically uploaded
* Refactor function to enable / disable submit button on modal forms
* Category selection now just uses the AP
* Remove unused forms / views
* JS linting fixes
* remove outdated unit test
* Updates for the PartRelated model
- Deleting a part also deletes the relationships
- Add unique_together requirement
- Bug fixes
- Added unit tests
* Adds JS function to delete a part instance
* Remove legacy delete view
* JS linting
* Moving PartCategoryParameterTemplate model to the API
- Add detail API endpoint
- Add 'create' action to LIST endpoint
* Update settings page to use the new API forms
* Remove old views / forms
* Update API version
* Fix table buttons
* Add title to deletion form
* Add unit tests for new API views
- For some reason, the reverse URL lookups would fail for stock items which were not "in stock"
- e.g. detail pages for stock items would fail to render if the stock item was "destroyed" or "quarantined"
- changing the queryset to .none() fixed this
- I do not know why...
* 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
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Adds detail API view for the PartParameterTemplate model
* Use API methods rather than server-side forms
* Remove old views / forms
* Update API version
* Remove outdated forms / views for stock item tracking
- No longer used anywhere
- Manual stock tracking entries are no longer supported anyway
* Futher cleanup:
- Delete unused template
- Remove URL which pointed to a nonexistent template
- Remove button for manually adding stock tracking entries
* Adds ability to return item into stock via the API
* Remove old server-side form / view for returning stock from a customer
* Add unit tests for new API endpoint
* Refactor out 'ordering' serializer annotation field
* Refactor BomItem serializer annotations
* Factor out MPTT OuterRef query
* Add 'available_stock' annotation to SalesOrderLineItem serializer
- Allows for better rendering of stock availability in sales order table
* Improve 'available quantity' rendering of salesorderlineitem table
* Bump API version
* Add docstring
* Add pre-commit to the stack
* exclude static
* Add locales to excludes
* fix style errors
* rename pipeline steps
* also wait on precommit
* make template matching simpler
* Use the same code for python setup everywhere
* use step and cache for python setup
* move regular settings up into general envs
* just use full update
* Use invoke instead of static references
* make setup actions more similar
* use python3
* refactor names to be similar
* fix runner version
* fix references
* remove incidential change
* use matrix for os
* Github can't do this right now
* ignore docstyle errors
* Add seperate docstring test
* update flake call
* do not fail on docstring
* refactor setup into workflow
* update reference
* switch to action
* resturcture
* add bash statements
* remove os from cache
* update input checks
* make code cleaner
* fix boolean
* no relative paths
* install wheel by python
* switch to install
* revert back to simple wheel
* refactor import export tests
* move setup keys back to not disturbe tests
* remove docstyle till that is fixed
* update references
* continue on error
* add docstring test
* use relativ action references
* Change step / job docstrings
* update to merge
* reformat comments 1
* fix docstrings 2
* fix docstrings 3
* fix docstrings 4
* fix docstrings 5
* fix docstrings 6
* fix docstrings 7
* fix docstrings 8
* fix docstirns 9
* fix docstrings 10
* docstring adjustments
* update the remaining docstrings
* small docstring changes
* fix function name
* update support files for docstrings
* Add missing args to docstrings
* Remove outdated function
* Add docstrings for the 'build' app
* Make API code cleaner
* add more docstrings for plugin app
* Remove dead code for plugin settings
No idea what that was even intended for
* ignore __init__ files for docstrings
* More docstrings
* Update docstrings for the 'part' directory
* Fixes for related_part functionality
* Fix removed stuff from merge 99676ee
* make more consistent
* Show statistics for docstrings
* add more docstrings
* move specific register statements to make them clearer to understant
* More docstrings for common
* and more docstrings
* and more
* simpler call
* docstrings for notifications
* docstrings for common/tests
* Add docs for common/models
* Revert "move specific register statements to make them clearer to understant"
This reverts commit ca96654622.
* use typing here
* Revert "Make API code cleaner"
This reverts commit 24fb68bd3e.
* docstring updates for the 'users' app
* Add generic Meta info to simple Meta classes
* remove unneeded unique_together statements
* More simple metas
* Remove unnecessary format specifier
* Remove extra json format specifiers
* Add docstrings for the 'plugin' app
* Docstrings for the 'label' app
* Add missing docstrings for the 'report' app
* Fix build test regression
* Fix top-level files
* docstrings for InvenTree/InvenTree
* reduce unneeded code
* add docstrings
* and more docstrings
* more docstrings
* more docstrings for stock
* more docstrings
* docstrings for order/views
* Docstrings for various files in the 'order' app
* Docstrings for order/test_api.py
* Docstrings for order/serializers.py
* Docstrings for order/admin.py
* More docstrings for the order app
* Add docstrings for the 'company' app
* Add unit tests for rebuilding the reference fields
* Prune out some more dead code
* remove more dead code
Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>