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
9a8e4d25d2
Input serial numbers when creating a new build
2019-07-22 13:45:09 +10:00
Oliver Walters
20ec36d3ea
Enforce authentication for API access
2019-07-08 19:20:00 +10:00
Oliver Walters
776ca7db12
Visual style for build
2019-06-19 08:03:39 +10:00
Oliver Walters
008a55d3d7
Squashed a bug
2019-06-17 23:02:44 +10:00
Oliver Walters
760d08608f
Minor test addition for builds
2019-06-17 22:41:44 +10:00
Oliver Walters
73b9881dc5
Improve table rendering for build allocation view
2019-06-13 22:18:27 +10:00
Oliver Walters
a37a2120fa
Add some context data to build views
2019-06-13 21:32:37 +10:00
Oliver Walters
2b74a0ed2c
Don't show zero-quantity items when ordering against a build
2019-06-13 21:28:01 +10:00
Oliver Walters
b138a4bd5f
Order parts directly from a build
2019-06-12 00:21:18 +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
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
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
0b88953706
Form field rearrangement
2019-06-02 20:07:30 +10:00
Oliver Walters
8214aef0db
Add template for hover_image
2019-06-01 21:13:51 +10:00
Oliver Walters
a305301b95
Switch between display and edit mode for build allocations
2019-05-27 08:07:38 +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
a6f95c70aa
Add detail view for Build model
2019-05-23 21:36:54 +10:00
Oliver Walters
72aba30e81
More hungry fetching
2019-05-21 00:16:00 +10:00
Oliver Walters
4bde00d925
AND AGAIN
...
Use --fake to force the migration
2019-05-20 22:24:18 +10:00
Oliver Walters
70be052c74
Rebuilt migrations again (arrrrrrrrrrrrrrrrrrrrrrrrrrgh never do this)
2019-05-20 21:45:37 +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
b64a29b897
Display build pricing information
2019-05-18 23:09:00 +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
0ce5240361
More UI stuff for the Build page
2019-05-17 16:35:23 +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
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
58cc1cda77
Only load api.js once
2019-05-14 23:43:16 +10:00
Oliver Walters
2164cac28a
PEP
2019-05-14 18:32:20 +10:00
Oliver Walters
46ab6e40eb
Bug fix for build allocation
...
- If the part did not have an image file the template failed to render
2019-05-14 18:31:19 +10:00
Oliver Walters
9986df2074
Add confirmation to cancel a build
2019-05-14 18:20:54 +10:00
Oliver Walters
edc2cc49c2
Fix deletion form for BuildItem
2019-05-13 23:03:32 +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
bbf46c4580
Display 'take_from' location on build detail page
2019-05-10 19:07:38 +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
66b729d579
Moved 'complete build' button to the build detail page
2019-05-10 08:44:07 +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
345913bc90
Improve rendering of 'Complete Build' form
2019-05-09 23:59:39 +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
40ca468b51
Added title for 'Build' app
2019-05-09 18:27:16 +10:00
Oliver
aafc4e367d
Merge pull request #265 from SchrodingersGat/help-text
...
Help text
2019-05-09 00:15:55 +10:00
Oliver Walters
e9c904076f
Added help text for model fields
2019-05-08 23:32:57 +10:00
Oliver Walters
d971747404
Improved part thumbnails in build allocation
2019-05-08 23:03:28 +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
cd514bf1db
Mark who a build was completed by
2019-05-07 23:39:42 +10:00
Oliver Walters
85869c07f6
Add 'allocated' column to Build detail view
2019-05-07 23:31:41 +10:00
Oliver Walters
29b94c91f3
Display part images in build allocation list
...
(CSS needs some work)
2019-05-07 23:28:46 +10:00
Oliver Walters
7101d9cb7e
Add part description to build allocation table
2019-05-07 23:09:36 +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
e58bed41b0
Visual style improvements
2019-05-07 21:24:09 +10:00
Oliver Walters
7e81d9021f
Auto-show the active build table
2019-05-07 21:24:09 +10:00
Oliver Walters
c10ddab30c
Improve display of Build index
2019-05-07 21:24:09 +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
b32a9ed597
Add 'About InvenTree' modal
...
- Accessible from the top-right dropdown menu
- Add InvenTree/version.py which contains helper functions
2019-05-04 11:23:30 +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
0be4ee5d92
PEP fix
2019-05-02 21:29:27 +10:00
Oliver Walters
1295390b03
Rendering changes
2019-05-02 21:28:47 +10:00
Oliver Walters
a0ad95ab28
Save the date of Build cancellation
2019-05-02 21:23:53 +10:00
Oliver Walters
b91de1af7b
Separate active / complete / cancelled builds
2019-05-02 21:16:35 +10:00
Oliver Walters
38100520df
Add 'to_order' and 'to_build' collapsible panels
2019-05-02 20:18:34 +10:00
Oliver Walters
fbb120da53
Use collapse template in allocation page
2019-05-02 18:53:03 +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
a4aec425be
Render better build description in complete form
...
- List of items to be removed from stock
- Detail of what will be created
2019-05-02 00:12:28 +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
29f7b1a32b
Revert "More intelligent passing of context data in AjaxView"
...
This reverts commit fbb9a708f5
.
2019-05-01 22:52:33 +10:00
Oliver Walters
fbb9a708f5
More intelligent passing of context data in AjaxView
...
- If context is not explicitly supplied, use default get_context_data() function
2019-05-01 22:45:41 +10:00
Oliver Walters
7f63a94f15
Cancel build function now works
2019-05-01 22:22:14 +10:00
Oliver Walters
98109bb1a1
Make build allocation much more intuiitive
...
- Display current allocation + total allocation requirement
- Color code results
- Required custom 'multiply' template tag
2019-05-01 22:12:34 +10:00
Oliver Walters
ad1d75c259
Improve table formatting when no allocation items found
2019-05-01 18:54:54 +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
b6becbc570
Rework build allocation
...
- Each item renders as a collapsible panel with overview data at the top
2019-05-01 07:48:46 +10:00
Oliver Walters
7e7ac60a1a
Tweaks
...
- Can't edit build status directly
- Refresh BOM table on reload
- Hide Company tabs that are not yet functional
2019-04-30 20:55:28 +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
efbef251b6
Added views / forms to edit and delete BuildItem objects
...
- Alter stock allocation
- remove (unallocate) stock from a build
2019-04-30 18:51:05 +10:00
Oliver Walters
24ed6f393b
When adding new item allocations, filter the available stock items
...
- Must match the appropriate part
- Remove items that are already allocated
2019-04-30 16:38:09 +10:00
Oliver Walters
6961d1ec68
Catch BuildItem errors in clean()
2019-04-30 16:35:55 +10:00
Oliver Walters
fbd5a2a270
Register BuildItem in admin interface
2019-04-30 16:35:40 +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
0208c6efe6
New Form and View to create a new BuildItem object
...
- Allocates stock to a build
2019-04-30 15:35:35 +10:00
Oliver Walters
aa491e336d
Move javascript for Build allocation to build.js
2019-04-30 14:42:48 +10:00
Oliver Walters
a3d4c81939
Display and edit build URL field
2019-04-30 14:04:43 +10:00
Oliver Walters
395db4df38
Pepe fixes
2019-04-30 00:18:58 +10:00
Oliver Walters
5c5411132a
First pass at build allocation table
...
- Uses bootstrap-table "detailView" function
2019-04-29 23:56:02 +10:00
Oliver Walters
192f604b76
Override get_queryset for BuildItem API view
...
- Special management to allow filtering by part
2019-04-29 23:45:05 +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
a9fbbc3a37
Remove references to get_object_or_404
...
- Properly handle DoesNotExist errors
2019-04-28 11:09:19 +10:00
Oliver Walters
d55ea1a982
PEP fixes
2019-04-28 01:09:48 +10:00
Oliver Walters
aa04941bf1
Add module-level docstrings for each app
2019-04-28 01:05:45 +10:00
Oliver Walters
a499fd325e
Docstring for Stock app
2019-04-27 22:49:16 +10:00
Oliver Walters
ed3ae30248
Documentation for Part app
2019-04-27 22:18:07 +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
7b68310d73
PEP fixes
2019-04-25 03:20:25 +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 Walters
0654fa7cc9
Deleted unused forms in Build
...
- These now use modal forms
- Removed redundant templates
2019-04-18 23:35:06 +10:00
Oliver Walters
ebcbf9a90e
Add status_text to API
2019-04-17 23:33:19 +10:00
Oliver Walters
01bdf2f19b
PEP fixes
2019-04-16 22:32:43 +10:00
Oliver Walters
29f33a8eec
Move button locations into bootstrap-table headers
...
- part category
- stock location
- build list
- company list
- supplier part list
2019-04-16 11:46:07 +10:00
Oliver Walters
338a30b50e
API endpoint for build list
...
- Changed part/build table to bootstrap table (ajax)
2019-04-16 08:31:43 +10:00
Oliver Walters
b9f23554a5
PEP fixes for /build
2019-04-14 09:29:05 +10:00
Oliver Walters
e6e03963c4
Simplified custom button text for modal forms
...
- Now only configured from the javascript end
- No server-side configuration of button text
2019-04-13 23:02:23 +10:00
Oliver Walters
c67dc6f56e
Initial updates required to run under django 2.2
...
- Change to middleware.py
- Change some URLs formatting
- Fix django version at 2.2
2019-04-12 20:44:22 +10:00
Oliver
ceea053368
Added part API
...
- Build allocation table now makes use of this API
- Further steps towards allocation table
2018-05-12 12:44:29 +10:00
Oliver
07f16d8891
Small improvements for build display
...
Working toward build management
2018-05-09 22:02:56 +10:00
Oliver
3f1c6e2059
Simplified modal calls
...
- Default modal target supplied (can be overridden in options)
2018-05-08 19:55:39 +10:00
Oliver
c5155d5ac7
Move modal JS file
...
- Loaded by base.
2018-05-08 19:40:29 +10:00
Oliver
a1eeeab64c
Build table now bootstrap-table'd
2018-05-04 01:39:20 +10:00
Oliver
211edb23bb
Removed footable
...
- Now using bootstrap-table
2018-05-02 22:22:43 +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
d68b51e007
Add ability to move a stock item
2018-04-30 01:00:18 +10:00
Oliver
bee760d184
Deleted extraneous form code
2018-04-30 00:59:36 +10:00
Oliver
5185173639
Updates for build app
...
- Added 'allocate' page (empty thus far)
- Added 'cancel' button and view
2018-04-30 00:23:44 +10:00
Oliver
aca0d236ee
Javascript consolidation
2018-04-29 12:25:07 +10:00