Oliver Walters
b138a4bd5f
Order parts directly from a build
2019-06-12 00:21:18 +10:00
Oliver Walters
74327d3094
Order from supplier 'parts list' page
2019-06-12 00:10:39 +10:00
Oliver Walters
e4f5cc8ccd
Order from a part page
2019-06-12 00:04:20 +10:00
Oliver Walters
3460a48b63
Extra form info
2019-06-11 23:58:00 +10:00
Oliver Walters
1cb6c67086
Launch order dialog from the 'Parts' table
2019-06-11 23:55:20 +10:00
Oliver Walters
0ca01fb0e7
Template improvements
2019-06-11 23:47:09 +10:00
Oliver Walters
0bc8190e8c
Style supplier-part selection as 'select2'
2019-06-11 23:41:15 +10:00
Oliver Walters
bc05146e72
First pass at 'order parts' fom
...
- Select parts in modal form window
2019-06-11 23:37:32 +10:00
Oliver Walters
8e82488f70
Display 'net stock' value on front page
2019-06-11 21:58:20 +10:00
Oliver Walters
50bab299c5
Add hover image to 'parts to order' table
2019-06-11 21:52:43 +10:00
Oliver Walters
d8d41c6eff
PEP fixes
2019-06-10 23:08:08 +10:00
Oliver Walters
3954b33fb7
Use 'on_order' count in calculation for parts we need to order
2019-06-10 23:05:14 +10:00
Oliver Walters
04a9b1a980
Create a new purchase order from a company page
2019-06-10 22:56:34 +10:00
Oliver Walters
c132f275f5
Split display of purchase orders by company view
2019-06-10 22:43:09 +10:00
Oliver Walters
b8bcc5ce0c
Separate display of open and closed purchase orders (per part)
2019-06-10 22:31:19 +10:00
Oliver Walters
228bf4e1da
Business logic
2019-06-10 22:17:19 +10:00
Oliver Walters
ec669dd670
Ability to 'issue' a purchase order
2019-06-10 22:14:23 +10:00
Oliver Walters
9efdd836f4
Tweak the 'on_order' calculation
2019-06-10 21:56:50 +10:00
Oliver Walters
351c5fb7d0
Fix for 'on_order' calculation
...
- Handle null results
2019-06-07 09:54:36 +10:00
Oliver Walters
31ad31365a
Calculate parts on order for a Part / SupplierPart
2019-06-07 08:37:25 +10:00
Oliver Walters
4af1f6ca9f
Update a TODO comment
2019-06-06 21:56:20 +10:00
Oliver Walters
4048091c2b
Prevent user from inputting a 'blank' supplier part into a line item
2019-06-06 21:55:02 +10:00
Oliver Walters
7b139a7f05
Form / view for creating a new purchase order
2019-06-06 21:39:04 +10:00
Oliver Walters
c1f3bddf45
Secondary modal for creating a new stock location when moving stock
2019-06-06 19:28:52 +10:00
Oliver Walters
ad5c6630bd
Bug fix in Build.completeBuild
2019-06-06 10:43:34 +10:00
Oliver Walters
96eb4086cf
Add form / view to edit purchase order details
...
- Cannot edit the COMPANY if there are line items already
2019-06-05 22:24:18 +10:00
Oliver Walters
bcc08f982b
Set default ajax form template
2019-06-05 22:08:22 +10:00
Oliver Walters
eced012ece
PEP fixes
2019-06-05 21:56:52 +10:00
Oliver Walters
04abe2b3d1
Display list of purchase orders against a particular supplier par
2019-06-05 21:50:11 +10:00
Oliver Walters
67248ec4dd
List purchase orders for a given part
2019-06-05 21:47:22 +10:00
Oliver Walters
9b2b2841d9
Hide 'order' input
2019-06-05 21:19:41 +10:00
Oliver Walters
8aa5452dd4
Add secondary modal to create a new supplier part
2019-06-05 21:17:29 +10:00
Oliver Walters
aee1ea9e35
Limit queryset
...
- Only parts from the supplier
- Exclude parts already in the order
2019-06-05 21:13:08 +10:00
Oliver Walters
f4abfc158f
Improve rendering of purchase order list
2019-06-05 21:02:51 +10:00
Oliver Walters
be6b1ae2f8
Updates for purchase order line items
...
- Display list of line items
- Add a form to create a new line item
2019-06-05 20:59:30 +10:00
Oliver Walters
e199ed2281
PEP fixes
2019-06-05 00:21:19 +10:00
Oliver Walters
c82d5482aa
Add a detail view for purchase orders
2019-06-05 00:17:25 +10:00
Oliver Walters
7bca9cc7af
Improve display of list of purchase orders
2019-06-05 00:02:34 +10:00
Oliver Walters
a9ba419503
Fix testing code
2019-06-05 00:00:05 +10:00
Oliver Walters
c49b8546f0
Index page for showing all purchase orders
2019-06-04 23:59:15 +10:00
Oliver Walters
4f1acddb5d
Fix some build status code thingies
2019-06-04 23:42:48 +10:00
Oliver Walters
f731c45ce8
Replace other choice fields with commonized status code
2019-06-04 23:38:52 +10:00
Oliver Walters
8d70d2f28a
Fix rendering of purchase order status codes
2019-06-04 23:14:57 +10:00
Oliver Walters
76a72be926
Add order status field
...
- Display status field in PurchaseOrder list view
2019-06-04 23:09:51 +10:00
Oliver Walters
da53de844a
Add page for detailing company purchase orders
2019-06-04 22:39:46 +10:00
Oliver Walters
c45d8a5782
Add 'purchase orders' tab for company
2019-06-04 22:35:34 +10:00
Oliver Walters
cc2e3351ff
Search for company
2019-06-04 22:34:58 +10:00
Oliver Walters
0e29f9b88c
Fix related name
2019-06-04 22:26:40 +10:00
Oliver Walters
54b1ccd585
Allow blank PO description and add URL field
2019-06-04 22:26:19 +10:00
Oliver Walters
68d514d478
Limit choices for supplier in PurchaseOrder
2019-06-04 22:20:49 +10:00
Oliver Walters
d840b44f7a
Create initial models for 'Order'
...
- PurchaseOrder
- PurchaseOrderLineItem
(These are based on some abstract model classes)
2019-06-04 22:19:04 +10:00
Oliver Walters
60f5160d24
Show total stock rather than taking allocation into account
2019-06-03 22:04:48 +10:00
Oliver Walters
782ad57f52
Re-enable image hovering where appropriate
2019-06-03 22:03:22 +10:00
Oliver Walters
8e0e2979b5
Rename parts tab in build view
2019-06-03 22:01:23 +10:00
Oliver Walters
68e4adda48
Simplified build allocation view
2019-06-03 21:59:15 +10:00
Oliver Walters
7a3b186a0c
Fix double loading of modals.html
2019-06-03 21:51:59 +10:00
Oliver Walters
7a244f48ae
Solve weird collapse bug
...
- HTML is so gross
- Disable image hover seems to work...
2019-06-03 21:35:40 +10:00
Oliver Walters
bb5ed0b9fe
Fix bug for BuildItem with no part image
...
- Can't request a field what don't exist
2019-06-03 21:25:37 +10:00
Oliver Walters
219c438b82
Part name uniqueness is case insensitive
2019-06-02 20:37:59 +10:00
Oliver Walters
64d541f453
Hide result types which return no results
2019-06-02 20:28:17 +10:00
Oliver Walters
0b88953706
Form field rearrangement
2019-06-02 20:07:30 +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
fd2e2a71f9
Add search results for part-category and stock-location
2019-06-02 19:15:05 +10:00
Oliver Walters
3427f81a34
Improve part information display
...
- Better terminology
2019-06-02 14:47:40 +10:00
Oliver Walters
6e7f354a23
Add a 'LOST' status code for stockitem
2019-06-02 13:53:54 +10:00
Oliver Walters
013a85e6f7
Better dispaly of stock status
...
- Send status text in JSON
- Only display status if it is not "OK"
2019-06-02 13:53:11 +10:00
Oliver Walters
6982b2f0c2
Making PEP happy
2019-06-02 12:47:40 +10:00
Oliver Walters
802ff35cf3
Remove some now unused forms / views / etc
2019-06-02 12:45:44 +10:00
Oliver Walters
5177b7f836
Remove some defunct javascript
2019-06-02 12:24:40 +10:00
Oliver Walters
2ee35ec062
Stock counting now works
2019-06-02 12:20:26 +10:00
Oliver Walters
d365d7cc44
remove from stock now works
2019-06-02 12:15:44 +10:00
Oliver Walters
1b3ffada6d
Add-stock is now working
2019-06-02 12:13:22 +10:00
Oliver Walters
8dd9034563
Remove 'destination' field if we are not moving stock
...
- Allow different stock adjustment actions
2019-06-02 12:00:39 +10:00
Oliver Walters
d1ff115f74
Simplifiy js and improve template / form
2019-06-02 11:47:21 +10:00
Oliver Walters
c7503b4f9f
Consolidated form/view into single 'stock-adjust' endpoint
2019-06-02 11:37:04 +10:00
Oliver Walters
fe31205017
Stock movement now works!
2019-06-02 11:27:03 +10:00
Oliver Walters
0b54baf6db
POST the stock adjustment method back as a hidden form input
2019-06-02 11:15:12 +10:00
Oliver Walters
1b7762470d
catch a ValueError
2019-06-02 11:14:56 +10:00
Oliver Walters
96f6f6068e
Return message on succses
2019-06-02 11:05:40 +10:00
Oliver Walters
20963f83d9
Better error reporting for quantity
2019-06-02 11:00:28 +10:00
Oliver Walters
c228a4998c
Extract stock items from POST and return to form
2019-06-02 10:25:19 +10:00
Oliver Walters
e278bdbb90
Improve filtering for stock items
2019-06-02 09:14:45 +10:00
Oliver Walters
011f5a5efd
Delete rows interactively from stock adjustment form
2019-06-01 22:04:03 +10:00
Oliver Walters
6a04c8cbd3
Update stock_move form template
2019-06-01 21:16:59 +10:00
Oliver Walters
8214aef0db
Add template for hover_image
2019-06-01 21:13:51 +10:00
Oliver Walters
3869bc27c9
Whoops, that form was being used.
...
Created a copy of the form for multiple-item-stock-movements
2019-05-30 09:01:16 +10:00
Oliver Walters
56821abd09
CSS tweaks for modals
2019-05-29 23:13:26 +10:00
Oliver Walters
d321947026
Add stock item fields for each item passed to the form
2019-05-29 22:38:42 +10:00
Oliver Walters
0e3f74ef31
Pass list of selected stock items to the view
2019-05-29 22:24:22 +10:00
Oliver Walters
0ce6c5f7d5
Redirect non-ajax forms to /
2019-05-29 22:24:17 +10:00
Oliver Walters
2b4cb4d3e0
Beginning to move the stocktake forms server side
2019-05-29 22:24:11 +10:00
Oliver
da4f68e5a5
Merge pull request #375 from SchrodingersGat/group-stock-items
...
Group stock items
2019-05-29 01:05:57 +10:00
Oliver Walters
6a30485a4e
Initial work toward fixing stock issues
2019-05-29 01:03:21 +10:00
Oliver Walters
d512232aac
Readable css
2019-05-29 00:54:00 +10:00
Oliver Walters
ea03205c50
Don't need to detach and re-attach rows any more!!
2019-05-29 00:47:36 +10:00
Oliver Walters
2ccb014d9e
FINALLY sorting is working well
...
- Wrote a custom sorter which takes group rows into account
2019-05-29 00:45:35 +10:00
Oliver Walters
ecde201bb0
Update to newest bootstrap-table script
2019-05-29 00:20:01 +10:00
Oliver Walters
729968e65d
Better message for no stock found
2019-05-28 22:05:30 +10:00
Oliver Walters
1232a6cf17
PEP fixes
2019-05-28 22:01:52 +10:00
Oliver Walters
8c583750a2
Update the stock list API
...
- Custom data serialization is MUCH faster (~400ms compared to 3s)
- Cache location queries
- Flatten related field data
- Update stock table javascript to match
2019-05-28 21:45:27 +10:00
Oliver Walters
f7d521ca97
Reorder stock table columns
2019-05-28 19:13:46 +10:00
Oliver Walters
7ac52d4d9f
Optionally select which column gets grouped
...
- Allow grouping by numerical values
2019-05-28 19:12:10 +10:00
Oliver Walters
e4acca2951
Display stock item serial number (if it exists)!
2019-05-28 18:29:12 +10:00
Oliver Walters
807798810b
Color sub-group rows slightly differently
2019-05-28 18:17:16 +10:00
Oliver Walters
8255332950
Remove some debug messages
2019-05-28 18:12:47 +10:00
Oliver Walters
4011d66b6f
Display sub-location information
2019-05-28 18:08:50 +10:00
Oliver Walters
7120b940f0
Pre-collapse grouped columns
2019-05-28 17:51: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
64403f824a
And deltaco some code that went along with it
2019-05-27 22:46:17 +10:00
Oliver Walters
7de4ee80f1
Deltaco some dead code
2019-05-27 22:44:38 +10:00
Oliver Walters
5a9c19492b
Design an aggregation filter for stock items
...
- If 'aggregate=1' is sent to the stock API, aggregate the returned stock items by part and location
- Suprisingly this actually works right out of the gate
2019-05-27 22:44:13 +10:00
Oliver Walters
a305301b95
Switch between display and edit mode for build allocations
2019-05-27 08:07:38 +10:00
Oliver Walters
4d518f4512
PEP
2019-05-26 16:05:54 +10:00
Oliver Walters
8715e29c31
Add ability to make variant from template
2019-05-26 16:00:27 +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
1312148721
Filter parts by template or variant status (in API)
2019-05-26 11:15:41 +10:00
Oliver Walters
41eb195940
Thanks, PEP
2019-05-26 00:42:40 +10:00
Oliver Walters
e5bb6284db
Add variant-of to part detail view
2019-05-26 00:41:24 +10:00
Oliver Walters
2138977b07
Include template attachments in attachment count
2019-05-26 00:39:36 +10:00
Oliver Walters
d563e873ed
Change some icons
2019-05-26 00:35:52 +10:00
Oliver Walters
f3b17b2164
Add some form fields (might have to remove later)
2019-05-26 00:32:18 +10:00
Oliver Walters
21dd893c01
Display templated parts as italic in the part list
2019-05-26 00:29:17 +10:00
Oliver Walters
6603d6e9ed
PEP fixes
2019-05-26 00:22:05 +10:00
Oliver Walters
75b21bdd8f
Visual tweaks
2019-05-26 00:20:03 +10:00
Oliver Walters
7881a67db4
Calculate stock based on variant stock if part is a template
2019-05-26 00:01:01 +10:00
Oliver Walters
c45a506a10
Rename field part.has_variants to part.is_template
2019-05-25 23:58:31 +10:00
Oliver Walters
c3d75deb16
More 'limit_choices_to' limitations for template parts
2019-05-25 23:55:16 +10:00
Oliver Walters
9c1c008f33
Show attachments for the Template part under attachments tab
2019-05-25 23:50:24 +10:00
Oliver Walters
08ac7e2a36
Rendering tweaks
2019-05-25 23:45:26 +10:00
Oliver Walters
3d57483f0e
Add a 'new varian't button
2019-05-25 23:43:06 +10:00
Oliver Walters
bbe66472ee
Display list of part variants
2019-05-25 23:40:59 +10:00
Oliver Walters
39c4611598
Add a tab for part variants
2019-05-25 23:31:23 +10:00
Oliver Walters
75d38489d7
Add ability to filter stock by variants for a templated part
2019-05-25 23:26:46 +10:00
Oliver Walters
0e684071fa
Display message if a part is a template or a variant
2019-05-25 23:21:38 +10:00
Oliver Walters
d70110690b
Validate uniqueness for StockItems
...
- If the Part is a variant of a template, ensure that the serial numbers are unique across all instances of the template
- Prevent instantiation of a StockItem for a part which has variants
2019-05-25 23:09:04 +10:00
Oliver Walters
bc778c1451
Prevent a Part from both having variants and being a variant of something else
2019-05-25 22:43:47 +10:00
Oliver Walters
1a2fb9e170
Add 'has_variants' and 'variant_of' field for Part
...
- StockItem cannot point to a part which is a template part
2019-05-25 22:27:36 +10:00
Oliver Walters
9f4105e2e4
PEP fix
2019-05-25 22:02:36 +10:00
Oliver Walters
2760efac18
Fix similar error for Build object
2019-05-25 22:01:30 +10:00
Oliver Walters
ecfde46838
Fix error in BomItem creation
2019-05-25 21:57:59 +10:00
Oliver Walters
add601e296
Display supplier part results on search page
2019-05-24 21:34:00 +10:00
Oliver Walters
d5da93b9d0
Make supplier part list API searchable
2019-05-24 21:33:45 +10:00
Oliver
632be8f04f
Merge pull request #364 from SchrodingersGat/bom-footer
...
Display total part quantity in BOM footer
2019-05-23 23:23:52 +10:00
Oliver Walters
2bf80efc09
Display total part quantity in BOM footer
...
- https://stackoverflow.com/questions/45190917/bootstrap-table-footer-functions-not-working-data-footer-formatter
2019-05-23 23:18:35 +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
5664fc5472
Detail in StockItem API now optional
2019-05-23 22:57:45 +10:00
Oliver Walters
9052ccc181
Make 'part_detail' field in SupplierPart serializer optional
2019-05-23 22:44:37 +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
a6f95c70aa
Add detail view for Build model
2019-05-23 21:36:54 +10:00
Oliver Walters
4d35841233
Consolidate on 'pk' as the ID field in the API
2019-05-23 00:31:27 +10:00
Oliver Walters
27f956bffa
Part detail rendering improvements
2019-05-22 23:27:43 +10:00
Oliver Walters
cd7bc6cce5
Include pricing information in part supplier view
...
Also some CSS tweaks to secondary modal buttons
2019-05-22 22:11:27 +10:00
Oliver Walters
d3a5661dbd
Serializer fix
2019-05-21 15:42:52 +10:00
Oliver Walters
d1dfad591d
Pepperoni
2019-05-21 15:38:22 +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
2817e6ca31
Added further part pricing
2019-05-21 14:08:40 +10:00
Oliver Walters
cdcc4f9ca1
Simple tests for price breaks
2019-05-21 13:53:25 +10:00
Oliver Walters
6f73c379c2
Remove 'minimum' order from SupplierPart
...
- This can be handled using the 'PriceBreak' set
2019-05-21 13:51:43 +10:00
Oliver Walters
357bfdae3f
Add some test fixtures for Company app
2019-05-21 13:33:05 +10:00
Oliver Walters
f19d4eec79
Improve query speed for supplierpart api
2019-05-21 08:19:16 +10:00
Oliver Walters
9d5b938ced
Don't serialize 'available_stock' in PartSerializer
2019-05-21 07:57:44 +10:00
Oliver Walters
ca9d6e6e25
PEP fixes
2019-05-21 00:54:48 +10:00
Oliver Walters
49ed17db56
Add a line
2019-05-21 00:52:17 +10:00
Oliver Walters
ae865d1de1
Commit
2019-05-21 00:40:42 +10:00
Oliver Walters
4b41766312
And mode
2019-05-21 00:31:34 +10:00
Oliver Walters
72aba30e81
More hungry fetching
2019-05-21 00:16:00 +10:00
Oliver Walters
157919f47a
More prefetching
...
-
2019-05-21 00:06:57 +10:00
Oliver Walters
6ae48d07c4
Cleanup pricing algorithms
2019-05-20 23:53:39 +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
4bde00d925
AND AGAIN
...
Use --fake to force the migration
2019-05-20 22:24:18 +10:00
Oliver Walters
ee2ddbf512
Reduce some database queries by using aggregate Sum
2019-05-20 21:47:30 +10:00
Oliver Walters
dd5de91c23
Add middleware to report response time (and number of queries)
2019-05-20 21:46:50 +10:00
Oliver Walters
70be052c74
Rebuilt migrations again (arrrrrrrrrrrrrrrrrrrrrrrrrrgh never do this)
2019-05-20 21:45:37 +10:00
Oliver Walters
34620b22b0
Add a middleware to count queries
...
- https://www.dabapps.com/blog/logging-sql-queries-django-13/
2019-05-20 18:51:57 +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
73041a3fe6
Fix div-by-zero for part pricing
2019-05-20 07:53:23 +10:00
Oliver Walters
9ddedc6915
Restart migrations
...
- Easier to delete all the migrations and start again :'(
2019-05-19 00:11:41 +10:00
Oliver Walters
a8846dc515
Hopefully fix the thingy
2019-05-18 23:52:22 +10:00
Oliver Walters
a54760b219
Improve pricing display
2019-05-18 23:44:43 +10:00
Oliver Walters
ffda5a1b29
Add warning if no pricing data available
2019-05-18 23:13:18 +10:00
Oliver Walters
368193d397
Fix formatting
2019-05-18 23:09:12 +10:00
Oliver Walters
dcf79338c1
Add pop-up pricing window for part
...
- Cost to purchase from suppliers
- Cost to build from BOM
2019-05-18 23:09:08 +10:00
Oliver Walters
54ccf6c7b3
PEP
2019-05-18 23:09:04 +10:00
Oliver Walters
b64a29b897
Display build pricing information
2019-05-18 23:09:00 +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
4c82714777
Allow 5 decimal places for pricing info
2019-05-18 23:08:47 +10:00
Oliver Walters
cdc55bb5d3
PEP fixes
2019-05-18 23:08:42 +10:00
Oliver Walters
a3d1591929
Display part pricing in Part view
...
- Calculate min_price and max_price based on provided supplier information
2019-05-18 23:08:38 +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
5043c354b1
Set default value for SupplierPriceBreak
...
Edit or Delete a SupplierPriceBreak
2019-05-18 23:08:30 +10:00
Oliver Walters
fc3072a459
Form for creating a new price break for a supplier part
2019-05-18 23:08:25 +10:00
Oliver Walters
1163f60b23
Return price breaks in the correct order
2019-05-18 23:08:21 +10:00
Oliver Walters
a3cd54875c
Update validator for supplier price break
2019-05-18 23:08:17 +10:00
Oliver Walters
92632b2ef7
PartAttachment attachment file is actually required!
2019-05-18 23:08:13 +10:00
Oliver Walters
a1461de297
Add supplierpricebreak model to the admin interface
2019-05-18 23:08:09 +10:00
Oliver Walters
613c96e093
Part attachment comment field is required
2019-05-18 23:08:04 +10:00
Oliver Walters
a2dbdfe794
Remove 'single_price' field from supplier part
...
- Instead we will rely entirely on the SupplierPriceBreak model
2019-05-18 23:07:58 +10:00
Oliver Walters
001dacc14e
Display 'no stock available' warning
2019-05-18 13:24:15 +10:00
Oliver Walters
04420b7f6b
Improve display of allocation page
2019-05-18 13:06:19 +10:00
Oliver Walters
a95e77c429
Pre-fill allocation count
2019-05-18 12:17:57 +10:00
Oliver Walters
34d1ef7d8d
Change label size for build status
2019-05-18 09:44:16 +10:00
Oliver Walters
0ce5240361
More UI stuff for the Build page
2019-05-17 16:35:23 +10:00
Oliver Walters
a2eeb7e946
Bug fix for part/stock
...
- Re-introduce the button to create a new stock item
2019-05-17 16:35:16 +10:00
Oliver Walters
3a3662ae14
Add part image
2019-05-17 00:31:35 +10:00
Oliver Walters
489d5de9c4
UI tweaks
2019-05-17 00:23:08 +10:00
Oliver Walters
2da3a022bf
Add allocation tab
2019-05-17 00:20:48 +10:00
Oliver Walters
bf987f23f3
Add 'tabbed' page set for Build app
2019-05-17 00:14:29 +10:00
Oliver Walters
b77b6d2256
Display number of supplier parts in supplier list
2019-05-16 22:29:39 +10:00
Oliver Walters
5ebc7b040a
Show current quantity in stocktake form
2019-05-16 22:23:31 +10:00
Oliver Walters
117fd701cd
Refactor some code
2019-05-16 22:19:49 +10:00
Oliver Walters
0a1887477c
Create template for stock table
2019-05-16 22:15:44 +10:00
Oliver Walters
b8f5c8cca7
Add confirmation box to stocktake form
2019-05-16 22:12:13 +10:00
Oliver Walters
7ef448d205
PEP
2019-05-16 21:26:53 +10:00
Oliver Walters
64a82389a2
Add ability for Company model to count stock sourced from that supplier
2019-05-16 21:26:12 +10:00
Oliver Walters
1b06cd23af
Add 'stock' tab for supplier page
2019-05-16 21:16:19 +10:00
Oliver Walters
c1224048ad
Add ability to filter stock by supplier
2019-05-16 21:01:34 +10:00
Oliver Walters
b4df96aaee
Simplify extended filters
2019-05-16 19:14:43 +10:00
Oliver Walters
e1558a7a96
Add ability to filter stock items by part category
...
- Using the REST API
- Add &category=x to the query string
- Add &include_child_categories to include child categories
2019-05-16 18:54:14 +10:00
Oliver Walters
387711a9a1
Fix help string
2019-05-16 18:08:37 +10:00
Oliver Walters
fae44c3002
Bug fix for part deep-copy
...
- Don't copy an image if an image doesn't exist
2019-05-15 09:21:31 +10:00
Oliver Walters
292e29e95e
Add some more secondary modals
2019-05-15 07:50:54 +10:00
Oliver Walters
a1d587b7f4
Rename 'Company' to 'Suppliers' in front-end
2019-05-15 07:44:13 +10:00
Oliver Walters
c6331255de
Fixes
2019-05-15 07:23:55 +10:00
Oliver Walters
8c92c2c2a1
Display overage values in BOM table
2019-05-15 07:23:02 +10:00
Oliver Walters
68ae38a7d7
Calculate total quantity required for a build (including overages)
2019-05-15 00:36:02 +10:00
Oliver Walters
a80c11f3ce
Add function to infer default_supplier for a Part
2019-05-15 00:22:10 +10:00
Oliver Walters
f6baf5d2ae
Add 'overage' field to BOM item
...
- Accepts absolute or percentage numbers
- Default = blank
- Now with custom validator! (for limited time only, limit one per customer)
2019-05-15 00:16:34 +10:00
Oliver Walters
f979edef8e
Prevent double loading of stock.js
2019-05-14 23:47:15 +10:00
Oliver Walters
2e5b3bfdf9
Prevent multiple loads of part.js
2019-05-14 23:44:33 +10:00
Oliver Walters
58cc1cda77
Only load api.js once
2019-05-14 23:43:16 +10:00
Oliver Walters
0ffe2666b3
Added some missing help text
2019-05-14 23:36:22 +10:00
Oliver Walters
505b7941b1
Add link to delete a part
...
- Part must first be deactivated
2019-05-14 23:33:25 +10:00
Oliver Walters
76e6094977
Add secondary modal to BOM
2019-05-14 23:30:32 +10:00
Oliver Walters
9d50f2a6ac
Toot toot all aboard the refactor tractor
...
- launchModalForm now accepts a 'secondary' parameter which is a list of secondary modals to attach
2019-05-14 23:27:45 +10:00
Oliver Walters
97c4e5acbf
Add some secondary buttons to the part-create form
2019-05-14 23:19:56 +10:00
Oliver Walters
be1b458634
Upon successful creation (in a secondary modal) update the field in the primary modal
2019-05-14 23:04:49 +10:00
Oliver Walters
a316681ec8
Pass object data back to modal when creating new object
2019-05-14 23:04:00 +10:00
Oliver Walters
21c238e96a
Secondary modal is slightly smaller than primary
...
- So that the primary modal is still visible underneath
2019-05-14 22:44:57 +10:00
Oliver Walters
226644e59a
Open a secondary modal over the top of a primary one
2019-05-14 22:37:45 +10:00
Oliver Walters
dc3abec899
Add a secondary modal in modals.html
2019-05-14 22:30:24 +10:00
Oliver Walters
a96cd2240c
Function to insert a 'create new' button into a form
...
- Look for a label like <label for="id_<field>">
2019-05-14 22:12:22 +10:00
Oliver Walters
0cc2e71843
Provide an after_render callback
...
- User callback after the form data are rendered
2019-05-14 19:00:59 +10:00