InvenTree/InvenTree/order
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
..
fixtures Add explicit reference_int values for order fixtures (#3645) 2022-09-05 21:37:59 +10:00
migrations total_price for orders (#4447) 2023-03-05 22:22:18 +11:00
templates/order total_price for orders (#4447) 2023-03-05 22:22:18 +11:00
__init__.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
admin.py Move Meta class to top of class definition (#4363) 2023-02-18 18:51:00 +11:00
api.py total_price for orders (#4447) 2023-03-05 22:22:18 +11:00
apps.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
forms.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
models.py total_price for orders (#4447) 2023-03-05 22:22:18 +11:00
serializers.py total_price for orders (#4447) 2023-03-05 22:22:18 +11:00
tasks.py Fix task register (#3805) 2022-10-18 16:54:10 +11:00
test_api.py total_price for orders (#4447) 2023-03-05 22:22:18 +11:00
test_migrations.py Int migration fix (#3323) 2022-07-15 11:57:27 +10:00
test_sales_order.py Fix email notification setting (#3832) 2022-10-22 18:56:38 +11:00
test_views.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
tests.py Bug fix for purchase order pricing (#4373) 2023-02-20 17:22:47 +11:00
urls.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
validators.py Reference fields (#3267) 2022-07-11 00:01:46 +10:00
views.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00