Oliver Walters
c4944268f3
Count the number of rows in the BOM file
2019-06-27 23:09:06 +10:00
Oliver Walters
9813205419
Perform 'matching' on imported field names
2019-06-27 22:57:55 +10:00
Oliver Walters
45d16f2c42
Create new file bom.py for BOM helper functions
...
- New class for managing BOM upload
2019-06-27 22:46:11 +10:00
Oliver Walters
65c7454124
Require certain headers to be present in the file
2019-06-27 22:16:24 +10:00
Oliver Walters
2831ac55c4
Link to download a BOM template file
2019-06-27 22:15:58 +10:00
Oliver Walters
3085db44af
Add 'reference' field to BOM item model
2019-06-27 21:44:40 +10:00
Oliver Walters
72486448b8
Fix form title
2019-06-27 21:17:33 +10:00
Oliver Walters
86695cf2bb
Validate uploaded BOM file with tablib
...
- Check to see if a bom_file file object was uploaded
- Pass off to the BOM file validity checker
- Only a valid tabulated dataset will be accepted
2019-06-27 21:09:33 +10:00
Oliver Walters
8b207d0d1d
Initial work towards uploading a BOM file
...
- Create a form with a single FileField
2019-06-27 21:09:33 +10:00
Oliver Walters
2dc43f0cf1
no message
2019-06-27 21:08:49 +10:00
Oliver Walters
cbfb6bd24c
no message
2019-06-25 19:16:24 +10:00
Oliver Walters
d6fcf85cd2
Set part category for multiple parts at once
2019-06-25 19:15:39 +10:00
Oliver Walters
faf2fd408f
PEP fix
2019-06-24 00:01:34 +10:00
Oliver Walters
a5306ec81b
Add 'revision' field to part
...
- e.g. different versions of a product
- Can keep old versions in database and mark as inactive
2019-06-20 21:46:16 +10:00
Oliver Walters
8328e7e13c
Improve uniqueness checking for Part
2019-06-20 21:37:25 +10:00
Oliver Walters
d5119e1aff
Replace some cog icons
2019-06-20 21:28:00 +10:00
Oliver Walters
6e1b7bf3f0
Fix buttons in attachment table
2019-06-19 19:05:18 +10:00
Oliver Walters
d837a1f9a2
Buttonize the part category page
2019-06-19 18:54:32 +10:00
Oliver Walters
fefbcf2ed9
Clean up buttons for stock location
2019-06-19 18:49:05 +10:00
Oliver Walters
afcbd73026
Consolidate visual style for "Part" tabs
2019-06-19 07:58:14 +10:00
Oliver Walters
c0e66dd9a0
Added pretty buttons to stock item page
2019-06-18 23:56:00 +10:00
Oliver Walters
0285d3ee83
Improved button mechanics
2019-06-18 22:54:32 +10:00
Oliver Walters
8842d50c72
Replace a whole bunch o' drop-down options with pretty buttons
2019-06-18 22:49:43 +10:00
Oliver Walters
ee5722857f
Re-add 'new stock item' button
2019-06-18 22:13:54 +10:00
Oliver Walters
3349d0c0df
Remove part 'type' fields from form
...
These are now presented as virtual buttons
2019-06-18 21:43:51 +10:00
Oliver Walters
1d67b4cdaa
Sliders now update the part options via AJAX
2019-06-18 19:24:10 +10:00
Oliver Walters
65a8a30f87
Many improves of the slidies
2019-06-18 19:05:09 +10:00
Oliver Walters
783b8964d1
Add 'slide' for part type
2019-06-18 18:49:52 +10:00
Oliver Walters
c9c851bead
Add 'virtual' part flag
2019-06-18 18:34:07 +10:00
Oliver Walters
a47be24410
Fixed test cases
2019-06-18 01:38:43 +10:00
Oliver Walters
ea0da4c8f8
PEP
2019-06-18 01:32:29 +10:00
Oliver Walters
79cd05423c
Custom aggregation of Part API
...
- Reduced full part query from 2.5s to 200ms!
2019-06-18 01:31:30 +10:00
Oliver Walters
37dba91b4a
Add 'include self' option to getUniqueChildren
2019-06-18 01:02:56 +10:00
Oliver Walters
16b6ae8d61
Fixed up some stupid recursion on the Tree model template
2019-06-18 00:59:54 +10:00
Oliver Walters
642660d76e
Improved speed of stock tree
2019-06-18 00:09:42 +10:00
Oliver Walters
037dc6a0d6
Reduced tree time with some better queries
2019-06-17 23:52:49 +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
1b06d86f59
Export purchase order to CSV
2019-06-13 22:38:10 +10:00
Oliver Walters
c9b946655c
Add some more data to Part serializer
2019-06-13 18:33:15 +10:00
Oliver Walters
f0796327b3
Improve display of part base page
2019-06-12 00:29:47 +10:00
Oliver Walters
e4f5cc8ccd
Order from a part page
2019-06-12 00:04:20 +10:00
Oliver Walters
1cb6c67086
Launch order dialog from the 'Parts' table
2019-06-11 23:55:20 +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
3954b33fb7
Use 'on_order' count in calculation for parts we need to order
2019-06-10 23:05:14 +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
9efdd836f4
Tweak the 'on_order' calculation
2019-06-10 21:56:50 +10:00
Oliver Walters
31ad31365a
Calculate parts on order for a Part / SupplierPart
2019-06-07 08:37:25 +10:00
Oliver Walters
67248ec4dd
List purchase orders for a given part
2019-06-05 21:47:22 +10:00
Oliver Walters
f731c45ce8
Replace other choice fields with commonized status code
2019-06-04 23:38:52 +10:00
Oliver Walters
782ad57f52
Re-enable image hovering where appropriate
2019-06-03 22:03:22 +10:00
Oliver Walters
7a3b186a0c
Fix double loading of modals.html
2019-06-03 21:51:59 +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
8214aef0db
Add template for hover_image
2019-06-01 21:13:51 +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
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
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
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
0e684071fa
Display message if a part is a template or a variant
2019-05-25 23:21:38 +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
ecfde46838
Fix error in BomItem creation
2019-05-25 21:57:59 +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
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
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
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
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
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
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
a95e77c429
Pre-fill allocation count
2019-05-18 12:17:57 +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
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
b4df96aaee
Simplify extended filters
2019-05-16 19:14:43 +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
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
a316681ec8
Pass object data back to modal when creating new object
2019-05-14 23:04:00 +10:00
Oliver Walters
2164cac28a
PEP
2019-05-14 18:32:20 +10:00
Oliver Walters
d1de6eb1f9
Copy across default tags when creating a new part
2019-05-14 17:32:29 +10:00
Oliver Walters
0842bd5833
Add 'default_keywords' field to a category
2019-05-14 17:30:24 +10:00
Oliver Walters
02033c2157
Add 'keywords' field to Part
...
- Shows up in search results
2019-05-14 17:23:20 +10:00
Oliver Walters
069cebb669
PEP
2019-05-13 23:03:37 +10:00
Oliver Walters
06e95819c9
Update form for deleting a BOM item
2019-05-13 23:00:04 +10:00
Oliver Walters
00b37b62db
Updated form to delete part category
2019-05-13 22:55:40 +10:00
Oliver Walters
ffa5a25fa9
Updated form for deleting part attachments
2019-05-13 22:53:58 +10:00
Oliver Walters
fcdddf6bb6
Cleaup for delete supplier part form
2019-05-13 22:52:20 +10:00
Oliver Walters
3e4d778539
Change menu ordering
2019-05-13 21:56:39 +10:00
Oliver Walters
e1e5cde60f
Renamed copyBomFrom to deepCopy
...
- Allows passing of more data (in the future) e.g. tags, etc
- Performs copy of the part image
2019-05-13 21:54:52 +10:00
Oliver Walters
00f7ece6b4
PEP fixes
2019-05-13 21:42:05 +10:00
Oliver Walters
2408318eae
Add new view to duplicate a part
...
- Allows 'deep_copy' (copies all BOM items for the duplicated part)
2019-05-13 21:41:32 +10:00
Oliver Walters
42bbf95c42
Include the sub_part ID in the BOM hash
2019-05-13 18:09:59 +10:00
Oliver Walters
f410957d8d
Refactored Stock test to use fixtures
2019-05-12 21:46:38 +10:00
Oliver Walters
e3a9a70678
Add a form/view/etc for BOM validation
2019-05-12 16:27:50 +10:00
Oliver Walters
c7f0d56be4
Don't display BOM hash any more!
2019-05-12 16:09:11 +10:00
Oliver Walters
d17e36b9f9
Add BOM checksum info panels to the BOM view
2019-05-12 13:24:58 +10:00
Oliver Walters
9149619f38
Make BOM tab badge red if the BOM is not validated
2019-05-12 13:12:04 +10:00
Oliver Walters
06deccca1c
Rename check_bom to validate_bom
2019-05-12 13:01:41 +10:00
Oliver Walters
985986a844
New functions for Part model
...
- is_bom_valid() - Tests if bom checksums match
- check_bom() function to mark the BOM as valid
2019-05-12 12:53:56 +10:00
Oliver Walters
2431ba2a04
Add new fields to Part model
...
- bom_checksum (stores checksum calculated when the BOM was checked)
- bom_checked_by (User who checked the BOM)
- bom_checked_date (When the BOM was last checked)
2019-05-12 12:47:28 +10:00
Oliver Walters
4c3032e2f0
Add function to calculate BOM hash
...
- Uses hashlib.md5
2019-05-12 12:42:20 +10:00
Oliver Walters
82fb43e1e3
PEP
2019-05-12 12:29:16 +10:00
Oliver Walters
d5dbc1b072
Display supplier part URL in table
2019-05-12 12:20:15 +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 Walters
b3cca1d851
Improve form management when possible part matches are found
...
- Display the checkbox always
- Display a warning message above the form
2019-05-11 18:07:37 +10:00
Oliver Walters
19854b4709
Improve str2bool to validate checkbox return values
...
- A checked checkbox returns 'on' :|
2019-05-11 18:06:17 +10:00
Oliver Walters
2e5b0bc961
PEP
2019-05-11 12:29:51 +10:00
Oliver Walters
84d2fce8ca
Add a 'confirm_creation' input if there are possible part matches
2019-05-11 12:29:02 +10:00
Oliver Walters
d9c0d2f5e3
Update PartCreate form
...
- Display list of close matches
- Invalidate form (for now)
2019-05-11 11:55:17 +10:00
Oliver Walters
1b8ca34ddb
Added fuzzy search function for matching against part names
2019-05-11 10:36:24 +10:00
Oliver Walters
343850c4f0
Cleanup for part.views
2019-05-11 09:51:45 +10:00
Oliver Walters
7f1cdaf73f
PEP
2019-05-10 22:52:45 +10:00
Oliver Walters
8ac180a9e3
Add validator to part name
...
- Check for 'illegal' characters
- Mostly just as a test for validators!
2019-05-10 22:52:06 +10:00
Oliver Walters
68b273aae1
Fixed some more part name displays
2019-05-10 22:18:56 +10:00
Oliver Walters
f76f1f54ae
Add 'variant' field to Part model
...
- Display 'long_name' which is concatenation of name and variant
2019-05-10 22:17:13 +10:00
Oliver Walters
01778f996e
PEP fixes
2019-05-10 20:12:15 +10:00
Oliver Walters
ba2f565e35
docstring improvements
...
- Added Attribute docstring to all model objects
2019-05-10 20:11:52 +10:00
Oliver Walters
932c07287b
Button fixes
2019-05-10 08:38:50 +10:00
Oliver
793b4f8063
Merge pull request #288 from SchrodingersGat/tree-badges
...
Tree badges
2019-05-09 23:06:32 +10:00
Oliver Walters
92930766c6
Tree view now supports root URL link
2019-05-09 22:23:56 +10:00
Oliver Walters
34225193fa
Improve tree toggle icon
2019-05-09 21:46:11 +10:00
Oliver Walters
bff0f30b13
Save tree state 'per tree'
...
- Separate save state for Part and Stock tree
2019-05-09 21:41:44 +10:00
Oliver Walters
45223fb607
Display count badges in sidenav tree
...
Uses the 'tags' parameter as according to the docs - https://github.com/jonmiles/bootstrap-treeview
- Part
- Stock
2019-05-09 20:30:23 +10:00
Oliver Walters
1a115104d2
If a part has no bom items, the 'can_build' function now returns zero
2019-05-09 18:35:55 +10:00
Oliver
8bf09300bb
Merge pull request #281 from SchrodingersGat/page-title
...
Page title
2019-05-09 18:33:03 +10:00
Oliver Walters
ca6bd0a999
Add page title for company page
2019-05-09 18:17:28 +10:00
Oliver Walters
a067d9f4cd
Add page title for Part app
2019-05-09 18:13:54 +10:00
Oliver Walters
873bd182f0
Vertical alignment of button toolbars
2019-05-09 18:04:42 +10:00
Oliver
fa2bf947ab
Merge pull request #267 from SchrodingersGat/bom-img
...
BOM table improvements
2019-05-09 00:42:33 +10:00
Oliver Walters
94ad378b9d
Part and company images return the 'no image found' image if they do not have an image
2019-05-09 00:39:51 +10:00
Oliver Walters
f05e05664b
PEP fix
2019-05-08 23:33:37 +10:00
Oliver Walters
e9c904076f
Added help text for model fields
2019-05-08 23:32:57 +10:00
Oliver Walters
1f9aa7a8fc
Display thumbnail in Part 'used_in' detail view
2019-05-08 20:26:39 +10:00
Oliver Walters
58e5b10d26
Display supplier logo in part suppliers list
...
- Also add a background colour for popup image in case of transparent image file
2019-05-08 20:23:54 +10:00
Oliver Walters
0754afd5f5
Display icons in supplier_part list
...
- Bug fix for part list API query
2019-05-08 20:16:53 +10:00
Oliver Walters
0058207fad
Functionalize loadPartTable
2019-05-08 19:31:43 +10:00
Oliver Walters
2a66224952
Part image hover preview working in part-category-list
...
- Yay for CSS!
2019-05-08 19:15:41 +10:00
Oliver Walters
fb38ddb1b3
Limit choices for 'parent' field when editing PartCategory
2019-05-08 17:57:31 +10:00
Oliver Walters
ab76525da2
Initially sort part list by 'name'
2019-05-08 15:53:03 +10:00
Oliver Walters
416b5c9820
Include part image URL in Part API
2019-05-08 15:25:28 +10:00
Oliver Walters
e58bed41b0
Visual style improvements
2019-05-07 21:24:09 +10:00
Oliver Walters
9a6cf259a6
PEP fixes
2019-05-07 14:48:35 +10:00
Oliver Walters
dcbd5d819c
Enable DnD for Company image
...
- Can actually use the existing form to do partial upload!
- Generecise the drag-and-drop upload function
- Remove some (now unnecessary) Python View code
2019-05-07 14:47:31 +10:00
Oliver Walters
0969edc431
Some tweaks
...
- Add (unused) function to download an external file
- JS tweaks
2019-05-07 08:07:33 +10:00
Oliver Walters
22ff085b15
PEP fixes
2019-05-07 00:11:27 +10:00
Oliver Walters
fe4acd48a7
Add the ability to extract image URL information when drag-and-dropping image URL from a browser window
...
- Can't do anything with it yet...
- Code is almost there but leaving for now
2019-05-07 00:04:35 +10:00
Oliver Walters
3c7238f29c
Extract img URL from a drag-and-dropped image from another website
...
- https://stackoverflow.com/a/19268449
2019-05-06 22:34:38 +10:00
Oliver Walters
bb702367b6
Test that uploaded image is an image file, return error otherwise
...
- New javascript function inventreeFileUpload
2019-05-06 22:20:06 +10:00
Oliver Walters
c88149b9aa
POST image data to View
...
- https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects
- https://stackoverflow.com/questions/25390598/append-called-on-an-object-that-does-not-implement-interface-formdata#25390646
2019-05-06 21:49:01 +10:00
Oliver Walters
eec0fc34d2
Provide function callback when file is dropped
...
- https://stackoverflow.com/questions/6756583/prevent-browser-from-loading-a-drag-and-dropped-file
-
2019-05-06 21:28:49 +10:00
Oliver Walters
dca26b5810
Change the display of the part thumbnail when dragging a file overhead
...
Refs:
- https://stackoverflow.com/questions/26756176/jquery-dragenter-or-dragover-to-include-children#26777526
- https://stackoverflow.com/questions/10867506/dragleave-of-parent-element-fires-when-dragging-over-children-elements
Thanks, StackOverflow!
2019-05-06 19:21:14 +10:00
Oliver Walters
02bd9c2d05
Search part by IPN
2019-05-06 11:23:55 +10:00
Oliver Walters
b9e5afa768
PEP
2019-05-05 22:35:39 +10:00
Oliver Walters
b85a4d0895
Limit choices for BomItem Part foreignkey fields
...
- Only allow 'active' Parts
2019-05-05 22:34:00 +10:00
Oliver Walters
7987fcc7cc
PEP fixes
2019-05-05 11:44:23 +10:00
Oliver Walters
aaff92ff9c
Make the star icon yellow
2019-05-05 11:21:08 +10:00
Oliver Walters
fc5fd5e477
Toggle part star status using AJAX
2019-05-05 11:18:38 +10:00
Oliver Walters
d2d248c72e
QR button code is now a template
2019-05-05 10:56:59 +10:00
Oliver Walters
bbd164407f
Display 'starred' status on the Part information page
2019-05-05 10:54:35 +10:00
Oliver Walters
b2e935382b
Override user field when creating a new PartStar
...
- Force it to be the currently logged-in user
2019-05-05 10:47:57 +10:00
Oliver Walters
3bd7c28558
Add API endpoint for viewing and deleting a PartStar entry
2019-05-05 10:36:48 +10:00
Oliver Walters
d245e58990
Only allow PartStar creation for the currently authenticated user
2019-05-05 09:14:12 +10:00
Oliver Walters
70f1097ea0
API endpoint for accessing part star information
2019-05-05 09:05:44 +10:00
Oliver Walters
86b5b8d16e
Add PartStar model to the admin interface
2019-05-05 08:50:14 +10:00
Oliver Walters
919f04044b
Enforce uniqueness constraint
2019-05-05 08:48:41 +10:00
Oliver Walters
9919bebaa2
Add PartStart model
...
- Links parts to users
2019-05-05 08:46:23 +10:00
Oliver Walters
16edcc4bd9
Add 'star' button to Part
2019-05-05 08:42:01 +10:00
Oliver Walters
8a6932e993
Improve QR code display
...
- Pretty little glyphicon button!
2019-05-05 08:39:16 +10:00
Oliver Walters
a66bc2fe72
Reload after adjusting Part attachments
2019-05-05 00:53:42 +10:00
Oliver Walters
ecb8e71d75
Fixed a missing form title
2019-05-05 00:46:11 +10:00
Oliver Walters
22afccd294
Add tests for the custom templates
2019-05-05 00:21:54 +10:00
Oliver Walters
fcc83ca7c7
Part API test suite now uses test data fixtures
2019-05-05 00:15:25 +10:00
Oliver Walters
e2ced18753
Added some more BomItem tests
2019-05-05 00:00:30 +10:00
Oliver Walters
c0e3007e4f
Add some BomItem tests
...
- Add a bom fixture
2019-05-04 23:50:24 +10:00
Oliver Walters
1f80e8c655
More tests for Part
...
- barcode
- category_path
2019-05-04 23:35:52 +10:00
Oliver Walters
3fda5a3925
Convert test_part to use fixture data
2019-05-04 23:30:41 +10:00
Oliver Walters
663cc269b4
Test recursive child count
2019-05-04 23:22:32 +10:00
Oliver Walters
ab6673caa3
Add tests for default location traversal
2019-05-04 23:20:59 +10:00
Oliver Walters
6d803d48b5
Add fixtures to the part test
...
- Make development of further tests much easier
2019-05-04 22:58:55 +10:00
Oliver Walters
bc7f3f77de
PEPEP
2019-05-04 21:57:43 +10:00
Oliver Walters
67eda51cd2
Add part category tree traversal
...
- If a category doesn't have a default_location, look at the parent category
- And so on and so on
2019-05-04 21:56:18 +10:00
Oliver Walters
71972f4454
Add function to get the default location for a part
...
- If field not specified, look at the part category
2019-05-04 19:06:39 +10:00
Oliver Walters
f270375847
Add ability to edit default_location for a PartCategory
2019-05-04 19:03:32 +10:00
Oliver Walters
4ffaad3f1a
Add a default_location to the PartCategory model
...
- If a part does not specify a default location, look at the default location of the category
2019-05-04 19:00:11 +10:00
Oliver Walters
9aa1a70f18
QR code improvements
...
- Display QR codes as links to served images
- The qr_code plugin caches these images in the background
- Make a qr_code template to push out as a modal form
- Create a QRCodeView to simplify display of QR codes
- Add option to launchModalForm() to disable the 'submit' button
Refactored QR code display for
- StockLocation
- StockItem
- Part
2019-05-04 18:46:57 +10:00
Oliver Walters
8e65c0a120
Fixes for some broken views
2019-05-04 17:20:05 +10:00
Oliver Walters
b6cace2681
Add 'options' drop-down for Part table in Category view
...
- Doesn't do anything yet
2019-05-04 16:41:45 +10:00
Oliver Walters
b1cdb7833d
Add confirmation modal to activate/deactivate a part
...
- New question modal available
2019-05-04 16:31:23 +10:00
Oliver Walters
4fe3b9d779
add docstrings
2019-05-04 11:28:23 +10:00
Oliver Walters
28600ebc79
There's always another PEP
2019-05-04 11:27:11 +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
6c7613ba2f
Fix form title
2019-05-04 01:03:43 +10:00
Oliver Walters
4af59f0ca9
Fixed part image upload
...
- Image was being saved twice
- Don't call super().post in AjaxUpdateView
- Instead, handle properly
2019-05-04 00:38:17 +10:00
Oliver Walters
2eb825b0e6
Improved table rendering
2019-05-04 00:02:53 +10:00
Oliver
6482b54bc9
Merge pull request #205 from SchrodingersGat/qr-codes
...
Qr codes
2019-05-02 21:15:34 +10:00
Oliver Walters
5a234a1070
Added barcode for Part object
2019-05-02 20:57:53 +10:00
Oliver Walters
d49ce465e5
Removed UUID field from StockItem
...
- QR code is now created based on a JSON object
- This will make it extensible to other things such as StockLocation
- Created a helper function to make Barcode objects
2019-05-02 20:40:56 +10:00
Oliver Walters
194a0962f3
PEP fixes
2019-05-02 20:19:08 +10:00
Oliver Walters
38100520df
Add 'to_order' and 'to_build' collapsible panels
2019-05-02 20:18:34 +10:00
Oliver Walters
4d7ac870e0
Use the collapse template for the stock location list view
2019-05-02 19:02:03 +10:00
Oliver Walters
fbb120da53
Use collapse template in allocation page
2019-05-02 18:53:03 +10:00
Oliver Walters
6e8c1bcc84
Add views to Create / Edit / Delete a PartAttachment
...
- Buttons to edit or delete existing attachments
- Button to add a new attachment
- Fixed conflicting migrations
2019-05-02 17:29:21 +10:00
Oliver Walters
505191089f
Added buttons to edit and delete attachments
2019-05-02 01:06:06 +10:00
Oliver Walters
9614ac2958
Move attachments list to attachments tab
2019-05-02 01:06:06 +10:00
Oliver Walters
ad6f4e19b1
Add 'comment' field to part attachment model
2019-05-02 01:06:06 +10:00
Oliver Walters
2181c82a31
Add 'attachments' tab for Part
2019-05-02 01:05:32 +10:00
Oliver Walters
7c11d917de
Bug fixes
...
- Part creation form was setting a field as HiddenInput() rather than its widget
- Added 'comment' file to FileAttachment model
2019-05-01 09:40:49 +10:00
Oliver Walters
436d158cfe
Merge remote-tracking branch 'inventree/master' into build-allocation
...
# Conflicts:
# InvenTree/company/templates/company/tabs.html
2019-05-01 08:15:58 +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
395db4df38
Pepe fixes
2019-04-30 00:18:58 +10:00
Oliver Walters
8ec4101edd
Reduce items presented in BOM creation list
...
- Don't allow selection of parts that are already in the BOM!
2019-04-30 00:16:20 +10:00
Oliver Walters
c29827e45a
Add API endpoint and serializer for BuildItem model
2019-04-29 22:59:42 +10:00
Oliver Walters
e25579141e
Rename BuildItemAllocation to BuildItem
2019-04-29 22:30:21 +10:00
Oliver Walters
6326d6d050
Fixed spelling mistake
2019-04-29 22:21:18 +10:00
Oliver Walters
3b838d29ec
Small fixes
...
- Hide some tabs that aren't functional yet
- Hide fields instead of marking them as disabled
- Default behaviour is to allow all hosts
2019-04-29 18:35:16 +10:00
Oliver
99b386fb95
Merge pull request #185 from SchrodingersGat/active-part
...
Inactive part
2019-04-29 00:04:26 +10:00
Oliver Walters
07fbaa9dd9
Test fix
...
- Part list API handles 'category' filtering a bit differently
- Probably need to address this
2019-04-29 00:01:57 +10:00
Oliver Walters
05333e7e7d
PEP fixes
2019-04-28 23:58:14 +10:00
Oliver Walters
87411293cf
docstring improvements
2019-04-28 23:57:29 +10:00
Oliver Walters
bc12af5994
Remove the 'supplier_part' field when first creating a Part object
...
- As the Part does not yet exist, there are no matching SupplierPart objects
2019-04-28 23:55:21 +10:00
Oliver Walters
4e3702384b
Limit SupplierPart option in Part edit form
...
- Only allow selection of SupplierPart that match the Part being edited
2019-04-28 23:50:35 +10:00
Oliver Walters
6612e91aec
Remove ability to delete part via API
2019-04-28 23:41:47 +10:00
Oliver Walters
73f672495d
Use API to mark part as active/inactive
2019-04-28 23:40:26 +10:00