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
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
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
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
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
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
09ccd6c5e2
PEP style fixes
2020-04-21 22:37:35 +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
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
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
96547b885e
Include supplier-part information in Stock API
2020-04-06 22:02:23 +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
8eaaf62eda
Limit choices for Part selection
...
Based on is_template / virtual / active status
2020-03-18 21:28:11 +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
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
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
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
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
75774771dc
Changes to StockItem model
...
- Stock adjustments need to accept decimal values
2019-11-19 09:18:41 +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
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
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
204cd967aa
Include status label text when exporting stocktake data
2019-09-15 20:14:27 +10:00
Oliver Walters
70e07470db
Custom URL validators for more fields
2019-09-14 00:08:49 +10:00
Oliver Walters
53c5324df6
Fix uniqueness test for stock item
2019-09-09 08:49:27 +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
906766cc0e
Bug fix - ensure pk is set to None
2019-09-01 23:28:28 +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
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
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
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
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
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
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
23d19d6784
Remove old debug messages
2019-07-11 23:07:52 +10:00
Oliver Walters
642660d76e
Improved speed of stock tree
2019-06-18 00:09:42 +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
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
f731c45ce8
Replace other choice fields with commonized status code
2019-06-04 23:38:52 +10:00
Oliver Walters
6e7f354a23
Add a 'LOST' status code for stockitem
2019-06-02 13:53:54 +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
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
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
70be052c74
Rebuilt migrations again (arrrrrrrrrrrrrrrrrrrrrrrrrrgh never do this)
2019-05-20 21:45:37 +10:00
Oliver Walters
9ddedc6915
Restart migrations
...
- Easier to delete all the migrations and start again :'(
2019-05-19 00:11:41 +10:00
Oliver Walters
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
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
0813f8cbd5
More test coverage for Stock
2019-05-13 18:45:52 +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
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
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 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
45223fb607
Display count badges in sidenav tree
...
Uses the 'tags' parameter as according to the docs - https://github.com/jonmiles/bootstrap-treeview
- Part
- Stock
2019-05-09 20:30:23 +10:00
Oliver Walters
e9c904076f
Added help text for model fields
2019-05-08 23:32:57 +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