mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
Extra bug fix for part variant form
This commit is contained in:
parent
137a668452
commit
77decc72ed
@ -14,18 +14,15 @@ database:
|
|||||||
|
|
||||||
# --- Available options: ---
|
# --- Available options: ---
|
||||||
# ENGINE: Database engine. Selection from:
|
# ENGINE: Database engine. Selection from:
|
||||||
# - sqlite3
|
|
||||||
# - mysql
|
# - mysql
|
||||||
# - postgresql
|
# - postgresql
|
||||||
|
# - sqlite3
|
||||||
# NAME: Database name
|
# NAME: Database name
|
||||||
# USER: Database username (if required)
|
# USER: Database username (if required)
|
||||||
# PASSWORD: Database password (if required)
|
# PASSWORD: Database password (if required)
|
||||||
# HOST: Database host address (if required)
|
# HOST: Database host address (if required)
|
||||||
# PORT: Database host port (if required)
|
# PORT: Database host port (if required)
|
||||||
|
|
||||||
# --- Example Configuration - sqlite3 ---
|
|
||||||
# ENGINE: sqlite3
|
|
||||||
# NAME: '/home/inventree/database.sqlite3'
|
|
||||||
|
|
||||||
# --- Example Configuration - MySQL ---
|
# --- Example Configuration - MySQL ---
|
||||||
#ENGINE: mysql
|
#ENGINE: mysql
|
||||||
@ -43,6 +40,10 @@ database:
|
|||||||
#HOST: 'localhost'
|
#HOST: 'localhost'
|
||||||
#PORT: '5432'
|
#PORT: '5432'
|
||||||
|
|
||||||
|
# --- Example Configuration - sqlite3 ---
|
||||||
|
# ENGINE: sqlite3
|
||||||
|
# NAME: '/home/inventree/database.sqlite3'
|
||||||
|
|
||||||
# Select default system language (default is 'en-us')
|
# Select default system language (default is 'en-us')
|
||||||
language: en-us
|
language: en-us
|
||||||
|
|
||||||
|
@ -345,6 +345,12 @@ function editPart(pk) {
|
|||||||
// Launch form to duplicate a part
|
// Launch form to duplicate a part
|
||||||
function duplicatePart(pk, options={}) {
|
function duplicatePart(pk, options={}) {
|
||||||
|
|
||||||
|
var title = '{% trans "Duplicate Part" %}';
|
||||||
|
|
||||||
|
if (options.variant) {
|
||||||
|
title = '{% trans "Create Part Variant" %}';
|
||||||
|
}
|
||||||
|
|
||||||
// First we need all the part information
|
// First we need all the part information
|
||||||
inventreeGet(`/api/part/${pk}/`, {}, {
|
inventreeGet(`/api/part/${pk}/`, {}, {
|
||||||
|
|
||||||
@ -372,7 +378,7 @@ function duplicatePart(pk, options={}) {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
fields: fields,
|
fields: fields,
|
||||||
groups: partGroups(),
|
groups: partGroups(),
|
||||||
title: '{% trans "Duplicate Part" %}',
|
title: title,
|
||||||
data: data,
|
data: data,
|
||||||
onSuccess: function(data) {
|
onSuccess: function(data) {
|
||||||
// Follow the new part
|
// Follow the new part
|
||||||
|
Loading…
x
Reference in New Issue
Block a user