mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
commit
1c3e26036f
@ -48,10 +48,6 @@ script:
|
||||
- rm inventree_default_db.sqlite3
|
||||
- invoke migrate
|
||||
- invoke import-records -f data.json
|
||||
# Run linting checks on migration files (django-migration-linter)
|
||||
# Run subset of linting checks on *ALL* migration files
|
||||
# Run strict migration file checks on *NEW* migrations (old ones are what they are)
|
||||
- cd InvenTree && python manage.py lintmigrations 79ddea50f507e34195bad635008419daac0d7a5f -q ok ignore --no-cache && cd ..
|
||||
|
||||
after_success:
|
||||
- coveralls
|
@ -211,7 +211,6 @@ INSTALLED_APPS = [
|
||||
'djmoney', # django-money integration
|
||||
'djmoney.contrib.exchange', # django-money exchange rates
|
||||
'error_report', # Error reporting in the admin interface
|
||||
'django_migration_linter', # Linting checking for migration files
|
||||
]
|
||||
|
||||
MIDDLEWARE = CONFIG.get('middleware', [
|
||||
|
@ -10,6 +10,11 @@
|
||||
{% endblock %}
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 0mm;
|
||||
}
|
||||
|
||||
img {
|
||||
display: inline-block;
|
||||
image-rendering: pixelated;
|
||||
|
@ -200,6 +200,25 @@ class POLineItemList(generics.ListCreateAPIView):
|
||||
|
||||
filter_backends = [
|
||||
DjangoFilterBackend,
|
||||
filters.SearchFilter,
|
||||
filters.OrderingFilter
|
||||
]
|
||||
|
||||
ordering_fields = [
|
||||
'part__part__name',
|
||||
'part__MPN',
|
||||
'part__SKU',
|
||||
'reference',
|
||||
'quantity',
|
||||
'received',
|
||||
]
|
||||
|
||||
search_fields = [
|
||||
'part__part__name',
|
||||
'part__part__description',
|
||||
'part__MPN',
|
||||
'part__SKU',
|
||||
'reference',
|
||||
]
|
||||
|
||||
filter_fields = [
|
||||
@ -412,7 +431,23 @@ class SOLineItemList(generics.ListCreateAPIView):
|
||||
|
||||
return queryset
|
||||
|
||||
filter_backends = [DjangoFilterBackend]
|
||||
filter_backends = [
|
||||
DjangoFilterBackend,
|
||||
filters.SearchFilter,
|
||||
filters.OrderingFilter
|
||||
]
|
||||
|
||||
ordering_fields = [
|
||||
'part__name',
|
||||
'quantity',
|
||||
'reference',
|
||||
]
|
||||
|
||||
search_fields = [
|
||||
'part__name',
|
||||
'quantity',
|
||||
'reference',
|
||||
]
|
||||
|
||||
filter_fields = [
|
||||
'order',
|
||||
|
@ -135,6 +135,7 @@ function setupCallbacks() {
|
||||
$("#po-table").inventreeTable({
|
||||
onPostBody: setupCallbacks,
|
||||
name: 'purchaseorder',
|
||||
sidePagination: 'server',
|
||||
formatNoMatches: function() { return "{% trans 'No line items found' %}"; },
|
||||
queryParams: {
|
||||
order: {{ order.id }},
|
||||
@ -151,6 +152,7 @@ $("#po-table").inventreeTable({
|
||||
{
|
||||
field: 'part',
|
||||
sortable: true,
|
||||
sortName: 'part__part__name',
|
||||
title: '{% trans "Part" %}',
|
||||
switchable: false,
|
||||
formatter: function(value, row, index, field) {
|
||||
@ -162,18 +164,24 @@ $("#po-table").inventreeTable({
|
||||
},
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
field: 'part_detail.description',
|
||||
title: '{% trans "Description" %}',
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
sortName: 'part__SKU',
|
||||
field: 'supplier_part_detail.SKU',
|
||||
title: '{% trans "Order Code" %}',
|
||||
title: '{% trans "SKU" %}',
|
||||
formatter: function(value, row, index, field) {
|
||||
return renderLink(value, `/supplier-part/${row.part}/`);
|
||||
},
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
sortName: 'part__MPN',
|
||||
field: 'supplier_part_detail.MPN',
|
||||
title: '{% trans "MPN" %}',
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
field: 'reference',
|
||||
|
@ -173,6 +173,7 @@ $("#so-lines-table").inventreeTable({
|
||||
part_detail: true,
|
||||
allocations: true,
|
||||
},
|
||||
sidePagination: 'server',
|
||||
uniqueId: 'pk',
|
||||
url: "{% url 'api-so-line-list' %}",
|
||||
onPostBody: setupCallbacks,
|
||||
@ -201,6 +202,7 @@ $("#so-lines-table").inventreeTable({
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
sortName: 'part__name',
|
||||
field: 'part',
|
||||
title: 'Part',
|
||||
formatter: function(value, row, index, field) {
|
||||
@ -222,7 +224,6 @@ $("#so-lines-table").inventreeTable({
|
||||
title: 'Quantity',
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
field: 'allocated',
|
||||
{% if order.status == SalesOrderStatus.PENDING %}
|
||||
title: '{% trans "Allocated" %}',
|
||||
|
@ -853,7 +853,9 @@ class StockList(generics.ListCreateAPIView):
|
||||
'status',
|
||||
]
|
||||
|
||||
ordering = ['part__name']
|
||||
ordering = [
|
||||
'part__name'
|
||||
]
|
||||
|
||||
search_fields = [
|
||||
'serial',
|
||||
|
@ -145,9 +145,6 @@ $.fn.inventreeTable = function(options) {
|
||||
var filters = options.queryParams || options.filters || {};
|
||||
|
||||
options.queryParams = function(params) {
|
||||
for (var key in filters) {
|
||||
params[key] = filters[key];
|
||||
}
|
||||
|
||||
// Override the way that we ask the server to sort results
|
||||
// It seems bootstrap-table does not offer a "native" way to do this...
|
||||
@ -170,6 +167,15 @@ $.fn.inventreeTable = function(options) {
|
||||
|
||||
}
|
||||
|
||||
for (var key in filters) {
|
||||
params[key] = filters[key];
|
||||
}
|
||||
|
||||
// Add "order" back in (if it was originally specified by InvenTree)
|
||||
// Annoyingly, "order" shadows some field names in InvenTree...
|
||||
if ('order' in filters) {
|
||||
params['order'] = filters['order'];
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,6 @@ django-money==1.1 # Django app for currency management
|
||||
certifi # Certifi is (most likely) installed through one of the requirements above
|
||||
django-error-report==0.2.0 # Error report viewer for the admin interface
|
||||
django-test-migrations==1.1.0 # Unit testing for database migrations
|
||||
django-migration-linter==2.5.0 # Linting checks for database migrations
|
||||
python-barcode[images]==0.13.1 # Barcode generator
|
||||
qrcode[pil]==6.1 # QR code generator
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user