Commit Graph

84 Commits

Author SHA1 Message Date
Oliver
32be39774f PEP fixes 2021-11-28 22:36:47 +11:00
Oliver
0949bac175 serializer fixes 2021-11-28 14:21:09 +11:00
Oliver
6582fd3d04 Add 'link' field to attachment serializer 2021-11-28 12:57:37 +11:00
Oliver
ac645b1fc7 Adds "responsible" row to purchase order table 2021-11-26 22:05:27 +11:00
Matthias
d884e62be1
[FR] Confirm to W293
Fixes #2335
2021-11-23 00:28:23 +01:00
Oliver
7ca36a092e convert remaining serializers 2021-11-18 23:01:19 +11:00
Oliver
30684685f9 Add unit test to check an "empty" (null) barcode can be supplied 2021-11-09 12:07:57 +11:00
Oliver
2d910022ac Fix for supplier price breaks
- Make "price" field an InvenTreeMoneySerializer instance
- Add client-side validation for number inputs
2021-10-26 01:55:41 +11:00
Oliver
0b7811b7e0 Add API endpoint for SalesOrderAllocation model
- Increment API version number
2021-10-06 16:54:40 +11:00
Oliver
4d8bec9663 Fix rendering of row sub tables 2021-10-06 16:38:13 +11:00
Oliver
1ea9b6f4cf PEP fixes 2021-10-05 16:10:00 +11:00
Oliver
dd4428464d Receiving items against a purchase order now makes use of the API forms
- Delete old unused code
- Improve serializer validation
2021-10-05 16:05:18 +11:00
Oliver
e39f1c320c Merge remote-tracking branch 'inventree/master' into auto-allocation-improvements 2021-10-05 12:53:47 +11:00
Oliver
99503a60d3 Fix for "barcode" field in purchase order receive serializer
- Allow blank values!
2021-10-05 12:16:41 +11:00
Oliver
ddcfc8996c Further fixes for API / serializer classes
- Correctly catch and re-throw errors
- Provide request to serializer context
2021-10-05 12:12:37 +11:00
Oliver
29588ff2c5 Refactor the POReceive API endpoint
- Lessons learned from the build allocate
- Use serializer.save() directly
2021-10-05 11:20:43 +11:00
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