InvenTree/InvenTree/order/migrations
Oliver 5ba75c868d
total_price for orders (#4447)
* Adds unit test for counting queries on PurchaseOrderList API endpoint

- We will work to make this queryset more efficient

* PEP fixes

* Add 'total_price' fields to SalesOrder and PurchaseOrder models

* PurchaseOrder list API now has constant query count

* Data migration for updating existing PurchaseOrder and SalesOrder instances

- Calculate total_price for any existing order
- Will fail if exchange rates are not available

* Add total_price_currency to API serializers

* Render total_price in SalesOrder table

* Add ability to filter both lists by total_price field

* Update total_price whenever an order is updated

* Update total price whenever a lineitem is saved or deleted

* Add query-counting unit test for SalesOrder list API

* Calling refresh_from_db inside a save() method is *not* a good idea
2023-03-05 22:22:18 +11:00
..
0001_initial.py Create initial models for 'Order' 2019-06-04 22:19:04 +10:00
0002_auto_20190604_2224.py Allow blank PO description and add URL field 2019-06-04 22:26:19 +10:00
0003_auto_20190604_2226.py Fix related name 2019-06-04 22:26:40 +10:00
0004_purchaseorder_status.py Add order status field 2019-06-04 23:09:51 +10:00
0005_purchaseorderlineitem_part.py Updates for purchase order line items 2019-06-05 20:59:30 +10:00
0006_auto_20190605_2056.py Updates for purchase order line items 2019-06-05 20:59:30 +10:00
0007_auto_20190605_2138.py List purchase orders for a given part 2019-06-05 21:47:22 +10:00
0008_auto_20190605_2140.py List purchase orders for a given part 2019-06-05 21:47:22 +10:00
0009_auto_20190606_2133.py Form / view for creating a new purchase order 2019-06-06 21:39:04 +10:00
0010_purchaseorderlineitem_notes.py Add notes field to purchase order line item 2019-06-13 21:57:35 +10:00
0011_auto_20190615_1928.py Implement POST for receiving items 2019-06-15 19:39:57 +10:00
0012_auto_20190617_1943.py Improve the 'creation date' for order 2019-06-17 19:44:36 +10:00
0013_auto_20191118_2323.py Convert some more fields to decimal 2019-11-19 10:30:04 +11:00
0014_auto_20191118_2328.py Convert some more fields to decimal 2019-11-19 10:30:04 +11:00
0015_auto_20200201_2346.py Remove reliance on django-markdownx (#3231) 2022-06-20 22:20:04 +10:00
0016_purchaseorderattachment.py Add PurchaseOrderAttachment model 2020-03-22 18:02:53 +11:00
0017_auto_20200331_1000.py Change POLineItem quantity to a rounding decimal field 2020-03-31 21:23:57 +11:00
0018_auto_20200406_0151.py Rename Order.URL to Order.link 2020-04-06 11:56:52 +10:00
0019_purchaseorder_supplier_reference.py Add "supplier_reference" field to PurchaseOrder 2020-04-15 13:32:14 +10:00
0020_auto_20200420_0940.py Remove reliance on django-markdownx (#3231) 2022-06-20 22:20:04 +10:00
0021_auto_20200420_1010.py API endpoint for serializing SalesOrder objects 2020-04-20 20:11:21 +10:00
0022_salesorderlineitem_part.py Add "part" reference to SalesOrderLineItem model 2020-04-21 08:33:32 +10:00
0023_auto_20200420_2309.py Add a 'sales order' view for each part 2020-04-21 09:15:01 +10:00
0024_salesorderallocation.py Create "SalesOrderAllocation" object 2020-04-22 12:12:48 +10:00
0025_auto_20200422_0222.py Update definition for StockItemAllocation model 2020-04-22 13:11:19 +10:00
0026_auto_20200422_0224.py Update definition for StockItemAllocation model 2020-04-22 13:11:19 +10:00
0027_auto_20200422_0236.py Update definition for StockItemAllocation model 2020-04-22 13:11:19 +10:00
0028_auto_20200423_0956.py Separate concept of "OrderStatus" into "SalesOrderStatus" and "PurchaseOrderStatus" 2020-04-23 20:38:09 +10:00
0029_auto_20200423_1042.py Order date adjustment 2020-04-23 20:42:59 +10:00
0030_auto_20200426_0551.py More work 2020-04-26 16:38:29 +10:00
0031_auto_20200426_0612.py More work 2020-04-26 16:38:29 +10:00
0032_auto_20200427_0044.py Add some unit testing for the SalesOrder model 2020-04-27 11:32:20 +10:00
0033_auto_20200512_1033.py Add 'user' field to attachment 2020-05-12 20:50:03 +10:00
0034_auto_20200512_1054.py Add "upload date" field to fileattachment base class 2020-05-12 20:57:41 +10:00
0035_auto_20200513_0016.py Drag and drop for order attachments 2020-05-13 11:28:45 +10:00
0036_auto_20200831_0912.py Order: Improve help text(s) 2020-08-31 19:13:24 +10:00
0037_auto_20201110_0911.py Remove defunct 'build_order' field from StockItem model 2020-11-10 20:12:39 +11:00
0038_auto_20201112_1737.py Add "purchase price" field to PurchaseOrderLineItem table 2020-11-12 18:05:24 +11:00
0039_auto_20201112_2203.py Add missing migration file 2020-11-12 22:04:50 +11:00
0040_salesorder_target_date.py Add 'target_date' field to SalesOrder model 2020-12-18 12:19:16 +11:00
0041_auto_20210114_1728.py Add "target_date" field to PurchaseOrder 2021-01-14 17:28:57 +11:00
0042_auto_20210310_1619.py Add "responsible" field to PO and SO models 2021-03-10 16:19:44 +11:00
0043_auto_20210330_0013.py Remove "unique" constraint for part / order relationship 2021-03-30 00:14:47 +11:00
0044_auto_20210404_2016.py Remove reliance on django-markdownx (#3231) 2022-06-20 22:20:04 +10:00
0045_auto_20210504_1946.py Add in sale price model 2021-05-04 21:56:25 +02:00
0046_purchaseorderlineitem_destination.py feat(purchase orders): show the preferred location for each PO Line 2021-06-09 09:06:03 -06:00
0047_auto_20210701_0509.py added clean migration steps for all price fields 2021-07-01 07:11:15 +02:00
0048_auto_20210702_2321.py Reference fields (#3267) 2022-07-11 00:01:46 +10:00
0049_alter_purchaseorderlineitem_unique_together.py Improved creation of purchase order line items from file upload 2021-08-12 14:27:00 -04:00
0050_alter_purchaseorderlineitem_destination.py Add migration file 2021-09-02 11:11:25 +10:00
0051_auto_20211014_0623.py Add a 'reference_int' field to the models, to be used as a secondary index 2021-10-14 17:45:43 +11:00
0052_auto_20211014_0631.py Int migration fix (#3323) 2022-07-15 11:57:27 +10:00
0053_auto_20211128_0151.py adds a "link" field to the InvenTree attachment model 2021-11-28 12:53:01 +11:00
0053_salesordershipment.py Remove reliance on django-markdownx (#3231) 2022-06-20 22:20:04 +10:00
0054_auto_20211201_2139.py use BigIntegerField for a hugher range ;-) 2021-12-01 22:39:53 +01:00
0054_salesorderallocation_shipment.py Add 'shipment' foreign-key field to SalesOrderAllocation model 2021-10-25 17:42:56 +11:00
0055_auto_20211025_0645.py fix trailing 2022-05-20 13:20:55 +02:00
0056_alter_salesorderallocation_shipment.py Add list and detail API endpoints for SalesOrderShipment 2021-10-25 23:34:58 +11:00
0057_salesorderlineitem_shipped.py Adds "shipped" field to SalesOrderLineItem 2021-11-26 23:20:27 +11:00
0058_auto_20211126_1210.py upgrade to pyhton 3.9 syntax 2022-05-01 21:53:12 +02:00
0059_salesordershipment_tracking_number.py Merge branch 'master' into partial-shipment 2021-11-29 22:59:36 +11:00
0060_auto_20211129_1339.py Allow shipment numbers to be non-unique for different sales orders 2021-11-30 00:42:30 +11:00
0061_merge_0054_auto_20211201_2139_0060_auto_20211129_1339.py Merge conflicting migrations 2021-12-03 00:43:10 +11:00
0062_auto_20220228_0321.py Adds "target_date" field to PurchaseOrderLineItem and SalesOrderLineItem models 2022-02-28 14:26:01 +11:00
0063_alter_purchaseorderlineitem_unique_together.py Remove unique_together requirement for purchaseorderlineitem 2022-02-28 15:27:56 +11:00
0064_purchaseorderextraline_salesorderextraline.py ignore coverage on reverse conversion 2022-05-03 20:11:41 +02:00
0065_alter_purchaseorderlineitem_part.py add missing migrations 2022-03-29 00:03:19 +02:00
0066_alter_purchaseorder_supplier.py move migrations 2022-05-02 22:10:50 +02:00
0067_auto_20220516_1120.py Adds metadata fields to PurchaseOrder and SalesOrder models 2022-05-16 21:21:32 +10:00
0068_alter_salesorderallocation_unique_together.py Remove unique_together requirement on SalesOrderAllocation model 2022-05-17 00:36:30 +10:00
0069_auto_20220524_0508.py SalesOrderShipment improvements (#3058) 2022-05-25 11:00:19 +10:00
0070_auto_20220620_0728.py Remove reliance on django-markdownx (#3231) 2022-06-20 22:20:04 +10:00
0071_auto_20220628_0133.py Virtual part fix (#3265) 2022-06-28 13:39:27 +10:00
0072_alter_salesorder_reference.py Reference fields (#3267) 2022-07-11 00:01:46 +10:00
0073_alter_purchaseorder_reference.py Reference fields (#3267) 2022-07-11 00:01:46 +10:00
0074_auto_20220709_0108.py Reference fields (#3267) 2022-07-11 00:01:46 +10:00
0075_auto_20221110_0108.py Remove client-side length validation in form inputs (#3911) 2022-11-10 12:51:15 +11:00
0076_auto_20221111_0153.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
0077_auto_20230129_0154.py Do not auto-fill target_date for line items (#4275) 2023-01-29 14:24:38 +11:00
0078_auto_20230304_0721.py total_price for orders (#4447) 2023-03-05 22:22:18 +11:00
0079_auto_20230304_0904.py total_price for orders (#4447) 2023-03-05 22:22:18 +11:00
__init__.py Create initial models for 'Order' 2019-06-04 22:19:04 +10:00