InvenTree/InvenTree/stock/migrations
Oliver 5dd6f18495
Part units (#4854)
* Add validation to part units field

* Add "pack_units" field to the SupplierPart model

* Migrate old units to new units, and remove old field

* Table fix

* Fixture fix

* Update migration

* Improve "hook" for loading custom unit database

* Display part units column in part table

- Also allow ordering by part units
- Allow filtering to show parts which have defined units

* Adds data migration for converting units to valid values

* Add "pack_units_native" field to company.SupplierPart model

* Clean pack units when saving a SupplierPart

- Convert to native part units
- Handle empty units value
- Add unit tests

* Add background function to rebuild supplier parts when a part is saved

- Required to ensure that the "pack_size_native" is up to date

* Template updates

* Sort by native units first

* Bump API version

* Rename "pack_units" to "pack_quantity"

* Update migration file

- Allow reverse migration

* Fix for currency migration

- Handle case where no currencies are provided
- Handle case where base currency is not in provided options

* Adds unit test for data migration

* Add unit test for part.units data migration

- Check that units fields are updated correctly

* Add some extra "default units"

- each / piece
- dozen / hundred / thousand
- Add unit testing also

* Update references to "pack_size"

- Replace with "pack_quantity" or "pack_quantity_native" as appropriate

* Improvements based on unit testing

* catch error

* Docs updates

* Fixes for pricing tests

* Update unit tests for part migrations · 1b6b6d9d

* Bug fix for conversion code

* javascript updates

* JS formatting fix
2023-05-26 16:57:23 +10:00
..
__init__.py Added migration files to git index 2018-04-14 18:36:06 +10:00
0001_initial.py AND AGAIN 2019-05-20 22:24:18 +10:00
0002_auto_20190525_2226.py Add 'has_variants' and 'variant_of' field for Part 2019-05-25 22:27:36 +10:00
0003_auto_20190525_2303.py Validate uniqueness for StockItems 2019-05-25 23:09:04 +10:00
0004_auto_20190525_2356.py Rename field part.has_variants to part.is_template 2019-05-25 23:58:31 +10:00
0005_auto_20190602_1944.py Rename some fields 2019-06-02 19:46:30 +10:00
0006_stockitem_purchase_order.py Implement POST for receiving items 2019-06-15 19:39:57 +10:00
0007_auto_20190618_0042.py Fixed up some stupid recursion on the Tree model template 2019-06-18 00:59:54 +10:00
0008_stockitemtracking_url.py Add (optional) URL to stock tracking info 2019-07-15 22:33:00 +10:00
0009_auto_20190715_2351.py Added descriptive help text 2019-07-15 23:53:25 +10:00
0010_stockitem_build.py Add a reference to a build for a stock item 2019-09-01 23:09:40 +10:00
0011_auto_20190908_0404.py Migrate InvenTreeTree to using MPTT model 2019-09-08 14:08:49 +10:00
0012_auto_20190908_0405.py Mark migrations with data operations "non atomic" 2021-02-04 22:19:15 +11:00
0013_auto_20190908_0916.py Change foreign keys to TreeForeignKey 2019-09-08 19:19:39 +10:00
0014_auto_20190908_0918.py Change foreign keys to TreeForeignKey 2019-09-08 19:19:39 +10:00
0015_auto_20190913_1407.py Custom URL validators for more fields 2019-09-14 00:08:49 +10:00
0016_auto_20191118_2146.py Change item quantity field from PositiveInteger to Decimal 2019-11-19 08:49:54 +11:00
0017_auto_20191118_2311.py Allow non-integer stock movement 2019-11-19 10:17:20 +11:00
0018_auto_20200202_0103.py Remove reliance on django-markdownx (#3231) 2022-06-20 22:20:04 +10:00
0019_auto_20200202_1024.py Allow PartCategory and StocKLocation names to be non-unique 2020-02-02 21:40:03 +11:00
0020_auto_20200206_1213.py Remove reliance on django-markdownx (#3231) 2022-06-20 22:20:04 +10:00
0021_auto_20200215_2232.py Add 'parent' field for StockItem 2020-02-17 21:52:31 +11:00
0022_auto_20200217_1109.py Mark migrations with data operations "non atomic" 2021-02-04 22:19:15 +11:00
0023_auto_20200318_1027.py Limit choices for Part selection 2020-03-18 21:28:11 +11:00
0024_auto_20200405_2239.py Rename "URL" to "link" for StockItem and StockItemTracking models 2020-04-06 10:43:06 +10:00
0025_auto_20200405_2243.py Rename "URL" to "link" for StockItem and StockItemTracking models 2020-04-06 10:43:06 +10:00
0026_stockitem_uid.py Add a 'uid' field to StockItem model 2020-04-14 22:54:05 +10:00
0027_stockitem_sales_order.py The 'StockItem' model now has a reference to a SalesOrderLineItem 2020-04-21 15:04:21 +10:00
0028_auto_20200421_0724.py Ability to filter StockItemList API by sales_order or sales_order_line 2020-04-21 17:33:02 +10:00
0029_auto_20200421_2359.py Expose "is_allocated" parameter on StockItem API 2020-04-22 10:11:40 +10:00
0030_auto_20200422_0015.py Fix for StockItem model 2020-04-22 10:16:54 +10:00
0031_auto_20200422_0209.py Create "SalesOrderAllocation" object 2020-04-22 12:12:48 +10:00
0032_stockitem_build_order.py "Fixes" for completing a build 2020-04-26 00:32:09 +10:00
0033_auto_20200426_0539.py More work 2020-04-26 16:38:29 +10:00
0034_auto_20200426_0602.py Remove reliance on django-markdownx (#3231) 2022-06-20 22:20:04 +10:00
0035_auto_20200502_2308.py Add "rejected" status code for StockItem 2020-05-03 09:09:17 +10:00
0036_stockitemattachment.py Add StockItemAttachment model 2020-05-07 09:39:28 +10:00
0037_stockitemattachment_user.py Add 'user' field to attachment 2020-05-12 20:50:03 +10:00
0038_stockitemattachment_upload_date.py Add "upload date" field to fileattachment base class 2020-05-12 20:57:41 +10:00
0039_auto_20200513_0016.py Drag and drop for order attachments 2020-05-13 11:28:45 +10:00
0040_stockitemtestresult.py Add StockItemTestResult model 2020-05-16 19:56:18 +10:00
0041_stockitemtestresult_notes.py Add some unit testing for the new model 2020-05-16 20:27:01 +10:00
0042_auto_20200523_0121.py Improve / simplify logic for file attachments against test result object 2020-05-23 11:30:42 +10:00
0043_auto_20200525_0420.py Allow stock items to be created for template parts 2020-05-25 14:20:35 +10:00
0044_auto_20200528_1036.py Remove unique-together requirement 2020-05-28 20:38:24 +10:00
0045_stockitem_customer.py Add 'customer' field to StockItem 2020-06-04 19:08:33 +10:00
0046_auto_20200605_0931.py Make description fields optional 2020-06-05 19:33:32 +10:00
0047_auto_20200605_0932.py Make description fields optional 2020-06-05 19:33:32 +10:00
0048_auto_20200807_2344.py Migration file for StockStatus codes 2020-08-08 09:44:21 +10:00
0049_auto_20200820_0454.py StockItem: Allow customer field to be blank 2020-08-20 14:54:55 +10:00
0050_auto_20200821_1403.py Support non-integer serial numbers 2020-08-21 17:36:49 +01:00
0051_auto_20200928_0928.py Renamed related name "owned_parts" to "installed_parts" 2020-09-28 19:33:32 +10:00
0052_stockitem_is_building.py Add "is_building" field to StockItem model 2020-10-05 00:12:42 +11:00
0053_auto_20201110_0513.py Add integration of django-money 2020-11-10 16:22:42 +11:00
0054_remove_stockitem_build_order.py Remove defunct 'build_order' field from StockItem model 2020-11-10 20:12:39 +11:00
0055_auto_20201117_1453.py Fix for StockItem creation form 2020-11-17 15:29:44 +11:00
0056_stockitem_expiry_date.py Add "expiry_date" field to StockItem model 2021-01-03 23:56:35 +11:00
0057_stock_location_item_owner.py Merged master 2021-01-13 17:08:01 -05:00
0058_stockitem_packaging.py Add "packaging" field for StockItem 2021-02-19 11:08:58 +11:00
0059_auto_20210404_2016.py added more translation-strings 2021-04-04 22:44:14 +02:00
0060_auto_20210511_1713.py Replace "addTrasactionNote" function with "add_tracking_entry" 2021-05-11 17:17:48 +10:00
0061_auto_20210511_0911.py Parameter filtering (#4823) 2023-05-19 13:24:55 +10:00
0062_auto_20210511_2151.py Unit test fixes 2021-05-11 22:26:03 +10:00
0063_auto_20210511_2343.py remove old fields from the StockItemTracking model 2021-05-12 08:07:03 +10:00
0064_auto_20210621_1724.py Parameter filtering (#4823) 2023-05-19 13:24:55 +10:00
0065_auto_20210701_0509.py added clean migration steps for all price fields 2021-07-01 07:11:15 +02:00
0066_stockitem_scheduled_for_deletion.py Add "scheduled_for_deletion" field to StockItem 2021-09-07 16:28:57 +10:00
0067_alter_stockitem_part.py More fixes 2021-11-05 00:02:55 +11:00
0068_stockitem_serial_int.py Add 'serial_int' field to stockitem model 2021-11-10 10:47:17 +11:00
0069_auto_20211109_2347.py Parameter filtering (#4823) 2023-05-19 13:24:55 +10:00
0070_auto_20211128_0151.py adds a "link" field to the InvenTree attachment model 2021-11-28 12:53:01 +11:00
0071_auto_20211205_1733.py Parameter filtering (#4823) 2023-05-19 13:24:55 +10:00
0072_remove_stockitem_scheduled_for_deletion.py Remove the "scheduled_for_deletion" field from the StockItem model 2021-12-05 18:14:14 +11:00
0073_alter_stockitem_belongs_to.py Cleanup models 2021-12-21 08:49:53 +11:00
0074_alter_stockitem_batch.py Add migration file 2022-04-26 20:21:15 +10:00
0075_auto_20220515_1440.py Adds metadata mixin class for adding JSON field to internal tables 2022-05-16 00:45:16 +10:00
0076_alter_stockitem_status.py Adds 'quarantine' code for StockItemStatus (#3084) 2022-05-27 15:12:15 +10:00
0077_alter_stockitem_notes.py Remove reliance on django-markdownx (#3231) 2022-06-20 22:20:04 +10:00
0078_alter_stockitem_supplier_part.py Bug fix for recent SupplierPart API annotation (#3336) 2022-07-15 20:30:26 +10:00
0079_alter_stocklocation_name.py Remove special characters restriction in category names (#3370) 2022-07-21 11:33:21 +10:00
0080_stocklocation_pathstring.py Tree query improvements (#3443) 2022-08-01 13:43:27 +10:00
0081_auto_20220801_0044.py Parameter filtering (#4823) 2023-05-19 13:24:55 +10:00
0082_alter_stockitem_link.py Url field fix (#3488) 2022-08-07 22:46:33 +10:00
0083_stocklocation_icon.py Feature/icons for PartCategory and StockLocation (#3542) 2022-08-16 21:51:55 +10:00
0084_auto_20220903_0154.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
0085_auto_20220903_0225.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
0086_remove_stockitem_uid.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
0087_auto_20220912_2341.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
0088_remove_stockitem_infinite.py Adds 'consumable' field to BomItem model (#2890) 2022-09-24 23:45:56 +10:00
0089_alter_stockitem_purchase_price.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
0090_stocklocation_structural.py Simple typo fix (#3968) 2022-11-20 21:54:52 +11:00
0091_alter_stockitem_delete_on_deplete.py Add configurable option for controlling default "delete_on_deplete" behaviour (#4106) 2022-12-25 07:13:53 +11:00
0092_alter_stockitem_updated.py [FR] Add last updated column for supplier parts (#4214) 2023-01-25 12:18:52 +11:00
0093_auto_20230217_2140.py Bug fix for ensuring location and category names are unique for common parent (#4361) 2023-02-18 11:42:53 +11:00
0094_auto_20230220_0025.py Part units (#4854) 2023-05-26 16:57:23 +10:00
0095_stocklocation_external.py Add "external" field to StockLocation (#4377) 2023-02-21 00:42:18 +11:00
0096_auto_20230330_1121.py Parameter filtering (#4823) 2023-05-19 13:24:55 +10:00
0097_alter_stockitem_notes.py Support image uploads in the "notes" markdown fields (#4615) 2023-04-19 13:08:26 +10:00
0098_auto_20230427_2033.py Add 'Tag' management (#4367) 2023-05-04 09:02:48 +10:00
0099_alter_stockitem_status.py [Feature] Scrap Build Outputs (#4800) 2023-05-13 22:19:35 +10:00
0100_auto_20230515_0004.py Allow tag fields to be empty (#4816) 2023-05-15 10:57:12 +10:00
0100_stockitem_consumed_by.py Build consume stock (#4817) 2023-05-16 21:25:02 +10:00