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

335 Commits

Author SHA1 Message Date
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
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
rocheparadox
76c1e936db Added post_delete hook to StockItem
moved the business logic of 'deciding if a low stock notification has to be sent' to part.tasks
2021-11-01 08:25:59 +05:30
rocheparadox
40da41959b Created part.tasks file and moved notify_low_stock function to the same from InvenTree.tasks. The argument type is changed from StockItem to Part
Added trans to headers of table in email template of low_stock_notification.html

added is_part_low_on_stock() function to the part model to check if the part's stock has fallen below the minimum quantity

used offload_task function to run the low stock notification function asynchronously
2021-10-31 11:26:41 +05:30
rocheparadox
e0cd02ee60 added dispatch_uid to post_save signal of StockItem 2021-10-30 08:30:39 +05:30
rocheparadox
d8796f9535 Notify users who have starred a part when that part's stock quantity falls below the minimum quanitity/threshold through email. 2021-10-29 16:03:41 +05:30
Oliver
2d9ca7c1b6 Do not rebuild the entire StockItem tree every time a single StockItem is deleted! 2021-09-28 10:36:01 +10:00
Oliver
5ab4be7025 Unit test fixes 2021-09-07 17:36:53 +10:00
Oliver
918106c225 Adds a background task to remove StockItem objects which are scheduled for deletion 2021-09-07 16:45:58 +10:00
Oliver
7d3cd03d6c Add "scheduled_for_deletion" field to StockItem
- If set to True, this StockItem will be deleted (soon) by the background worker
- As deletion takes significant time, this prevents delete operations from blocking the UI
2021-09-07 16:28:57 +10:00
Oliver
4ee0004c97 Filtering for Build and StockItem 2021-07-21 21:34:16 +10:00
Oliver
598ea11211 Add manager class for StockItem 2021-07-21 09:28:58 +10:00
eeintech
6687661928 Fixes for stock modal and notes propagation to tracking items 2021-07-05 17:36:10 -04:00
Oliver
51ebe30754 Merge remote-tracking branch 'inventree/master' into drf-api-forms
# Conflicts:
#	InvenTree/company/forms.py
2021-07-02 11:26:09 +10:00
ea8b102897 style fix 2021-07-01 00:50:50 +02:00
fcdefc4f83 removing default_currency in fields 2021-07-01 00:40:26 +02:00
3a57093b4e replace MoneyFields with inherited classes 2021-07-01 00:13:38 +02:00
Oliver
04374c71c2 Annotate models with their API list view
- It will make sense, trust me
2021-06-25 00:17:58 +10:00
d87592aedb use the default currency in forms 2021-06-05 13:22:11 +02:00
Nigel
bca2f4a07b
feat(sales_order): Stock Items show the PO number
Stock items show the PO number that they were purchased on when being
viewed in the sales order allocation modal and when viewing the sales
order details.
2021-05-13 14:18:25 -06:00
Oliver Walters
30ff48d803 Fixes 2021-05-12 10:09:02 +10:00
Oliver Walters
68b53acbf1 remove old fields from the StockItemTracking model 2021-05-12 08:07:03 +10:00
Oliver Walters
03a231bffb Updates
- Add StockHistoryCode to custom context
- Add simple form for editing stock item history
- Add tracking entry when stock status is changed
2021-05-11 23:38:26 +10:00
Oliver Walters
84bfffd5a7 Override 'add_note' when new StockItem is created
- This allows us to prevent the issue of duplicate notes being created
2021-05-11 22:51:29 +10:00
Oliver Walters
93e6eb6dc7 Unit test fixes 2021-05-11 22:26:03 +10:00
Oliver Walters
a1203aa1e5 Fixes for unit testing 2021-05-11 21:22:54 +10:00
Oliver Walters
0020e85397 Refactor add_tracking_entry 2021-05-11 20:56:20 +10:00