Commit Graph

481 Commits

Author SHA1 Message Date
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
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
Oliver
05791a8efd
Merge pull request #2138 from rocheparadox/master
Custom name format for parts - FR InvenTree#2085
2021-10-14 16:03:58 +11:00
Oliver
be5c5496b2 Improvements to allocation of stock items against build orders
- Refactor functions for filtering stock using bom_item pk
- Allow selection of substitute items when allocating against build order
- Improvements for modal rendering
- Don't display filter drop-down if there are no filters available
2021-10-13 23:53:35 +11:00
Oliver
f3074e8f34 Improved unit testing for BomItem
- tests for allowing variant parts
- tests for allowing substitutes
2021-10-13 23:18:26 +11:00
Oliver
0f8c279aa2 Add some unit testing for the new model 2021-10-13 22:27:10 +11:00
Oliver
ea4c4c514f Add uniqueness checking for the BomItemSubstitute model 2021-10-13 22:01:32 +11:00
rocheparadox
0742fb063c comment cleanup 2021-10-13 10:58:36 +05:30
Oliver
37bd5c0507 Add serializer and API endpoint for BomItemSubstitute class 2021-10-13 13:58:41 +11:00
rocheparadox
4fddc656c4 removed unused import
added unit tests for PART_NAME_FORMAT
2021-10-12 19:51:21 +05:30
rocheparadox
2bf51b0ac3 Added PART_NAME_FORMAT to Inventree settings and exposed the same in settings window with a validator 2021-10-12 19:06:23 +05:30
Oliver Walters
4eb8c60ee0 Add new BomItemSubstitute model 2021-10-12 22:22:49 +11:00
rocheparadox
2d77b21a4e PART_NAME_FORMAT is introduced to display the names of parts in custom format. - For Feature Request InvenTree#2085
full_name construction in part.js is obsolete/redundant since the same is constructed in backend and sent through api response
2021-10-11 22:21:12 +05:30
Oliver
e7d78db87b Fixes for unit tests 2021-10-05 10:53:11 +11:00
Oliver
ae0efe73d1 Further improvements to build allocation form
- Auto-allocation button ignores outputs which are complete
- StockItem API allows filtering by BomItem
- Quantity inputs are now auto-filled
- Display progress bar in the modal form
2021-10-05 08:25:10 +11:00
Matthias
cb1e7a6cc5
only process purchase_price if prices present 2021-08-19 23:22:58 +02:00
Matthias
a2ffd06abf
calculate purchase price for part 2021-08-13 17:49:58 +02:00
Oliver Walters
6d42cfab75 Add model validator to prevent illegal names for PartParameterTemplate
(cherry picked from commit 93805a87e0)
2021-08-07 21:23:52 +10:00
Oliver Walters
aaf394ca7a PEP fixes 2021-08-05 00:26:21 +10:00
Oliver Walters
dd78464a74 remove unused function 2021-08-05 00:25:47 +10:00
Oliver Walters
b04f22fc53 CreatePart form now uses the API
- Simplify the way category parameter templates are copied
2021-08-04 23:27:16 +10:00
Oliver
afde997cf9 Expose part parameters to Part label templates 2021-07-21 22:05:52 +10:00
Oliver
9cf372f633 PEP fixes 2021-07-21 21:24:18 +10:00
Oliver
df48df8119 Catch recursive tree error for part / variant relationship 2021-07-21 21:10:31 +10:00
Oliver
dad9239a1c Add instance-specific filters to API OPTIONS data 2021-07-21 20:59:55 +10:00
Oliver
b04a403081 subclass TreeManager 2021-07-20 22:15:49 +10:00
Oliver
cb0b7209ec Add custom "list" function back in
- Actually does make a significant difference to query speed
2021-07-20 22:12:01 +10:00
Oliver
84fc2785d6 Create a custom Manager class for the Part model
- Always perform prefetch_related calls
2021-07-20 21:26:51 +10:00
Matthias Mair
c2ce569506
Merge branch 'inventree:master' into bom-internal 2021-07-19 21:51:18 +02:00
Matthias
8d2e910323 style fix 2021-07-19 21:50:06 +02:00
Oliver
bf2774eb21 Add numerical validation step for BomItem 2021-07-10 13:48:44 +10:00
Oliver
cbf0e0bd4a Refactor forms for editing and deleting a PartParameter
- PartParameters now loaded using the API, not pre-rendered
2021-07-09 01:56:04 +10:00
Oliver
376428b80b Add regex IPN filter for Part API 2021-07-08 17:02:45 +10:00
Oliver
798bc17311 Merge remote-tracking branch 'inventree/master' into drf-api-forms 2021-06-29 09:57:03 +10:00
Matthias
e4a9d56ba0 style fixes 2021-06-27 14:26:51 +02:00
Matthias
4f726931a6 adds in money-conversion helper 2021-06-27 14:18:37 +02:00
Matthias
67128c308b fixing typo 2021-06-27 12:26:02 +02:00
Oliver
67f76c8bca Merge remote-tracking branch 'inventree/master' into drf-api-forms 2021-06-27 09:26:23 +10:00