Oliver Walters
29335fa665
Add "rejected" status code for StockItem
2020-05-03 09:09:17 +10:00
Oliver Walters
9b2045025b
StockItem page tweaks
2020-05-02 14:05:52 +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
087001f29d
Fix BOM table rendering
...
- Price was not being sent in the PartBriefSerializer!
2020-04-28 23:17:15 +10:00
Oliver Walters
9add3d4409
Much better rendering and calculation of part allocations
2020-04-28 10:43:46 +10:00
Oliver Walters
fb70da0331
Cleanup part allocation calculation functions
2020-04-28 10:35:19 +10:00
Oliver Walters
440fe155ff
Change glyphicons for fontawesome
...
I think I gottem all
2020-04-28 09:31:51 +10:00
Oliver Walters
489dfa1823
Bug fix for a code path which resulted in a form failing validation but not showing any errors!
...
This one has been here for a while!
2020-04-27 20:45:01 +10:00
Oliver Walters
5e309a62f7
Display "Fulfilled" items
...
- Once a salesorder has been marked as "shipped" then the table is displayed differently
- The sub rows show stock items which have been fulfilled against the sales order
2020-04-27 10:31:38 +10:00
Oliver Walters
5167117067
Calculate 'fulfilled' quantity once a sales order is marked as shipped
...
- This allows us to delete the SalesOrderAllocation objects from the database
2020-04-27 08:58:18 +10:00
Oliver Walters
3c5ba75d27
PEP fixes
2020-04-26 16:44: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
4147163418
Improve status code label rendering
2020-04-26 15:29:21 +10:00
Oliver Walters
0892b160c6
"Fixes" for completing a build
...
- This will require a lot of unit testing to get right
2020-04-26 00:32:09 +10:00
Oliver Walters
4f0efec39f
PEP and unit testing fixes
2020-04-25 23:24:00 +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
b351976ae9
Mark a SalesOrder as "shipped"
...
- Option to hide non-stock items from stock list
- Update models with new feature
2020-04-25 08:46:28 +10:00
Oliver Walters
77471cb89c
Form for shipping a SalesOrder
...
- Returns "False" for now
2020-04-24 10:20:56 +10:00
Oliver Walters
b45fec221c
Expose more status code data to the templates
...
- Status codes are now exposed globally to every page
- Much simplified so wow
- https://stackoverflow.com/questions/3221592/how-to-pass-common-dictionary-data-to-every-page-in-django
2020-04-24 09:27:42 +10:00
Oliver Walters
7f020cbbf6
Enbiggen a whole lotta buttons
2020-04-23 19:41:14 +10:00
Oliver Walters
b70e79b778
Optionally add all SalesOrderAllocations to the SalesOrderLineItem serializer
2020-04-22 20:10:23 +10:00
Oliver Walters
5d1754ec32
Better display of where a StockItem is allocated
2020-04-22 17:39:59 +10:00
Oliver Walters
eb7b49784b
StockItem serializer now includes the allocated quantity
2020-04-22 15:24:11 +10:00
Oliver Walters
d9698b10cc
PEP fixes
2020-04-22 13:21:45 +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
2cb1b076f6
Create "SalesOrderAllocation" object
...
- Links multiple StockItem objects to a single SalesOrderLineItem
2020-04-22 12:12:48 +10:00
Oliver Walters
3a71a4f63a
Fix for StockItem model
...
- Allow sales_order_line to be blank
2020-04-22 10:16:54 +10:00
Oliver Walters
6dd79af0b6
Expose "is_allocated" parameter on StockItem API
2020-04-22 10:11:40 +10:00
Oliver Walters
372958d939
Migrate more pages to the two_column template
2020-04-22 09:50:10 +10:00
Oliver Walters
09ccd6c5e2
PEP style fixes
2020-04-21 22:37:35 +10:00
Oliver Walters
cb636e000d
Display a sub-list of stock items which are allocated to a SalseOrderLineItem
2020-04-21 21:38:04 +10:00
Oliver Walters
2c6e8da90e
Ability to filter StockItemList API by sales_order or sales_order_line
2020-04-21 17:33:02 +10:00
Oliver Walters
0d1919f10b
Display an alert on a stock item page if that stock item is allocated to a salesorder
2020-04-21 16:59:14 +10:00
Oliver Walters
89ede3e103
Fix for SalesOrderLineItem allocation calculation
...
Also function to render a progress bar
2020-04-21 16:45:44 +10:00
Oliver Walters
a1376eeb9e
The 'StockItem' model now has a reference to a SalesOrderLineItem
2020-04-21 15:04:21 +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
d57fed6142
Change fingerprint icon to barcode
2020-04-15 00:30:00 +10:00
Oliver Walters
e56c018a4a
Display StockItem UID if one exists
2020-04-14 23:28:46 +10:00
Oliver Walters
977316cb3a
Include UID field in StockItem API
2020-04-14 22:57:46 +10:00
Oliver Walters
ba4a1fd771
Add a 'uid' field to StockItem model
...
- To be used for barcode asociation and lookup
2020-04-14 22:54:05 +10:00
Oliver Walters
4a615e05ae
Further barcode work
...
- Simplify InvenTree barcode format
- Create base-clas for plugin
2020-04-14 21:30:43 +10:00
Oliver Walters
2506aa110b
API changes
...
- Allow SupplierPart to be filtered by 'company' in addition to 'supplier' and 'manufacturer'
- Stock can now also be filtered by 'company'
(cherry picked from commit 1b1cd944be
)
2020-04-13 20:20:33 +10:00
Oliver Walters
7503596ea4
More fixes
...
- Add a set of template tags for rendering status codes
- Improve build API filtering
- Remove some outdated files
- Fix unit testing
2020-04-12 00:10:33 +10:00
Oliver Walters
e3102900b6
Allow stock API to filter by parts which are not active
2020-04-11 14:41:07 +10:00