Commit Graph

13530 Commits

Author SHA1 Message Date
Oliver
a816c14b95
Allow build orders to be deleted via the API (#3155) 2022-06-08 07:45:42 +10:00
Oliver
403655e3d2
Adding bulk deletion endpoint for notifications (#3154)
* 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
2022-06-08 07:45:30 +10:00
Oliver
c0148c0a38
Ensure an error gets logged when a delivery method fails (#3144)
* 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
2022-06-07 08:58:00 +10:00
Oliver
5870b21a91
Simplify version_check script (#3152)
* 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
2022-06-07 08:57:51 +10:00
Oliver
6b038d85b6
Notification on new orders (#3145)
* 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>
2022-06-07 08:11:11 +10:00
Oliver
00b75d792e
Adds API mixin for "bulk delete" (#3146)
* 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
2022-06-07 07:25:12 +10:00
Oliver
ea83d4b290
Refactor stock item test result form for API (#3143)
* 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
2022-06-06 21:27:19 +10:00
Matt Brown
121c5d107e
Separate unit cost and purchase price in BOM (#3141)
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.
2022-06-06 21:03:15 +10:00
Oliver
88a0e38b69
Fix "polarity" of modal form submit button (#3142) 2022-06-06 20:43:50 +10:00
Oliver
1e6bdfbcab
Overdue order notification (#3114)
* 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
2022-06-06 19:12:29 +10:00
Matt Brown
7b4d0605b8
Fix has_complete_bom_pricing logic errors (#3140)
* 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.
2022-06-06 18:57:21 +10:00
Oliver
e85d9aca52
L10 crowdin (#3138)
* 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>
2022-06-06 16:43:36 +10:00
Oliver
92aa7adfec
Adds callback for creation of an error log (#3136)
* Adds callback for creation of an error log

* Fix unit tests
2022-06-06 15:21:31 +10:00
Oliver
a066fcc909
Add new global setting to control auto-upload of test reports (#3137)
* 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
2022-06-06 15:20:41 +10:00
Oliver
2b1d8f5b79
Set part category (#3134)
* 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
2022-06-06 13:00:30 +10:00
Oliver
fe8f111a63
Delete part via API (#3135)
* 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
2022-06-06 11:42:22 +10:00
Matthias Mair
f38386b13c
Add more checks to pre-commit (#3132)
* Add bandit to pre-commit checks

* fix catchall exceptions

* remove unused definitons

* remove unuseed ariables

* Add docstring

* fix B006, B008 errors

* fix B007 error

* ignore B009

* Add checks for formatting and naming
2022-06-06 08:56:52 +10:00
Oliver
bbbfd003e0
Convert category parameter forms to use the API (#3130)
* 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
2022-06-06 00:25:08 +10:00
Oliver
80b10c62f3
Fix behaviour of attachment table for purchase orders (#3127)
- Refresh table, rather than reloading page!

(cherry picked from commit 141c2370e3a19526def9bfcd7ccac50e60e1684a)
2022-06-04 09:11:30 +10:00
Oliver
0c8bb7328a
Change view queryset from .all() to .none() (#3125)
- 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...
2022-06-03 20:20:21 +10:00
Oliver
b20fa1df9a
L10 crowdin (#3124)
* 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>
2022-06-03 20:01:38 +10:00
Oliver
2e40f3ccf3
Move PartParameterTemplate model to the API (#3123)
* Adds detail API view for the PartParameterTemplate model

* Use API methods rather than server-side forms

* Remove old views / forms

* Update API version
2022-06-03 17:11:19 +10:00
Oliver
ebca787f71
Remove outdated forms / views for stock item tracking (#3122)
* 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
2022-06-03 12:20:37 +10:00
Oliver
4b3f77763d
Return from customer (#3120)
* 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
2022-06-03 08:36:08 +10:00
Oliver
5fef6563d8
Bug fix for part category view (#3119) 2022-06-03 00:14:36 +10:00
Oliver
e8bf35585a
Ignore auto-creation of shipments under certain conditions (#3118)
- Database is not ready
- Data import is active

Ref: https://github.com/inventree/demo-dataset/pull/23
2022-06-03 00:07:06 +10:00
Oliver
309ed595d7
Queryset annotation refactor (#3117)
* 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
2022-06-02 23:22:47 +10:00
Oliver
2074bf9156
Fix broken delete button (#3116)
* Fix broken delete button

* Fix filtering for purchaseorder table on supplierpart page

(cherry picked from commit 77fb02ff39)
2022-06-02 15:00:09 +10:00
dependabot[bot]
bc8777f93c
Bump pillow from 9.1.0 to 9.1.1 (#3113)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.1.0 to 9.1.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.1.0...9.1.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-02 10:40:43 +10:00
Matthias Mair
0c97a50e47
Docstring checks in QC checks (#3089)
* 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>
2022-06-02 01:37:39 +10:00
Oliver
66a6915213
Adds 'multi delete' for attachment tables (#3111)
* Adds 'multi delete' for attachment tables

- Should roll out seamlessly to any attachment table

* JS linting
2022-06-01 17:23:36 +10:00
Oliver
e174096173
Adds ability to search build API by part parameters (#3110)
* Adds ability to filter build API by part parameters

* Bump API version
2022-06-01 16:52:43 +10:00
Oliver
8c9f676ffb
Fix formatting of 'build-args' parameter for docker build (#3105)
* Fix formatting of 'build-args' parameter for docker build

* Remove quotes
2022-05-31 14:26:35 +10:00
Oliver
a129c650fe
Remove unique-together requirement for BomItem model (#3104)
* Remove unique-together requirement for BomItem model

Ref: https://github.com/inventree/InvenTree/issues/1254

* Update unit test

* Remove unused import
2022-05-31 13:33:23 +10:00
Oliver
02607bd854
Search improvements (#3103)
* Allow part list API to be searched by SKU

* Enable manufacturer parts and supplier parts search preview

* Increment API version

* Remove whitespace

* Remove more whitespace
2022-05-31 11:51:22 +10:00
Oliver
ccefefdc7f
Version checker (#3102)
* Updates for docker version check script:

- Do not run on a push to stable
- Check existing versions via GitHub API
- Add stable docker image tag also

* Fix regex pattern

* Check for null regex result

* Push to stable on tagged release
2022-05-31 09:50:38 +10:00
Oliver
8a2cfa04d1
Adds release.yml file for auto-generating release notes (#3099)
* Adds release.yml file for auto-generating release notes

* Add more tags
2022-05-30 23:57:15 +10:00
Oliver
71ed181611
Change docker user (#3096)
- Running under 'inventree' user means that the mounted volume cannot be accessed
- Will need to return to this issue soon
2022-05-30 08:37:58 +10:00
Oliver
9430d1bbbe
L10 crowdin (#3095)
* 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-29 17:46:29 +10:00
Oliver
2fcf627c88
Update README.md (#3094)
* Update README.md

Fix docker build status badge

* Simplify version check script
2022-05-29 17:41:14 +10:00
Oliver
deacf207ff
Docker Build Fixes (#3093)
* Docker: Require libffi-dev

* set push to true

* debug

* Check GITHUB_BASE_REF also
2022-05-29 13:47:29 +10:00
Oliver
1f6b81745d
Docker: Require libffi-dev (#3092) 2022-05-29 11:07:09 +10:00
Oliver
ea465497c0
Fixes for version check script (#3091)
- GITHUB_BASE_REF not available on a push!
2022-05-29 09:49:32 +10:00
Oliver
b9fd263899
Docker improvements (#3042)
* Simplified dockerfile

- Changed from alpine to python:slim
- Removed some database libs (because we *connect* to a db, not host it)

* - Add gettext as required package
- Only create inventree user as part of production build (leave admin access for dev build)

* Tweaks for tasks.py

* Fix user permissions (drop to inventree user)

* Drop to the 'inventree' user level as part of init.sh

- As we have mounted volumes at 'run time' we need to ensure that the inventree user has correct permissions!
- Ref: https://stackoverflow.com/questions/39397548/how-to-give-non-root-user-in-docker-container-access-to-a-volume-mounted-on-the

* Adjust user setup

- Only drop to non-root user as part of "production" build
- Mounted external volumes make it tricky when in the dev build
- Might want to revisit this later on

* More dockerfile changes

- reduce required system packages
-

* Add new docker github workflow

* Print some more debug

* GITHUB_BASE_REF

* Add gnupg to base requirements

* Improve debug output during testing

* Refactoring updates for label printing API

- Update weasyprint version to 55.0
- Generate labels as pdf files
- Provide filename to label printing plugin
- Additional unit testing
- Improve extraction of some hidden debug data during TESTING
- Fix a spelling mistake (notifaction -> notification)

* Working on github action

* More testing

* Add requirement for pdf2image

* Fix label printing plugin and update unit testing

* Add required packages for CI

* Move docker files to the top level directory

- This allows us to build the production image directly from soure
- Don't need to re-download the source code from github
- Note: The docker install guide will need to be updated!

* Fix for docker ci file

* Print GIT SHA

* Bake git information into the production image

* Add some exta docstrings to dockerfile

* Simplify version check script

* Extract git commit info

* Extract docker tag from check_version.py

* Newline

* More work on the docker workflow

* Dockerfile fixes

- Directory / path issues

* Dockerfile fixes

- Directory / path issues

* Ignore certain steps on a pull request

* Add poppler-utils to CI

* Consolidate version check into existing CI file

* Don't run docker workflow on pull request

* Pass docker image tag through to the build

Also check .j2k files

* Add supervisord.conf example file back in

* Remove --no-cache-dir option from pip install
2022-05-29 09:40:37 +10:00
Matthias Mair
9a2300d920
Add option to also reload plugin mechanisms (#3081) 2022-05-29 08:25:40 +10:00
Matthias Mair
4d8836378b
CI updates (#3087)
* 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

* use relativ action references

* Change step / job docstrings
2022-05-28 10:38:12 +10:00
Oliver
09a4fab0d6
Adds 'quarantine' code for StockItemStatus (#3084)
* Adds 'quarantine' code for StockItemStatus

- Marks item as "unavailable"
- Removes unused code from StockItemStatus class

* Add migration file
2022-05-27 15:12:15 +10:00
Oliver
6c7a80c141
Check user permissions before performing search (#3083)
* Check user permissions before performing search

* JS linting
2022-05-27 13:26:45 +10:00
Oliver
640a5d0f24
Improve error management for order price calculation (#3075)
* Improve error management for order price calculation

- If there are missing exchange rates, it throws an error
- Very much an edge case

* Style fixes

* Add warning message if total order price cannot be calculated

* price -> cost
2022-05-27 13:26:37 +10:00
Matthias Mair
dcffd9a3cf
Add codeowners (#3079)
* Add codeowners

* use direct user handles
2022-05-27 11:04:40 +10:00