Commit Graph

102 Commits

Author SHA1 Message Date
Oliver Walters 435c13cf7c Separate concept of "OrderStatus" into "SalesOrderStatus" and "PurchaseOrderStatus" 2020-04-23 20:38:09 +10:00
Oliver Walters b75c343236 Add action buttons to the sales order page 2020-04-21 22:02:17 +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 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 092215918c PEP fixes 2020-04-19 23:56:16 +10:00
Oliver Walters 2621c51a7e Further API cleanup
- Perform a single call to get starred parts for current user and record results
- This provides significant speed improvements
- Remove old manual serializer
- More data prefetching
2020-04-19 23:50:41 +10:00
Oliver Walters 69b8eed028 Fixes for aggregation issues
- Ensure that "distinct=True" is set!
- ARRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
2020-04-19 22:54:46 +10:00
Oliver Walters 10ee8bc666 Use existing serializers to encode information for barcode response 2020-04-15 23:41:16 +10:00
Oliver Walters 92cb7211ce Rename 'image_url' to 'thumbnail' in PartBrief API 2020-04-06 12:57:04 +10:00
Oliver Walters b28487760a Rename Part.URL -> part.link
- Previous migration needed some tweaking to get it to run... because.. why?
- It seems to pass when running manage.py migrate but fails when running manage.py test
- Stumped on this one
2020-04-06 11:16:39 +10:00
Oliver Walters d739c2dea8 "URL" is renamed to "link" in the URL 2020-04-05 19:18:32 +10:00
Oliver Walters 511cdef323 Peppy fix 2020-04-05 15:59:48 +10:00
Oliver Walters 91b5911ff2 Add 'notes' field to Part detail API 2020-04-05 15:46:18 +10:00
Oliver Walters 1f172b3a57 Add 'bom_items' and 'used_in' to Part detail API 2020-04-05 15:39:55 +10:00
Oliver Walters b4d66c6797 Add 'building' count to Part detail API 2020-04-05 15:29:31 +10:00
Oliver Walters 0cfb293ca9 List API now uses the thumbnail image 2020-04-05 00:19:37 +11:00
Oliver Walters 7e8664a4dd Include "parts" count in Category API 2020-04-03 09:15:09 +11:00
Oliver Walters 434d084371 Provide form for user to select export options 2020-02-11 21:43:17 +11:00
Oliver Walters 1327c1d3b1 Add API endpoint for querying part images 2020-02-10 22:03:06 +11:00
Oliver Walters f415e2040e API endpoint for PartParameter and PartParameterTemplate 2019-09-07 19:44:10 +10:00
Oliver Walters 0508c2dcaf Use the hash for each line item to calculate the total BOM hash 2019-09-05 13:10:26 +10:00
Oliver Walters 8637d46981 Display inactive parts in part used_in view 2019-07-10 13:18:07 +10:00
Oliver Walters 808d332bda Show BomItem reference field in BOM table 2019-06-27 23:57:21 +10:00
Oliver Walters 1d67b4cdaa Sliders now update the part options via AJAX 2019-06-18 19:24:10 +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 c9b946655c Add some more data to Part serializer 2019-06-13 18:33:15 +10:00
Oliver Walters ba26acd487 Rename some fields
- Oops didn't think that through, gotta go through and fix the data now...
2019-06-02 19:46:30 +10:00
Oliver Walters 91a5a7f051 Simplify part model
- Remove 'varian't or ''revision' field
- Part name must be unique across database
2019-05-26 12:16:57 +10:00
Oliver Walters 21dd893c01 Display templated parts as italic in the part list 2019-05-26 00:29:17 +10:00
Oliver aeaf4e7dc9
Merge pull request #363 from SchrodingersGat/rest-simplify
Rest simplify
2019-05-23 23:03:39 +10:00
Oliver Walters c2ca5a24f8 PEP 2019-05-23 22:59:56 +10:00
Oliver Walters cf5b8d0249 Optional part_detail and sub_part_detail for BOM API
- Significant speed boost on request
- Request the relevent information at the right place
2019-05-23 22:36:19 +10:00
Oliver Walters d386c2a6f9 Include total stock in PartBrief serializer 2019-05-23 21:51:27 +10:00
Oliver Walters d3a5661dbd Serializer fix 2019-05-21 15:42:52 +10:00
Oliver Walters 988a35d237 Serialize BOMItem pricing information
- Account for quantity
- Prefetch required items
2019-05-21 15:15:54 +10:00
Oliver Walters 9d5b938ced Don't serialize 'available_stock' in PartSerializer 2019-05-21 07:57:44 +10:00
Oliver Walters 72aba30e81 More hungry fetching 2019-05-21 00:16:00 +10:00
Oliver Walters 8adb4f6c20 Further query reduction
- Also improved query reporting middleware
2019-05-20 23:26:27 +10:00
Oliver Walters d15b09a5f4 Don't serialize pricing
- Saves MANY queries and provides drastic speedup
2019-05-20 23:03:19 +10:00
Oliver Walters 18ff80312b Fixes 2019-05-20 22:53:01 +10:00
Oliver Walters ee2ddbf512 Reduce some database queries by using aggregate Sum 2019-05-20 21:47:30 +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 5055226490 Reduce BOM listing time to ~1.8s 2019-05-20 08:31:03 +10:00
Oliver Walters cee1062b51 Prefetch locations - 2.6s
However the 'total_stock' and 'available_stock' fields are still the majority of the response time
2019-05-20 08:24:05 +10:00
Oliver Walters 6766063c8b Reducing request time for PartList API
- Initial query time = 5.91s
- Prefetch related part categories = 3.64s
2019-05-20 08:13:22 +10:00
Oliver Walters 2b098942b0 Fix pricing bug
- Include BOM item pricing in API
2019-05-18 23:08:56 +10:00
Oliver Walters 2a1fd2b03b More complex pricing calculations
- Calculate BOM price for a part
- Calculate total pricing for a part (build or purchase)
- Display pricing information in BOM table
2019-05-18 23:08:51 +10:00
Oliver Walters 0cfb243eb3 Move SupplierPart and SupplierPriceBreak to the 'Company' app
- https://docs.djangoproject.com/en/2.2/ref/models/options/#django.db.models.Options.db_table
- https://stackoverflow.com/questions/3519143/django-how-to-specify-a-database-for-a-model
- And others, presumably
2019-05-18 23:08:34 +10:00
Oliver Walters 8c92c2c2a1 Display overage values in BOM table 2019-05-15 07:23:02 +10:00