eeintech
946d824995
Switched to ModelChoiceField
2020-08-24 11:41:14 -05:00
eeintech
6f89f7dc7f
Merge branch 'master' into show_potential_bom_items_stock
2020-08-24 10:35:59 -05:00
Ben Charlton
471ece136e
Merge branch 'master' into feature-non-int-serial
2020-08-24 11:12:07 +01:00
Oliver Walters
ca1985e11a
PEP fixes
2020-08-23 21:10:45 +10:00
Oliver Walters
c849f618d5
Clean up implementation of test report matching
2020-08-23 21:03:29 +10:00
Ben Charlton
23cc3d9b06
Handle 'next serial' more gracefully
2020-08-21 19:17:58 +01:00
Ben Charlton
c31b30bf83
Fix simple tests
2020-08-21 18:53:51 +01:00
Ben Charlton
f7ed48809c
Support non-integer serial numbers
2020-08-21 17:36:49 +01:00
eeintech
9fa13aeae3
Show 'available_stock' in Part string representation
2020-08-20 15:38:41 -05:00
Oliver Walters
92ac93aac5
More intelligent checking for circular BOM
...
- Check all the way down a BOM "tree"
- Validate BOM tree before allowing BOM submission
2020-08-18 14:17:59 +10:00
eeintech
685a58b807
Merge remote-tracking branch 'origin/master' into bom_dev
2020-08-17 12:05:54 -05:00
Oliver Walters
a4267f76e8
Fixes for barcode data rendering
2020-08-16 13:39:05 +10:00
Oliver Walters
a7ee323035
PEP fix
2020-08-08 16:59:48 +10:00
Oliver Walters
ad977d4d26
Add default ordering for Company model
...
- Now will sort by "name" in choice fields, etc
2020-08-08 16:54:09 +10:00
Oliver Walters
3a266cf322
Allow default_keywords to be null
2020-08-04 11:10:24 +10:00
eeintech
46586ba960
Corrected typo in part.models, simplified MakeBomTemplate function
2020-07-09 08:47:52 -05:00
Oliver Walters
3d245c7ce3
Improve logic of "quantity_to_order" function
2020-06-28 19:14:51 +10:00
Oliver Walters
a3c0d35b20
Fix for case where BOM item quantity is zero
2020-06-04 11:37:55 +10:00
Oliver Walters
5f3816212f
template parts are now allowed to be variants
...
- Do not throw an error here!
2020-05-29 12:40:40 +10:00
Oliver Walters
7bcf9bf5be
Allow template parts to be specified for the BOM item
2020-05-27 10:06:18 +10:00
Oliver Walters
009adaf528
Code to get and test for variants of a part
2020-05-25 13:13:28 +10:00
Oliver Walters
68b9a690f2
Integer value required for trackable bom item
2020-05-24 20:22:15 +10:00
Oliver Walters
01481ef5c9
Add function to get the number of required tests for a part
2020-05-23 14:28:25 +10:00
Oliver Walters
71681bfda1
Add a button if a stock item test report is available
2020-05-22 21:38:05 +10:00
Oliver Walters
1ad7e699a9
PEP
2020-05-22 21:31:21 +10:00
Oliver Walters
0ec880290b
Functionality for retrieving test templates associated with a given part
2020-05-22 21:29:58 +10:00
Oliver Walters
e8c402ecd9
Add some more fields to the PartTestTemplate model
2020-05-18 19:00:45 +10:00
Oliver Walters
6cb017bbfd
Add functions to test if a stock item has passed all tests
2020-05-17 22:03:55 +10:00
Oliver Walters
95d07cd02b
Add unit testing for new API features
2020-05-17 14:14:54 +10:00
Oliver Walters
f791ac9f57
Register test template in the admin interface
2020-05-17 13:50:06 +10:00
Oliver Walters
badf9230a9
Add fixtures / unit testing for the stock item testing framework
2020-05-17 13:46:19 +10:00
Oliver Walters
8c8b704e38
Add PartTestTemplate model
2020-05-17 13:26:51 +10:00
Oliver Walters
8a99062704
PEP fixes
2020-05-16 17:52:25 +10:00
Oliver Walters
3d0bea15ae
Refactor function naming
2020-05-16 12:03:18 +10:00
Oliver Walters
10762fc1cf
Refactor tractor
2020-05-16 08:55:19 +10:00
Oliver Walters
ea88a03b5a
More serial number validation and unit testing
...
-
2020-05-16 08:43:57 +10:00
Oliver Walters
0a78432a0f
Convert 'part" to MPTT model - based on the 'variant_of' field
...
- Now recursive variants can be implemented properly
2020-05-15 21:35:53 +10:00
Oliver Walters
0199760e1c
Bug fix
2020-05-02 20:10:12 +10:00
Oliver Walters
087001f29d
Fix BOM table rendering
...
- Price was not being sent in the PartBriefSerializer!
2020-04-28 23:17:15 +10:00
Oliver Walters
9add3d4409
Much better rendering and calculation of part allocations
2020-04-28 10:43:46 +10:00
Oliver Walters
fb70da0331
Cleanup part allocation calculation functions
2020-04-28 10:35:19 +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
435c13cf7c
Separate concept of "OrderStatus" into "SalesOrderStatus" and "PurchaseOrderStatus"
2020-04-23 20:38:09 +10:00
Oliver Walters
4979c690d9
Prevent BOM price calculation from becoming too recursive
2020-04-21 21:38:22 +10:00
Oliver Walters
3d2e907d5e
Add a 'sales order' view for each part
2020-04-21 09:15:01 +10:00
Oliver Walters
4a615e05ae
Further barcode work
...
- Simplify InvenTree barcode format
- Create base-clas for plugin
2020-04-14 21:30:43 +10:00
Oliver Walters
3c46e12839
Further work on decimal rounding
...
- Prevent numbers from being represented in scientific notation
2020-04-12 00:56:15 +10:00
Oliver Walters
fd8273e3e2
Improve build base rendering
...
- Consolidate style
- Fix rendering of part pricing
2020-04-12 00:31:59 +10:00
Oliver Walters
5e706554b1
Part table filtering
...
- Filter by active status
- Filter by 'is_template' status
- Filter by 'has_stock'
- Allow cascading sublocations
- API improvements to allow new features
2020-04-11 22:10:15 +10:00
Oliver Walters
d06018cbbe
PEP fixes
2020-04-07 11:40:10 +10:00
Oliver Walters
95032141ce
Toot toot! It's the refactor tractor.
...
- Create helper functions to qualify media and static files
2020-04-07 11:38:57 +10:00
Oliver Walters
b28487760a
Rename Part.URL -> part.link
...
- Previous migration needed some tweaking to get it to run... because.. why?
- It seems to pass when running manage.py migrate but fails when running manage.py test
- Stumped on this one
2020-04-06 11:16:39 +10:00
Oliver Walters
8b61acb048
PEP fixes
2020-04-05 00:38:25 +11:00
Oliver Walters
afa31b3415
Generate thumbnails for any part images existing in the database
2020-04-05 00:19:05 +11:00
Oliver Walters
aee0970e49
Part image field now uses django-stdimage
2020-04-04 15:47:05 +11:00
Oliver Walters
713d7960a8
Fix on_order calculation
...
- Take into account the number "received"
- Also fix unit tests
2020-03-26 17:56:44 +11:00
Oliver Walters
6a78f6d451
Include quantity currently being build in Part API
2020-03-26 17:43:02 +11:00
Oliver Walters
41bbbdcd43
Improve query speed when calculating how many parts are on order
2020-03-26 17:31:59 +11:00
maxbachmann
b162c97226
use rapidfuzz instead of fuzzywuzzy
2020-03-22 22:31:15 +01:00
Oliver Walters
56a6943438
Add an 'attachment' page for the PurchaseOrder view
2020-03-22 18:13:34 +11:00
Oliver Walters
a661d7e1a6
Abstract the PartAttachment class
...
Now "Attachments" are much easier to implement for different models
2020-03-22 17:59:23 +11:00
Oliver Walters
15bc457714
Improve calculation of BOM item overage
2020-03-19 10:15:43 +11:00
Oliver Walters
2b08b0f2b9
Add new fields for Part object
...
- Creation date
- Creation user
- Responsible user
2020-03-18 21:50:18 +11: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
3b9f57fc80
Bug fix - Multiplying float by decimal
...
- Overage percentage now uses explicit decimal multiplication
2020-03-18 20:44:45 +11:00
Oliver Walters
4a2fa36e30
Allow 'notes' field in Part object to be blank
2020-02-23 20:02:33 +11:00
Oliver Walters
d04fb0d826
Use decimal2string instead of normalize
2020-02-12 10:08:35 +11:00
Oliver Walters
520b8d7b2b
Fix for BOM pricing weirdness
2020-02-12 10:06:17 +11:00
Oliver Walters
55aa63dab4
Override save() method for Part model
...
- Delete old thumbnails if they are no longer being used
2020-02-11 20:27:06 +11:00
Oliver Walters
dee47bdea8
Prevent django_cleanup from deleting part thumbs that are used elsewhere
...
- Will need to implement a method for automatically deleting part thumbs...
2020-02-11 00:29:29 +11:00
Oliver Walters
d4fe83170f
Select existing image and upload successfully
2020-02-10 23:48:45 +11:00
Oliver Walters
725eb3c538
Do not duplicate images when copying a part
...
- Simply reference the existing image
2020-02-10 23:04:58 +11:00
Oliver Walters
9cef038d6a
IPN must match regex validator (if one is provided)
2020-02-03 21:09:24 +11:00
Oliver Walters
c546ed5dcd
Update requirements
...
- Use markdownify for rendering
- Use markdownx for editing
2020-01-31 21:42:30 +11:00
Oliver Walters
5e9b012031
Bug fix for static lookup of blank image
2019-12-09 20:40:04 +11:00
Oliver Walters
1a6f06cceb
normalize decimal fields
2019-12-06 22:40:27 +11:00
Oliver Walters
98374ca466
Update to more recent libraries
...
- Specify exact module versions
2019-12-05 14:12:05 +11:00
Oliver Walters
9da8189899
Allow non-integer stock movement
2019-11-19 10:17:20 +11:00
Oliver Walters
6e90ac367e
Massaging unit tests
...
- Decimal fields are useful but VERY ANNOYING to use
- Needed to fix some test cases
2019-11-19 08:59:56 +11:00
Oliver Walters
400941c10f
Change item quantity field from PositiveInteger to Decimal
...
- Allow 'partial' quantity e.g. '0.45kg'
- Need to change some maths functions as Decimal type is pernickity
2019-11-19 08:49:54 +11:00
Oliver Walters
5ffbfe8eb8
Add translation strings for part models
2019-11-19 08:42:10 +11:00
Oliver Walters
a77fd23fcf
Add a reminder for future-self
2019-09-17 20:19:27 +10:00
Oliver Walters
db04f399c1
Simplify exporting of BOM for a part
2019-09-15 22:21:12 +10:00
Oliver Walters
4ac8353099
Create a custom URL field, which allows the user-specified validators
...
- Ref: https://stackoverflow.com/questions/41756572/django-urlfield-with-custom-scheme
- Apply this to the URL field in the Part model
2019-09-14 00:04:08 +10:00
Oliver Walters
e4fc44c135
More test
2019-09-08 20:36:51 +10:00
Oliver Walters
2a203be5cc
Tests for part parameters
2019-09-08 20:18:21 +10:00
Oliver Walters
dac61eafa2
Fixed tests
...
- Tree classes now need extra configuration in the fixture
- Check for null pk when cleaning a tree node
2019-09-08 19:41:54 +10:00
Oliver Walters
a5189b8f3f
Replace a recursive function
2019-09-08 19:28:40 +10:00
Oliver Walters
0d6a3d3b28
BOM table now refreshes the table rather than the page
2019-09-08 19:24:47 +10:00
Oliver Walters
3eb3c43e5c
Change foreign keys to TreeForeignKey
2019-09-08 19:19:39 +10:00
Oliver Walters
678157aac4
Update StockLocation and PartCategory models
...
- Use the MPTT functionality once more
2019-09-08 19:13:13 +10:00
Oliver Walters
13270617b9
Ensure PartParameterTemplate name is unique
2019-09-07 19:43:41 +10:00
Oliver Walters
37d9c59a0e
Add API endpoint for validating a BOM item
2019-09-05 19:29:51 +10:00
Oliver Walters
0508c2dcaf
Use the hash for each line item to calculate the total BOM hash
2019-09-05 13:10:26 +10:00
Oliver Walters
7671eb2b22
Add a checksum field to the bom line item
2019-09-05 12:58:11 +10:00
Oliver Walters
43967e302b
Add ablity to serialize an existing quantity of stock
...
- Do not have to serialize all the stock
- Add tests
- Add function to copy entire stock transaction history
2019-08-28 21:12:16 +10:00
Oliver Walters
d5ad53c788
Add docstring
2019-08-28 19:44:46 +10:00
Oliver Walters
f94be40857
Style fixes
2019-08-28 19:44:02 +10:00
Oliver Walters
c68c79ea43
Create view / form / URL for PartParameter creation
2019-08-20 14:14:21 +10:00
Oliver Walters
db834802e3
Add uniqueness check for PartParameterTemplate name field
...
- Case insensitive
2019-08-20 13:08:06 +10:00
Oliver Walters
a228b38e5d
Fix parameter lookup
2019-08-20 13:03:36 +10:00
Oliver Walters
e6819b5396
Change model - add PartParameterTemplate
2019-08-20 13:02:00 +10:00
Oliver Walters
6393ddad53
Add param tab to Part detail view
2019-08-20 12:44:00 +10:00
Oliver Walters
2f6357b136
Add PartParameter table
2019-08-20 12:31:43 +10:00
Oliver Walters
3dca7ba353
Include supplier information in BOM
2019-08-07 09:12:53 +10:00
Oliver Walters
0a328687a5
BOM hash includes reference fields
2019-08-02 11:11:28 +10:00
Oliver Walters
482a5dae4b
Save the selected BOM data
2019-07-10 12:27:19 +10:00
Oliver Walters
ff5af8f217
Add a button to create a new part if necessary
2019-07-07 11:56:44 +10:00
Oliver Walters
bd30ac037b
Generate a list of allowed BOM items and pass to the form template
2019-07-07 11:22:01 +10:00
Oliver Walters
b6a6e2dae7
Change the manner in which active parts are filtered for BOM
...
- Prevented BOM from displaying for an inactive part
- Now manually filter the queryset in the form view
2019-06-28 10:00:23 +10:00
Oliver Walters
3085db44af
Add 'reference' field to BOM item model
2019-06-27 21:44:40 +10:00
Oliver Walters
d6fcf85cd2
Set part category for multiple parts at once
2019-06-25 19:15:39 +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
c9c851bead
Add 'virtual' part flag
2019-06-18 18:34:07 +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
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
219c438b82
Part name uniqueness is case insensitive
2019-06-02 20:37:59 +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
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
41eb195940
Thanks, PEP
2019-05-26 00:42:40 +10:00
Oliver Walters
2138977b07
Include template attachments in attachment count
2019-05-26 00:39:36 +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
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 Walters
d386c2a6f9
Include total stock in PartBrief serializer
2019-05-23 21:51:27 +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
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
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
ee2ddbf512
Reduce some database queries by using aggregate Sum
2019-05-20 21:47:30 +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