mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Transfer stock location (#5117)
* Hide info messages if no data * pre-fill location when transferring stock * Change iteration variable * Measure twice, cut once * js improvements
This commit is contained in:
parent
a78b26f93a
commit
752fb97d2f
@ -459,7 +459,8 @@ def rebuild_parameters(template_id):
|
||||
parameter.save()
|
||||
n += 1
|
||||
|
||||
logger.info(f"Rebuilt {n} parameters for template '{template.name}'")
|
||||
if n > 0:
|
||||
logger.info(f"Rebuilt {n} parameters for template '{template.name}'")
|
||||
|
||||
|
||||
def rebuild_supplier_parts(part_id):
|
||||
@ -486,4 +487,5 @@ def rebuild_supplier_parts(part_id):
|
||||
except ValidationError:
|
||||
pass
|
||||
|
||||
logger.info(f"Rebuilt {n} supplier parts for part '{prt.name}'")
|
||||
if n > 0:
|
||||
logger.info(f"Rebuilt {n} supplier parts for part '{prt.name}'")
|
||||
|
@ -1148,7 +1148,26 @@ function adjustStock(action, items, options={}) {
|
||||
var extraFields = {};
|
||||
|
||||
if (specifyLocation) {
|
||||
|
||||
// If a common location is specified, use that as the default
|
||||
let commonLocation = null;
|
||||
|
||||
for (const item of items) {
|
||||
|
||||
if (item.location == commonLocation) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (commonLocation == null) {
|
||||
commonLocation = item.location;
|
||||
} else {
|
||||
commonLocation = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
extraFields.location = {
|
||||
value: commonLocation,
|
||||
filters: {
|
||||
structural: false,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user