Commit Graph

4795 Commits

Author SHA1 Message Date
Oliver fcd38c16d8 Add workflow to ensure that the python bindings build whenever there's a push to master 2021-06-22 20:26:55 +10:00
Oliver 1456868d03 Add default values for line item serializers
- Once https://github.com/inventree/InvenTree/issues/1687 is fixed, remove default values
2021-06-22 17:03:21 +10:00
Oliver 4fe6562d29 PEP fixes 2021-06-22 16:43:49 +10:00
Oliver 26dd9c10a4 Fixes for SalesOrder API 2021-06-22 16:43:38 +10:00
Oliver 3fa3ce06a1 Fixes for PurchaseOrder API interface
- Allow DELETE endpoint for PurchaseOrder
- Remove 'read_only' attribute for 'reference' field
- Add extra functionality to API test class
- Add unit testing
2021-06-22 16:28:42 +10:00
Oliver 061a120af2
Merge pull request #1705 from SchrodingersGat/part-validation
API Validation fixes
2021-06-22 13:39:05 +10:00
Oliver 979ef674d6 Update data for unit test fixtures 2021-06-22 13:24:03 +10:00
Oliver eae9ff7d1d More unit test fixes 2021-06-22 11:54:18 +10:00
Oliver 650d31ae32 Remove debug statements 2021-06-22 10:43:00 +10:00
Oliver 6d2cd78d29 Fixes for unit tests 2021-06-22 10:36:04 +10:00
Oliver 6886570d0f Bug fix for build order allocation sorting 2021-06-22 10:30:15 +10:00
Oliver 9475af62ae Style fixes 2021-06-22 10:12:44 +10:00
Oliver c62ba5eb12 Perform a "full_clean" on serialized model
- DRF does not by deault run validate_unique on the model
- Need to check if we are "creating" or "updating" a model
- Catch and re-throw errors in the correct format
- Unit tests
2021-06-22 10:09:19 +10:00
Oliver c3fc04e872 Unit testing for part duplication 2021-06-22 09:35:34 +10:00
Oliver a38835022a Better management of unique constraint for Part 2021-06-22 09:33:07 +10:00
Oliver 40fcfe1f47 Reduce noise in logs 2021-06-22 09:32:36 +10:00
Matthias b503c62464 Merge branch 'master' of https://github.com/inventree/InvenTree into order-modal-show-price 2021-06-22 00:27:56 +02:00
Matthias c8defae575 fixing allocation sorting 2021-06-22 00:03:54 +02:00
Matthias 8b515571ca I think a fix for #1663
Closes #1663
2021-06-21 23:33:27 +02:00
Adam Walsh d1a2ed9af1
Fix supplier part view/edit without a manufacturer
Fixes the following issues when a supplier part was created with an MPN but no manufacturer was assigned:
- Viewing a supplier part stock item
- Editing a supplier part stock item
2021-06-21 11:20:43 -04:00
Oliver 8fd41f5ecf Unit testing for default values 2021-06-21 21:46:22 +10:00
Oliver f90730d866
Merge pull request #1699 from SchrodingersGat/purchase-price-migration
Data migration to copy missing purchase price information to stock items
2021-06-21 20:57:23 +10:00
Oliver 02540edd58 Copy purchase price information across in the data migration 2021-06-21 20:30:15 +10:00
Oliver ff33cc43bd Create initial migration file 2021-06-21 17:28:41 +10:00
Oliver 044650ca10
Merge pull request #1698 from SchrodingersGat/po-stock-pricing
Displays "purchase order" column in StockItem table
2021-06-21 17:19:38 +10:00
Oliver 6d29418364 Prevent "rebuild" command from running certain things 2021-06-21 17:03:00 +10:00
Oliver e6598b5115 Displays "purchase order" column in StockItem table 2021-06-21 16:58:39 +10:00
Oliver 5e5fc35655
Merge pull request #1688 from SchrodingersGat/supplier-part-parameters
Adds "parameters" for manufacturer parts
2021-06-21 16:39:15 +10:00
Oliver e0e560352e Add forms / views for ManufacturerPartParameter CRUD 2021-06-21 16:14:58 +10:00
Oliver 04b216253d Ok, that was a bad idea. 2021-06-21 11:30:20 +10:00
Oliver 908039e1db Perform unique checks for InvenTreeModelSerializer in DRF
- Prevents ValidationError from throwing in the wrong spot and not being handled
2021-06-21 11:10:29 +10:00
Oliver 213e4dccc5 Add model to permission set 2021-06-21 08:35:54 +10:00
Oliver 637033cf7d
Merge pull request #1692 from matmair/part-table-cat-sort
Support sorting by category in part-table
2021-06-21 08:33:09 +10:00
Oliver b7a5a7f524
Merge pull request #1691 from matmair/purchase-price-zero
Purchase price zero
2021-06-21 08:26:42 +10:00
Matthias 80e47b6f76 addd in sorting for category
fixes #1689
2021-06-20 22:49:06 +02:00
Matthias a0b83d530c refactor 2021-06-20 20:19:11 +02:00
Matthias 59aae51652 show stock history starting by 1 element 2021-06-20 20:17:01 +02:00
Matthias b32a6b50d2 fixes #1671 2021-06-20 20:16:14 +02:00
Matthias 4d0ce643a1 fix for timezone warning on heartbeat 2021-06-20 19:53:17 +02:00
Matthias a3517b9313 fixes: response data stays persistent throughout views 2021-06-20 18:52:55 +02:00
Oliver 8a8b310195 Add some more inlines in the admin interface 2021-06-21 00:46:15 +10:00
Oliver 70b6a3c13f Display table of parameters 2021-06-21 00:39:18 +10:00
Oliver a00441a1c0 Adds API endpoints for ManufacturerPartParameter mdoel 2021-06-21 00:28:28 +10:00
Oliver bea7ab7175 Add python version information to the "about" window 2021-06-21 00:25:27 +10:00
Oliver 0013eb4c23 Adds inline for SupplierPart 2021-06-21 00:03:16 +10:00
Oliver 8188ba86a7 Adds tabular inline class for ManufacturerPartParameter
- Super cool!
2021-06-21 00:00:55 +10:00
Oliver 3fcb552759 Register admin class for ManufacturerPartParameter 2021-06-20 23:54:03 +10:00
Oliver 310f369394 Adds admin interface for ManufacturerPart 2021-06-20 23:49:44 +10:00
Matthias b4412ef575 also show prices of the value 0 2021-06-20 13:32:52 +02:00
Oliver 2473318828 Add ManufacturerPartParameter model 2021-06-20 17:50:07 +10:00
Oliver 847d946fa4 Bug fixes 2021-06-20 17:39:00 +10:00
Matthias 452d2004ce added handling for no supplier price 2021-06-19 23:46:31 +02:00
Matthias 7d5aa8189d Merge branch 'master' of https://github.com/inventree/InvenTree into part-import 2021-06-18 23:30:54 +02:00
Matthias b86793703e Merge branch 'part-import' of https://github.com/matmair/InvenTree into part-import 2021-06-18 23:14:48 +02:00
Matthias 59e6cc1a10 Merge branch 'master' of https://github.com/inventree/InvenTree into part-import 2021-06-18 23:10:59 +02:00
Matthias 15804f873b Merge branch 'master' of https://github.com/inventree/InvenTree into order-modal-show-price 2021-06-18 16:46:11 +02:00
Oliver 9a4ccedf5c Adds a management command to rebuild MPTT models
- Important to do after importing records / fixtures!
- Otherwise very strange things might happen especially when you try to use the API...
2021-06-18 21:53:15 +10:00
Oliver e68a4abdf2 Error: wrong error 2021-06-18 19:51:54 +10:00
Oliver 3fb57abe66 Error catching 2021-06-18 19:39:06 +10:00
Oliver 34c34487b5 PEP style fix 2021-06-18 19:21:46 +10:00
Oliver 778aa0314d Load and display build order allocation items via AJAX 2021-06-18 19:18:35 +10:00
Oliver 245c9bfd28 Enhancement for the BuildItem API / serializer
- Add optional "part_detail" information
- Add optional "build_detail" information
- Add optional "location_detail" information
2021-06-18 19:08:54 +10:00
Matthias Mair 8d317581dd
Merge branch 'master' into order-modal-show-price 2021-06-18 09:41:10 +02:00
Oliver 10ecddf9b4 Fixes after rebase 2021-06-18 17:25:24 +10:00
Oliver Walters 0b8a50cd92 Add 'location_detail' filter 2021-06-18 16:51:34 +10:00
Oliver Walters caf52c6ce5 Add optional detail elements to SOAllocation API 2021-06-18 16:49:56 +10:00
Oliver Walters ad8dbb5900 Add API LIST endpoint for SalesOrderAllocations 2021-06-18 16:48:32 +10:00
Oliver 43478a0be7
Merge pull request #1634 from matmair/internal-price
Internal price
2021-06-18 10:36:29 +10:00
Oliver bb910a09fb
Merge pull request #1679 from matmair/fix-for-1678
fix for part with no bom-price
2021-06-18 10:35:59 +10:00
Oliver b6e3df4e6b
Merge pull request #1680 from matmair/modal-options
more modal options
2021-06-18 10:30:18 +10:00
Matthias 2cbdeae914 style-fix 2021-06-18 00:18:45 +02:00
Matthias 865a2b4af8 Merge branch 'modal-options' of https://github.com/matmair/InvenTree into order-modal-show-price 2021-06-17 23:44:45 +02:00
Matthias f0dd543ffa render price in oer-modal if enabled in settings 2021-06-17 23:44:22 +02:00
Matthias a3a623a5ca update-button for modal, repeat 1st step on use 2021-06-17 23:24:32 +02:00
Matthias 2d8b96a6b8 setting to control visibility of price 2021-06-17 23:15:42 +02:00
Matthias 4c7508cd6b tag to call a method with (multiple)args 2021-06-17 23:11:31 +02:00
Matthias 58b6bbb236 tag to read out dict value 2021-06-17 23:09:50 +02:00
Matthias c74ee4e925 doc for option.buttons 2021-06-17 19:24:08 +02:00
Matthias 96c29847e1 add custom buttons with response 2021-06-17 19:23:30 +02:00
Matthias 3d17388b48 set modal title with response 2021-06-17 19:22:00 +02:00
Matthias ebe2ae77a5 hide error message with response 2021-06-17 19:18:34 +02:00
Matthias 789865b996 style-fix 2021-06-17 18:25:05 +02:00
Matthias 997d68694e fix for part with no bom-price #1678 2021-06-17 18:21:11 +02:00
Matthias 6e77029d7d Revert "fix for part with no bom"
This reverts commit dd58f89977.
2021-06-17 18:12:41 +02:00
Matthias Mair 44464de2b6
Merge branch 'inventree:master' into internal-price 2021-06-17 16:42:57 +02:00
Matthias Mair e77e89b16c
Merge branch 'inventree:master' into part-import 2021-06-17 16:42:49 +02:00
Matthias dd58f89977 fix for part with no bom 2021-06-17 14:51:41 +02:00
Oliver bc46cca9f0
Merge pull request #1677 from SchrodingersGat/new-typo-fix
Typo fix for excluded commands
2021-06-17 22:37:45 +10:00
Oliver 8766c80233
Merge pull request #1645 from matmair/pricing-reformat
Pricing reformat
2021-06-17 22:36:07 +10:00
Oliver Walters f6241031f6 Typo fix for excluded commands
(cherry picked from commit cf7087747b)
2021-06-17 22:21:26 +10:00
Oliver 93e83d0bf9
Merge pull request #1587 from nwns/feature/see_default_location
feat(purchase orders): show the preferred location for each PO Line
2021-06-17 17:01:05 +10:00
Oliver b2975596dc
L10 (#1668)
* updated translation base

* 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

* 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

* updated translation base

* updated translation base

* updated translation base

* updated translation base

* 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

* updated translation base

* 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

* updated translation base

* 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

* 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

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-17 09:11:04 +10:00
Matthias af2cfe55be missed a translation there 2021-06-17 00:51:53 +02:00
Matthias ddd84dcd7c Merge branch 'master' of https://github.com/inventree/InvenTree into so-total 2021-06-17 00:50:39 +02:00
Matthias bbe7edbf82 totals like in #1666 2021-06-17 00:50:10 +02:00
Matthias 5d3360e63b added quantity total 2021-06-17 00:23:08 +02:00
Matthias dac112d908 added footer total for price 2021-06-17 00:22:32 +02:00
Matthias 2fc185bd71 show footer 2021-06-16 23:57:33 +02:00
Matthias 70e0933336 total price column as per #1660 2021-06-16 23:52:00 +02:00
Oliver 9386332de1
Update version.py 2021-06-16 23:54:42 +10:00
Oliver 731ea0238e
Update version.py
Bump version number
2021-06-16 23:53:58 +10:00
Oliver Walters 513449e13c Whoops, missed one 2021-06-16 23:03:38 +10:00
Oliver Walters 725d26d76f Fix default paths in InvenTree settings 2021-06-16 23:03:09 +10:00
Oliver Walters acd7322ff0 Files under /media require session to be authenticated
References:

- https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/apache-auth/
- https://stackoverflow.com/questions/46421589/nginx-location-and-django-auth
- https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication/
- https://pawamoy.github.io/posts/django-auth-server-for-shiny/
2021-06-16 21:30:25 +10:00
Oliver Walters 0821ead024 Only provide static redirects if in DEBUG mode 2021-06-15 23:51:37 +10:00
eeintech 08fbdf660b Fix for #1661 2021-06-14 14:19:10 -04:00
Matthias 447a7dd4e4 style fix 2021-06-13 15:04:57 +02:00
Matthias 3f04a57452 added test for internal prices 2021-06-13 15:01:03 +02:00
Matthias 3fb95bea7e added test for sell price breaks 2021-06-13 13:31:31 +02:00
Matthias c0e50128dd display latest serial on all part-views #1648 2021-06-11 23:43:23 +02:00
Nigel f8e4a5ac2e
test: improve coverage of new get_destination 2021-06-09 11:04:42 -06:00
Nigel cd07ea835d
feat(purchase orders): show the preferred location for each PO Line
Adds the ability for the Purchaser to specify where the item is
intentended to go when received.  If the Purchaser does not set a
preferred location, then the default location for the part is displayed.
If the item is received them where it was actually placed is shown.

NOTE: if an item is split when received only one of the resulting
StockItem location is used.

Fixes #1467
Addresses some of the requests in #551
2021-06-09 09:06:03 -06:00
Oliver 0c14457598 Fix typo in getStockItemThumbnail 2021-06-09 11:16:37 +10:00
Oliver 9fd212d1b2 BuildItemSerializer: Handle errors when thumbnail is not found 2021-06-09 09:41:27 +10:00
Oliver 3aadf94a9c Stock Test: Fix display of stock test table
- Incorrect parent node was set
2021-06-08 16:15:40 +10:00
Matthias 74c4c559e4 clearer wording for internal price settings 2021-06-07 05:33:20 +02:00
Matthias 4f3bfe569a added in internal prices in price calculations 2021-06-07 05:25:13 +02:00
Matthias 0e8a97acb0 added permissions 2021-06-07 05:23:13 +02:00
Matthias 37c0025399 settings for internal prices added 2021-06-07 04:58:37 +02:00
Matthias 62638f76ed fixing wrong page title 2021-06-07 04:00:12 +02:00
Matthias 6ae9fa716c added internal price to part_pricing 2021-06-07 00:19:37 +02:00
Matthias 27282c8049 Merge branch 'master' of https://github.com/inventree/InvenTree into internal-price 2021-06-06 18:15:41 +02:00
Matthias 413fa2e842 merging in sidebar icon changes fr upstream 2021-06-06 17:50:13 +02:00
Matthias 5a869d247f Merge branch 'master' of https://github.com/inventree/InvenTree into part-import 2021-06-06 17:46:33 +02:00
Matthias d70b4bcabb refactor 2021-06-06 17:44:02 +02:00
Matthias 4f7edac213 back button 2021-06-06 17:43:16 +02:00
Matthias a535f8df42 hide scrollbar if not needed 2021-06-06 16:40:51 +02:00
Matthias a2a2c61e31 refactor and fix rendering on error 2021-06-06 16:36:01 +02:00
Matthias 7439f72ab1 hide error messagre on error 2021-06-06 16:33:19 +02:00
Matthias 5e6919f14e hide error message 2021-06-06 16:32:46 +02:00
Matthias ded68bb4f6 change titel with modal submit 2021-06-06 16:09:51 +02:00
Matthias 35451248c2 reseting modal on open 2021-06-06 15:25:56 +02:00
Matthias fcf360f2a3 clearer information text? as in #1577 2021-06-06 14:33:26 +02:00
Oliver 5377d860f4 Merge remote-tracking branch 'inventree/master' into l10-merge
# Conflicts:
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/en/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
#	InvenTree/locale/fr/LC_MESSAGES/django.po
#	InvenTree/locale/it/LC_MESSAGES/django.po
#	InvenTree/locale/ja/LC_MESSAGES/django.po
#	InvenTree/locale/pl/LC_MESSAGES/django.po
#	InvenTree/locale/ru/LC_MESSAGES/django.po
#	InvenTree/locale/tr/LC_MESSAGES/django.po
#	InvenTree/locale/zh/LC_MESSAGES/django.po
2021-06-06 22:27:27 +10:00
Matthias 36ff21f11e hide supply part price on start 2021-06-06 14:21:08 +02:00
Matthias ced7768030 calculate button added 2021-06-06 14:20:30 +02:00
Oliver 573f601752
Merge pull request #1632 from matmair/nav-style
same nav sidebar distance for everything
2021-06-06 22:14:20 +10:00
Matthias 06d3489ede fix: added ruleset 2021-06-05 18:06:26 +02:00
Matthias 81f00753c6 style 2021-06-05 17:24:04 +02:00
Matthias 0bac7ebf3e styling 2021-06-05 17:18:46 +02:00
Matthias 768080f9a0 Adding internal functions to use internal prices 2021-06-05 17:06:58 +02:00
Matthias 0d93c96f2a adding internal price breaks as in #1606 2021-06-05 17:01:49 +02:00
Matthias 05d79a4c19 same nav sidebar distance for everything 2021-06-05 15:18:08 +02:00
Matthias 44717b646f using new tag for currency 2021-06-05 15:07:42 +02:00
Matthias 0eff7d000a added tag to replace dynamic setting 2021-06-05 15:05:05 +02:00
Matthias 691142ea4c fixing currency display 2021-06-05 13:27:39 +02:00
Matthias d87592aedb use the default currency in forms 2021-06-05 13:22:11 +02:00
Matthias daf3d06cf0 added in optional matches 2021-06-05 01:19:12 +02:00
eeintech 74bd975a0b Revert back to form_list
Moved OrderMatchItemForm to forms.py
2021-06-04 13:41:07 -04:00
Oliver 3e9adec4ff Fix: New translations django.po from Crowdin 2021-06-04 03:03:42 +10:00