2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-18 08:15:21 +00:00

Merge branch 'master' of github.com:inventree/InvenTree into manufacturer_part

This commit is contained in:
eeintech 2021-03-29 10:12:20 -04:00
commit cbb887ae79
11 changed files with 2374 additions and 1751 deletions
InvenTree
build/templates/build
company/templates/company
locale
de/LC_MESSAGES
en/LC_MESSAGES
es/LC_MESSAGES
order/templates/order
part/templates/part
stock/templates/stock
requirements.txt

@ -10,6 +10,9 @@
{% block heading %} {% block heading %}
{% trans "Build Notes" %} {% trans "Build Notes" %}
{% if roles.build.change and not editing %}
<button title='{% trans "Edit notes" %}' class='btn btn-default' id='edit-notes'><span class='fas fa-edit'></span></button>
{% endif %}
{% endblock %} {% endblock %}
{% block details %} {% block details %}
@ -20,14 +23,13 @@
{{ form }} {{ form }}
<hr> <hr>
<input type="submit" value='{% trans "Save" %}'/> <button type="submit" class='btn btn-default'>{% trans "Save" %}</button>
</form> </form>
{{ form.media }} {{ form.media }}
{% else %} {% else %}
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button' id='edit-notes'><span class='fas fa-edit'></span></button>
{{ build.notes | markdownify }} {{ build.notes | markdownify }}
{% endif %} {% endif %}

@ -9,6 +9,9 @@
{% block heading %} {% block heading %}
{% trans "Company Notes" %} {% trans "Company Notes" %}
{% if not editing %}
<button title='{% trans "Edit notes" %}' class='btn btn-default' id='edit-notes'><span class='fas fa-edit'></span></button>
{% endif %}
{% endblock %} {% endblock %}
{% block details %} {% block details %}
@ -18,7 +21,7 @@
{{ form }} {{ form }}
<hr> <hr>
<input type="submit" value='{% trans "Save" %}'/> <button type="submit" class='btn btn-default'>{% trans "Save" %}</button>
</form> </form>
@ -26,7 +29,6 @@
{% else %} {% else %}
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button' id='edit-notes'><span class='fas fa-edit'></span></button>
{{ company.notes | markdownify }} {{ company.notes | markdownify }}
{% endif %} {% endif %}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -11,6 +11,9 @@
{% block heading %} {% block heading %}
{% trans "Order Notes" %} {% trans "Order Notes" %}
{% if roles.purchase_order.change and not editing %}
<button title='{% trans "Edit notes" %}' class='btn btn-default' id='edit-notes'><span class='fas fa-edit'></span></button>
{% endif %}
{% endblock %} {% endblock %}
{% block details %} {% block details %}
@ -21,21 +24,19 @@
{{ form }} {{ form }}
<hr> <hr>
<input type='submit' value='{% trans "Save" %}'/> <button type="submit" class='btn btn-default'>{% trans "Save" %}</button>
</form> </form>
{{ form.media }} {{ form.media }}
{% else %} {% else %}
{% if roles.purchase_order.change %}
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button' id='edit-notes'><span class='fas fa-edit'></span></button>
{% endif %}
{% endif %}
<div class='panel panel-default'> <div class='panel panel-default'>
<div class='panel-content'> <div class='panel-content'>
{{ order.notes | markdownify }} {{ order.notes | markdownify }}
</div> </div>
</div> </div>
{% endif %}
{% endblock %} {% endblock %}

@ -12,6 +12,9 @@
{% block heading %} {% block heading %}
{% trans "Sales Order Notes" %} {% trans "Sales Order Notes" %}
{% if roles.sales_order.change and not editing %}
<button title='{% trans "Edit notes" %}' class='btn btn-default' id='edit-notes'><span class='fas fa-edit'></span></button>
{% endif %}
{% endblock %} {% endblock %}
{% block details %} {% block details %}
@ -23,13 +26,12 @@
{{ form }} {{ form }}
<hr> <hr>
<input type='submit' value='{% trans "Save" %}'/> <button type="submit" class='btn btn-default'>{% trans "Save" %}</button>
</form> </form>
{{ form.media }} {{ form.media }}
{% else %} {% else %}
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button float-right' id='edit-notes'><span class='fas fa-edit'></span></button>
<div class='panel panel-default'> <div class='panel panel-default'>
<div class='panel-content'> <div class='panel-content'>
{{ order.notes | markdownify }} {{ order.notes | markdownify }}

@ -10,35 +10,34 @@
{% block heading %} {% block heading %}
{% trans "Part Notes" %} {% trans "Part Notes" %}
{% if roles.part.change and not editing %}
<button title='{% trans "Edit notes" %}' class='btn btn-default' id='edit-notes'><span class='fas fa-edit'></span></button>
{% endif %}
{% endblock %} {% endblock %}
{% block details %} {% block details %}
{% if editing %} {% if editing %}
<form method='POST'> <form method='POST'>
{% csrf_token %} {% csrf_token %}
{{ form }} {{ form }}
<hr> <hr>
<input type="submit" value='{% trans "Save" %}'/>
<button type="submit" class='btn btn-default'>{% trans "Save" %}</button>
</form> </form>
{{ form.media }} {{ form.media }}
{% else %} {% else %}
{% if roles.part.change %}
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button' id='edit-notes'><span class='fas fa-edit'></span></button>
{% endif %}
<div class='panel panel-default'> <div class='panel panel-default'>
<div class='panel-content'>
{% if part.notes %} {% if part.notes %}
<div class='panel-content'>
{{ part.notes | markdownify }} {{ part.notes | markdownify }}
{% endif %}
</div> </div>
{% endif %}
</div> </div>
{% endif %} {% endif %}

@ -155,18 +155,24 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
<div class='btn-group'> <div class='btn-group'>
<button id='stock-actions' title='{% trans "Stock adjustment actions" %}' class='btn btn-default dropdown-toggle' type='button' data-toggle='dropdown'><span class='fas fa-boxes'></span> <span class='caret'></span></button> <button id='stock-actions' title='{% trans "Stock adjustment actions" %}' class='btn btn-default dropdown-toggle' type='button' data-toggle='dropdown'><span class='fas fa-boxes'></span> <span class='caret'></span></button>
<ul class='dropdown-menu' role='menu'> <ul class='dropdown-menu' role='menu'>
{% if item.can_adjust_location %}
{% if not item.serialized %} {% if not item.serialized %}
{% if item.in_stock %}
<li><a href='#' id='stock-count' title='{% trans "Count stock" %}'><span class='fas fa-clipboard-list'></span> {% trans "Count stock" %}</a></li> <li><a href='#' id='stock-count' title='{% trans "Count stock" %}'><span class='fas fa-clipboard-list'></span> {% trans "Count stock" %}</a></li>
{% endif %}
{% if not item.customer %}
<li><a href='#' id='stock-add' title='{% trans "Add stock" %}'><span class='fas fa-plus-circle icon-green'></span> {% trans "Add stock" %}</a></li> <li><a href='#' id='stock-add' title='{% trans "Add stock" %}'><span class='fas fa-plus-circle icon-green'></span> {% trans "Add stock" %}</a></li>
{% endif %}
{% 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> <li><a href='#' id='stock-move' title='{% trans "Transfer stock" %}'><span class='fas fa-exchange-alt icon-blue'></span> {% trans "Transfer stock" %}</a></li>
{% if item.part.trackable and not item.serialized %} {% 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> <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.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 %}
{% if item.customer %} {% if item.customer %}
@ -469,16 +475,6 @@ $("#barcode-scan-into-location").click(function() {
scanItemsIntoLocation([{{ item.id }}]); scanItemsIntoLocation([{{ item.id }}]);
}); });
{% if item.in_stock %}
$("#stock-assign-to-customer").click(function() {
launchModalForm("{% url 'stock-item-assign' item.id %}",
{
reload: true,
}
);
});
function itemAdjust(action) { function itemAdjust(action) {
launchModalForm("/stock/adjust/", launchModalForm("/stock/adjust/",
{ {
@ -492,6 +488,29 @@ function itemAdjust(action) {
); );
} }
$('#stock-add').click(function() {
itemAdjust('add');
});
$("#stock-delete").click(function () {
launchModalForm(
"{% url 'stock-item-delete' item.id %}",
{
redirect: "{% url 'part-stock' item.part.id %}"
}
);
});
{% if item.in_stock %}
$("#stock-assign-to-customer").click(function() {
launchModalForm("{% url 'stock-item-assign' item.id %}",
{
reload: true,
}
);
});
{% if item.part.has_variants %} {% if item.part.has_variants %}
$("#stock-convert").click(function() { $("#stock-convert").click(function() {
launchModalForm("{% url 'stock-item-convert' item.id %}", launchModalForm("{% url 'stock-item-convert' item.id %}",
@ -514,10 +533,6 @@ $('#stock-remove').click(function() {
itemAdjust('take'); itemAdjust('take');
}); });
$('#stock-add').click(function() {
itemAdjust('add');
});
{% else %} {% else %}
$("#stock-return-from-customer").click(function() { $("#stock-return-from-customer").click(function() {
@ -530,13 +545,4 @@ $("#stock-return-from-customer").click(function() {
{% endif %} {% endif %}
$("#stock-delete").click(function () {
launchModalForm(
"{% url 'stock-item-delete' item.id %}",
{
redirect: "{% url 'part-stock' item.part.id %}"
}
);
});
{% endblock %} {% endblock %}

@ -11,6 +11,9 @@
{% block heading %} {% block heading %}
{% trans "Stock Item Notes" %} {% trans "Stock Item Notes" %}
{% if roles.stock.change and not editing %}
<button title='{% trans "Edit notes" %}' class='btn btn-default' id='edit-notes'><span class='fas fa-edit'></span></button>
{% endif %}
{% endblock %} {% endblock %}
{% block details %} {% block details %}
@ -20,13 +23,12 @@
{{ form }} {{ form }}
<hr> <hr>
<input type='submit' value='{% trans "Save" %}'/> <button type="submit" class='btn btn-default'>{% trans "Save" %}</button>
</form> </form>
{{ form.media }} {{ form.media }}
{% else %} {% else %}
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button' id='edit-notes'><span class='fas fa-edit'></span></button>
{% if item.notes %} {% if item.notes %}
{{ item.notes | markdownify }} {{ item.notes | markdownify }}
{% endif %} {% endif %}

@ -1,7 +1,7 @@
wheel>=0.34.2 # Wheel wheel>=0.34.2 # Wheel
Django==3.0.7 # Django package Django==3.0.7 # Django package
pillow==8.1.1 # Image manipulation pillow==8.1.1 # Image manipulation
djangorestframework==3.10.3 # DRF framework djangorestframework==3.11.2 # DRF framework
django-dbbackup==3.3.0 # Database backup / restore functionality django-dbbackup==3.3.0 # Database backup / restore functionality
django-cors-headers==3.2.0 # CORS headers extension for DRF django-cors-headers==3.2.0 # CORS headers extension for DRF
django_filter==2.2.0 # Extended filtering options django_filter==2.2.0 # Extended filtering options