mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix style errors
This commit is contained in:
parent
4a8e4b0bfb
commit
793009215c
@ -22,8 +22,8 @@ from django.dispatch.dispatcher import receiver
|
|||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from djmoney.contrib.exchange.models import convert_money
|
|
||||||
from djmoney.contrib.exchange.exceptions import MissingRate
|
from djmoney.contrib.exchange.exceptions import MissingRate
|
||||||
|
from djmoney.contrib.exchange.models import convert_money
|
||||||
from djmoney.money import Money
|
from djmoney.money import Money
|
||||||
from error_report.models import Error
|
from error_report.models import Error
|
||||||
from markdownx.models import MarkdownxField
|
from markdownx.models import MarkdownxField
|
||||||
@ -43,7 +43,6 @@ from plugin.models import MetadataMixin
|
|||||||
from stock import models as stock_models
|
from stock import models as stock_models
|
||||||
from users import models as UserModels
|
from users import models as UserModels
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger('inventree')
|
logger = logging.getLogger('inventree')
|
||||||
|
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{% if item.uid %}
|
{% if item.uid %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-barcode'></span></td>
|
<td><span class='fas fa-barcode'></span></td>
|
||||||
@ -452,7 +452,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
{% endblock details_right %}
|
{% endblock details_right %}
|
||||||
|
|
||||||
|
@ -2582,7 +2582,7 @@ function loadBuildTable(table, options) {
|
|||||||
loaded_calendar = true;
|
loaded_calendar = true;
|
||||||
|
|
||||||
var el = document.getElementById('build-order-calendar');
|
var el = document.getElementById('build-order-calendar');
|
||||||
|
|
||||||
calendar = new FullCalendar.Calendar(el, {
|
calendar = new FullCalendar.Calendar(el, {
|
||||||
initialView: 'dayGridMonth',
|
initialView: 'dayGridMonth',
|
||||||
nowIndicator: true,
|
nowIndicator: true,
|
||||||
@ -2592,7 +2592,7 @@ function loadBuildTable(table, options) {
|
|||||||
buildEvents(calendar);
|
buildEvents(calendar);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
calendar.render();
|
calendar.render();
|
||||||
} else {
|
} else {
|
||||||
calendar.render();
|
calendar.render();
|
||||||
|
@ -1522,7 +1522,7 @@ function loadPurchaseOrderTable(table, options) {
|
|||||||
setupFilterList('purchaseorder', $(table), target, {download: true});
|
setupFilterList('purchaseorder', $(table), target, {download: true});
|
||||||
|
|
||||||
var display_mode = inventreeLoad('purchaseorder-table-display-mode', 'list');
|
var display_mode = inventreeLoad('purchaseorder-table-display-mode', 'list');
|
||||||
|
|
||||||
// Function for rendering PurchaseOrder calendar display
|
// Function for rendering PurchaseOrder calendar display
|
||||||
function buildEvents(calendar) {
|
function buildEvents(calendar) {
|
||||||
|
|
||||||
@ -1538,7 +1538,7 @@ function loadPurchaseOrderTable(table, options) {
|
|||||||
filters.supplier_detail = true;
|
filters.supplier_detail = true;
|
||||||
filters.min_date = start;
|
filters.min_date = start;
|
||||||
filters.max_date = end;
|
filters.max_date = end;
|
||||||
|
|
||||||
// Request purchase orders from the server within specified date range
|
// Request purchase orders from the server within specified date range
|
||||||
inventreeGet(
|
inventreeGet(
|
||||||
'{% url "api-po-list" %}',
|
'{% url "api-po-list" %}',
|
||||||
@ -1718,7 +1718,7 @@ function loadPurchaseOrderTable(table, options) {
|
|||||||
|
|
||||||
if (display_mode == 'calendar') {
|
if (display_mode == 'calendar') {
|
||||||
var el = document.getElementById('purchase-order-calendar');
|
var el = document.getElementById('purchase-order-calendar');
|
||||||
|
|
||||||
calendar = new FullCalendar.Calendar(el, {
|
calendar = new FullCalendar.Calendar(el, {
|
||||||
initialView: 'dayGridMonth',
|
initialView: 'dayGridMonth',
|
||||||
nowIndicator: true,
|
nowIndicator: true,
|
||||||
@ -1728,7 +1728,7 @@ function loadPurchaseOrderTable(table, options) {
|
|||||||
buildEvents(calendar);
|
buildEvents(calendar);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
calendar.render();
|
calendar.render();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2409,7 +2409,7 @@ function loadSalesOrderTable(table, options) {
|
|||||||
|
|
||||||
if (display_mode == 'calendar') {
|
if (display_mode == 'calendar') {
|
||||||
var el = document.getElementById('purchase-order-calendar');
|
var el = document.getElementById('purchase-order-calendar');
|
||||||
|
|
||||||
calendar = new FullCalendar.Calendar(el, {
|
calendar = new FullCalendar.Calendar(el, {
|
||||||
initialView: 'dayGridMonth',
|
initialView: 'dayGridMonth',
|
||||||
nowIndicator: true,
|
nowIndicator: true,
|
||||||
@ -2419,7 +2419,7 @@ function loadSalesOrderTable(table, options) {
|
|||||||
buildEvents(calendar);
|
buildEvents(calendar);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
calendar.render();
|
calendar.render();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2881,7 +2881,7 @@ function allocateStockToSalesOrder(order_id, line_items, options={}) {
|
|||||||
|
|
||||||
fields.reference.value = ref;
|
fields.reference.value = ref;
|
||||||
fields.reference.prefix = global_settings.SALESORDER_REFERENCE_PREFIX + options.reference;
|
fields.reference.prefix = global_settings.SALESORDER_REFERENCE_PREFIX + options.reference;
|
||||||
|
|
||||||
return fields;
|
return fields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,16 +27,16 @@ function reloadtable(table) {
|
|||||||
/*
|
/*
|
||||||
* Construct a set of extra buttons to display against a list of orders,
|
* Construct a set of extra buttons to display against a list of orders,
|
||||||
* allowing the orders to be displayed in various 'view' modes:
|
* allowing the orders to be displayed in various 'view' modes:
|
||||||
*
|
*
|
||||||
* - Calendar view
|
* - Calendar view
|
||||||
* - List view
|
* - List view
|
||||||
* - Tree view
|
* - Tree view
|
||||||
*
|
*
|
||||||
* Options:
|
* Options:
|
||||||
* - callback: Callback function to be called when one of the buttons is pressed
|
* - callback: Callback function to be called when one of the buttons is pressed
|
||||||
* - prefix: The prefix to use when saving display data to user session
|
* - prefix: The prefix to use when saving display data to user session
|
||||||
* - display: Which button to set as 'active' by default
|
* - display: Which button to set as 'active' by default
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function constructOrderTableButtons(options={}) {
|
function constructOrderTableButtons(options={}) {
|
||||||
|
|
||||||
@ -51,10 +51,10 @@ function constructOrderTableButtons(options={}) {
|
|||||||
|
|
||||||
var idx = 0;
|
var idx = 0;
|
||||||
var buttons = [];
|
var buttons = [];
|
||||||
|
|
||||||
function buttonCallback(view_mode) {
|
function buttonCallback(view_mode) {
|
||||||
inventreeSave(key, view_mode);
|
inventreeSave(key, view_mode);
|
||||||
|
|
||||||
if (options.callback) {
|
if (options.callback) {
|
||||||
options.callback(view_mode);
|
options.callback(view_mode);
|
||||||
}
|
}
|
||||||
|
6
tasks.py
6
tasks.py
@ -554,9 +554,9 @@ def test_translations(c):
|
|||||||
|
|
||||||
# complie regex
|
# complie regex
|
||||||
reg = re.compile(
|
reg = re.compile(
|
||||||
r"[a-zA-Z0-9]{1}"+ # match any single letter and number
|
r"[a-zA-Z0-9]{1}" + # match any single letter and number # noqa: W504
|
||||||
r"(?![^{\(\<]*[}\)\>])"+ # that is not inside curly brackets, brackets or a tag
|
r"(?![^{\(\<]*[}\)\>])" + # that is not inside curly brackets, brackets or a tag # noqa: W504
|
||||||
r"(?<![^\%][^\(][)][a-z])"+ # that is not a specially formatted variable with singles
|
r"(?<![^\%][^\(][)][a-z])" + # that is not a specially formatted variable with singles # noqa: W504
|
||||||
r"(?![^\\][\n])" # that is not a newline
|
r"(?![^\\][\n])" # that is not a newline
|
||||||
)
|
)
|
||||||
last_string = ''
|
last_string = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user