Commit Graph

1067 Commits

Author SHA1 Message Date
Oliver Walters
e56c018a4a Display StockItem UID if one exists 2020-04-14 23:28:46 +10:00
Oliver Walters
977316cb3a Include UID field in StockItem API 2020-04-14 22:57:46 +10:00
Oliver Walters
ba4a1fd771 Add a 'uid' field to StockItem model
- To be used for barcode asociation and lookup
2020-04-14 22:54:05 +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
2e1c4e9792 Merge remote-tracking branch 'inventree/master' 2020-04-13 20:43:00 +10:00
Oliver Walters
2506aa110b API changes
- Allow SupplierPart to be filtered by 'company' in addition to 'supplier' and 'manufacturer'
- Stock can now also be filtered by 'company'

(cherry picked from commit 1b1cd944be)
2020-04-13 20:20:33 +10:00
Oliver Walters
a8ceddc8e4 Merge remote-tracking branch 'inventree/master' 2020-04-12 01:05:42 +10:00
Oliver Walters
7503596ea4 More fixes
- Add a set of template tags for rendering status codes
- Improve build API filtering
- Remove some outdated files
- Fix unit testing
2020-04-12 00:10:33 +10:00
Oliver Walters
e3102900b6 Allow stock API to filter by parts which are not active 2020-04-11 14:41:07 +10:00
Oliver Walters
ba2b1ce581 Merge remote-tracking branch 'inventree/master' 2020-04-10 01:12:11 +10:00
Oliver Walters
bc91975f2c Fixes for Stocktransfer API endpoint 2020-04-10 01:01:39 +10:00
Oliver Walters
5b2665edb1 Better API validation 2020-04-10 00:53:04 +10:00
Oliver Walters
41b3f1d39c API cleanup
Add / Remove / Count endpoints now work
2020-04-10 00:03:43 +10:00
Oliver Walters
3e5dc65c49 Bugfix for notes field 2020-04-10 00:03:21 +10:00
Oliver Walters
58a0f40889 Simplifiy stock adjustment APIs
- Separate API endpoints for count / add / remove / transfer
- Unit testing
2020-04-09 22:24:05 +10:00
Oliver Walters
1b3f8a9309 Unit testing for the stocktake API 2020-04-09 21:19:13 +10:00
Oliver Walters
f6a1ddf8e7 Re-enable stocktake API 2020-04-09 21:18:55 +10:00
Oliver Walters
97f605ef55 Remove some weird trailing zeros 2020-04-07 00:19:51 +10:00
Oliver Walters
4a02a90954 Merge remote-tracking branch 'inventree/master' 2020-04-07 00:08:44 +10:00
Oliver Walters
96547b885e Include supplier-part information in Stock API 2020-04-06 22:02:23 +10:00
Oliver Walters
93eeeec2f3 Merge remote-tracking branch 'inventree/master' 2020-04-06 21:15:06 +10:00
Oliver Walters
44c10c45cd visual consolidation 2020-04-06 20:50:33 +10:00
Oliver Walters
b8f7555a73 Merge remote-tracking branch 'inventree/master' 2020-04-06 16:25:48 +10:00
Oliver Walters
bbe714c8f7 Bugs!
Thanks, unit testing
2020-04-06 11:21:34 +10:00
Oliver Walters
bd407cd226 Rename "URL" to "link" for StockItem and StockItemTracking models 2020-04-06 10:43:06 +10:00
Oliver Walters
2530313e68 Add part_detail and location_detail to the StockItem detail class 2020-04-06 08:38:10 +10:00
Oliver Walters
94b9878c8d Bug fix for stock api
- If a part had an empty image, the thumbnail was improperly encoded
2020-04-05 22:57:42 +10:00
Oliver Walters
efaa532162 Merge remote-tracking branch 'inventree/master' 2020-04-05 22:07:57 +10:00
Oliver Walters
7b494c08ec Translations 2020-04-05 20:40:46 +10:00
Oliver Walters
c170d3f87a More icons 2020-04-05 20:40:41 +10:00
Oliver Walters
c427f173ed Nav link icon improvements 2020-04-05 20:04:12 +10:00
Oliver Walters
428b52693a Merge remote-tracking branch 'inventree/master' 2020-04-05 01:00:00 +11:00
Oliver Walters
0cfb293ca9 List API now uses the thumbnail image 2020-04-05 00:19:37 +11:00
Oliver Walters
55e831f4b4 Merge remote-tracking branch 'inventree/master' 2020-04-03 14:24:35 +11:00
Oliver Walters
92f5648656 Fix API endpoints for Stock app 2020-04-03 12:20:43 +11:00
Oliver Walters
ccb637773f Add item count to StockLocation serializer 2020-04-03 11:41:51 +11:00
Oliver Walters
d4da6211be StockItem: filtering improvements
- Optional 'cacade' param
- Filter by null parent
2020-04-03 11:40:37 +11:00
Oliver Walters
fb94949538 Allow StockLocation filtering of null parent 2020-04-03 11:34:42 +11:00
Oliver Walters
ed6abcdf32 Merge remote-tracking branch 'inventree/master' 2020-03-22 20:20:22 +11:00
Oliver Walters
5af2fae120 Simplify URLs for purchase orders 2020-03-22 19:47:08 +11:00
Oliver Walters
7424cc1352 Merge remote-tracking branch 'inventree/master' 2020-03-18 21:33:09 +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
ef83480f65 Merge remote-tracking branch 'inventree/master' 2020-02-19 00:03:32 +11:00
Oliver Walters
068c237c6e remove failing test 2020-02-18 23:59:37 +11:00
Oliver Walters
49118d8083 Do not let a StockItem be deleted if child items exist 2020-02-18 10:41:06 +11:00
Oliver Walters
49d5573f8b Bug fix: Update child/parent relationship when a StockItem is deleted
- Pass the child items up to the parent of the deleted item
- Fix unit tests
2020-02-18 08:42:55 +11:00
Oliver Walters
9e456f5a11 Flake fix 2020-02-18 08:15:05 +11:00
Oliver Walters
0f4d60dceb StockItem LIST API can now be filtered by StocKItem status 2020-02-17 23:32:43 +11:00
Oliver Walters
23aebab6d0 Display list of build outputs in the Build tab
- Allow StockList api to be filtered by Build id
2020-02-17 23:31:23 +11:00
Oliver Walters
e483b42df6 Logic fix for StockItem splitting
- The original is left in place
- The new item is moved
2020-02-17 22:56:54 +11:00
Oliver Walters
3715c5d637 Set the parent relationship when serializing StockItem object
- Keep track of which StockItem is came from
2020-02-17 22:44:41 +11:00
Oliver Walters
ae4ebab957 Display table of StockItems which have been split from the current item
- The StockItem list api now allows filtering by 'ancestor'
- Add 'children' tab for StockItem
- Needed to tweak the unit testing fixtures (yay thanks MPTT)
2020-02-17 22:37:55 +11:00
Oliver Walters
4f266958e3 Add custom migration
- Required to initialize the MPTT fields for the StockItem model
2020-02-17 22:11:44 +11:00
Oliver Walters
750dfcda07 Add 'parent' field for StockItem
- Allows StockItem to be tracked when it is split into multiple items
- Uses MPTT field
2020-02-17 21:52:31 +11:00
Oliver Walters
0498fd633a Merge remote-tracking branch 'inventree/master' 2020-02-12 12:56:17 +11:00
Oliver Walters
33d21594da Create new stock item from supplierpart stock page
- Allow stock-item-create form to have supplierpart passed as initial data
- Add some translations too
2020-02-12 11:32:01 +11:00
Oliver Walters
6d80788618 Allow stock-filtering and export using SupplierPart ID 2020-02-12 11:16:00 +11:00
Oliver Walters
8dd8505a2c More tab updates
- Add Stock tab
- Add Stock table for supplier part
- Allow stock API to be filtered by supplier-part ID
- Add Orders tab
2020-02-12 11:09:37 +11:00
Oliver Walters
265ed5115a Float parsing on StockItem tracking page 2020-02-12 08:19:08 +11:00
Oliver Walters
bb4c25ba68 Merge remote-tracking branch 'inventree/master' 2020-02-11 20:36:13 +11:00
Oliver Walters
4bd4f2a0a3 Fix for bug b)
- Don't attempt to save if there are duplicates
- Fix overwritten variable name
- Provide correct return data to the form
2020-02-06 23:22:55 +11:00
Oliver Walters
2949289fab Fix for bug a)
- Would not create new StockItem for trackable part if Serial Numbers not provided
2020-02-06 23:11:47 +11:00
Oliver Walters
8412885e09 Merge remote-tracking branch 'inventree/master' 2020-02-02 22:26:18 +11:00
Oliver Walters
5264f816f1 Allow PartCategory and StocKLocation names to be non-unique
- As long as they are unique in the current tree level
2020-02-02 21:40:03 +11:00
Oliver Walters
40037d826d Merge remote-tracking branch 'inventree/master' 2020-02-02 12:48:04 +11:00
Oliver Walters
1a32e441b7 Add //TODO entry in stock tabs 2020-02-02 12:42:35 +11:00
Oliver Walters
1bdcbd1974 Markdownify the 'notes' field for StockItem
- New tab interface for the StockItem page
- Display / editing of notes field with markdown
2020-02-02 12:11:18 +11:00
Oliver Walters
07de23f120 Merge remote-tracking branch 'inventree/master' 2020-01-06 10:11:18 +11:00
Oliver Walters
b3ec748123 Display current stock item quantity in stock-adjust modal form 2020-01-06 08:52:28 +11:00
Oliver Walters
b29e1ded64 Merge branch 'decimal-quantity' 2019-11-19 21:47:22 +11:00
Oliver Walters
dbdbe69f7f Bug fix for test cases 2019-11-19 10:19:52 +11:00
Oliver Walters
9da8189899 Allow non-integer stock movement 2019-11-19 10:17:20 +11:00
Oliver Walters
e4bfe43c04 More rendering improvements 2019-11-19 10:10:23 +11:00
Oliver Walters
003a2d9f3c Allow creation of stockitem with non-integer quantity
-  Also provided more translation strings
2019-11-19 10:00:08 +11:00
Oliver Walters
75774771dc Changes to StockItem model
- Stock adjustments need to accept decimal values
2019-11-19 09:18:41 +11:00
Oliver Walters
20755a6dac Rendering of decimal value on stockitem page 2019-11-19 09:10:47 +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
81a226c760 Added translation strings for stock.models 2019-11-19 08:46:25 +11:00
Oliver Walters
6e54c49142 Merge remote-tracking branch 'inventree/master' 2019-11-16 20:45:34 +11:00
Oliver Walters
16f3dfb678 Removed old migration file 2019-11-16 20:39:10 +11:00
Oliver Walters
b7473be8ef Update stock adjustment dialog 2019-11-16 20:29:05 +11:00
Oliver Walters
2261973331 Ability to delete multiple stock items 2019-11-16 20:19:10 +11:00
Oliver Walters
789515e39d Add translations for the StockItem detail page 2019-11-16 20:14:08 +11:00
Oliver Walters
0effb584b9 Remove 'active' field
- Will work this change in at a later date
2019-11-16 20:13:51 +11:00
Oliver Walters
339126b27a Add new field "active" to StockItem model
- True by default
- Set to 'false' to mark a stockitem as 'deleted'
2019-11-16 19:41:36 +11:00
Oliver Walters
e891f117f3 Merge remote-tracking branch 'inventree/master' 2019-09-27 10:25:11 +10:00
Oliver Walters
3e2a5263a5 Add stock information for top-level stock page 2019-09-27 09:59:14 +10:00
Oliver Walters
14217ff648 Merge remote-tracking branch 'inventree/master' 2019-09-24 08:06:11 +10:00
Oliver Walters
7c1615a2b6 Fix user recording when serializing stock 2019-09-24 07:59:59 +10:00
Oliver Walters
41c07fc423 Save user who created a stock item
- Handled differently for batch or serialized parts
2019-09-24 07:54:18 +10:00
Oliver Walters
d6749dfb24 Merge remote-tracking branch 'inventree/master' 2019-09-22 22:34:34 +10:00
Oliver Walters
6f54091354 Improve display of stock location 2019-09-20 00:03:59 +10:00
Oliver Walters
b3ea2bfb9a Update badges 2019-09-19 23:38:15 +10:00
Oliver Walters
3c98cd87a7 Use localStorage rather than sessionStorage for storing user prefs
- Also create some helper functions
2019-09-19 23:29:03 +10:00
Oliver Walters
119cccc318 Merge remote-tracking branch 'inventree/master' 2019-09-17 20:32:30 +10:00
Oliver Walters
cb77506111 Simplify 2019-09-17 20:19:05 +10:00
Oliver Walters
4a0be0dfb8 Simplify 2019-09-17 20:15:50 +10:00
Oliver Walters
d0ad3f0e37 Merge remote-tracking branch 'inventree/master' 2019-09-15 22:28:55 +10:00
Oliver Walters
194ae49914 Export full_name for parts 2019-09-15 22:23:34 +10:00
Oliver Walters
204cd967aa Include status label text when exporting stocktake data 2019-09-15 20:14:27 +10:00
Oliver Walters
03043e67c7 Perform full validation when importing data 2019-09-15 19:58:05 +10:00
Oliver Walters
9c84e9076f Consolidate stock export code
- Now defined in stock.admin as StockItemResource
- Much more control over format of exported data
- Exported data can be re-imported!
2019-09-15 19:29:18 +10:00
Oliver Walters
5fde9777fb Merge remote-tracking branch 'inventree/master' 2019-09-14 00:19:17 +10:00
Oliver Walters
70e07470db Custom URL validators for more fields 2019-09-14 00:08:49 +10:00
Oliver Walters
4b33b15dd2 Merge remote-tracking branch 'inventree/master' 2019-09-13 23:38:07 +10:00
Oliver Walters
8578a3b8d1 Add searching to other admin views 2019-09-13 23:32:49 +10:00
Oliver Walters
cb5db332d3 Manager for import/export of StockItem data 2019-09-13 23:00:21 +10:00
Oliver Walters
23b814569a Manager for importing StockLocation data 2019-09-13 22:44:50 +10:00
Oliver Walters
a6e850e39f Merge remote-tracking branch 'inventree/master' 2019-09-09 15:03:57 +10:00
Oliver Walters
53c5324df6 Fix uniqueness test for stock item 2019-09-09 08:49:27 +10:00
Oliver Walters
108382cc89 Prefecth related data for stock export
- Example export reduced from 1,024 queries to 7
2019-09-09 08:17:26 +10:00
Oliver Walters
abecb4856f Merge remote-tracking branch 'inventree/master' 2019-09-09 00:09:58 +10:00
Oliver Walters
11c946be4d Export human-readable status code 2019-09-09 00:02:08 +10:00
Oliver Walters
231a669fe5 Export stock based on supplier 2019-09-08 23:53:09 +10:00
Oliver Walters
3d5542181a Move "Export" button onto stock table 2019-09-08 23:40:51 +10:00
Oliver Walters
8817b4d692 Icer button rendering for PurchaseOrder page 2019-09-08 23:27:54 +10:00
Oliver Walters
9212d6047f Add supplier information to exported data 2019-09-08 23:10:13 +10:00
Oliver Walters
cc452bc270 Export stock data 2019-09-08 23:01:16 +10:00
Oliver Walters
faf8b9f2f0 Form / view for downloading stocktake info 2019-09-08 22:37:27 +10:00
Oliver Walters
f4e71d6055 Add a buttony-boy
(cherry picked from commit 69ac5d870a2f1bc9589cd9b23212d3b51cf92c80)
2019-09-08 20:55:19 +10:00
Oliver Walters
2c969ef1c6 View for exporting stocktake / stock list
(cherry picked from commit bdad2d6178a14322ef225d08b13db86b6d7d0909)
2019-09-08 20:55:06 +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
0d6a3d3b28 BOM table now refreshes the table rather than the page 2019-09-08 19:24:47 +10:00
Oliver Walters
b554af5f10 Fix display of location list 2019-09-08 19:21:40 +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
2f11fccb73 Migrate InvenTreeTree to using MPTT model 2019-09-08 14:08:49 +10:00
Oliver Walters
83af318ad0 Merge remote-tracking branch 'inventree/master' 2019-09-07 21:23:50 +10:00
Oliver Walters
023c386f5e Display a warning message if delete_on_deplete is set 2019-09-07 21:18:32 +10:00
Oliver Walters
b4bbd43bae Fix 404 if a stock item is completely depleted 2019-09-07 21:15:14 +10:00
Oliver Walters
755962c6a2 Merge remote-tracking branch 'inventree/master' 2019-09-05 20:13:17 +10:00
Oliver Walters
7fd4359007 Add new option to move-stock form
- Set the destination as the default location for parts being moved
2019-09-05 19:59:00 +10:00
Oliver Walters
7b8d7c9fe0 Merge remote-tracking branch 'upstream/master' 2019-09-01 23:33:39 +10:00
Oliver Walters
906766cc0e Bug fix - ensure pk is set to None 2019-09-01 23:28:28 +10:00
Oliver Walters
7db938eda0 Show the build item on the stock-item page (if applicable) 2019-09-01 23:24:27 +10:00
Oliver Walters
3cef5c93ce Improve stock item splitting 2019-09-01 23:18:08 +10:00
Oliver Walters
90a342fad8 Add a reference to a build for a stock item 2019-09-01 23:09:40 +10:00
Oliver Walters
d319c79abb Merge remote-tracking branch 'upstream/master' 2019-08-30 02:59:01 +10:00
Oliver Walters
094e8cdc23 PEP 2019-08-30 00:15:16 +10:00
Oliver Walters
891f4f9f17 Another test 2019-08-30 00:14:54 +10:00
Oliver Walters
6f8c3454f3 Tests for stock serialization form 2019-08-30 00:06:46 +10:00
Oliver Walters
34bfdea4b5 Test another invalid serialization 2019-08-29 23:50:33 +10:00
Oliver Walters
1e62528d2a Merge remote-tracking branch 'upstream/master' 2019-08-29 21:37:03 +10:00
Oliver Walters
0fba236eef Stock locations are now persistent 2019-08-29 15:52:32 +10:00
Oliver Walters
7ae7c19a24 Merge remote-tracking branch 'inventree/master' 2019-08-29 08:21:21 +10:00
Oliver Walters
937bcd41d6 Fix tests for stock serialization 2019-08-29 07:37:44 +10:00
Oliver Walters
4db345d0c2 Perfom serialization 2019-08-28 22:47:46 +10:00
Oliver Walters
76ec44d770 Form improvements 2019-08-28 22:04:04 +10:00
Oliver Walters
6c5b09efd4 Provide initial data 2019-08-28 21:50:44 +10:00
Oliver Walters
7575a39b7f Add form / view for serializing a stock item
- Back end doesn't do anything yet
2019-08-28 21:46:26 +10:00
Oliver Walters
3b8f5872ac Add button to serialize stock 2019-08-28 21:21:26 +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
bc03ae53bd Changes for clean of StockItem 2019-08-28 20:01:38 +10:00
Oliver Walters
88b90281f5 Do not enforce serialization when creating a stock item 2019-08-28 19:56:35 +10:00
Oliver Walters
c3fe101571 Merge remote-tracking branch 'inventree/master' 2019-08-15 13:41:50 +10:00
Oliver Walters
c81f8e6d87 Add 'new supplier part' button to stock item creation form 2019-08-15 13:17:33 +10:00
Oliver Walters
f9fa16a397 Fix remove-row button in stock-adjust form 2019-08-14 13:29:51 +10:00
Oliver Walters
c1ab004c0c Merge remote-tracking branch 'inventree/master' 2019-08-09 20:37:46 +10:00
Oliver Walters
a36d99b3e7 PEP fixes 2019-08-09 20:14:47 +10:00
Oliver Walters
bd61c89094 Tests for stock app views 2019-08-09 20:13:23 +10:00
Oliver Walters
84ea95181d Merge remote-tracking branch 'inventree/master' 2019-08-02 22:37:26 +10:00
Oliver Walters
c8bf20ad41 Add part hover image 2019-07-25 11:08:22 +10:00
Oliver Walters
fe7392f152 Prevent stock adjustments for serialized stock items 2019-07-25 11:05:09 +10:00
Oliver Walters
94c0102742 Improve validation logic for StockItem
- Allow tracked items to exist without a serial number (e.g. non-serialized tracked items)
2019-07-25 11:04:45 +10:00
Oliver Walters
42e1370e92 Bug fix 2019-07-25 10:36:59 +10:00
Oliver Walters
3058b895dd Prevent auto-delete of stock items which have a serial number 2019-07-24 20:24:12 +10:00
Oliver Walters
33fe4d186d Include more fields when splitting stock 2019-07-24 19:48:37 +10:00
Oliver Walters
163f076565 Merge remote-tracking branch 'inventree/master' 2019-07-23 12:07:13 +10:00
Oliver Walters
a42371598c Fix part deletion template
- Display list of stock items which will be thusly deleted
2019-07-23 11:55:51 +10:00
Oliver Walters
b546b5e0cc Create separate entries for each unique serial number 2019-07-23 11:45:03 +10:00
Oliver Walters
d82d8f5cd1 Re-implement item saving for non-tracked parts 2019-07-23 11:31:29 +10:00
Oliver Walters
9e5eadd6c3 Set serial numbers when creating a new stock item 2019-07-23 10:31:34 +10:00
Oliver Walters
23d03d6b9b Build completion now handles unique serial numbers
Provide a method to test if a serial number matches for a given part
2019-07-22 15:55:36 +10:00
Oliver Walters
8ca14efa53 Delete stock tracking entries 2019-07-22 10:46:42 +10:00
Oliver Walters
c27e8e809a Endpoint for editing a stock tracking entry 2019-07-18 08:55:57 +10:00
Oliver Walters
bb799d98be Add ability to create new stock tracking note for a stock item 2019-07-16 00:10:24 +10:00
Oliver Walters
310d4b5f07 Added descriptive help text 2019-07-15 23:53:25 +10:00
Oliver Walters
d800ed715e Add (optional) URL to stock tracking info 2019-07-15 22:33:00 +10:00
Oliver Walters
c9bee19b8a Remove thingy 2019-07-15 19:26:41 +10:00
Oliver Walters
7d2d6a79e4 Merge remote-tracking branch 'inventree/master' 2019-07-12 00:20:54 +10:00
Oliver Walters
23d19d6784 Remove old debug messages 2019-07-11 23:07:52 +10:00
Oliver Walters
40695b3288 Merge remote-tracking branch 'inventree/master' 2019-07-10 20:13:35 +10:00
Oliver
1f9e6f4a68
Merge pull request #411 from SchrodingersGat/bom-upload
BOM upload
2019-07-10 15:17:58 +10:00
Oliver Walters
20ec36d3ea Enforce authentication for API access 2019-07-08 19:20:00 +10:00
Oliver Walters
b185abbb87 Catch case in which a request.GET is not available
(cherry picked from commit 9296c0ba0f8c4914cd04b820c6172f8c3a794750)
2019-07-08 09:41:20 +10:00
Oliver Walters
047d2f2f4c Include part revision in stock API / table 2019-06-28 09:35:29 +10:00
Oliver Walters
bd9d5b92dc Merge remote-tracking branch 'inventree/master' 2019-06-25 21:04:02 +10:00
Oliver Walters
d6fcf85cd2 Set part category for multiple parts at once 2019-06-25 19:15:39 +10:00
Oliver Walters
6da0106aa2 Merge remote-tracking branch 'inventree/master' 2019-06-20 21:49:30 +10:00
Oliver Walters
e0bfda2b14 Merge remote-tracking branch 'inventree/master' 2019-06-20 21:49:19 +10:00
Oliver Walters
d5119e1aff Replace some cog icons 2019-06-20 21:28:00 +10:00
Oliver Walters
1fc39d56df Add 'new stock location' button to top-level locatino 2019-06-19 18:50:05 +10:00
Oliver Walters
fefbcf2ed9 Clean up buttons for stock location 2019-06-19 18:49:05 +10:00
Oliver Walters
e5c2ee5587 Merge remote-tracking branch 'inventree/master' 2019-06-19 08:12:14 +10:00
Oliver Walters
c0e66dd9a0 Added pretty buttons to stock item page 2019-06-18 23:56:00 +10:00
Oliver Walters
f417ddb8e0 Merge remote-tracking branch 'inventree/master' 2019-06-18 01:50:50 +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
1b43f151df Merge remote-tracking branch 'inventree/master' 2019-06-17 23:28:35 +10:00
Oliver Walters
3405fb93a9 Peppy fixes 2019-06-15 19:42:09 +10:00
Oliver Walters
1290e7f289 Implement POST for receiving items
- Create new StockItem in the correct location
2019-06-15 19:39:57 +10:00
Oliver Walters
c906cbe2c2 Merge branch 'stock-endpoint' 2019-06-13 23:06:08 +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
222c9f1876 Allow quantity editing via /api/stock/ endpoint
- Allows creation of a new StockItem with a specified quantity
2019-06-13 22:58:02 +10:00
Oliver Walters
8a46dda07f Merge remote-tracking branch 'inventree/master' 2019-06-10 23:22:04 +10:00
Oliver Walters
f731c45ce8 Replace other choice fields with commonized status code 2019-06-04 23:38:52 +10:00
Oliver Walters
166b41196b Merge remote-tracking branch 'inventree/master' 2019-06-04 21:22:36 +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
c00b19bc5b Merge remote-tracking branch 'inventree/master' 2019-06-02 20:42:37 +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
6e7f354a23 Add a 'LOST' status code for stockitem 2019-06-02 13:53:54 +10:00
Oliver Walters
013a85e6f7 Better dispaly of stock status
- Send status text in JSON
- Only display status if it is not "OK"
2019-06-02 13:53:11 +10:00
Oliver Walters
9577e4e505 Merge remote-tracking branch 'inventree/master'
# Conflicts:
#	InvenTree/static/script/inventree/stock.js
#	InvenTree/stock/forms.py
#	InvenTree/stock/urls.py
#	InvenTree/stock/views.py
2019-06-02 12:51:56 +10:00
Oliver Walters
6982b2f0c2 Making PEP happy 2019-06-02 12:47:40 +10:00
Oliver Walters
802ff35cf3 Remove some now unused forms / views / etc 2019-06-02 12:45:44 +10:00
Oliver Walters
2ee35ec062 Stock counting now works 2019-06-02 12:20:26 +10:00
Oliver Walters
d365d7cc44 remove from stock now works 2019-06-02 12:15:44 +10:00
Oliver Walters
1b3ffada6d Add-stock is now working 2019-06-02 12:13:22 +10:00
Oliver Walters
8dd9034563 Remove 'destination' field if we are not moving stock
- Allow different stock adjustment actions
2019-06-02 12:00:39 +10:00
Oliver Walters
d1ff115f74 Simplifiy js and improve template / form 2019-06-02 11:47:21 +10:00
Oliver Walters
c7503b4f9f Consolidated form/view into single 'stock-adjust' endpoint 2019-06-02 11:37:04 +10:00
Oliver Walters
fe31205017 Stock movement now works! 2019-06-02 11:27:03 +10:00
Oliver Walters
0b54baf6db POST the stock adjustment method back as a hidden form input 2019-06-02 11:15:12 +10:00
Oliver Walters
1b7762470d catch a ValueError 2019-06-02 11:14:56 +10:00
Oliver Walters
96f6f6068e Return message on succses 2019-06-02 11:05:40 +10:00
Oliver Walters
20963f83d9 Better error reporting for quantity 2019-06-02 11:00:28 +10:00
Oliver Walters
c228a4998c Extract stock items from POST and return to form 2019-06-02 10:25:19 +10:00
Oliver Walters
e278bdbb90 Improve filtering for stock items 2019-06-02 09:14:45 +10:00
Oliver Walters
011f5a5efd Delete rows interactively from stock adjustment form 2019-06-01 22:04:03 +10:00
Oliver Walters
6a04c8cbd3 Update stock_move form template 2019-06-01 21:16:59 +10:00
Oliver Walters
3869bc27c9 Whoops, that form was being used.
Created a copy of the form for multiple-item-stock-movements
2019-05-30 09:01:16 +10:00
Oliver Walters
d321947026 Add stock item fields for each item passed to the form 2019-05-29 22:38:42 +10:00
Oliver Walters
0e3f74ef31 Pass list of selected stock items to the view 2019-05-29 22:24:22 +10:00
Oliver Walters
0ce6c5f7d5 Redirect non-ajax forms to / 2019-05-29 22:24:17 +10:00
Oliver Walters
2b4cb4d3e0 Beginning to move the stocktake forms server side 2019-05-29 22:24:11 +10:00
Oliver Walters
72dc75512b Pass list of selected stock items to the view 2019-05-29 22:23:45 +10:00
Oliver Walters
f4a052ee2b Redirect non-ajax forms to / 2019-05-29 22:11:03 +10:00
Oliver Walters
080f9da9c8 Beginning to move the stocktake forms server side 2019-05-29 22:05:13 +10:00
Oliver Walters
6a30485a4e Initial work toward fixing stock issues 2019-05-29 01:03:21 +10:00
Oliver Walters
1232a6cf17 PEP fixes 2019-05-28 22:01:52 +10:00
Oliver Walters
8c583750a2 Update the stock list API
- Custom data serialization is MUCH faster (~400ms compared to 3s)
- Cache location queries
- Flatten related field data
- Update stock table javascript to match
2019-05-28 21:45:27 +10:00
Oliver Walters
4218cf8b45 Client-side grouping
- Cusomizations made to bootstrap-table-group-by.js
- Group by part name
- Display total stock count per group
- Only group if there are more than 1 item in the group
- Groups send checkbox signals through appropriately!
2019-05-28 17:21:29 +10:00
Oliver Walters
64403f824a And deltaco some code that went along with it 2019-05-27 22:46:17 +10:00
Oliver Walters
7de4ee80f1 Deltaco some dead code 2019-05-27 22:44:38 +10:00
Oliver Walters
5a9c19492b Design an aggregation filter for stock items
- If 'aggregate=1' is sent to the stock API, aggregate the returned stock items by part and location
- Suprisingly this actually works right out of the gate
2019-05-27 22:44:13 +10:00
Oliver Walters
f3b17b2164 Add some form fields (might have to remove later) 2019-05-26 00:32:18 +10:00
Oliver Walters
6603d6e9ed PEP fixes 2019-05-26 00:22:05 +10:00
Oliver Walters
c45a506a10 Rename field part.has_variants to part.is_template 2019-05-25 23:58:31 +10:00
Oliver Walters
75d38489d7 Add ability to filter stock by variants for a templated part 2019-05-25 23:26:46 +10:00
Oliver Walters
d70110690b Validate uniqueness for StockItems
- If the Part is a variant of a template, ensure that the serial numbers are unique across all instances of the template
- Prevent instantiation of a StockItem for a part which has variants
2019-05-25 23:09:04 +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
5664fc5472 Detail in StockItem API now optional 2019-05-23 22:57:45 +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
70be052c74 Rebuilt migrations again (arrrrrrrrrrrrrrrrrrrrrrrrrrgh never do this) 2019-05-20 21:45:37 +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
9ddedc6915 Restart migrations
- Easier to delete all the migrations and start again :'(
2019-05-19 00:11:41 +10:00
Oliver Walters
a8846dc515 Hopefully fix the thingy 2019-05-18 23:52:22 +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
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
1b06cd23af Add 'stock' tab for supplier page 2019-05-16 21:16:19 +10:00
Oliver Walters
c1224048ad Add ability to filter stock by supplier 2019-05-16 21:01:34 +10:00
Oliver Walters
b4df96aaee Simplify extended filters 2019-05-16 19:14:43 +10:00
Oliver Walters
e1558a7a96 Add ability to filter stock items by part category
- Using the REST API
- Add &category=x to the query string
- Add &include_child_categories to include child categories
2019-05-16 18:54:14 +10:00
Oliver Walters
292e29e95e Add some more secondary modals 2019-05-15 07:50:54 +10:00
Oliver Walters
f979edef8e Prevent double loading of stock.js 2019-05-14 23:47:15 +10:00
Oliver Walters
58cc1cda77 Only load api.js once 2019-05-14 23:43:16 +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
be1b458634 Upon successful creation (in a secondary modal) update the field in the primary modal 2019-05-14 23:04:49 +10:00
Oliver Walters
226644e59a Open a secondary modal over the top of a primary one 2019-05-14 22:37:45 +10:00
Oliver Walters
dc3abec899 Add a secondary modal in modals.html 2019-05-14 22:30:24 +10:00
Oliver Walters
d679ee9971 Update form for deleting stock location 2019-05-13 22:58:42 +10:00
Oliver Walters
a78106526a Remove launchDeleteForm JS function
- All should be consolidated upon launchModalForm
- StockItem delete now uses this
2019-05-13 22:47:36 +10:00
Oliver Walters
150c68e65b Bug fix
- Turns out 'item_count' was actually used for something (that I wrote... recently...)
2019-05-13 18:52:54 +10:00
Oliver Walters
b7d3bbd836 PEP 2019-05-13 18:46:48 +10:00
Oliver Walters
0813f8cbd5 More test coverage for Stock 2019-05-13 18:45:52 +10:00
Oliver Walters
f410957d8d Refactored Stock test to use fixtures 2019-05-12 21:46:38 +10:00
Oliver Walters
25e41b3fa2 Allow null values for StockItem.updated
- Just to make the tests run better
2019-05-12 21:20:43 +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
b73583be40 Make the 'quantity' field optional in the stock move API
If not specified, the entire quantity will be moved
2019-05-11 09:02:30 +10:00
Oliver Walters
271c684b22 Making the frog happy 2019-05-11 00:43:02 +10:00
Oliver Walters
97b9cac205 Successfully move multiple parts with partial quantities 2019-05-11 00:42:24 +10:00
Oliver Walters
306a981ca1 Allow partial-quantity move
- Automatically split out the stock
- Move the specified quantity to the new location
2019-05-11 00:40:37 +10:00
Oliver Walters
c376f38a8d Added function to split stock
- Specify the quantity to move into the NEW stock item
- The left over quantity will remain in the current stock item
2019-05-11 00:37:54 +10:00
Oliver Walters
6561a613d7 Add extra validation step 2019-05-11 00:07:21 +10:00
Oliver Walters
8d5c4c521c Pass stock move quantity through per item 2019-05-11 00:04:45 +10:00
Oliver Walters
ba2f565e35 docstring improvements
- Added Attribute docstring to all model objects
2019-05-10 20:11:52 +10:00
Oliver
e1fbd4611f
Merge pull request #289 from SchrodingersGat/delete_on_empty
Delete on empty
2019-05-09 23:26:19 +10:00
Oliver
793b4f8063
Merge pull request #288 from SchrodingersGat/tree-badges
Tree badges
2019-05-09 23:06:32 +10:00
Oliver Walters
027e1cf130 Add ability to edit 'delete_on_deplete' field 2019-05-09 23:06:19 +10:00
Oliver Walters
ac326c135f Auto delete stock items when they are depleted 2019-05-09 23:01:32 +10:00
Oliver Walters
61351a8f8d Renamed add_transaction_note to addTransactionNote 2019-05-09 22:52:38 +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
f4941d55ed
Merge pull request #285 from SchrodingersGat/hide-supplier-part
Hide supplier_part field if the part cannot be purchased
2019-05-09 18:46:48 +10:00
Oliver Walters
2c5bb6b126 Hide supplier_part field if the part cannot be purchased 2019-05-09 18:43:22 +10:00
Oliver Walters
ef9fb5b018 Hide some fields from forms 2019-05-09 18:38:37 +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
b9b17f39d9 Override page title for Stock app 2019-05-09 18:11:13 +10:00
Oliver Walters
873bd182f0 Vertical alignment of button toolbars 2019-05-09 18:04:42 +10:00
Oliver Walters
e9c904076f Added help text for model fields 2019-05-08 23:32:57 +10:00
Oliver Walters
afffd06fb8 Limit choices for 'parent' field when editing StockLocation 2019-05-08 18:00:34 +10:00
Oliver Walters
abb8930702 Limit SupplierPart choices in EditStockItem view 2019-05-06 18:06:06 +10:00
Oliver Walters
d2d248c72e QR button code is now a template 2019-05-05 10:56:59 +10:00
Oliver Walters
8a6932e993 Improve QR code display
- Pretty little glyphicon button!
2019-05-05 08:39:16 +10:00
Oliver Walters
ab6673caa3 Add tests for default location traversal 2019-05-04 23:20:59 +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
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
4ef1e4fc78 Explicitly mark some CharField as non blank 2019-05-04 17:01:31 +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
a116c3f191 Handle case where a new stock item is to be created without the part being specified 2019-05-03 23:52:30 +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
c901294a48 Add more information to the Barcode
- API endpoint URL
- Add barcode generation for StockLocation
2019-05-02 20:50:20 +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
4d7ac870e0 Use the collapse template for the stock location list view 2019-05-02 19:02:03 +10:00
Oliver Walters
20cfa71db2 Added migration file 2019-05-02 00:59:59 +10:00
Oliver Walters
22f8c1d8c7 Adjust model field (haven't run make migrate yet) 2019-05-02 00:57:44 +10:00
Oliver Walters
8a8de2b78f Add migration file
- Should pass this time
2019-05-02 00:49:30 +10:00
Oliver Walters
7e149f817c Small change to uuid should trigger migrations 2019-05-02 00:41:29 +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
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
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
e471313435 PEP fix 2019-04-29 18:43:44 +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 Walters
2f7f49c116 PEP fix 2019-04-28 11:54:40 +10:00
Oliver Walters
ba49b080b0 Some small tweaks 2019-04-28 11:46:53 +10:00
Oliver
e5e6480099
Merge pull request #181 from SchrodingersGat/supplier-parts
Supplier parts
2019-04-28 11:28:32 +10:00
Oliver Walters
1171953e65 Limit SupplierPart options in CreateBomItem form
- If Part is selected, limit the options in supplier_part field
- Only allow supplier_parts which map back to the same part
2019-04-28 11:24:26 +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
2108ee2eb7 Update makefile 2019-04-28 08:42:17 +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
0484e62836 PEP fixes 2019-04-27 15:25:40 +10:00
Oliver Walters
e7685951e1 Add (simple) test cases for Stock API
- Still a lot of work to do here
2019-04-27 15:24:30 +10:00
Oliver Walters
030265cc2d Allow editing of 'notes' field when creating new StockItem 2019-04-27 13:12:34 +10:00
Oliver Walters
6c3041d99c Remove 'draft' function from StockItem RUD endpoint 2019-04-26 21:44:38 +10:00
Oliver Walters
d78841a665 Allow editing of more stockitem options 2019-04-25 23:35:48 +10:00
Oliver Walters
8d5850248e PEP fixes 2019-04-25 23:25:52 +10:00
Oliver Walters
1f8632c77c Improved response message for stocktake 2019-04-25 23:19:22 +10:00
Oliver Walters
990808ec03 Fix code to move multiple parts via AJAX / JSON 2019-04-25 23:16:54 +10:00
Oliver Walters
757cd539b2 Enforce 'notes' field for StockItem move
- Better error handling for StockItem.move
2019-04-25 23:01:03 +10:00
Oliver Walters
053e9c9795 Add a stock tracking index
- Shows entire history of stocktracking items
2019-04-25 22:11:10 +10:00
Oliver Walters
79f8736b6b Add note on creation of StockItem 2019-04-25 22:10:46 +10:00
Oliver Walters
533fdb71c4 Javascript function to render stock tracking table
- Added extra info to StockItemTracking serializer
2019-04-25 22:04:32 +10:00
Oliver Walters
f36f02b27f Tests for stock app
- Increase coverage of Stock/models.py to 84%
2019-04-25 17:30:44 +10:00
Oliver Walters
7b68310d73 PEP fixes 2019-04-25 03:20:25 +10:00
Oliver Walters
7c91c9ba79 Reverse URL for stock models
- stock location
- stock item
- stock tracking

- Added blank test files
2019-04-25 03:13:41 +10:00
Oliver Walters
0cdf660a80 Merge remote-tracking branch 'inventree/master' into delete-old-forms
# Conflicts:
#	InvenTree/part/views.py
2019-04-18 23:51:58 +10:00
Oliver Walters
9e9aa02b90 Remove old templates from Stock 2019-04-18 23:41:17 +10:00
Oliver Walters
8040ad8a6a Add function to duplicate stock item 2019-04-18 23:28:46 +10:00
Oliver Walters
a0b6900eb8 Disable buttons that require row selection, until a selection has been made
- Stock table
2019-04-18 22:35:51 +10:00
Oliver Walters
5d887f3785 Remove 'simple-history'
- Might re-add it later on
2019-04-18 21:28:09 +10:00
Oliver Walters
fd3f6ec21e Add stock item filtering by sub-category 2019-04-18 08:33:12 +10:00
Oliver Walters
ebcbf9a90e Add status_text to API 2019-04-17 23:33:19 +10:00
Oliver Walters
963883acd6 Consolidated function to adjust stock
- Add / remove / stocktake
- Handle forms and tables properly
2019-04-17 23:17:04 +10:00
Oliver Walters
ba1b8d9181 Created js function to load stock table
- Avoid duplication of code
2019-04-17 22:59:52 +10:00
Oliver Walters
b9b8b5ee12 Update model for StockItem 2019-04-17 18:34:21 +10:00
Oliver Walters
01bdf2f19b PEP fixes 2019-04-16 22:32:43 +10:00
Oliver Walters
be60fbcc25 More cleanup for modal forms
- Require 'ajax_template_name' to be set or weird things happen!
2019-04-16 21:25:20 +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
1ef81ecf2e Ignore some rules 2019-04-14 09:39:01 +10:00
Oliver Walters
76b0d17b11 PEP fixes for /stock 2019-04-14 09:23:24 +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
51d77ce4d2 Include uuid in serializer and api 2019-04-13 07:56:06 +10:00
Oliver Walters
7b68bac32f Display UUID and QR code on stockitem page
- The actual display of this can be improved upon at a later stage
2019-04-13 01:14:24 +10:00
Oliver Walters
b64e584b52 Add UUID field to StockItem model 2019-04-13 01:12:47 +10:00
Oliver Walters
1b5287307b Add some help text 2019-04-13 00:52:26 +10:00
Oliver Walters
926d717190 Add quantity field to StockItemTracking
- Keep track of historical levels of part availability
2019-04-13 00:14:10 +10:00
Oliver Walters
93bb0bf6f4 Improved 'move stock' form
- Better error checking on the form (provides form validation messages to user)
2019-04-13 00:08:13 +10:00
Oliver Walters
f451d31f00 Rearrange stockitem drop-down menu for more logical operations 2019-04-12 23:10:47 +10:00
Oliver Walters
e560ea4a41 Update edit form for StockItem
- Disallow direct quantity editing (must perform stocktake)
- Add notes field to allow editing
2019-04-12 23:10:32 +10:00
Oliver Walters
7566c3769a Added a note for future work 2019-04-12 23:05:12 +10:00
Oliver Walters
68ec5df371 Correctly handle StockTrackingItem if there is no user data 2019-04-12 23:03:02 +10:00
Oliver Walters
88103b63d2 Cannot filter by STATUS
- Is this because it is a dict?
- Need to address this in the future
2019-04-12 22:46:48 +10:00
Oliver Walters
7a7b0aea33 Changed 'stocklocation.items' to 'stocklocation.stock_items' 2019-04-12 22:46:15 +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
1b9c98ae3e Bug fix for stock item traking list
- Query was returning ALL stock tracking objects!
- Now filter by StockItem ID
2018-05-10 21:27:41 +10:00
Oliver
4b4db50de5 Display username in stock-tracking
- Add UserSerializer
2018-05-10 21:20:12 +10:00
Oliver
dcf74292b6 Changed tracking into to datetime field
- Added moment.js for formatting dates
-
2018-05-10 21:13:36 +10:00
Oliver
bf4ffb8b0b Add part stocktake to Stock Location page(s) 2018-05-08 22:41:52 +10:00
Oliver
f2982a59ad Added StockTracking API
/api/stock/track/
ListCreate API view
StockItem page now shows bootrap-table of tracking notes
2018-05-08 22:30:32 +10:00
Oliver
3b6ef3f008 Added stocktake / add / remove actions to StockItemDetail page 2018-05-08 22:14:03 +10:00
Oliver
25e0de1ce7 Vast improvements to stocktake API endpoint
- Also acts to ADD and REMOVE stock
- Send 'action' field to specify which one to perform
- Fixed add_stock and remove_stock funcs for StockItem model
- Autoatically add transaction notes for all actions
2018-05-08 22:06:28 +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
fdf214626c Further assorted updates
What, you need more commit details?! Pah
2018-05-07 23:40:17 +10:00
Oliver
b6944620dd Fixes for JSON API
- Set content type
- Stringify JSON data
- Finish API to stocktake multiple parts
2018-05-07 23:25:47 +10:00
Oliver
425db5fd39 Tweaked part stock page 2018-05-07 21:51:08 +10:00
Oliver
2b286c3b83 Bulk stocktake API
- Pass list of pk/quantity dict objects
2018-05-07 21:17:19 +10:00
Oliver
e746ca6e0a Paginate company page 2018-05-07 18:16:12 +10:00
Oliver
ee0cbdbb07 Skeleton for deleting multiple items
- Does not work yet! But opens a window...
2018-05-06 22:38:39 +10:00
Oliver
c1e7e95fc0 UI improvements
Consolidated detail pages with OPTIONS drown down
(rather than multiple single buttons)
2018-05-06 22:09:15 +10:00
Oliver
8a0db0e6df Updated stockitem detail page
- Consolidated buttons into dropdown
- Stock tracking now in collapsible list
2018-05-06 21:53:06 +10:00
Oliver
d8922aa9db Implemented API to move multiple items at once
- Added ability to override request method in inventreeUpdate
- Added inventree/script/stock.js to handle stock API js 
- Added StockMove API endpoint
2018-05-06 21:39:33 +10:00
Oliver
8e7e784934 Remove test code 2018-05-05 01:27:15 +10:00
Oliver
41e031d4b4 Draft API endpoint RUD class
- RUD = Retrieve / Update / Destroy
- When issuing an Update command, the validity is checked but the model object is only saved if the POST data has "_is_final": true
2018-05-05 01:26:01 +10:00
Oliver
7e4b0630b6 Part category API 2018-05-04 23:54:57 +10:00
Oliver
83dd068fec Initial commit for api.js
- GET JSON call with console output
- Provide filters
2018-05-04 23:43:41 +10:00
Oliver
a7d4e299b2 Cleaned up stock app 2018-05-04 23:31:48 +10:00
Oliver
3511ce29ee Added StockLocation API 2018-05-04 01:33:21 +10:00
Oliver
395bf23d6c Cleanup / formatting 2018-05-04 01:33:13 +10:00
Oliver
347a324589 Fix 2018-05-04 01:04:12 +10:00
Oliver
52cc7360b3 More betterer buttons for stock locationdetail 2018-05-04 00:48:36 +10:00
Oliver
1c5972e326 Cleaned up action buttons for StockLocation
- Merged edit/create/delete into a single drop-down button
2018-05-04 00:32:06 +10:00
Oliver
1899d8f3e9 Stock location part list now uses bootstrap table
- Serializers within serializers!
2018-05-02 23:08:45 +10:00
Oliver
211edb23bb Removed footable
- Now using bootstrap-table
2018-05-02 22:22:43 +10:00
Oliver
f337291db8 Stock tables now searchable 2018-05-01 09:04:52 +10:00
Oliver
b24ddac0b8 Part stuff 2018-04-30 22:30:15 +10:00
Oliver
4a2b6a5674 Formatting fixes 2018-04-30 21:56:46 +10:00
Oliver
37b109b8fc First pass of automated tracking data
- When stock item is moved
- When stocktake is performed
- Yes it is  bad - needs improvement!
2018-04-30 21:36:50 +10:00
Oliver
f9138f4997 Item stocktake form 2018-04-30 21:03:25 +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
f74e176579 JSON api for stock items 2018-04-29 21:02:40 +10:00
Oliver
3403af18c8 Trackable items must have serial number set 2018-04-29 17:06:22 +10:00
Oliver
feb45513f7 Prevent serial number for stock item with quantity > 1 2018-04-29 13:20:02 +10:00
Oliver
8d0789c37c Implemented tree view
Using library bootstrap-treeview
- part category tree
- stock location tree
- Currenly is functional but looks terrible
2018-04-28 23:22:12 +10:00
Oliver
095492203f Simplified javascript templating
- Load js modules in block js_load
- Write $(document).ready script in block js_ready
- Write any other js in block_js
2018-04-28 12:45:12 +10:00
Oliver
7ebb723d15 Revert "Set initial value fields to disabled for some forms"
This reverts commit c1271367bd.
2018-04-28 12:19:50 +10:00
Oliver
c1271367bd Set initial value fields to disabled for some forms
- Prevent user from changing certain fields
- Only when a form is launched from a particular view
2018-04-28 12:14:18 +10:00
Oliver
bc597d7c21 Style fixes 2018-04-28 01:16:47 +10:00
Oliver
1df42b2397 Sanity checking for StockItem
- If a SupplierPart is selected, it must point to the same Part type as the Part field!
2018-04-28 00:06:39 +10:00
Oliver
4d6e2aca2c Modal forms for stock app 2018-04-27 22:59:08 +10:00
28e6d50f08 Check for null StockItem location 2018-04-27 09:33:05 +10:00
Oliver
08ed128bea PEP style fixes 2018-04-23 21:18:35 +10:00
Oliver
4bedf0ed4c Finally got migrations working together 2018-04-22 21:54:12 +10:00
Oliver
cef3c664f9 Moving 'supplier' to 'company' 2018-04-19 09:01:25 +10:00
Oliver
3bb434ae98 Migration fix 2018-04-19 09:01:20 +10:00
Oliver
433f670e1c Removed 'customer' app 2018-04-19 09:01:17 +10:00
Oliver
f1357cfb7c Adde 'system' Field to StockItemTracking 2018-04-18 08:44:08 +10:00
Oliver
a4621295a6 Fixed spash page for customer index
Added 'notes' field to Part object
2018-04-18 01:44:55 +10:00
Oliver
d8d3509b5e Changes 'notes' fields to be textfield - not charfield 2018-04-18 01:16:30 +10:00
James Newlands
5bb08053e0 Added table of orders and details for each order showing table of lines 2018-04-18 00:38:06 +10:00
Oliver
3f33a921ae Renamed URLs for /customer/ 2018-04-17 23:56:25 +10:00
Oliver
8856d7f793 Renamed 'customer-order' app to 'customer'
- This app should manage more than just orders
- Moved the 'Customer' model into this app
2018-04-17 23:39:53 +10:00
Oliver
81afd3a47d Merge remote-tracking branch 'origin/customer_orders' 2018-04-17 23:18:08 +10:00
Oliver
291992ab7f Added views and pages for Build model
- Edit / create
- View details
- View build index at /build/
2018-04-17 23:13:41 +10:00
James Newlands
45a14b4350 Merge branch 'master' into customer_orders 2018-04-17 23:06:41 +10:00
James Newlands
bc04ca3727 First rough pass at adding customer orders model and some views/templates/admin stuff for same 2018-04-17 23:05:22 +10:00
Oliver
982803a0a7 Updated Part model
- Added 'default_location'
- Added 'default_supplier'
2018-04-17 18:23:39 +10:00
Oliver
9dc41ba122 Fix requirements
>= rather than ==
2018-04-17 16:58:37 +10:00
Oliver
fa23767150 Added skeleton for 'build' app 2018-04-17 00:32:02 +10:00
Oliver
86b3092b5e Change action on deleting top-level stock location 2018-04-16 23:29:11 +10:00
Oliver
937470750b Added helper functions, improved UI 2018-04-16 23:26:02 +10:00
Oliver
a67d5b58db UI improvements 2018-04-16 23:09:45 +10:00
Oliver
b6b4189c49 UI tweaks 2018-04-16 22:23:29 +10:00
Oliver
202a8e65b9 Added URL field to stock item 2018-04-16 21:07:57 +10:00
Oliver
9191d1ae21 PEP fixes 2018-04-16 20:46:21 +10:00
Oliver
09b357976d Admin for part tracking
- Added 'has_tracking_info' function for StockItem
2018-04-16 20:17:58 +10:00
Oliver
76ee150ca4 Moved tracking information to StockItem 2018-04-16 20:08:04 +10:00
Oliver
a91ff58d84 Flakey
Fixing python style errors
2018-04-16 01:02:17 +10:00
Oliver
8e6de1b832 Add pages for part tracking
- Edit / Delete / Create tracking info
- Improvements to many pages
2018-04-16 00:30:57 +10:00
Oliver
55b533d3ef Added edit views for stock
- StockItem
- StockLocation
2018-04-15 23:27:56 +10:00
Oliver
9d89db34b2 Improvements to stock page
- Fixed URL / view (use class views)
- Better slug lookup
- Better table rendering using ol' mate bootstrap
2018-04-15 20:10:49 +10:00
Oliver
8232baeed7 Improved list and detail views for supplier
Huzzah for bootstrap
2018-04-15 13:49:47 +10:00
Oliver
5b5b8f4d12 Fix parent error when deleting category
- Any child categories have their parent set to the parent of the deleted category
2018-04-15 11:25:57 +10:00
Oliver
8578c8a1a7 Updated breadcrumbs to use bootstrap 2018-04-14 23:42:24 +10:00
Oliver
204874dcb4 Changed some category views to use boostrap list-group
- Looks much fancier!
2018-04-14 23:05:36 +10:00
Oliver
830d33763e Fix deletion of part category and stock location
- Category up part updated to parent
- Location of item updated to parent
2018-04-14 20:33:53 +10:00
Oliver
226828791f Added migration files to git index 2018-04-14 18:36:06 +10:00
Oliver
6a98846a8f Added supplier web interface
- Display list of suppliers
- Supplier detail page
- Supplier part detail page
- Part detail now includes list of supplier parts
2018-04-14 16:26:26 +10:00
Oliver
ce854e3119 Add 'detail' view for stock item 2018-04-14 15:26:42 +10:00
Oliver
89ee09b01f Implemented bidirectional traversal for PART and STOCK apps
- Added list view for StockItems
2018-04-14 15:13:16 +10:00
Oliver
1da6df0c5e Separate API views into api.py
- Web views are still in views.py
- Files were getting too cluttered and hard to grok
2018-04-14 14:11:46 +10:00
Oliver
bd46f66d6b Begin to add views for part models
- List BOM items
- Show category listing as linked items
- Fix some pathing issues with InvenTreeTree class
2018-04-13 22:36:59 +10:00
Oliver
ed61ebe5b7 Starting to implement BOM management
- Each part can be made of other parts
- Disable tracking and project apps for now
- Project will change (eventually) to work order
- Part parameters have been disabled (for now)
2018-04-12 16:27:26 +10:00
Oliver Walters
7478371d0c Added stockhistory
using django-simple-history
2017-04-21 23:47:04 +10:00
Oliver Walters
4777b02080 Added User API and serializer 2017-04-20 22:40:59 +10:00
Oliver Walters
92cbd43f0f Code cleanup 2017-04-20 22:20:41 +10:00
Oliver Walters
41485e0e0f Style fix 2017-04-20 22:10:13 +10:00
Oliver Walters
2c28ef6b3c Added update endpoints for StockItem
- Stocktake
- Take-Stock
2017-04-20 22:08:27 +10:00
Oliver Walters
6c7f5fdaf3 Added MinValue validator(s) 2017-04-16 17:05:02 +10:00
Oliver Walters
057fd1dd20 Filtering improvements 2017-04-16 14:24:15 +10:00
Oliver Walters
883efd0945 Removed 'pending' tag 2017-04-16 14:11:20 +10:00
Oliver Walters
a65f85df87 Added StockTracking model 2017-04-16 01:43:30 +10:00
Oliver Walters
d0a66390f5 db unique_together 2017-04-16 01:24:00 +10:00
Oliver Walters
7e1fbf8a04 Style fixes 2017-04-16 01:01:48 +10:00
Oliver Walters
4259c6f9eb Fixed stock URLs and API docs 2017-04-15 23:14:10 +10:00
Oliver Walters
7d7579d3d6 Style fixes 2017-04-15 00:55:30 +10:00
Oliver Walters
7c5261bc4a Stock API now hyperlinkd 2017-04-14 23:44:24 +10:00
Oliver Walters
858a7fe089 Tweaking URL patterns 2017-04-14 21:44:01 +10:00
Oliver Walters
e5f6de5d2b Style fixes 2017-04-14 16:12:54 +10:00
Oliver Walters
f80918554d Removed old templates 2017-04-14 14:13:00 +10:00
Oliver Walters
f21a05dfa3 Style fixes 2017-04-14 13:31:07 +10:00
Oliver Walters
7fe1c21ebd Updated Part API
- categories can now be filtered by parent
- Added FilterChildren func to invenTree.models
2017-04-14 13:09:24 +10:00
Oliver Walters
c4b7b80e1a Added stock permissison 2017-04-14 12:58:43 +10:00
Oliver Walters
0441eb4c38 API improvements for Stock app 2017-04-14 12:54:34 +10:00
Oliver Walters
2f3e29ab13 more api fixes 2017-04-14 08:52:25 +10:00
Oliver Walters
f7ba84495b Fix for stock serializer 2017-04-13 00:31:03 +10:00
Oliver
15582369d2 API for stock app 2017-04-11 18:58:44 +10:00
Oliver
338dcd3b72 Fixing python errors 2017-04-11 17:21:05 +10:00
Oliver Walters
6e0a02a885 Added extra fields to stock item 2017-03-29 23:36:06 +11:00
Oliver Walters
8ba4ea344e updates 2017-03-29 23:19:53 +11:00
Oliver Walters
b2eca2aa48 Added ETA for part stock 2017-03-29 22:55:36 +11:00
Oliver Walters
68ae1110ad Updates
- Improved some models
- Added PEP check script
2017-03-29 08:37:41 +11:00
Oliver Walters
4912d5507b peppercord 2017-03-28 23:46:17 +11:00
Oliver Walters
1a875811b7 not a pep 2017-03-28 23:44:32 +11:00
Oliver Walters
433dc7b3e3 Pep goes the weasel 2017-03-28 23:41:05 +11:00
Oliver Walters
7ce5a9a7e5 Papa Pep 2017-03-28 23:38:12 +11:00
Oliver Walters
c111aaf9b2 peps 2017-03-28 23:25:38 +11:00
Oliver Walters
7eb00e8d47 More model updates 2017-03-28 22:45:43 +11:00
Oliver Walters
deda73a50f Added stock status field 2017-03-28 22:27:46 +11:00
Oliver Walters
5c8cc035a4 Started work on cross-referencing
- part admin now shows total quantity in stock
- part model can return a list of projects it is associated with
2017-03-28 21:24:00 +11:00
Oliver Walters
155151e98b More admin updates 2017-03-28 17:59:28 +11:00
Oliver Walters
8229f02db6 BugFix and docs for InvenTreeTree 2017-03-27 23:08:03 +11:00
Oliver Walters
e98c20048b Added stock page 2017-03-27 21:05:19 +11:00