Commit Graph

518 Commits

Author SHA1 Message Date
Matthias
d05472b30c
upgrade to pyhton 3.9 syntax
using pyupgrade
2022-05-01 21:53:12 +02:00
Oliver
aec10e0cc7 Fix part allocation check 2022-04-28 14:58:05 +10:00
Oliver
3ef0386593 Prevent inactive or trackable parts from being 'auto allocated' 2022-04-26 17:14:47 +10:00
Oliver
99718865c0 Further attempts to fix CI issues 2022-04-22 14:33:46 +10:00
Oliver Walters
5fde9f552c Add similar check for IPN 2022-04-22 01:00:38 +10:00
Oliver Walters
a7c18891b5 Increase unit testing for duplicate IPN testing
- IPN duplication test is case sensitive!
2022-04-22 00:38:08 +10:00
Oliver Walters
9a9ed5f192 Fix validation of duplicate IPN
- Duplicate IPN check does not apply if an empty IPN value is set
- Note that "if x" is a more pythonic test than "if x not in [None, '']"
2022-04-22 00:36:30 +10:00
Oliver
35aa5f25be Allocation quantity functions include variants
- For calculation of total "available_stock", variants are included
- Update the allocation quantity functions to also include variants
- Otherwise, the calculations are "out of sync"
2022-04-14 11:54:30 +10:00
Oliver Walters
be9648cbc7 Remove unused function which shadowed name of query annotation 2022-04-07 19:22:20 +10:00
Oliver Walters
271cb3f8b1 Rebuild tree structure before running unit tests! 2022-04-02 13:26:39 +11:00
Oliver Walters
0ab2ff306c Fix incorrect value for "available stock" 2022-04-02 11:13:43 +11:00
Oliver
4a381c7474 Part allocation query improvements 2022-03-16 23:28:30 +11:00
Oliver
c49cd52df7 style fix 2022-03-16 23:27:39 +11:00
Oliver
529acb3bf6 Fix queries for displaying sales order allocation quantities 2022-03-16 22:57:30 +11:00
Oliver
82840b0590 Adds custom delete routine for PartCategory model 2022-03-10 15:01:20 +11:00
Oliver
434f563a41 Adds API endpoint for "auto allocating" stock items against a build order.
- If stock exists in multiple locations, and the user "does not care" where to take from, simply iterate through and take
2022-03-04 15:26:00 +11:00
Oliver
55d09c4469
Merge pull request #2699 from SchrodingersGat/duplicate-bom-subs
Allow duplication of subtitute parts when copying a BOM
2022-03-02 21:50:18 +11:00
Oliver
5dc543618e Allow duplication of subtitute parts when copying a BOM 2022-03-02 00:31:50 +11:00
Oliver
28a7ad7f0e Bug fix for BuildOrder.bom_items
- Now uses the query generator provided by the Part model
- No more code duplication
- More importantly, no more code duplication which is WRONG!
2022-03-01 23:53:33 +11:00
Oliver
580effab92 Merge remote-tracking branch 'inventree/master' into match-fields
# Conflicts:
#	InvenTree/InvenTree/version.py
2022-02-17 22:55:16 +11:00
Oliver
0604e1a127 Adds API endpoint for installing stock items into other stock items
- Requires more filtering for the Part API
- Adds more BOM related functionality for Part model
- Removes old server-side form
2022-02-17 17:03:17 +11:00
Oliver
f399f4fa34 Refactoring API endpoints
- Improved URL naming scheme
2022-02-16 16:57:27 +11:00
Oliver
58aa2adde7 Adds model mixin for generically determining which fields can be imported on any particular model 2022-02-16 11:42:15 +11:00
Oliver
037232c177 Adds query function to Part model to return trackable parts in the BOM 2022-02-15 13:19:14 +11:00
Matthias
c44565f9e3
fix reused builtins 2022-01-21 00:17:52 +01:00
Matthias
f8c4470d98
make simpler 2022-01-20 23:51:42 +01:00
Oliver
7ce55f4195 Add try/except blocks for calls to conert_money 2022-01-12 11:57:33 +11:00
Oliver
1243923944 Event refactoring 2022-01-10 17:28:44 +11:00
Oliver
886b1f1d72 Simplify event triggering
- add generic receivers for database actions
- exclude django_q tables, otherwise we get an infinite loop!

Ref: https://stackoverflow.com/questions/17507784/consolidating-multiple-post-save-signals-with-one-receiver/32230933#32230933
2022-01-10 17:24:53 +11:00
Oliver
936330d3d2 Add more triggered events 2022-01-09 23:07:12 +11:00
Oliver
04d25a60b0 Adds sample plugin which responds to triggered events
- Adds some example trigger events for the "Part" model
2022-01-08 09:07:27 +11:00
Matthias
95ee4f908f
Merge branch 'master' of https://github.com/inventree/InvenTree into sn-append 2021-12-29 23:45:19 +01:00
Matthias
1d0aa900e8
add helper fnc to get latest SN as int 2021-12-29 02:50:23 +01:00
Oliver
70f9a0fe13 Furher logic improvements to BOM copy
- Remove "self" part from list
- Stop inherited BOM items from being copied incorrectly
- Allow user to select whether "inherited" BOM items are copied
2021-12-21 22:07:08 +11:00
Matthias
d884e62be1
[FR] Confirm to W293
Fixes #2335
2021-11-23 00:28:23 +01:00
Oliver
6a6eae7e54 Bug fix for BOM uploading
(cherry picked from commit 2e04b311306259e0ead07de9e08b3ba376caf4e4)
2021-11-20 18:10:51 +11:00
Oliver
db009189ca remove unused function 2021-11-16 20:07:16 +11:00
Oliver
4a26f274af fixing silly bug I introduced 2021-11-10 14:00:30 +11:00
Oliver
bd81eba380 PEP style fixes 2021-11-10 11:13:30 +11:00
Oliver
6a534e0322 Improve options for installing a part into another part
- Allow "variant" parts when the BOM specifies that variants are allowed for a particular BOM item
2021-11-10 11:11:52 +11:00
Oliver
cb075ed2c2 Fix logic for converting stock items to applicable variants 2021-11-08 15:10:41 +11:00
Oliver
3a7f8c9196 Fix comparison operator 2021-11-04 16:18:49 +11:00
Oliver
5ae6241083 Fixes for low-stock emails
- Include variant stock in test
- Improve email template
2021-11-04 16:15:11 +11:00
Oliver
01191d84c5 Only run check stock function when updating an existing part 2021-11-04 14:32:42 +11:00
Oliver
6db6a70fc2 Add task to check required stock for build order 2021-11-04 13:32:14 +11:00
Oliver
5542532223 Template tweaks 2021-11-04 00:44:16 +11:00
Oliver
476a1342c1 Improve notification of 'low stock' parts:
- Traverse up the variant tree
- Enable subscription by "category"
2021-11-04 00:28:10 +11:00
Oliver
7567b8dd63 MOAR FEATURES:
- Add admin view for PartCategoryStar
- Add starred status to partcategory API
- Can filter by "starred" status
- Rename internal functions back to using "starred" (front-end now uses the term "subscribe")
2021-11-03 23:22:31 +11:00
Oliver
f9a00b7a90 Adds extra subsctiption functionality for Part and PartCategory
- Allows variants and templates
- Allows categories and sub-categories
- Unit testing
2021-11-03 22:57:49 +11:00
Oliver
cf023e2cc1 Create new model for "PartCategory" 2021-11-03 18:10:34 +11:00