[PUI] Installed items (#8202)

* Improve checks if "installed items" panel should be displayed

* Adds ability to exclude a given field from form data

* Implement form for installing stock item

* Add placeholder for uninstall action

* Add "note" field

* Add PUI form to uninstall stock item
This commit is contained in:
Oliver authored and GitHub committed 2024-09-27 16:00:06 +10:00
1 parent a5f2273e14
commit 392624cb84
7 files changed
+246 -31

No files matched your search

+3 -3
View File
@@ -820,9 +820,9 @@ class InstallStockItemSerializer(serializers.Serializer):
quantity = data.get('quantity', stock_item.quantity)
if quantity > stock_item.quantity:
raise ValidationError(
_('Quantity to install must not exceed available quantity')
)
raise ValidationError({
'quantity': _('Quantity to install must not exceed available quantity')
})
return data