2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

Merge pull request #2825 from SchrodingersGat/trans-fix

Fix templated string
This commit is contained in:
Oliver 2022-04-14 11:39:13 +10:00 committed by GitHub
commit 58d9ca93e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -192,7 +192,7 @@ function renderPart(name, data, parameters={}, options={}) {
<small> <small>
${stock_data} ${stock_data}
${extra} ${extra}
${renderId('{% trans "Part ID" $}', data.pk, parameters)} ${renderId('{% trans "Part ID" %}', data.pk, parameters)}
</small> </small>
</span>`; </span>`;

View File

@ -373,6 +373,9 @@ function duplicatePart(pk, options={}) {
// Override the "variant_of" field // Override the "variant_of" field
data.variant_of = pk; data.variant_of = pk;
// By default, disable "is_template" when making a variant *of* a template
data.is_template = false;
} }
constructForm('{% url "api-part-list" %}', { constructForm('{% url "api-part-list" %}', {