2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 12:36:45 +00:00

411 Commits

Author SHA1 Message Date
Matthias
ecccfbd546
Remove encoding header
Fixes #2996
2022-05-15 20:33:00 +02:00
Matthias
136d642703
Merge branch 'fix-boolean' of https://github.com/matmair/InvenTree into fix-boolean 2022-05-15 17:52:34 +02:00
Matthias
77aeecf23a
make operators simpler 2022-05-15 17:52:23 +02:00
Oliver Walters
097afed78e Adds metadata mixin class for adding JSON field to internal tables
- Add metadata field to stocklocation
- Add metadata field to stockitem
2022-05-16 00:45:16 +10:00
Oliver
47ddafb728 Fix edge case when converting stock item to variant
- If the stock item had been created as part of a Build Order, and subsequently "converted" to a variant part, the conversion operation will fail
- Patch allows the build reference to be linked based on either the base part, or any conversion options
2022-05-12 15:15:51 +10:00
Oliver
db018af0ce Prevent some model based events from triggering during data import 2022-05-10 13:43:16 +10:00
Oliver Walters
adbcd68fe8 Refactor "uninstall stock item" form to use the API 2022-05-04 17:25:24 +10:00
Oliver Walters
24da5d41b8 Add migration file 2022-04-26 20:21:15 +10:00
Oliver Walters
314cec5ad0 Generate default batch code for stock items 2022-04-26 20:18:33 +10:00
Oliver Walters
292d28d378 Account for cases where serial number could be an integer! 2022-04-22 01:00:02 +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 Walters
cffeb62bd1 Bug fix for StockItem.clean() 2022-04-19 20:28:13 +10:00
Oliver Walters
141f6ccbdf Increase unit testing for StockItem API 2022-04-19 20:10:07 +10:00
Oliver
5f503c7e0f PEP fxies 2022-04-19 13:16:45 +10:00
Oliver
48170ee096 Update stock item variant conversion form to use new function 2022-04-19 13:04:17 +10:00
Oliver
87de7e4beb Adds "convert_to_variant" function for the StockItem model 2022-04-19 12:52:36 +10:00
Oliver
82840b0590 Adds custom delete routine for PartCategory model 2022-03-10 15:01:20 +11:00
Oliver
24af134a87 Fix behaviour when deleting a StockLocation
Adds unit tests
2022-03-10 14:56:44 +11:00
Oliver
6fcc9ec8f0 Unit test fixes 2022-03-07 15:01:15 +11:00
Oliver
0adf89e793 Add unit tests for serial number functionality 2022-03-07 14:07:01 +11:00
Oliver
2f3f57148a Refactor previous code for looking up "previous" and "next" serial numbers
- Old way was extremely inefficient, especially when large spaces existed between serial numbers
- New method reduces O(n) to O(1)
2022-03-07 13:47:38 +11:00
Oliver Walters
89f2317e1c Bug fix for stock serial numbers:
- empty strings do not count as a valid serial number
2022-03-06 22:18:31 +11:00
Oliver
aeb9dfe371 Allows deletion of serialized stock 2022-03-01 23:58:30 +11:00
Oliver
65e4ee5793 PEP style fixes 2022-02-25 23:01:02 +11:00
Oliver
7c26d8f71d Refactor ownership for StockItem model 2022-02-25 22:58:00 +11:00
Oliver
d6764573c3 Refactor "ownership" concepts in templates
- Template code was very messy
- Makes it a lot "simpler"
- Adds convenience functions to the StockLocation model
- Adds pre-calculated data to the template
- Display ownership information on the stocklocation page
2022-02-25 22:45:24 +11:00
Oliver
fea6091e42 Fix incorrect inputs 2022-02-25 15:57:30 +11:00
Oliver
ef9c6e9fe0 Bug fix 2022-02-25 15:56:40 +11:00
Oliver
9e3406efc9 Add stock tracking code to indicate stock has been consumed by a build order 2022-02-25 15:56:09 +11:00
Oliver
9153b62ea0 Handle case when aggregation returns None 2022-01-27 10:49:30 +11:00
Matthias
cbd84a23f9
fix default empy dict 2022-01-21 00:11:26 +01: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
4ddd6bc351 Adds more triggered events for stock models 2022-01-10 09:16:18 +11:00
Oliver
936330d3d2 Add more triggered events 2022-01-09 23:07:12 +11:00
Oliver
52ca2e5068 Add another check for merging stock 2021-12-21 09:29:12 +11:00
Oliver
dd53748f9f Cleanup models 2021-12-21 08:49:53 +11:00
Oliver
fcb2bb2a46 Fix behaviour on deleting parent stock item 2021-12-21 01:03:37 +11:00
Oliver
31dbb9563b Add some unit tests for the new endpoint 2021-12-20 21:25:27 +11:00
Oliver
943b27e195 Adds "items" list to API endpoint 2021-12-20 19:29:08 +11:00
Oliver
93a240d9c3 Remove the "scheduled_for_deletion" field from the StockItem model
Reverts back to the original behaviour - stock items are just deleted
2021-12-05 18:14:14 +11:00
Matthias
6657d093d7
PEP fixes 2021-12-02 12:13:03 +01:00
Matthias
b0fb5657e8
also validate serial number 2021-12-02 12:11:09 +01:00
Matthias
d884e62be1
[FR] Confirm to W293
Fixes #2335
2021-11-23 00:28:23 +01:00
Oliver
bfb32f3bf6 Record the user information when creating or updating a stock item 2021-11-18 21:26:26 +11:00
Oliver
ba11a73f91 Fix for saving stock item objects 2021-11-10 11:22:58 +11:00
Oliver
067f12d5eb PEP fixes 2021-11-10 11:01:12 +11:00
Oliver
738ba4eddf Data migration to initially update serial number fields for all stock items
- Also automatically updates serial_int field when saving StockItem
2021-11-10 10:59:48 +11:00
Oliver
257be18d79 Add 'serial_int' field to stockitem model
- Allows for integer sorting of stock items
2021-11-10 10:47:17 +11:00
Oliver
f27acde934 More fixes
- Allow stock item creation for inactive parts
- Better handling of successful stock item creation
- Disable fields rather than hiding them
2021-11-05 00:02:55 +11:00