Oliver Walters
db9970e5df
Add some further unit tests for the Build model
2020-04-27 21:44:59 +10:00
Oliver Walters
cb3fe0fc35
Add some more unit testing for the builds
2020-04-27 21:28:44 +10:00
Oliver Walters
35f48ed899
Delete BuildItem objects once a Build has been completed
...
- Much more complicated template for build allocation page!
- This will require some refactoring at some point ...
2020-04-27 20:46:34 +10:00
Oliver Walters
2b99cf353a
Fix for build complete form
2020-04-27 20:16:41 +10:00
Oliver Walters
646dd65d27
Re-enable auto-allocation for build
2020-04-27 20:05:02 +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
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
72c43d0c2d
Bug fix for build completion form
2020-04-25 23:59:28 +10:00
Oliver Walters
50dbebdf59
Improve rendering of BuildComplete template
2020-04-25 23:44:03 +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
c11b433d94
Make Build object into a MPTT tree model
...
- Builds can have child builds
2020-04-25 15:25:17 +10:00
Oliver Walters
d5f3498238
Add a "sales_order" reference to the Build model
...
- If a build order is made to fulfil a sales order
- Add sales_order filtering to the Build API
- Pass initial information through to the BuildCreate view
2020-04-25 13:15: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
789712acbe
Rename Build.URL -> Build.link
2020-04-06 11:28:35 +10:00
Oliver Walters
8eaaf62eda
Limit choices for Part selection
...
Based on is_template / virtual / active status
2020-03-18 21:28:11 +11:00
Oliver Walters
23aebab6d0
Display list of build outputs in the Build tab
...
- Allow StockList api to be filtered by Build id
2020-02-17 23:31:23 +11:00
Oliver Walters
5ae7ca71d7
Improve number rendering of build allocation page
2020-02-12 08:12:26 +11:00
Oliver Walters
cb29ff14e0
Change auto_now field to auto_now_add
...
- Build creation date should no longer get erroneously updated
2020-02-10 21:34:41 +11:00
Oliver Walters
a7846940c4
Markdownify the notes field for Build model
2020-02-02 00:00:19 +11:00
Oliver Walters
a1f33c4084
Change build allocation quantity to decimal field
2019-11-19 10:22:46 +11:00
Oliver Walters
70e07470db
Custom URL validators for more fields
2019-09-14 00:08:49 +10:00
Oliver Walters
c45c4e236e
Point new stockitem to the correct build
2019-09-01 23:18:28 +10:00
Oliver Walters
23d03d6b9b
Build completion now handles unique serial numbers
...
Provide a method to test if a serial number matches for a given part
2019-07-22 15:55:36 +10:00
Oliver Walters
008a55d3d7
Squashed a bug
2019-06-17 23:02:44 +10:00
Oliver Walters
ad5c6630bd
Bug fix in Build.completeBuild
2019-06-06 10:43:34 +10:00
Oliver Walters
e199ed2281
PEP fixes
2019-06-05 00:21:19 +10:00
Oliver Walters
a9ba419503
Fix testing code
2019-06-05 00:00:05 +10:00
Oliver Walters
f731c45ce8
Replace other choice fields with commonized status code
2019-06-04 23:38:52 +10:00
Oliver Walters
0b88953706
Form field rearrangement
2019-06-02 20:07:30 +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
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
72aba30e81
More hungry fetching
2019-05-21 00:16:00 +10:00
Oliver Walters
387711a9a1
Fix help string
2019-05-16 18:08:37 +10:00
Oliver Walters
8c92c2c2a1
Display overage values in BOM table
2019-05-15 07:23:02 +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
164f98540d
Merge pull request #297 from SchrodingersGat/field-doc
...
Field doc
2019-05-10 20:18:51 +10:00
Oliver Walters
ba2f565e35
docstring improvements
...
- Added Attribute docstring to all model objects
2019-05-10 20:11:52 +10:00
Oliver Walters
763e0a991c
Limit user choices in the manual part allocation form
2019-05-10 19:12:56 +10:00
Oliver Walters
3588161632
Build.getAutoAllocations() only selects parts from the designation location
2019-05-10 19:03:45 +10:00
Oliver Walters
468322fa9d
Add field 'take_from' to Build
2019-05-10 19:03:10 +10:00
Oliver Walters
05f5aa27c5
Add a 'Remove build allocation' function
...
- Removes all parts allocated to a given build
2019-05-10 08:33:54 +10:00
Oliver Walters
7835562396
Auto-allocation form now working
...
- Displays a list of stock items which will be allocated
2019-05-09 23:55:30 +10:00
Oliver Walters
e9c904076f
Added help text for model fields
2019-05-08 23:32:57 +10:00
Oliver Walters
40d8332e7f
Add 'allocated' status code to build
...
- This means that parts have been taken from stock
2019-05-08 07:48:39 +10:00
Oliver Walters
85869c07f6
Add 'allocated' column to Build detail view
2019-05-07 23:31:41 +10:00
Oliver Walters
7dd7b68ed6
Improve functions
2019-05-07 23:03:05 +10:00
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