mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master' into settings-refactor
This commit is contained in:
commit
7fdc0546b4
@ -502,11 +502,24 @@ LANGUAGE_CODE = CONFIG.get('language', 'en-us')
|
||||
|
||||
# If a new language translation is supported, it must be added here
|
||||
LANGUAGES = [
|
||||
('en', _('English')),
|
||||
('fr', _('French')),
|
||||
('de', _('German')),
|
||||
('el', _('Greek')),
|
||||
('en', _('English')),
|
||||
('es', _('Spanish')),
|
||||
('fr', _('French')),
|
||||
('he', _('Hebrew')),
|
||||
('it', _('Italian')),
|
||||
('ja', _('Japanese')),
|
||||
('ko', _('Korean')),
|
||||
('nl', _('Dutch')),
|
||||
('no', _('Norwegian')),
|
||||
('pl', _('Polish')),
|
||||
('ru', _('Russian')),
|
||||
('sv', _('Swedish')),
|
||||
('th', _('Thai')),
|
||||
('tr', _('Turkish')),
|
||||
('vi', _('Vietnamese')),
|
||||
('zh-cn', _('Chinese')),
|
||||
]
|
||||
|
||||
# Currencies available for use
|
||||
|
@ -371,7 +371,7 @@
|
||||
requests.push(inventreeDelete(url));
|
||||
});
|
||||
|
||||
$.when.apply($, requests).then(function() {
|
||||
$.when.apply($, requests).done(function() {
|
||||
$('#supplier-part-table').bootstrapTable('refresh');
|
||||
});
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ $("#supplier-part-delete").click(function() {
|
||||
requests.push(inventreeDelete(url));
|
||||
});
|
||||
|
||||
$.when.apply($, requests).then(function() {
|
||||
$.when.apply($, requests).done(function() {
|
||||
reloadSupplierPartTable();
|
||||
});
|
||||
}
|
||||
@ -247,7 +247,7 @@ $("#multi-parameter-delete").click(function() {
|
||||
requests.push(inventreeDelete(url));
|
||||
});
|
||||
|
||||
$.when.apply($, requests).then(function() {
|
||||
$.when.apply($, requests).done(function() {
|
||||
$('#parameter-table').bootstrapTable('refresh');
|
||||
});
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
7945
InvenTree/locale/el/LC_MESSAGES/django.po
Normal file
7945
InvenTree/locale/el/LC_MESSAGES/django.po
Normal file
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
File diff suppressed because it is too large
Load Diff
7945
InvenTree/locale/he/LC_MESSAGES/django.po
Normal file
7945
InvenTree/locale/he/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
7945
InvenTree/locale/id/LC_MESSAGES/django.po
Normal file
7945
InvenTree/locale/id/LC_MESSAGES/django.po
Normal file
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
7945
InvenTree/locale/ko/LC_MESSAGES/django.po
Normal file
7945
InvenTree/locale/ko/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
7945
InvenTree/locale/nl/LC_MESSAGES/django.po
Normal file
7945
InvenTree/locale/nl/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
7945
InvenTree/locale/no/LC_MESSAGES/django.po
Normal file
7945
InvenTree/locale/no/LC_MESSAGES/django.po
Normal file
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
7945
InvenTree/locale/sv/LC_MESSAGES/django.po
Normal file
7945
InvenTree/locale/sv/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
7945
InvenTree/locale/th/LC_MESSAGES/django.po
Normal file
7945
InvenTree/locale/th/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
7945
InvenTree/locale/vi/LC_MESSAGES/django.po
Normal file
7945
InvenTree/locale/vi/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -995,8 +995,9 @@ class BomList(generics.ListCreateAPIView):
|
||||
|
||||
# Get values for currencies
|
||||
currencies = queryset.annotate(
|
||||
purchase_price=F('sub_part__stock_items__purchase_price'),
|
||||
purchase_price_currency=F('sub_part__stock_items__purchase_price_currency'),
|
||||
).values('pk', 'sub_part', 'purchase_price_currency')
|
||||
).values('pk', 'sub_part', 'purchase_price', 'purchase_price_currency')
|
||||
|
||||
def convert_price(price, currency, decimal_places=4):
|
||||
""" Convert price field, returns Money field """
|
||||
@ -1032,7 +1033,7 @@ class BomList(generics.ListCreateAPIView):
|
||||
# Find associated currency (select first found)
|
||||
purchase_price_currency = None
|
||||
for currency_item in currencies:
|
||||
if currency_item['pk'] == bom_item.pk and currency_item['sub_part'] == bom_item.sub_part.pk:
|
||||
if currency_item['pk'] == bom_item.pk and currency_item['sub_part'] == bom_item.sub_part.pk and currency_item['purchase_price']:
|
||||
purchase_price_currency = currency_item['purchase_price_currency']
|
||||
break
|
||||
# Convert prices
|
||||
|
@ -416,7 +416,7 @@
|
||||
});
|
||||
|
||||
// Wait for *all* the requests to complete
|
||||
$.when.apply($, requests).then(function() {
|
||||
$.when.apply($, requests).done(function() {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
@ -832,7 +832,7 @@
|
||||
requests.push(inventreeDelete(url));
|
||||
});
|
||||
|
||||
$.when.apply($, requests).then(function() {
|
||||
$.when.apply($, requests).done(function() {
|
||||
reloadSupplierPartTable();
|
||||
});
|
||||
}
|
||||
|
@ -147,8 +147,7 @@ function inventreeDelete(url, options={}) {
|
||||
|
||||
options.method = 'DELETE';
|
||||
|
||||
inventreePut(url, {}, options);
|
||||
|
||||
return inventreePut(url, {}, options);
|
||||
}
|
||||
|
||||
|
||||
|
@ -349,7 +349,7 @@ function deleteManufacturerParts(selections, options={}) {
|
||||
});
|
||||
|
||||
// Wait for all the requests to complete
|
||||
$.when.apply($, requests).then(function() {
|
||||
$.when.apply($, requests).done(function() {
|
||||
|
||||
if (options.onSuccess) {
|
||||
options.onSuccess();
|
||||
|
@ -287,7 +287,7 @@ function adjustStock(action, items, options={}) {
|
||||
});
|
||||
|
||||
// Wait for *all* the requests to complete
|
||||
$.when.apply($, requests).then(function() {
|
||||
$.when.apply($, requests).done(function() {
|
||||
// Destroy the modal window
|
||||
$(modal).modal('hide');
|
||||
|
||||
@ -1265,7 +1265,7 @@ function loadStockTable(table, options) {
|
||||
);
|
||||
});
|
||||
|
||||
$.when.apply($, requests).then(function() {
|
||||
$.when.apply($, requests).done(function() {
|
||||
$("#stock-table").bootstrapTable('refresh');
|
||||
});
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user