Commit Graph

68 Commits

Author SHA1 Message Date
Oliver
dd4db6442e PEP fixes 2021-10-05 00:45:49 +11:00
Oliver
5ded23fd99 Fixes for serializer validation
- Note: use the validate() function!
- Ref: https://www.django-rest-framework.org/api-guide/serializers/
- override serializer.save() functionality for simpler operation
2021-10-04 23:44:23 +11:00
Oliver Walters
f38bf6e20a Adds unit testing for barcode field 2021-09-07 23:34:14 +10:00
Oliver Walters
bf05c9cfae Adds "barcode" field to POLineItem receive serializer 2021-09-07 23:06:36 +10:00
Oliver Walters
125554c53f Merge remote-tracking branch 'upstream/master' into receive-via-api
# Conflicts:
#	InvenTree/templates/js/dynamic/inventree.js
#	InvenTree/templates/js/translated/forms.js
#	InvenTree/templates/js/translated/tables.js
2021-09-07 22:34:00 +10:00
Oliver
ac8a0be74a Enable sorting by total_price 2021-08-26 08:48:19 +10:00
Oliver Walters
0d7eb6b72c Style fixes 2021-08-24 22:25:25 +10:00
Oliver Walters
d5e58fd798 Fix for status code serializer 2021-08-24 22:03:52 +10:00
Oliver
1b65fbad2c Update unit tests
- Found some bugs too, thanks unit tests!
2021-08-24 11:42:08 +10:00
Oliver
d30173132a Actually receive items 2021-08-24 08:49:23 +10:00
Oliver
6091f2ba33 Serializer improvements
- Pass the "order" down to the nested serializers for validation
2021-08-24 00:29:38 +10:00
Oliver
dc53a433a7 Fix serializer nesting
- Add new API endpoint to receive items
- Add unit testing
2021-08-23 23:35:22 +10:00
Oliver
28cc241354 Custom DRF serializers for receiving line items against a purchase order 2021-08-23 23:13:07 +10:00
Oliver
6141ddc3eb SalesOrderAttachment and PurchaseOrderAttachment 2021-08-16 10:53:28 +10:00
Oliver Walters
e17b92b126 Add 'destination' field to POLineItem API serializer 2021-07-18 21:25:59 +10:00
Oliver
889834b693 Refactor POLineItemCreate form 2021-07-03 21:43:22 +10:00
Oliver
c524f754e9 Allow null values for purchase_price and sale_price 2021-07-03 21:27:03 +10:00
Oliver
77c3aa5379 Use custom currency choices 2021-07-03 12:45:59 +10:00
Oliver
8c3a4b60ab Refactoring forms for order line items
- Required some fixes for money serializer
-
2021-07-03 01:17:29 +10:00
Oliver
1cdf03ef49 Added MinMoneyValidator to InvenTreeModelMoneyField
- Refactor edit and delete forms for PurchaseOrderLineItem
2021-07-03 00:34:41 +10:00
Oliver
993abd9d91 Refactor forms for sales orders 2021-07-03 00:14:36 +10:00
Oliver
984828f3bb Specify 'default' functions for 'reference' field in SalesOrder and PurchaseOrder
- Refactor CreatePurchaseOrder form
- Some migrations
2021-07-02 23:59:02 +10:00
Oliver
5e9372f2d6 Add API endpoints for Owner model
- Will be necessary for PurchaseOrder, SalesOrder and BuildOrder forms
2021-07-02 22:45:42 +10:00
Oliver
30ac5dba55 Display attachment upload date 2021-06-30 17:44:23 +10:00
Matthias Mair
e760aa172a
Merge branch 'master' into part-import 2021-06-26 23:58:41 +02:00
Oliver
1456868d03 Add default values for line item serializers
- Once https://github.com/inventree/InvenTree/issues/1687 is fixed, remove default values
2021-06-22 17:03:21 +10:00
Oliver
26dd9c10a4 Fixes for SalesOrder API 2021-06-22 16:43:38 +10:00
Oliver
3fa3ce06a1 Fixes for PurchaseOrder API interface
- Allow DELETE endpoint for PurchaseOrder
- Remove 'read_only' attribute for 'reference' field
- Add extra functionality to API test class
- Add unit testing
2021-06-22 16:28:42 +10:00
Matthias
7d5aa8189d Merge branch 'master' of https://github.com/inventree/InvenTree into part-import 2021-06-18 23:30:54 +02:00
Matthias
b86793703e Merge branch 'part-import' of https://github.com/matmair/InvenTree into part-import 2021-06-18 23:14:48 +02:00
Matthias
59e6cc1a10 Merge branch 'master' of https://github.com/inventree/InvenTree into part-import 2021-06-18 23:10:59 +02:00
Oliver
10ecddf9b4 Fixes after rebase 2021-06-18 17:25:24 +10:00
Oliver Walters
0b8a50cd92 Add 'location_detail' filter 2021-06-18 16:51:34 +10:00
Oliver Walters
caf52c6ce5 Add optional detail elements to SOAllocation API 2021-06-18 16:49:56 +10:00
Oliver Walters
ad8dbb5900 Add API LIST endpoint for SalesOrderAllocations 2021-06-18 16:48:32 +10:00
Nigel
cd07ea835d
feat(purchase orders): show the preferred location for each PO Line
Adds the ability for the Purchaser to specify where the item is
intentended to go when received.  If the Purchaser does not set a
preferred location, then the default location for the part is displayed.
If the item is received them where it was actually placed is shown.

NOTE: if an item is split when received only one of the resulting
StockItem location is used.

Fixes #1467
Addresses some of the requests in #551
2021-06-09 09:06:03 -06:00
Nigel
bca2f4a07b
feat(sales_order): Stock Items show the PO number
Stock items show the PO number that they were purchased on when being
viewed in the sales order allocation modal and when viewing the sales
order details.
2021-05-13 14:18:25 -06:00
Matthias Mair
e59f467c79
Merge branch 'master' into spaces! 2021-05-08 12:27:19 +02:00
Matthias
f2b0717d10 removes all lines consisting only of spaces
this really bothers me for some reason - nothing technical
2021-05-06 12:11:38 +02:00
Matthias
294e86cc38 Add in sale price model 2021-05-04 21:56:25 +02:00
Oliver Walters
a8e6d0a89f Display overdue status in purchase order table
- Allow table to be filtered by "overdue" status
2021-01-14 17:37:10 +11:00
Oliver Walters
4d73aab090 Add "overdue" flag to serializer
- Also allow filtering by overdue status in the API
2021-01-14 17:33:24 +11:00
Oliver Walters
d1ce0f062e Improve unit testing for StockItem API 2021-01-04 01:22:43 +11:00
Oliver Walters
c34196538b Filter API by overdue status 2020-12-18 12:40:47 +11:00
Oliver Walters
c6134b54ab Add "overdue" status to SalesOrder serializer 2020-12-18 12:26:58 +11:00
Oliver Walters
6e7224ee7c Add "purchase price" field to PurchaseOrderLineItem table 2020-11-12 18:05:24 +11:00
Oliver Walters
5f2e4c3790 Update serializers for Order model 2020-09-05 23:08:59 +10:00
Oliver Walters
e128410d54 Update 'required' status for new serializers
(cherry picked from commit 2306e29743eb25266c78bec5357d1194e0778c58)
2020-05-26 20:29:09 +10:00
Oliver Walters
81e38eeb14 Add some more custom FileField serializers
(cherry picked from commit 7b9ff27baefacc977fef7852e99d8a9bb46a062a)
2020-05-26 20:29:04 +10:00
Oliver Walters
a7e5a79f4c Expose salesorder and purchaseorder attachments to the API 2020-05-11 23:41:57 +10:00