mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Merge remote-tracking branch 'upstream/master' into django-q
This commit is contained in:
commit
b74d365529
18
InvenTree/company/migrations/0033_auto_20210410_1528.py
Normal file
18
InvenTree/company/migrations/0033_auto_20210410_1528.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 3.0.7 on 2021-04-10 05:28
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('company', '0032_auto_20210403_1837'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='company',
|
||||||
|
name='description',
|
||||||
|
field=models.CharField(blank=True, help_text='Description of the company', max_length=500, verbose_name='Company description'),
|
||||||
|
),
|
||||||
|
]
|
@ -95,7 +95,12 @@ class Company(models.Model):
|
|||||||
help_text=_('Company name'),
|
help_text=_('Company name'),
|
||||||
verbose_name=_('Company name'))
|
verbose_name=_('Company name'))
|
||||||
|
|
||||||
description = models.CharField(max_length=500, verbose_name=_('Company description'), help_text=_('Description of the company'))
|
description = models.CharField(
|
||||||
|
max_length=500,
|
||||||
|
verbose_name=_('Company description'),
|
||||||
|
help_text=_('Description of the company'),
|
||||||
|
blank=True,
|
||||||
|
)
|
||||||
|
|
||||||
website = models.URLField(blank=True, verbose_name=_('Website'), help_text=_('Company website URL'))
|
website = models.URLField(blank=True, verbose_name=_('Website'), help_text=_('Company website URL'))
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
params: {
|
params: {
|
||||||
supplier_part: {{ part.id }},
|
supplier_part: {{ part.id }},
|
||||||
location_detail: true,
|
location_detail: true,
|
||||||
part_detail: true,
|
part_detail: false,
|
||||||
},
|
},
|
||||||
groupByField: 'location',
|
groupByField: 'location',
|
||||||
buttons: ['#stock-options'],
|
buttons: ['#stock-options'],
|
||||||
|
@ -16,8 +16,6 @@ from .models import PartCategoryParameterTemplate
|
|||||||
from .models import PartTestTemplate
|
from .models import PartTestTemplate
|
||||||
from .models import PartSellPriceBreak
|
from .models import PartSellPriceBreak
|
||||||
|
|
||||||
from InvenTree.helpers import normalize
|
|
||||||
|
|
||||||
from stock.models import StockLocation
|
from stock.models import StockLocation
|
||||||
from company.models import SupplierPart
|
from company.models import SupplierPart
|
||||||
|
|
||||||
@ -180,7 +178,7 @@ class BomItemResource(ModelResource):
|
|||||||
|
|
||||||
Ref: https://django-import-export.readthedocs.io/en/latest/getting_started.html#advanced-data-manipulation-on-export
|
Ref: https://django-import-export.readthedocs.io/en/latest/getting_started.html#advanced-data-manipulation-on-export
|
||||||
"""
|
"""
|
||||||
return normalize(item.quantity)
|
return float(item.quantity)
|
||||||
|
|
||||||
def before_export(self, queryset, *args, **kwargs):
|
def before_export(self, queryset, *args, **kwargs):
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
params: {
|
params: {
|
||||||
part: {{ part.id }},
|
part: {{ part.id }},
|
||||||
location_detail: true,
|
location_detail: true,
|
||||||
part_detail: true,
|
part_detail: false,
|
||||||
},
|
},
|
||||||
groupByField: 'location',
|
groupByField: 'location',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
@ -165,13 +165,13 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
|||||||
{% if item.in_stock %}
|
{% if item.in_stock %}
|
||||||
<li><a href='#' id='stock-remove' title='{% trans "Remove stock" %}'><span class='fas fa-minus-circle icon-red'></span> {% trans "Remove stock" %}</a></li>
|
<li><a href='#' id='stock-remove' title='{% trans "Remove stock" %}'><span class='fas fa-minus-circle icon-red'></span> {% trans "Remove stock" %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.in_stock and item.can_adjust_location %}
|
|
||||||
<li><a href='#' id='stock-move' title='{% trans "Transfer stock" %}'><span class='fas fa-exchange-alt icon-blue'></span> {% trans "Transfer stock" %}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% if item.in_stock and item.part.trackable %}
|
{% if item.in_stock and item.part.trackable %}
|
||||||
<li><a href='#' id='stock-serialize' title='{% trans "Serialize stock" %}'><span class='fas fa-hashtag'></span> {% trans "Serialize stock" %}</a> </li>
|
<li><a href='#' id='stock-serialize' title='{% trans "Serialize stock" %}'><span class='fas fa-hashtag'></span> {% trans "Serialize stock" %}</a> </li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if item.in_stock and item.can_adjust_location %}
|
||||||
|
<li><a href='#' id='stock-move' title='{% trans "Transfer stock" %}'><span class='fas fa-exchange-alt icon-blue'></span> {% trans "Transfer stock" %}</a></li>
|
||||||
|
{% endif %}
|
||||||
{% if item.in_stock and item.can_adjust_location and item.part.salable and not item.customer %}
|
{% if item.in_stock and item.can_adjust_location and item.part.salable and not item.customer %}
|
||||||
<li><a href='#' id='stock-assign-to-customer' title='{% trans "Assign to customer" %}'><span class='fas fa-user-tie'></span> {% trans "Assign to customer" %}</a></li>
|
<li><a href='#' id='stock-assign-to-customer' title='{% trans "Assign to customer" %}'><span class='fas fa-user-tie'></span> {% trans "Assign to customer" %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -131,6 +131,7 @@ addHeaderAction('stock-to-build', '{% trans "Required for Build Orders" %}', 'fa
|
|||||||
|
|
||||||
loadStockTable($('#table-recently-updated-stock'), {
|
loadStockTable($('#table-recently-updated-stock'), {
|
||||||
params: {
|
params: {
|
||||||
|
part_detail: true,
|
||||||
ordering: "-updated",
|
ordering: "-updated",
|
||||||
max_results: {% settings_value "STOCK_RECENT_COUNT" %},
|
max_results: {% settings_value "STOCK_RECENT_COUNT" %},
|
||||||
},
|
},
|
||||||
|
@ -241,7 +241,6 @@ function loadStockTable(table, options) {
|
|||||||
|
|
||||||
// List of user-params which override the default filters
|
// List of user-params which override the default filters
|
||||||
|
|
||||||
options.params['part_detail'] = true;
|
|
||||||
options.params['location_detail'] = true;
|
options.params['location_detail'] = true;
|
||||||
|
|
||||||
var params = options.params || {};
|
var params = options.params || {};
|
||||||
@ -524,7 +523,8 @@ function loadStockTable(table, options) {
|
|||||||
title: '{% trans "Part" %}',
|
title: '{% trans "Part" %}',
|
||||||
sortName: 'part__name',
|
sortName: 'part__name',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
switchable: false,
|
visible: params['part_detail'],
|
||||||
|
switchable: params['part_detail'],
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
|
|
||||||
var url = `/stock/item/${row.pk}/`;
|
var url = `/stock/item/${row.pk}/`;
|
||||||
@ -543,6 +543,8 @@ function loadStockTable(table, options) {
|
|||||||
title: 'IPN',
|
title: 'IPN',
|
||||||
sortName: 'part__IPN',
|
sortName: 'part__IPN',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
visible: params['part_detail'],
|
||||||
|
switchable: params['part_detail'],
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return row.part_detail.IPN;
|
return row.part_detail.IPN;
|
||||||
},
|
},
|
||||||
@ -550,6 +552,8 @@ function loadStockTable(table, options) {
|
|||||||
{
|
{
|
||||||
field: 'part_detail.description',
|
field: 'part_detail.description',
|
||||||
title: '{% trans "Description" %}',
|
title: '{% trans "Description" %}',
|
||||||
|
visible: params['part_detail'],
|
||||||
|
switchable: params['part_detail'],
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
return row.part_detail.description;
|
return row.part_detail.description;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user