Commit Graph

138 Commits

Author SHA1 Message Date
Oliver Walters
4f84febbd1 More intelligent BuildItem allocation
- Set initial value for quantity based on how many parts are left to allocate
- Auto select the StockItem to take from (if there is only one)
2019-05-07 22:46:37 +10:00
Oliver Walters
ff14b0b363 Ensure that a StockItem is not already allocated to a Build 2019-05-07 21:24:09 +10:00
Oliver Walters
7c70b31af4 Build no longer auto-allocates on creation
- Provide 'auto allocation' function which can be run by the user
2019-05-07 21:24:09 +10:00
Oliver Walters
b9e5afa768 PEP 2019-05-05 22:35:39 +10:00
Oliver Walters
9bbcc35959 Builds can only be made for active parts 2019-05-05 22:34:14 +10:00
Oliver Walters
4ef1e4fc78 Explicitly mark some CharField as non blank 2019-05-04 17:01:31 +10:00
Oliver Walters
9c4a5d10fa PEP fixes 2019-05-03 08:04:30 +10:00
Oliver Walters
019d5aa4ba Add 'completed_by' field to Build
- On Complete() or Cancel() user field is filled in
2019-05-03 07:58:46 +10:00
Oliver Walters
a0ad95ab28 Save the date of Build cancellation 2019-05-02 21:23:53 +10:00
Oliver Walters
09b7846310 Improve edit form for BuildItem
- Hide the build field
- Limit the choices for StockItem (don't let user change the allocation!)
2019-05-02 00:25:19 +10:00
Oliver Walters
905d78e25c Complete build now works
- Marks build as complete
- Deletes temporary BuildItem objects
- Preselects the part's default_location if there is one
- Creates a new stockitem in the selected location
2019-05-02 00:04:39 +10:00
Oliver Walters
7f63a94f15 Cancel build function now works 2019-05-01 22:22:14 +10:00
Oliver Walters
7dd960a299 PEP fixes 2019-05-01 08:19:57 +10:00
Oliver Walters
fc42cca10e Automatically allocate parts when a Build is created
- If there is only one StockItem to choose from, allocate parts from that StockItem
2019-05-01 08:08:50 +10:00
Oliver Walters
fb89574c42 Skeleton code for Build cancel() and complete() functions
- BuildComplete view
2019-04-30 20:39:01 +10:00
Oliver Walters
d518739643 PEP fixes 2019-04-30 19:17:54 +10:00
Oliver Walters
6961d1ec68 Catch BuildItem errors in clean() 2019-04-30 16:35:55 +10:00
Oliver Walters
db5521f02e Limit available choicse in form
- Only allow selection of StockItem which matches the correct part
2019-04-30 15:48:26 +10:00
Oliver Walters
c29827e45a Add API endpoint and serializer for BuildItem model 2019-04-29 22:59:42 +10:00
Oliver Walters
17d9d25fb9 Require Build and StockItem to be unique_together in BuildItem class 2019-04-29 22:56:40 +10:00
Oliver Walters
f42116c0d9 Renamed 'stock' to 'stock_item' 2019-04-29 22:33:39 +10:00
Oliver Walters
e25579141e Rename BuildItemAllocation to BuildItem 2019-04-29 22:30:21 +10:00
Oliver Walters
989611cae2 Added BuildItemAllocation Model
- Used to link stock items to a build
2019-04-29 22:19:13 +10:00
Oliver Walters
d55ea1a982 PEP fixes 2019-04-28 01:09:48 +10:00
Oliver Walters
c3f0570926 Add docstring to Company app 2019-04-27 20:43:27 +10:00
Oliver Walters
d9169a0dd1 Add docstrings for Build app 2019-04-27 20:35:14 +10:00
Oliver Walters
5098712d9c Use reverse to get Build URL
- Add test cases to Build
2019-04-24 23:47:39 +10:00
Oliver
7c3b1f9bb4 Function to test if enough parts for a build 2018-05-01 09:00:09 +10:00
Oliver
dad594dc7a Tweaked build detail page 2018-05-01 08:55:51 +10:00
Oliver
08ed128bea PEP style fixes 2018-04-23 21:18:35 +10:00
Oliver
4bedf0ed4c Finally got migrations working together 2018-04-22 21:54:12 +10:00
Oliver
d8d3509b5e Changes 'notes' fields to be textfield - not charfield 2018-04-18 01:16:30 +10:00
Oliver
192f823b1a PEP fixes (not all yet) 2018-04-18 00:03:42 +10:00
Oliver
291992ab7f Added views and pages for Build model
- Edit / create
- View details
- View build index at /build/
2018-04-17 23:13:41 +10:00
Oliver
0b40197cd2 Update 'Build'
- Part model now has active_builds and inactive_builds properties
-
2018-04-17 20:25:43 +10:00
Oliver
256f8eb924 Add 'batch' field to BuildOutput object
This 'batch' output will be copied to any parts produced as part of this build
2018-04-17 19:10:38 +10:00
Oliver
9dc41ba122 Fix requirements
>= rather than ==
2018-04-17 16:58:37 +10:00
Oliver
fa23767150 Added skeleton for 'build' app 2018-04-17 00:32:02 +10:00