Oliver
598ea11211
Add manager class for StockItem
2021-07-21 09:28:58 +10:00
Oliver Walters
753fe9c80f
Ordering and rendering for StockLocation
2021-07-18 21:15:51 +10:00
Oliver
770cd9a12d
Fix for LocationSerializer
2021-06-30 22:10:15 +10:00
Oliver
30ac5dba55
Display attachment upload date
2021-06-30 17:44:23 +10:00
Oliver
87235b7e6f
Replace StockItemAttachmentCreate form
...
- Also replace drag-and-drop
- Add 'hidden' option for form fields
- Adds renderer for StockItem model
2021-06-30 09:17:28 +10:00
Oliver
e6598b5115
Displays "purchase order" column in StockItem table
2021-06-21 16:58:39 +10:00
eeintech
08fbdf660b
Fix for #1661
2021-06-14 14:19:10 -04:00
Oliver Walters
3b252b8409
Record the user when updating stock items
2021-05-12 10:42:09 +10:00
Oliver Walters
725a64c29d
Extract more information from legacy tracking data
2021-05-11 18:11:27 +10:00
Oliver Walters
70ad0ba0de
Improve reporting in stock history API
2021-05-11 17:41:17 +10: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
eeintech
0b1f22c7fd
Almost there, needs some interface testing and tweaking
2021-03-30 18:08:33 -04:00
Oliver Walters
644583f636
Display packaging info in stock table
2021-02-19 11:09:24 +11:00
Oliver Walters
ef3ac43c4a
Add "last updated" date to stock table
2021-01-15 15:27:40 +11:00
Oliver Walters
df327d4e64
Add stocktake_date field to stock API, and to stock table
2021-01-14 11:29:35 +11:00
Oliver Walters
1d6a049c5a
Annotate stock queryset with stale status
2021-01-06 23:06:49 +11:00
Oliver Walters
d1ce0f062e
Improve unit testing for StockItem API
2021-01-04 01:22:43 +11:00
Oliver Walters
39b9dcfec9
Add 'expired' flag to StockItem serializer
2021-01-04 00:21:21 +11:00
Oliver Walters
e4f2eecb3b
Remove defunct 'build_order' field from StockItem model
...
- This is now handled by the new-and-improved build system, no longer required
2020-11-10 20:12:39 +11:00
Oliver Walters
3bb247a135
Create an initial stockitem output when a new build is created
2020-10-20 23:27:43 +11:00
Oliver Walters
28460b3023
Validate that the BuildItem quantity is an integer
2020-10-20 20:42:29 +11:00
Oliver Walters
db214dfd73
Update queryset annotation for StockItem
...
- Query time reduced from 4.1 to 3.5s (for sample data)
2020-09-05 22:50:17 +10:00
Oliver Walters
e6c0a04131
Merge branch 'feature-non-int-serial' of git://github.com/bcc/InvenTree into bcc-feature-non-int-serial
2020-09-01 19:41:48 +10:00
Oliver Walters
8615cad711
Stock: Fix serializers.py
...
- Use of read_only PrimaryKeyRelatedField was breaking POST via API
2020-08-31 20:08:07 +10:00
Ben Charlton
f7ed48809c
Support non-integer serial numbers
2020-08-21 17:36:49 +01:00
Oliver Walters
2f77007dbe
Significant query speed improvements to stock list API
...
- Thanks, django-debug-toolbar!
- Gah, django DRF is the worst. Enforcing a PrimaryKeyRelatedSerializer seems to really improve speed
2020-08-15 21:15:11 +10:00
Oliver Walters
930f903f5d
Add ability to display "out of stock" items against a part
2020-06-22 10:48:41 +10:00
Oliver Walters
774e26eb19
Mark some fields as not-required via the API
2020-05-28 20:33:33 +10:00
Oliver Walters
78990a99e5
Fix serializer for stock item
2020-05-26 23:01:30 +10:00
Oliver Walters
e128410d54
Update 'required' status for new serializers
...
(cherry picked from commit 2306e29743eb25266c78bec5357d1194e0778c58)
2020-05-26 20:29:09 +10:00
Oliver Walters
81e38eeb14
Add some more custom FileField serializers
...
(cherry picked from commit 7b9ff27baefacc977fef7852e99d8a9bb46a062a)
2020-05-26 20:29:04 +10:00
Oliver Walters
861e30e8d6
Add a special serializer class for FileField which has a custom to_representation function
...
- This was solving a very subtle bug which will probably only ever apply to a single installation instance
- Future me will most likely not remember what this was for or how it works
- In any case, there we go
- Ref: http://www.cdrf.co/3.9/rest_framework.fields/Field.html
(cherry picked from commit 7305094854
)
2020-05-26 20:29:00 +10:00
Oliver Walters
1bf696a052
Allow API upload of file attachments against StockItemTestResult objects
2020-05-25 22:19:28 +10:00
Oliver Walters
e4d10279fa
Include 'key' field in StockItemTestResult serializer
2020-05-24 20:04:34 +10:00
Oliver Walters
e63342418f
Improve / simplify logic for file attachments against test result object
2020-05-23 11:30:42 +10:00
Oliver Walters
4bd0872b2c
Expose some more stock item data over API
2020-05-22 23:33:27 +10:00
Oliver Walters
3b53437f46
Add 'attachment_detail' to the TestResult serializer
2020-05-16 23:53:28 +10:00
Oliver Walters
608057da69
Add option for user_detail in stockitemtestresult serializer
2020-05-16 23:36:03 +10:00
Oliver Walters
197a3e6731
Fixes for Stock API
2020-05-16 23:12:43 +10:00
Oliver Walters
fd11317409
Whoops
2020-05-16 23:04:37 +10:00
Oliver Walters
45556058d2
Allow files to be uploaded alongside a test report
...
- Attach the file to the stock item
- Link the uploaded attachment to the test report
2020-05-16 22:53:23 +10:00
Oliver Walters
f3c71bd96f
API interface for StockItemTestResult
2020-05-16 20:56:36 +10:00
Oliver Walters
df91b8cf4d
Add function to get all test results as a map
...
- This will be required for pushing out to a test report
2020-05-16 20:45:10 +10:00
Oliver Walters
d4fa7d936e
Add 'user' field to attachment
2020-05-12 20:50:03 +10:00
Oliver Walters
c6cff1fb2e
Fixes for StockItem tracking API
...
- Make the tracking API consistent with other API endpoints
2020-05-12 08:12:12 +10:00
Oliver Walters
17d0a015f2
Add API endpoint for StockItem attachment items
2020-05-11 23:32:40 +10:00
Oliver Walters
7fca496de8
Bug fix for StockItem list API
...
- The wrong detail data was being set
2020-05-02 13:51:29 +10:00
Oliver Walters
4197e29fce
Major major major (improvements for StockItem list API)
...
OK LISTEN UP - Lots of work went into making this speedier:
- For related detail fields (e.g. part_detail), we pre-fetch and cache the model data
- This eliminates duplicate database hits for the same model instances
- Perform all field filtering manually, rather than using the DRF 'filter_fields' concept (this seems to add a lot of overhead)
- Use query annotations to getch calculated fields rather than fetching one-at-a-time
- And finally, if the request is AJAX then return a JsonResponse which is SO FREAKING MUCH FASTER
2020-05-02 13:46:19 +10:00
Oliver Walters
44319d24e4
Custom list serializer for 'location_detail'
2020-05-02 10:05:35 +10:00
Oliver Walters
e768ada83b
More work
...
- Consolidated "in_stock" filter to single code location
- Improve 'limit_choices_to' for BuildItem and SalesOrderAllocation
- Various template improvements etc
2020-04-26 16:38:29 +10:00
Oliver Walters
01a68270ea
Add verbose names for multiple Build model fields
...
- Improve methods for different models
2020-04-25 23:17:07 +10:00
Oliver Walters
eb7b49784b
StockItem serializer now includes the allocated quantity
2020-04-22 15:24:11 +10:00
Oliver Walters
1373425c29
Update definition for StockItemAllocation model
...
- Limit foreignkey choices
- Error checking
- Check if a StockItem is over-allocated
- Fix API serialization and filtering
2020-04-22 13:11:19 +10:00
Oliver Walters
6dd79af0b6
Expose "is_allocated" parameter on StockItem API
2020-04-22 10:11:40 +10:00
Oliver Walters
4ec5e9a907
Consolidate StockItem serializer
2020-04-20 08:24:43 +10:00
Oliver Walters
c72fce0cc5
Add "tracking items" back in
2020-04-20 01:14:19 +10:00
Oliver Walters
b2c40c91b7
PEP fixes
2020-04-20 01:11:25 +10:00
Oliver Walters
0334035e77
Simplify StockItem serializer
...
- Some more work needed here to cut down on database hits
2020-04-20 01:09:37 +10:00
Oliver Walters
6a89e0089d
Updates for stock serializer
2020-04-20 00:49:13 +10:00
Oliver Walters
977316cb3a
Include UID field in StockItem API
2020-04-14 22:57:46 +10:00
Oliver Walters
96547b885e
Include supplier-part information in Stock API
2020-04-06 22:02:23 +10:00
Oliver Walters
bd407cd226
Rename "URL" to "link" for StockItem and StockItemTracking models
2020-04-06 10:43:06 +10:00
Oliver Walters
2530313e68
Add part_detail and location_detail to the StockItem detail class
2020-04-06 08:38:10 +10:00
Oliver Walters
ccb637773f
Add item count to StockLocation serializer
2020-04-03 11:41:51 +11:00
Oliver Walters
bb799d98be
Add ability to create new stock tracking note for a stock item
2019-07-16 00:10:24 +10:00
Oliver Walters
ff6df9741f
Perform model validation on API serializers
...
If you have a class, why not subclass it?!
2019-06-13 23:03:58 +10:00
Oliver Walters
222c9f1876
Allow quantity editing via /api/stock/ endpoint
...
- Allows creation of a new StockItem with a specified quantity
2019-06-13 22:58:02 +10:00
Oliver Walters
4218cf8b45
Client-side grouping
...
- Cusomizations made to bootstrap-table-group-by.js
- Group by part name
- Display total stock count per group
- Only group if there are more than 1 item in the group
- Groups send checkbox signals through appropriately!
2019-05-28 17:21:29 +10:00
Oliver Walters
7de4ee80f1
Deltaco some dead code
2019-05-27 22:44:38 +10:00
Oliver Walters
5664fc5472
Detail in StockItem API now optional
2019-05-23 22:57:45 +10:00
Oliver Walters
18ff80312b
Fixes
2019-05-20 22:53:01 +10:00
Oliver Walters
fc75ab7420
Reduce response time for stock list
...
Initial time - 6.2s
After prefetch - 4.3s
2019-05-20 08:44:52 +10:00
Oliver Walters
1d36ea3e2e
Add a 'full_name' field for Part
...
- Combines IPN | Name | Variant
- Use this to display in most views
2019-05-12 12:16:04 +10:00
Oliver Walters
d49ce465e5
Removed UUID field from StockItem
...
- QR code is now created based on a JSON object
- This will make it extensible to other things such as StockLocation
- Created a helper function to make Barcode objects
2019-05-02 20:40:56 +10:00
Oliver Walters
395db4df38
Pepe fixes
2019-04-30 00:18:58 +10:00
Oliver Walters
5c5411132a
First pass at build allocation table
...
- Uses bootstrap-table "detailView" function
2019-04-29 23:56:02 +10:00
Oliver Walters
a499fd325e
Docstring for Stock app
2019-04-27 22:49:16 +10:00
Oliver Walters
533fdb71c4
Javascript function to render stock tracking table
...
- Added extra info to StockItemTracking serializer
2019-04-25 22:04:32 +10:00
Oliver Walters
ebcbf9a90e
Add status_text to API
2019-04-17 23:33:19 +10:00
Oliver Walters
1ef81ecf2e
Ignore some rules
2019-04-14 09:39:01 +10:00
Oliver Walters
76b0d17b11
PEP fixes for /stock
2019-04-14 09:23:24 +10:00
Oliver Walters
51d77ce4d2
Include uuid in serializer and api
2019-04-13 07:56:06 +10:00
Oliver Walters
926d717190
Add quantity field to StockItemTracking
...
- Keep track of historical levels of part availability
2019-04-13 00:14:10 +10:00
Oliver
4b4db50de5
Display username in stock-tracking
...
- Add UserSerializer
2018-05-10 21:20:12 +10:00
Oliver
f2982a59ad
Added StockTracking API
...
/api/stock/track/
ListCreate API view
StockItem page now shows bootrap-table of tracking notes
2018-05-08 22:30:32 +10:00
Oliver
41e031d4b4
Draft API endpoint RUD class
...
- RUD = Retrieve / Update / Destroy
- When issuing an Update command, the validity is checked but the model object is only saved if the POST data has "_is_final": true
2018-05-05 01:26:01 +10:00
Oliver
3511ce29ee
Added StockLocation API
2018-05-04 01:33:21 +10:00
Oliver
1899d8f3e9
Stock location part list now uses bootstrap table
...
- Serializers within serializers!
2018-05-02 23:08:45 +10:00
Oliver
f9138f4997
Item stocktake form
2018-04-30 21:03:25 +10:00
Oliver
f74e176579
JSON api for stock items
2018-04-29 21:02:40 +10:00
Oliver
bd46f66d6b
Begin to add views for part models
...
- List BOM items
- Show category listing as linked items
- Fix some pathing issues with InvenTreeTree class
2018-04-13 22:36:59 +10:00
Oliver Walters
7478371d0c
Added stockhistory
...
using django-simple-history
2017-04-21 23:47:04 +10:00
Oliver Walters
4777b02080
Added User API and serializer
2017-04-20 22:40:59 +10:00
Oliver Walters
2c28ef6b3c
Added update endpoints for StockItem
...
- Stocktake
- Take-Stock
2017-04-20 22:08:27 +10:00
Oliver Walters
057fd1dd20
Filtering improvements
2017-04-16 14:24:15 +10:00
Oliver Walters
883efd0945
Removed 'pending' tag
2017-04-16 14:11:20 +10:00
Oliver Walters
a65f85df87
Added StockTracking model
2017-04-16 01:43:30 +10:00
Oliver Walters
7c5261bc4a
Stock API now hyperlinkd
2017-04-14 23:44:24 +10:00
Oliver Walters
858a7fe089
Tweaking URL patterns
2017-04-14 21:44:01 +10:00
Oliver Walters
0441eb4c38
API improvements for Stock app
2017-04-14 12:54:34 +10:00