mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Paginate company page
This commit is contained in:
parent
deccdce6d9
commit
e746ca6e0a
@ -34,6 +34,7 @@
|
||||
$("#company-table").bootstrapTable({
|
||||
sortable: true,
|
||||
search: true,
|
||||
pagination: true,
|
||||
columns: [
|
||||
{
|
||||
field: 'pk',
|
||||
|
@ -79,6 +79,11 @@ class StockItem(models.Model):
|
||||
# TODO - Find a test than can be perfomed...
|
||||
pass
|
||||
|
||||
if self.belongs_to and self.belongs_to.pk == self.pk:
|
||||
raise ValidationError({
|
||||
'belongs_to': _('Item cannot belong to itself')
|
||||
})
|
||||
|
||||
# Serial number cannot be set for items with quantity greater than 1
|
||||
if not self.quantity == 1 and self.serial:
|
||||
raise ValidationError({
|
||||
|
Loading…
Reference in New Issue
Block a user