Fix dimensions for label templates (#3578)

- Disable localization in certain areas
- Different localization settings could mess with label generation
This commit is contained in:
Oliver 2022-08-19 11:57:33 +10:00 committed by GitHub
parent 4c22110c76
commit c8de2efd9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 0 deletions

View File

@ -1,10 +1,13 @@
{% load l10n %}
{% load report %}
{% load barcode %}
<head>
<style>
@page {
{% localize off %}
size: {{ width }}mm {{ height }}mm;
{% endlocalize %}
{% block margin %}
margin: 0mm;
{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends "label/label_base.html" %}
{% load l10n %}
{% load barcode %}
{% block style %}
@ -8,15 +9,19 @@
position: fixed;
left: 0mm;
top: 0mm;
{% localize off %}
height: {{ height }}mm;
width: {{ height }}mm;
{% endlocalize %}
}
.part {
font-family: Arial, Helvetica, sans-serif;
display: inline;
position: absolute;
{% localize off %}
left: {{ height }}mm;
{% endlocalize %}
top: 2mm;
}

View File

@ -1,5 +1,6 @@
{% extends "label/label_base.html" %}
{% load l10n %}
{% load barcode %}
{% block style %}
@ -8,15 +9,19 @@
position: fixed;
left: 0mm;
top: 0mm;
{% localize off %}
height: {{ height }}mm;
width: {{ height }}mm;
{% endlocalize %}
}
.part {
font-family: Arial, Helvetica, sans-serif;
display: inline;
position: absolute;
{% localize off %}
left: {{ height }}mm;
{% endlocalize %}
top: 2mm;
}

View File

@ -1,5 +1,6 @@
{% extends "label/label_base.html" %}
{% load l10n %}
{% load barcode %}
{% block style %}
@ -8,8 +9,10 @@
position: fixed;
left: 0mm;
top: 0mm;
{% localize off %}
height: {{ height }}mm;
width: {{ height }}mm;
{% endlocalize %}
}
{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends "label/label_base.html" %}
{% load l10n %}
{% load barcode %}
{% block style %}
@ -8,8 +9,10 @@
position: fixed;
left: 0mm;
top: 0mm;
{% localize off %}
height: {{ height }}mm;
width: {{ height }}mm;
{% endlocalize %}
}
{% endblock %}

View File

@ -1,5 +1,6 @@
{% extends "label/label_base.html" %}
{% load l10n %}
{% load barcode %}
{% block style %}
@ -8,15 +9,19 @@
position: fixed;
left: 0mm;
top: 0mm;
{% localize off %}
height: {{ height }}mm;
width: {{ height }}mm;
{% endlocalize %}
}
.loc {
font-family: Arial, Helvetica, sans-serif;
display: inline;
position: absolute;
{% localize off %}
left: {{ height }}mm;
{% endlocalize %}
top: 2mm;
}