mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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'),
|
||||
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'))
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
params: {
|
||||
supplier_part: {{ part.id }},
|
||||
location_detail: true,
|
||||
part_detail: true,
|
||||
part_detail: false,
|
||||
},
|
||||
groupByField: 'location',
|
||||
buttons: ['#stock-options'],
|
||||
|
@ -16,8 +16,6 @@ from .models import PartCategoryParameterTemplate
|
||||
from .models import PartTestTemplate
|
||||
from .models import PartSellPriceBreak
|
||||
|
||||
from InvenTree.helpers import normalize
|
||||
|
||||
from stock.models import StockLocation
|
||||
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
|
||||
"""
|
||||
return normalize(item.quantity)
|
||||
return float(item.quantity)
|
||||
|
||||
def before_export(self, queryset, *args, **kwargs):
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
params: {
|
||||
part: {{ part.id }},
|
||||
location_detail: true,
|
||||
part_detail: true,
|
||||
part_detail: false,
|
||||
},
|
||||
groupByField: 'location',
|
||||
buttons: [
|
||||
|
@ -165,13 +165,13 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
||||
{% 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>
|
||||
{% 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 %}
|
||||
<li><a href='#' id='stock-serialize' title='{% trans "Serialize stock" %}'><span class='fas fa-hashtag'></span> {% trans "Serialize 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.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>
|
||||
{% endif %}
|
||||
|
@ -131,6 +131,7 @@ addHeaderAction('stock-to-build', '{% trans "Required for Build Orders" %}', 'fa
|
||||
|
||||
loadStockTable($('#table-recently-updated-stock'), {
|
||||
params: {
|
||||
part_detail: true,
|
||||
ordering: "-updated",
|
||||
max_results: {% settings_value "STOCK_RECENT_COUNT" %},
|
||||
},
|
||||
|
@ -241,7 +241,6 @@ function loadStockTable(table, options) {
|
||||
|
||||
// List of user-params which override the default filters
|
||||
|
||||
options.params['part_detail'] = true;
|
||||
options.params['location_detail'] = true;
|
||||
|
||||
var params = options.params || {};
|
||||
@ -524,7 +523,8 @@ function loadStockTable(table, options) {
|
||||
title: '{% trans "Part" %}',
|
||||
sortName: 'part__name',
|
||||
sortable: true,
|
||||
switchable: false,
|
||||
visible: params['part_detail'],
|
||||
switchable: params['part_detail'],
|
||||
formatter: function(value, row, index, field) {
|
||||
|
||||
var url = `/stock/item/${row.pk}/`;
|
||||
@ -543,6 +543,8 @@ function loadStockTable(table, options) {
|
||||
title: 'IPN',
|
||||
sortName: 'part__IPN',
|
||||
sortable: true,
|
||||
visible: params['part_detail'],
|
||||
switchable: params['part_detail'],
|
||||
formatter: function(value, row, index, field) {
|
||||
return row.part_detail.IPN;
|
||||
},
|
||||
@ -550,6 +552,8 @@ function loadStockTable(table, options) {
|
||||
{
|
||||
field: 'part_detail.description',
|
||||
title: '{% trans "Description" %}',
|
||||
visible: params['part_detail'],
|
||||
switchable: params['part_detail'],
|
||||
formatter: function(value, row, index, field) {
|
||||
return row.part_detail.description;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user