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
Matthias
9ce5a9823e
added doc for internal price
2021-06-24 21:48:00 +02:00
Matthias
abe00232f3
use internal price in more places
2021-06-24 21:47:11 +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
rgilham
c6fd2281d6
Allow BOM pricing to be valid when using internal pricing
2021-06-24 02:13:55 +02:00
Oliver
6d2cd78d29
Fixes for unit tests
2021-06-22 10:36:04 +10:00
Oliver
a38835022a
Better management of unique constraint for Part
2021-06-22 09:33:07 +10:00
Oliver
04b216253d
Ok, that was a bad idea.
2021-06-21 11:30:20 +10:00
Matthias
4f3bfe569a
added in internal prices in price calculations
2021-06-07 05:25:13 +02:00
Matthias
81f00753c6
style
2021-06-05 17:24:04 +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
Oliver Walters
5c71f04360
Add "allow_variants" field to BomItem
2021-06-01 13:59:01 +10:00
Oliver Walters
c2fe5e08b4
Expand possibilities for variant conversion
...
- Ref get_conversion_options
2021-05-27 12:35:55 +10:00
Matthias Mair
e59f467c79
Merge branch 'master' into spaces!
2021-05-08 12:27:19 +02:00
Matthias
f2b0717d10
removes all lines consisting only of spaces
...
this really bothers me for some reason - nothing technical
2021-05-06 12:11:38 +02:00
Matthias
1b7ade9405
adding in missing parts for full saleprice
2021-05-05 23:47:46 +02:00
Oliver Walters
0fbf39f1bc
More fixes
2021-04-20 10:59:28 +10:00
Oliver Walters
6b9145ae56
Fixes required for v3.2 compatibility
...
- Specify DEFAULT_AUTO_FIELD
- Specify output_field for annotations
2021-04-20 09:14:08 +10:00
Oliver Walters
e787c853e5
Update logger context
2021-04-10 20:08:13 +10:00
Matthias
32eaf48c12
fixed styling
2021-04-06 18:33:57 +02:00
Matthias
20c455384e
added more translation-strings
2021-04-04 22:44:14 +02:00
Matthias
2de6fcbfa4
added missing translation fields #753
2021-04-03 03:59:09 +02:00
eeintech
64a57128bc
Return True for BOM valid flag if part does not have BOM items
2021-03-15 10:37:30 -04:00
Oliver Walters
f2da1c990b
Simplify process for marking a part as "starred"
2021-02-25 23:27:27 +11:00
Oliver
35b9b17167
Merge pull request #1354 from SchrodingersGat/tree-fix
...
Sidenav Fixes
2021-02-25 09:45:56 +11:00
Oliver Walters
15a59d54ca
Abstract template context data for part
2021-02-24 09:05:31 +11:00
Oliver Walters
b64d48544d
Bug fix for trackable parts
2021-02-23 16:49:09 +11:00
Oliver Walters
e75b9d04fe
PEP fix
2021-02-18 14:38:25 +11:00
Oliver Walters
7a51e6cf78
Implement filtering which accommodates new inheritable BOM feature
...
- Can no longer filter bom_items by sub_part
- Adds get_used_in_filter() and get_used_in() for part model (returns a query of other part objects)
2021-02-18 14:35:21 +11:00
Oliver Walters
abe1018abe
Add new fields to BOM item hash
2021-02-18 00:40:30 +11:00
Oliver Walters
8caf6bad10
Fix for duplicating BOM
...
- Do not duplicate bom items which are "inherited"
2021-02-18 00:38:40 +11:00
Oliver Walters
3f30421ba9
bug fix
2021-02-17 23:57:45 +11:00
Oliver Walters
bb3440a8a4
Refactor bom item filter
...
- Also updates a number of part functions to make use of inherited BOM items
2021-02-17 22:53:56 +11:00
Oliver Walters
d692c18274
Add 'inherited' field to BomItem
2021-02-17 21:53:15 +11:00
Oliver Walters
fcc35f2260
Fix display of parts currently being built
2021-02-17 13:14:27 +11:00
Oliver Walters
ba542dcbdb
Auto-fill build quantity
2021-02-17 13:06:18 +11:00
Oliver Walters
8780b8435a
style fix
2021-02-17 12:46:05 +11:00
Oliver Walters
28c9c80f54
Calculate quantity required for sales orders
...
- Cache data going to part detail view
2021-02-17 10:57:17 +11:00
Oliver Walters
cda97829ab
Add function for required build order quantity
2021-02-17 10:27:36 +11:00
Oliver Walters
220777611a
Prevent part images from auto deleting
...
- Part images can be used for multiple parts
2021-01-27 22:31:21 +11:00
Oliver Walters
526d81481b
Cleanup
2021-01-18 22:25:53 +11:00
Oliver Walters
1dc2636e45
Add option to show part quantity in various forms
...
Enabling this option can make BOM item forms *very* slow!
2021-01-14 15:20:42 +11:00
Oliver Walters
e715ea5d79
Merge remote-tracking branch 'inventree/master' into stock-expiry
...
# Conflicts:
# InvenTree/common/models.py
2021-01-05 00:58:32 +11:00
Oliver Walters
37dcf1c1cf
Add "default_expiry" field to Part model
2021-01-04 23:36:11 +11:00
Oliver Walters
b05504e1c4
Add PART_VIRTUAL setting
2021-01-03 23:13:58 +11:00
Oliver Walters
0aeeba808c
PEP fixes
2021-01-03 23:07:21 +11:00
Oliver Walters
6c7b648133
Implement global settings for assembly and template values of Part model
2021-01-03 23:06:51 +11:00
Oliver Walters
298e9cae65
Fix variable scope issue
2021-01-03 10:07:38 +11:00
Oliver Walters
06d9f4f982
Bugfix for duplicate IPN checks when blank IPN is used
2020-12-16 21:02:53 +11:00
Oliver Walters
b5d75d6e6a
PEP fixes
2020-11-24 11:56:51 +11:00
Oliver Walters
ce82579930
Cleanup getRequiredParts function
2020-11-24 10:18:07 +11:00
Oliver Walters
af9b88de11
Fix for BomItem clean function
...
Handle the case where the sub_part does not exist
2020-11-24 09:33:26 +11:00
eeintech
d4ac35b9aa
Check that category was selected before fetching templates
2020-11-12 16:52:22 -05:00
Francois
a7444a9926
Merge branch 'master' into categories_parameters
2020-11-11 06:40:11 -05:00
Oliver Walters
039a7badd1
A little whoopsie-doo:
...
- Part.clean() was incorrectly referencing a BomItem when it should have been referencing BomItem.part
2020-11-11 16:09:14 +11:00
Oliver Walters
a6028f027a
Add setting to allow or prohibit duplicate IPN values
2020-11-10 09:03:26 +11:00
Oliver Walters
c95f124578
Add some helper magic for setting objects
...
- If the setting is defined as a "bool" then the returned value is automatically cast to a bool
- Add some more unit testing
2020-11-09 23:44:54 +11:00
Oliver Walters
75ab7b247b
Push part settings into part/settings.py
...
- Use the user-configurable defaults in the database model itself
- This means they are observed even when using the API / etc
2020-11-09 23:16:04 +11:00
eeintech
e401bb8e3c
Improved tests, fixed admin, improved naming
2020-11-04 12:06:07 -05:00
eeintech
1c14c2237a
Moved category templates processing to Part save() method
2020-11-04 09:52:26 -05:00
eeintech
142cea0cbb
Removed custom form save method, remove unused model methods, restored InvenTree CreateAjaxView, improved part related testing
2020-11-04 07:44:06 -05:00
Francois
b1885138de
Merge branch 'master' into categories_parameters
2020-11-03 07:01:56 -05:00
Oliver Walters
083dac1300
Merge remote-tracking branch 'inventree/master' into build-fixes
2020-11-03 21:26:39 +11:00