Oliver Walters
3bb247a135
Create an initial stockitem output when a new build is created
2020-10-20 23:27:43 +11:00
Oliver Walters
652c2dbcbe
Automagically disable 'serial_numbers' field for StockItemCreate form
...
- Yay, ajax magic!
2020-10-20 22:37:55 +11:00
Oliver Walters
28460b3023
Validate that the BuildItem quantity is an integer
2020-10-20 20:42:29 +11:00
Oliver Walters
fdcef7b699
Add "install_into" field for BuildItem
...
- Points to which output stock item it will be going into
2020-10-20 20:37:57 +11:00
Oliver Walters
647e2cf64d
Change text for barcode
2020-10-19 16:06:18 +11:00
Oliver Walters
634410294b
Display table of items received against a particular purchase order
...
- Adds new tab to "Purchase Order" view
- Adds ability to filter StockList API by purchase_order ID
2020-10-19 11:40:57 +11:00
Oliver Walters
3c175a6c8d
Update creation of StockItem via API
...
- If no location is specified, but a default location exists for the part, use that
- If a location is specified (even if it is null) then the specified value is used instead
2020-10-18 22:24:45 +11:00
eeintech
dbee26aaad
Fixed insertion of backslash in the barcode button group
2020-10-13 10:29:34 -05:00
eeintech
5bcf8529ff
Only users with Part view permission have part URL shown
2020-10-06 09:16:38 -05:00
eeintech
e4ce19d22a
Added Test user and all permissions
2020-10-06 09:02:10 -05:00
eeintech
095cfe9845
Updated Stock permission views and templates
2020-10-06 08:55:40 -05:00
Oliver Walters
ab454e5ba4
More template changes: perms -> roles
2020-10-06 16:46:13 +11:00
Oliver Walters
dc2c9aa662
Add InvenTreeRoleMixin
...
- Simplifies permission requirements for views
- e.g. 'part.view' rather than 'part.view_partcategory'
2020-10-06 11:29:38 +11:00
Oliver Walters
3f59ce3f93
Update unit tests
...
- requires the user to actually have the necessary permissions!
2020-10-06 01:30:36 +11:00
Oliver Walters
16d720b62c
Update permission requirements for API
...
- Automatically use model permissions by default!
-
2020-10-06 00:36:55 +11:00
Oliver Walters
48e050d317
Add some more unit tests and validation code for the StockItem model
...
- Ensure that the build part matches the stockitem part!
2020-10-05 00:49:00 +11:00
Oliver Walters
c1595396c4
Unit testing: fix PEP issues
2020-10-05 00:29:31 +11:00
Oliver Walters
fe3a72c6cc
Add some unit testing
2020-10-05 00:29:06 +11:00
Oliver Walters
26d113e8ad
Update IN_STOCK_FILTER to reject stock items which have is_building set to True
2020-10-05 00:14:04 +11:00
Oliver Walters
ee28b4eea5
Add "is_building" field to StockItem model
...
- This will be set to TRUE until a stock item has been completed
2020-10-05 00:12:42 +11:00
Oliver Walters
62734c4b72
Add a custom template for the install item form
2020-10-05 00:01:01 +11:00
Oliver Walters
3fe0886207
Remove a debug statement
2020-10-04 23:49:01 +11:00
Oliver Walters
852da6d696
Fix form validation
2020-10-04 23:48:15 +11:00
Oliver Walters
42a75a8238
Add hidden input to the InstallStockForm form
...
- keeps track of "part" object
- so we can filter the stock_items queryset if the form validation fails
- Is there a more djangonic way of doing this??
2020-10-04 23:45:52 +11:00
Oliver Walters
b9291c6705
Improve transaction note recording for the StockItem model
2020-10-04 23:33:43 +11:00
Oliver Walters
3c5968ef1a
Add subrow table to the "installed items" view
...
Ah, javascript...
2020-10-04 22:58:41 +11:00
Oliver Walters
9c27680202
Finish function to install stock item(s)
2020-10-04 21:32:21 +11:00
Oliver Walters
45c888e13d
Custom cleaning for form
...
Ok, looks like I've been doing this wrong the whole time!
The "djangonic" way is pretty cool
2020-10-04 21:31:44 +11:00
Oliver Walters
a686500df1
Calculate initial values for the view
2020-10-04 21:02:20 +11:00
Oliver Walters
fd22e713ff
Filter available stock items by Part reference
2020-10-04 20:50:06 +11:00
Oliver Walters
f04977e7e1
Add form / view for installing a stock item into another stock item
2020-10-04 20:41:28 +11:00
Oliver Walters
27656633df
Update admin links to require specific permissions
2020-09-30 23:57:23 +10:00
Oliver Walters
4f1d087654
PEP fix
2020-09-30 07:56:44 +10:00
Oliver Walters
d1cce7df94
Add direct admin links if the user is staff
2020-09-30 00:02:10 +10:00
Oliver Walters
0e5f10c020
Add some more search terms to the admin interface
2020-09-29 23:41:50 +10:00
Oliver Walters
1f6cbd7408
Add action to uninstall a particular stock item
2020-09-29 23:11:37 +10:00
Oliver Walters
38beaff01b
peppy
2020-09-28 22:09:09 +10:00
Oliver Walters
d348d90fbe
Cleanup errors in unit testing
2020-09-28 22:08:38 +10:00
Oliver Walters
54bfcff213
CHange "parts" to "items"
2020-09-28 22:03:41 +10:00
Oliver Walters
b2b22762ef
style fixes
2020-09-28 22:01:45 +10:00
Oliver Walters
a18886f196
Add some unit tests for the new functions
2020-09-28 22:00:17 +10:00
Oliver Walters
df8d1fb32b
Add functions to install and uninstall stock items
2020-09-28 21:52:23 +10:00
Oliver Walters
81ce284264
Select the "default" where we wish to uninstall parts
2020-09-28 21:41:35 +10:00
Oliver Walters
39cfe39172
View / form / url for stock-uninstall form
2020-09-28 21:27:27 +10:00
Oliver Walters
2ef8464a83
Add buttons to remove installed items from a stock item
2020-09-28 20:27:13 +10:00
Oliver Walters
b58f7d7461
Custom table display for installed stock items
2020-09-28 20:19:56 +10:00
Oliver Walters
d684ed076b
Improve table filter naming
2020-09-28 20:10:29 +10:00
Oliver Walters
f253bf1843
Add ability for stock API to be filtered by installed status
2020-09-28 20:07:25 +10:00
Oliver Walters
8dd8e69c05
Add "installed parts" tab for stock item
2020-09-28 19:34:43 +10:00
Oliver Walters
97b35d9269
Renamed related name "owned_parts" to "installed_parts"
2020-09-28 19:33:32 +10:00
Oliver Walters
b76e6a5023
Bugfix: Test result ordering was reversed!
2020-09-28 09:02:17 +10:00
Oliver Walters
8a4597be6a
Adds ability to filter stock API results by batch code
2020-09-23 09:11:46 +10:00
Oliver Walters
f19a727a02
Allow searching by stock item batch code
2020-09-19 23:40:06 +10:00
Oliver Walters
083bfe05c0
Add ability to search stock API
...
- serial number
- part information
2020-09-19 21:49:07 +10:00
Oliver Walters
32cde5d8f1
Fixx css for multiple button groups
2020-09-13 20:56:05 +10:00
Oliver Walters
87f25eacc5
Add link from stock item to base part
2020-09-06 00:01:14 +10:00
Oliver
22e30903b6
Merge pull request #965 from SchrodingersGat/api-stock-fix
...
Major bugfix for multiple annotations in API querysets
2020-09-05 23:42:25 +10:00
Oliver Walters
db214dfd73
Update queryset annotation for StockItem
...
- Query time reduced from 4.1 to 3.5s (for sample data)
2020-09-05 22:50:17 +10:00
Oliver Walters
f737ad2d38
Bugfix: CreateStockItem form
...
- hide the field rather than popping it
2020-09-05 20:31:18 +10:00
Oliver Walters
bb9e8fa97b
Merge remote-tracking branch 'inventree/master' into multi-db-unit-test
...
# Conflicts:
# InvenTree/build/test_build.py
2020-09-02 20:02:22 +10:00
Oliver Walters
911727f7b7
Update test fixtures
...
- Can't assume that pk values will be assigned sensibly!
- Need to hard-code them in
2020-09-02 19:47:07 +10:00
Oliver Walters
74f25ee7f9
Part: Extend logic for "latest" serial number
...
- Return value if it is a string
- Remove 'getNextSerialNumber' function
- Improve functionality of function which returns serial number placeholder string
2020-09-01 20:16:46 +10:00
Oliver Walters
e6c0a04131
Merge branch 'feature-non-int-serial' of git://github.com/bcc/InvenTree into bcc-feature-non-int-serial
2020-09-01 19:41:48 +10:00
Oliver Walters
1eeaa17085
Merge remote-tracking branch 'inventree/master'
2020-09-01 16:41:07 +10:00
Oliver Walters
ffbdb0317f
Add "focus" option when displaying a modal form
2020-09-01 12:43:37 +10:00
Oliver Walters
59e7474f75
Stock: More unit tests
...
- Add some more tests (would have caught a bug that was there already, darn it)
2020-08-31 20:09:43 +10:00
Oliver Walters
8615cad711
Stock: Fix serializers.py
...
- Use of read_only PrimaryKeyRelatedField was breaking POST via API
2020-08-31 20:08:07 +10:00
Ben Charlton
06552832cb
Style corrections
2020-08-28 17:30:16 +01:00
Ben Charlton
6b1696f8df
Merge branch 'master' into feature-non-int-serial
2020-08-28 17:14:02 +01:00
Oliver Walters
f6d8a3f229
Merge remote-tracking branch 'upstream/master'
2020-08-27 22:50:52 +10:00
Oliver Walters
27f7745231
Follow link to newly created StockItem
2020-08-27 08:37:18 +10:00
Oliver Walters
19329a9627
Merge remote-tracking branch 'inventree/master'
2020-08-27 00:21:42 +10:00
Oliver Walters
146dae6d43
Toot toot - it's the refactor tractor!
...
- New function for launching a CreateStockItem form
- Wraps up the previous code improvements into a single function
- Oh, the ease!
2020-08-27 00:08:02 +10:00
Oliver Walters
72899530cf
Add helper function to simplify reloading of field options
2020-08-26 23:43:19 +10:00
Oliver Walters
9dcc23ee4e
Hide 'supplier part' options if no part is selected in the form
2020-08-26 23:40:15 +10:00
Oliver Walters
d44ad541eb
Add "callback" functionality for modal forms when a given field is changed
...
- Attach callback function
- Add a function to retrieve a field by name
2020-08-26 22:35:36 +10:00
Oliver Walters
54d0c4e8a8
Bugfix: Select test report template
...
- Actually, two bugs!
2020-08-26 14:29:49 +10:00
Ben Charlton
7d6055f06f
Merge branch 'master' into feature-non-int-serial
2020-08-25 09:28:42 +01:00
Ben Charlton
9c2d13b487
test non-numeric serials are handled correctly for ranges
2020-08-24 20:04:10 +01:00
Ben Charlton
d5a374f1fd
Make serial number suggestion DB independent, handle mixed types more cleanly and test
2020-08-24 19:49:32 +01:00
Ben Charlton
9149aa1536
Fix internal server error when serializing stock with no location
2020-08-24 18:04:22 +01:00
Ben Charlton
471ece136e
Merge branch 'master' into feature-non-int-serial
2020-08-24 11:12:07 +01:00
Oliver Walters
78826dc20b
Merge remote-tracking branch 'inventree/master'
2020-08-23 21:21:18 +10:00
Oliver
2a4b9c6c5c
Merge pull request #929 from SchrodingersGat/label-enable
...
Label enable
2020-08-23 21:18:11 +10:00
Oliver Walters
c849f618d5
Clean up implementation of test report matching
2020-08-23 21:03:29 +10:00
Oliver Walters
8f1af0f5f9
Add "enabled" field to Label class
...
- Only list labels which are enabled
- Allows labels to be hidden / disabled without being deleted
2020-08-23 09:07:15 +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
Ben Charlton
eeca3effee
Fix disabled form item from preventing stock location moves for items with serial numbers
2020-08-21 16:20:33 +01:00
Oliver Walters
98017cb8bd
Merge remote-tracking branch 'inventree/master'
2020-08-21 22:11:02 +10:00
Oliver Walters
59b3d8b5bc
Fix stocktake export
...
- Exclude MPTT fields
- Fix foreignkey field references
2020-08-21 20:08:47 +10:00
Oliver Walters
142a1462bb
Merge remote-tracking branch 'inventree/master'
2020-08-20 16:02:18 +10:00
Oliver Walters
90d34cdfcf
StockItem: Allow customer field to be blank
2020-08-20 14:54:55 +10:00
Oliver Walters
e67327953d
Merge remote-tracking branch 'inventree/master'
2020-08-16 15:10:23 +10:00
Oliver
b5b882d3b6
Merge pull request #906 from SchrodingersGat/blabel
...
Label Printing Functionality
2020-08-16 14:02:38 +10:00
Oliver Walters
d52278e423
Icon tweak
2020-08-16 13:45:58 +10:00
Oliver Walters
da079b23dc
Fix duplicate label printing menu action
2020-08-16 13:43:59 +10:00
Oliver Walters
a4267f76e8
Fixes for barcode data rendering
2020-08-16 13:39:05 +10:00
Oliver Walters
2bbc65cc59
Add "brief" version of QR codes
...
- Use this to render to labels (as it contains much less information)
2020-08-16 13:29:38 +10:00
Oliver Walters
1807ba4e7b
Add form for selecting label template for a StockItem
2020-08-16 12:10:58 +10:00
Oliver Walters
cdde0f8c43
Add URL endpoint for downloading PDF labels
2020-08-16 11:12:21 +10:00
Oliver Walters
18b3fd3256
Add context data to StockItemLabel model
2020-08-16 10:24:15 +10:00
Oliver Walters
2f77007dbe
Significant query speed improvements to stock list API
...
- Thanks, django-debug-toolbar!
- Gah, django DRF is the worst. Enforcing a PrimaryKeyRelatedSerializer seems to really improve speed
2020-08-15 21:15:11 +10:00
Oliver Walters
3b01614a38
Merge remote-tracking branch 'inventree/master'
2020-08-09 21:37:06 +10:00
Oliver Walters
cebba6909c
Revert thing
2020-08-09 21:21:12 +10:00
Oliver Walters
3336eb9f45
Default stock list behaviour is to only show in_stock items
2020-08-09 21:12:49 +10:00
Oliver Walters
0da9e0f834
Add "sent_to_customer" filter
2020-08-09 21:10:21 +10:00
Oliver
fcfd1f82d6
Merge pull request #898 from SchrodingersGat/filter-depleted
...
Filter depleted
2020-08-08 17:19:28 +10:00
Oliver Walters
402301e165
Add ability to filter stock items by "depleted" status
2020-08-08 17:06:22 +10:00
Oliver Walters
732405f738
Cannot edit quantity for serialized stock when adjusting
2020-08-08 17:01:29 +10:00
Oliver Walters
3831a04ce0
Merge remote-tracking branch 'inventree/master'
2020-08-08 09:52:48 +10:00
Oliver Walters
8d9cfd3678
Migration file for StockStatus codes
2020-08-08 09:44:21 +10:00
Oliver Walters
a2c3c1086c
Catch unhandled javascript errors
2020-08-08 09:31:57 +10:00
Oliver Walters
ff71fe6e93
Fix "in_stock" logic for StockItem
...
- Not in stock if it is at a customer!
2020-08-08 09:20:42 +10:00
Oliver Walters
861a2982db
Removed "SHIPPED" stock status code
2020-08-08 09:16:53 +10:00
Oliver Walters
bdea29df04
Add functionality to return stock item from customer
2020-08-08 09:05:33 +10:00
Oliver Walters
7b332d93ee
Rearrange button layouts
2020-08-08 08:48:27 +10:00
Oliver Walters
d65d76653c
Merge remote-tracking branch 'inventree/master'
2020-08-03 20:49:33 +10:00
Oliver Walters
10691b3d03
Allow creation of a stock item with zero quantity
2020-07-30 21:05:37 +10:00
Oliver Walters
d90edab59f
Staff users are allowed to delete stock items that otherwise are not able to be deleted
2020-07-30 20:23:46 +10:00
Oliver Walters
5f2ca784c9
Merge branch 'negative-stock-fix'
2020-06-28 19:26:56 +10:00
Oliver Walters
930f903f5d
Add ability to display "out of stock" items against a part
2020-06-22 10:48:41 +10:00
Oliver Walters
82433db1ea
Merge remote-tracking branch 'inventree/master'
2020-06-12 18:16:23 +10:00
Oliver Walters
1ad4b8b131
Reorganize buttons for "Part" view
2020-06-12 18:11:57 +10:00
Oliver Walters
ab4e6548dc
Transfer stock items into a stock location using barcode scanning
2020-06-12 16:29:08 +10:00
Oliver Walters
351a55c9ea
Add the concept of "action groups" to the buttons for the Stock Location view
2020-06-12 11:14:33 +10:00
Oliver Walters
e1c503836d
Improve barcode icon in navbar
2020-06-12 10:56:52 +10:00
Oliver Walters
6064c6ceb5
Add dialog for linking a barcode with a stock item
2020-06-12 10:26:23 +10:00
Oliver Walters
b559816dca
Update translations
2020-06-12 10:25:07 +10:00
Oliver Walters
ba94b340dd
Add function to un-link barcode from a stock item
2020-06-12 10:12:31 +10:00
Oliver Walters
2d9b75c6ae
Include URL data in barcode scan endpoint
2020-06-11 19:21:38 +10:00
Oliver Walters
bc31cc550e
Consolidate buttons for stock item
2020-06-10 15:27:30 +10:00
Oliver Walters
f40a9d1dad
Merge remote-tracking branch 'inventree/master'
2020-06-09 16:28:59 +10:00
Oliver Walters
38dcdcad54
Update translation hooks
2020-06-09 16:18:38 +10:00
Oliver Walters
c7586b83e9
Fix display of buttons for stock item
...
(cherry picked from commit b23017b6bf
)
2020-06-09 13:15:12 +10:00
Oliver Walters
b23017b6bf
Fix display of buttons for stock item
2020-06-09 13:14:29 +10:00
Oliver Walters
a6a58b299b
Merge remote-tracking branch 'inventree/master'
2020-06-06 08:59:28 +10:00
Oliver Walters
126e42a022
Add "IPN" column to stock list table
2020-06-06 08:47:06 +10:00
Oliver Walters
7be158722f
Merge remote-tracking branch 'inventree/master'
2020-06-05 20:04:41 +10:00
Oliver Walters
16d261d956
Make description fields optional
2020-06-05 19:33:32 +10:00
Oliver Walters
9f599546de
Use stock status for determining "in stock"
2020-06-05 09:08:46 +10:00
Oliver Walters
408c6a4040
Filter stock list by "customer"
2020-06-05 09:05:57 +10:00
Oliver Walters
2c7e0bd321
Merge remote-tracking branch 'inventree/master'
2020-06-04 20:07:59 +10:00
Oliver Walters
ca1526405b
PEP fixes
2020-06-04 19:51:43 +10:00
Oliver Walters
80019a3ed8
Add forms/views for manually assigning a stock item to a customer
2020-06-04 19:45:41 +10:00
Oliver Walters
d907136264
Display customer in stock item
2020-06-04 19:13:37 +10:00
Oliver Walters
fbd21827fb
Add 'customer' field to StockItem
2020-06-04 19:08:33 +10:00
Oliver Walters
4ddabb82ef
Add a button to assign stock item to customer
2020-06-04 11:50:55 +10:00
Oliver Walters
dd9584f487
Follow link when a new stock item is created
2020-05-30 20:58:52 +10:00
Oliver Walters
8459de7be2
Display a message if no stock location is set
2020-05-30 20:58:05 +10:00
Oliver Walters
b73044cd44
Merge remote-tracking branch 'inventree/master'
2020-05-29 13:47:19 +10:00
Oliver Walters
59d9e430b4
Remove unique-together requirement
...
- This is handled manually via the validate_unique function
2020-05-28 20:38:24 +10:00
Oliver Walters
774e26eb19
Mark some fields as not-required via the API
2020-05-28 20:33:33 +10:00
Oliver Walters
d0b3e0bd7c
Merge remote-tracking branch 'inventree/master'
2020-05-27 09:31:15 +10:00
Oliver Walters
78990a99e5
Fix serializer for stock item
2020-05-26 23:01:30 +10:00
Oliver Walters
fe69a8e7bb
Merge remote-tracking branch 'inventree/master'
2020-05-26 21:53:20 +10:00
Oliver Walters
e128410d54
Update 'required' status for new serializers
...
(cherry picked from commit 2306e29743eb25266c78bec5357d1194e0778c58)
2020-05-26 20:29:09 +10:00
Oliver Walters
81e38eeb14
Add some more custom FileField serializers
...
(cherry picked from commit 7b9ff27baefacc977fef7852e99d8a9bb46a062a)
2020-05-26 20:29:04 +10:00
Oliver Walters
861e30e8d6
Add a special serializer class for FileField which has a custom to_representation function
...
- This was solving a very subtle bug which will probably only ever apply to a single installation instance
- Future me will most likely not remember what this was for or how it works
- In any case, there we go
- Ref: http://www.cdrf.co/3.9/rest_framework.fields/Field.html
(cherry picked from commit 7305094854
)
2020-05-26 20:29:00 +10:00
Oliver Walters
03cc6892ea
Merge remote-tracking branch 'inventree/master'
2020-05-26 12:52:17 +10:00
Oliver Walters
c0f1966a2c
Decimal filter on StockItem adjustment form
2020-05-26 12:08:00 +10:00
Oliver Walters
4cbf2099fa
Add stock item filtering by serial number range
2020-05-26 11:49:48 +10:00
Oliver Walters
046a00026c
remove debug print
2020-05-26 11:42:30 +10:00
Oliver Walters
ae4bfd07da
StockItemCreate form now has better logic for auto-detecting the part
2020-05-26 11:31:08 +10:00
Oliver Walters
1bf696a052
Allow API upload of file attachments against StockItemTestResult objects
2020-05-25 22:19:28 +10:00
Oliver Walters
d2c1e9e2b0
Type fixes
2020-05-25 14:24:29 +10:00
Oliver Walters
0d052334e2
Allow stock items to be created for template parts
2020-05-25 14:20:35 +10:00
Oliver Walters
fdf57891fc
Form / view / etc for performing StockItem conversion
2020-05-25 14:16:38 +10:00
Oliver Walters
22220493bd
Add unit tests
2020-05-24 21:10:00 +10:00
Oliver Walters
95cc3d2a7a
Copy test results when a stock item is split or serialized
2020-05-24 21:09:43 +10:00
Oliver Walters
e4d10279fa
Include 'key' field in StockItemTestResult serializer
2020-05-24 20:04:34 +10:00
Oliver Walters
e63342418f
Improve / simplify logic for file attachments against test result object
2020-05-23 11:30:42 +10:00
Oliver Walters
50987f47b0
Add a buttony thing
2020-05-22 23:37:26 +10:00
Oliver Walters
4bd0872b2c
Expose some more stock item data over API
2020-05-22 23:33:27 +10:00
Oliver Walters
5245442b11
Fixes
2020-05-22 22:27:52 +10:00
Oliver Walters
e6f56cb056
where one or more test report templates exist for a part,
...
provide a button for all stock-items of that part,
allowing the user to generate and download a test repotr
2020-05-22 22:25:05 +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
05be4da25c
remove test code
2020-05-21 14:06:29 +10:00
Oliver Walters
70c5b27d22
Add ReportAsset model
...
- Files which can be embedded into a report
2020-05-21 14:05:25 +10:00
Oliver Walters
b121262af1
pep FIX
2020-05-19 17:37:00 +10:00
Oliver Walters
9cb039f685
Remove a test (for now) which is causing issues...
2020-05-19 17:08:19 +10:00
Oliver Walters
1cfe445897
PEP fix
2020-05-19 16:59:21 +10:00
Oliver Walters
bf296057b3
Enable attachments to be uploaded via the API
2020-05-19 16:56:41 +10:00
Oliver Walters
fc6cad475a
Add validation for StockItemTestResult based on the matching PartTestTemplate
2020-05-18 19:11:43 +10:00
Oliver Walters
0bdb62f263
Fix pep
2020-05-18 14:32:30 +10:00
Oliver Walters
fce8e3fe05
add button to delete all test data for a given stock item
2020-05-18 14:29:35 +10:00
Oliver Walters
18b7baa5b9
Allow stock item filtering by IPN
...
(cherry picked from commit bd9aad935594e4022299567667faeb149f6d2375)
2020-05-18 13:33:41 +10:00
Oliver Walters
59dfac2c9b
Merge branch 'warning-mesages'
2020-05-17 22:58:21 +10:00
Oliver Walters
1cc0977816
Display testing status for a stock item
2020-05-17 22:33:41 +10:00
Oliver Walters
02b0c0831d
Removed test that caused a bug
2020-05-17 22:29:07 +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
5f318799c1
Logic fix for table row grouping
2020-05-17 21:51:46 +10:00
Oliver Walters
8ace71ef56
Complete refactor of the test-result table for stock item
2020-05-17 21:09:49 +10:00
Oliver Walters
cd0e66e3c6
Add ability to edit / assign attatched files to test result data
2020-05-17 16:17:05 +10:00
Oliver Walters
66f2c01d5d
Add (empty) page for displaying part test templates
2020-05-17 14:26:53 +10:00
Oliver Walters
f791ac9f57
Register test template in the admin interface
2020-05-17 13:50:06 +10:00
Oliver Walters
17f241774f
Add function to generate "keys" for test results.
...
- As the keys are to be used for dict-based lookup (in a template) then they cannot contains spaces.
- May as well enforce lower-case encoding!
2020-05-17 12:59:03 +10:00
Oliver Walters
1e94a597c9
Merge remote-tracking branch 'inventree/master'
2020-05-17 00:42:03 +10:00
Oliver Walters
b3ca6a6ca7
PEP fixes
2020-05-17 00:26:44 +10:00
Oliver Walters
327682b719
Add forms / views / etc to create / edit / delete test results manually
2020-05-17 00:26:10 +10:00
Oliver Walters
05856a72cf
UI cleanup
2020-05-16 23:56:50 +10:00
Oliver Walters
e23a9c1269
Load testresult table for stock item
...
- Uses the API / bootstrap table
- Is pretty!
- Provides link to the attachment (if one exists)
2020-05-16 23:54:07 +10:00
Oliver Walters
3b53437f46
Add 'attachment_detail' to the TestResult serializer
2020-05-16 23:53:28 +10:00
Oliver Walters
608057da69
Add option for user_detail in stockitemtestresult serializer
2020-05-16 23:36:03 +10:00
Oliver Walters
e02b692ab2
Improve API filtering for StockItem
2020-05-16 23:19:16 +10:00
Oliver Walters
197a3e6731
Fixes for Stock API
2020-05-16 23:12:43 +10:00
Oliver Walters
fd11317409
Whoops
2020-05-16 23:04:37 +10:00
Oliver Walters
45556058d2
Allow files to be uploaded alongside a test report
...
- Attach the file to the stock item
- Link the uploaded attachment to the test report
2020-05-16 22:53:23 +10:00
Oliver Walters
247cfcc514
Add API unit tests
2020-05-16 21:57:41 +10:00
Oliver Walters
d6a56da441
PEP fixes
2020-05-16 21:15:14 +10:00
Oliver Walters
a17ab9bfbd
Add an (empty) page for dispalying test results
2020-05-16 21:10:27 +10:00
Oliver Walters
f3c71bd96f
API interface for StockItemTestResult
2020-05-16 20:56:36 +10:00
Oliver Walters
880a0a4af8
Add StockItemTestResult to the admin interface
2020-05-16 20:55:30 +10:00
Oliver Walters
df91b8cf4d
Add function to get all test results as a map
...
- This will be required for pushing out to a test report
2020-05-16 20:45:10 +10:00
Oliver Walters
2bb9fd9955
Add some unit testing for the new model
2020-05-16 20:27:01 +10:00
Oliver Walters
f39f5e5825
Add StockItemTestResult model
2020-05-16 19:56:18 +10:00
Oliver Walters
8a99062704
PEP fixes
2020-05-16 17:52:25 +10:00
Oliver Walters
a6ad263ee7
Fix clean functions so unit tests pass
2020-05-16 17:43:32 +10:00
Oliver Walters
7190a8ef69
Serial number placeholder text for BuildComplete form
2020-05-16 17:29:41 +10:00
Oliver Walters
6552d011a4
Better calculatation of placeholder text for serial number
2020-05-16 16:42:34 +10:00
Oliver Walters
3df8f33080
Logic fixes for CreateStockItem form
...
- Improved data validation
- Fix bug where form was not checked for validity
2020-05-16 12:04:53 +10:00
Oliver Walters
3d0bea15ae
Refactor function naming
2020-05-16 12:03:18 +10:00
Oliver Walters
4cb97b1340
Add some more form candy
2020-05-16 11:55:10 +10:00
Oliver Walters
498ad4162c
Bugfix: Turns out 'prefix' and 'suffix' were protected fields!
2020-05-16 11:05:45 +10:00
Oliver Walters
8fae32e3c7
Refactor HelperForm to easily allow setting prepended text / placeholder / etc
2020-05-16 09:33:34 +10:00
Oliver Walters
0ccac09962
Auto-fill serial numbers for the SerializeStock form
2020-05-16 09:06:39 +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
72cfaccac5
Pass StockItem object through to the SerializeStock form
2020-05-15 21:16:00 +10:00
Oliver Walters
30b5f7d507
Drag and drop for order attachments
2020-05-13 11:28:45 +10:00
Oliver Walters
7143c32fc9
Drag-and-drop attachments for stock item
2020-05-13 11:22:57 +10:00
Oliver Walters
dcf00d816d
Merge remote-tracking branch 'inventree/master'
2020-05-12 22:14:20 +10:00
Oliver Walters
f5b97da5d2
Refactor "attachment" table into template
2020-05-12 22:05:38 +10:00
Oliver Walters
366d4b2143
Add new attechment functionality to new models
...
- Giving the ol' refactor tractor a fresh coat of paint
2020-05-12 21:40:42 +10:00
Oliver Walters
2369b40bbf
Ensure user gets saved when uploading attachment via API
2020-05-12 21:11:38 +10:00
Oliver Walters
5d716d0cdd
Add "upload date" field to fileattachment base class
2020-05-12 20:57:41 +10:00
Oliver Walters
d4fa7d936e
Add 'user' field to attachment
2020-05-12 20:50:03 +10:00
Oliver Walters
0851a925fb
Add ability to filter by whether the part is serialized or not
2020-05-12 20:18:28 +10:00
Oliver Walters
4615fbc0d8
Abillty to filter stock list by serial number
2020-05-12 20:15:37 +10:00
Oliver Walters
e4872d9f67
Merge remote-tracking branch 'inventree/master'
2020-05-12 09:16:04 +10:00
Oliver Walters
b9d0c60189
Pepper
2020-05-12 08:12:42 +10:00
Oliver Walters
c6cff1fb2e
Fixes for StockItem tracking API
...
- Make the tracking API consistent with other API endpoints
2020-05-12 08:12:12 +10:00
Oliver Walters
a86513e15d
Merge remote-tracking branch 'inventree/master'
2020-05-12 00:29:33 +10:00
Oliver Walters
17d0a015f2
Add API endpoint for StockItem attachment items
2020-05-11 23:32:40 +10:00
Oliver Walters
c5999f7186
Merge remote-tracking branch 'inventree/master'
2020-05-11 23:10:29 +10:00
Oliver Walters
003b384abd
Slight adjustment to page tabs for StockItem view
2020-05-07 10:04:16 +10:00
Oliver Walters
ea0d32fd3d
PEP fixes
2020-05-07 09:58:29 +10:00
Oliver Walters
14132a6efa
Add views / models / etc etc to support StockItem attachment
2020-05-07 09:57:54 +10:00
Oliver Walters
64f6238351
Add StockItemAttachment model
2020-05-07 09:39:28 +10:00
Oliver Walters
1c3878829d
Merge remote-tracking branch 'inventree/master'
2020-05-04 09:39:19 +10:00
Oliver Walters
29335fa665
Add "rejected" status code for StockItem
2020-05-03 09:09:17 +10:00
Oliver Walters
094ef38e27
Merge remote-tracking branch 'inventree/master'
2020-05-02 15:29:47 +10:00
Oliver Walters
9b2045025b
StockItem page tweaks
2020-05-02 14:05:52 +10:00
Oliver Walters
7fca496de8
Bug fix for StockItem list API
...
- The wrong detail data was being set
2020-05-02 13:51:29 +10:00
Oliver Walters
4197e29fce
Major major major (improvements for StockItem list API)
...
OK LISTEN UP - Lots of work went into making this speedier:
- For related detail fields (e.g. part_detail), we pre-fetch and cache the model data
- This eliminates duplicate database hits for the same model instances
- Perform all field filtering manually, rather than using the DRF 'filter_fields' concept (this seems to add a lot of overhead)
- Use query annotations to getch calculated fields rather than fetching one-at-a-time
- And finally, if the request is AJAX then return a JsonResponse which is SO FREAKING MUCH FASTER
2020-05-02 13:46:19 +10:00
Oliver Walters
44319d24e4
Custom list serializer for 'location_detail'
2020-05-02 10:05:35 +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
351e825ba8
Merge remote-tracking branch 'inventree/master'
2020-04-28 10:51:55 +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
440fe155ff
Change glyphicons for fontawesome
...
I think I gottem all
2020-04-28 09:31:51 +10:00
Oliver Walters
b338834146
Merge remote-tracking branch 'inventree/master'
2020-04-27 22:18:45 +10:00
Oliver Walters
489dfa1823
Bug fix for a code path which resulted in a form failing validation but not showing any errors!
...
This one has been here for a while!
2020-04-27 20:45:01 +10:00
Oliver Walters
5e309a62f7
Display "Fulfilled" items
...
- Once a salesorder has been marked as "shipped" then the table is displayed differently
- The sub rows show stock items which have been fulfilled against the sales order
2020-04-27 10:31:38 +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
4147163418
Improve status code label rendering
2020-04-26 15:29:21 +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
4f0efec39f
PEP and unit testing fixes
2020-04-25 23:24:00 +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
b351976ae9
Mark a SalesOrder as "shipped"
...
- Option to hide non-stock items from stock list
- Update models with new feature
2020-04-25 08:46:28 +10:00
Oliver Walters
77471cb89c
Form for shipping a SalesOrder
...
- Returns "False" for now
2020-04-24 10:20:56 +10:00
Oliver Walters
b45fec221c
Expose more status code data to the templates
...
- Status codes are now exposed globally to every page
- Much simplified so wow
- https://stackoverflow.com/questions/3221592/how-to-pass-common-dictionary-data-to-every-page-in-django
2020-04-24 09:27:42 +10:00
Oliver Walters
7f020cbbf6
Enbiggen a whole lotta buttons
2020-04-23 19:41:14 +10:00
Oliver Walters
b70e79b778
Optionally add all SalesOrderAllocations to the SalesOrderLineItem serializer
2020-04-22 20:10:23 +10:00
Oliver Walters
5d1754ec32
Better display of where a StockItem is allocated
2020-04-22 17:39:59 +10:00
Oliver Walters
eb7b49784b
StockItem serializer now includes the allocated quantity
2020-04-22 15:24:11 +10:00
Oliver Walters
d9698b10cc
PEP fixes
2020-04-22 13:21: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
2cb1b076f6
Create "SalesOrderAllocation" object
...
- Links multiple StockItem objects to a single SalesOrderLineItem
2020-04-22 12:12:48 +10:00
Oliver Walters
3a71a4f63a
Fix for StockItem model
...
- Allow sales_order_line to be blank
2020-04-22 10:16:54 +10:00
Oliver Walters
6dd79af0b6
Expose "is_allocated" parameter on StockItem API
2020-04-22 10:11:40 +10:00
Oliver Walters
372958d939
Migrate more pages to the two_column template
2020-04-22 09:50:10 +10:00
Oliver Walters
09ccd6c5e2
PEP style fixes
2020-04-21 22:37:35 +10:00
Oliver Walters
cb636e000d
Display a sub-list of stock items which are allocated to a SalseOrderLineItem
2020-04-21 21:38:04 +10:00
Oliver Walters
2c6e8da90e
Ability to filter StockItemList API by sales_order or sales_order_line
2020-04-21 17:33:02 +10:00
Oliver Walters
0d1919f10b
Display an alert on a stock item page if that stock item is allocated to a salesorder
2020-04-21 16:59:14 +10:00
Oliver Walters
89ede3e103
Fix for SalesOrderLineItem allocation calculation
...
Also function to render a progress bar
2020-04-21 16:45:44 +10:00
Oliver Walters
a1376eeb9e
The 'StockItem' model now has a reference to a SalesOrderLineItem
2020-04-21 15:04:21 +10:00
Oliver Walters
87d8b4674a
Merge remote-tracking branch 'inventree/master'
2020-04-20 09:58:49 +10:00
Oliver Walters
4ec5e9a907
Consolidate StockItem serializer
2020-04-20 08:24:43 +10:00
Oliver Walters
c49cd9ffde
Merge remote-tracking branch 'inventree/master'
2020-04-20 01:28:31 +10:00
Oliver Walters
c72fce0cc5
Add "tracking items" back in
2020-04-20 01:14:19 +10:00
Oliver Walters
b2c40c91b7
PEP fixes
2020-04-20 01:11:25 +10:00
Oliver Walters
0334035e77
Simplify StockItem serializer
...
- Some more work needed here to cut down on database hits
2020-04-20 01:09:37 +10:00
Oliver Walters
6a89e0089d
Updates for stock serializer
2020-04-20 00:49:13 +10:00
Oliver Walters
762d735618
Merge remote-tracking branch 'inventree/master'
2020-04-16 21:55:59 +10:00
Oliver Walters
d57fed6142
Change fingerprint icon to barcode
2020-04-15 00:30:00 +10:00