Migrate #1

Merged
christian merged 2 commits from develop into version-14 2023-08-28 13:18:35 +02:00
5 changed files with 10 additions and 5 deletions
Showing only changes of commit 494c7d622f - Show all commits

2
.gitignore vendored
View File

@@ -17,3 +17,5 @@ __pycache__
.vscode/ .vscode/
node_modules/ node_modules/
.backportrc.json .backportrc.json
label_printing/public/node_modules

View File

@@ -31,6 +31,8 @@ def print_label(values):
doc.qty = label["item_qty"] doc.qty = label["item_qty"]
if "information" in label: if "information" in label:
doc.information = label["information"] doc.information = label["information"]
if "is_warehouse_label" in label:
doc.is_warehouse_label = label["is_warehouse_label"]
newdoc = doc.insert() newdoc = doc.insert()

View File

@@ -4,20 +4,21 @@
"creation": "2022-03-01 09:42:22.551134", "creation": "2022-03-01 09:42:22.551134",
"css": ".print-format {\n\tmargin: 0;\n\tpadding: 0;\n margin-left: 1mm;\n margin-right: 1mm;\n margin-top: 1mm;\n margin-bottom: 1mm;\n\twidth: 100mm;\n\tmax-height: 39mm;\n}\n\n.page-size {\n\twidth: 104mm;\n\theight: 40mm;\n}\n\n.label-wrapper {\n\twidth: 104mm;\n\ttext-align: center;\n\tdisplay: -webkit-box;\n\t/* wkhtmltopdf uses this one */\n\tdisplay: -webkit-flex;\n\tdisplay: flex;\n\t-webkit-box-pack: center;\n\t/* wkhtmltopdf uses this one */\n\t-webkit-justify-content: center;\n\tjustify-content: center;\n\tfont-size: 15px;\n}\n\n.left-wrapper {\n\twidth: 80mm;\n\tmargin-top: 1mm;\n}\n\n.left-wrapper div {\n\twhite-space: nowrap;\n\tfont-size: 12px;\n}\n\n.right-wrapper {\n\twidth: 20mm;\n\ttext-align: right;\n}\n\n.label-wrapper h4 {\n\tmargin: 0;\n\twhite-space: nowrap;\n\tfont-size: 23px;\n}\n\n.label-wrapper h5 {\n\tmargin: 0;\n\twhite-space: nowrap;\n\tfont-size: 15px;\n}\n\n\n.right-wrapper {\n padding-right: 2mm;\n padding-top: 0.5mm;\n}\n", "css": ".print-format {\n\tmargin: 0;\n\tpadding: 0;\n margin-left: 1mm;\n margin-right: 1mm;\n margin-top: 1mm;\n margin-bottom: 1mm;\n\twidth: 100mm;\n\tmax-height: 39mm;\n}\n\n.page-size {\n\twidth: 104mm;\n\theight: 40mm;\n}\n\n.label-wrapper {\n\twidth: 104mm;\n\ttext-align: center;\n\tdisplay: -webkit-box;\n\t/* wkhtmltopdf uses this one */\n\tdisplay: -webkit-flex;\n\tdisplay: flex;\n\t-webkit-box-pack: center;\n\t/* wkhtmltopdf uses this one */\n\t-webkit-justify-content: center;\n\tjustify-content: center;\n\tfont-size: 15px;\n}\n\n.left-wrapper {\n\twidth: 80mm;\n\tmargin-top: 1mm;\n}\n\n.left-wrapper div {\n\twhite-space: nowrap;\n\tfont-size: 12px;\n}\n\n.right-wrapper {\n\twidth: 20mm;\n\ttext-align: right;\n}\n\n.label-wrapper h4 {\n\tmargin: 0;\n\twhite-space: nowrap;\n\tfont-size: 23px;\n}\n\n.label-wrapper h5 {\n\tmargin: 0;\n\twhite-space: nowrap;\n\tfont-size: 15px;\n}\n\n\n.right-wrapper {\n padding-right: 2mm;\n padding-top: 0.5mm;\n}\n",
"custom_format": 1, "custom_format": 1,
"default_print_language": "de",
"disabled": 0, "disabled": 0,
"doc_type": "Label", "doc_type": "Label",
"docstatus": 0, "docstatus": 0,
"doctype": "Print Format", "doctype": "Print Format",
"font": "Default", "font": "Default",
"font_size": 0, "font_size": 0,
"html": "{% if doc.is_warehouse_label %}\n<div class=\"label-wrapper\">\n <div class=\"left-wrapper\">\n {% if doc.customer %} \n <h5 style=\"font-size: 20px;\"><strong>{{doc.customer}}</strong></h5>\n {% endif %}\n {% if doc.item_code %} \n <h4 style=\"font-size: 25px;\"><strong>{{doc.item_code}}</strong></h4>\n {% endif %}\n {% if doc.item_name%} \n <h5 style=\"font-size: 20px;\">{{doc.item_name}}</h5>\n {% endif %}\n \n {% if doc.batch %}\n <div><strong>{{_(\"Batch\")}} </strong> {{doc.batch}}</div>\n {% endif %}\n \n {% if doc.information%} \n <div> {{doc.information}} </div>\n {% endif %} \n </div>\n</div>\n\n{% else %}\n<div class=\"label-wrapper\">\n <div class=\"left-wrapper\">\n {% if doc.customer %} \n <h5><strong>{{doc.customer}}</strong></h5>\n {% endif %}\n {% if doc.item_code %} \n <h4><strong>{{doc.item_code}}</strong></h4>\n {% endif %}\n {% if doc.item_name%} \n <h5>{{doc.item_name}}</h5>\n {% endif %}\n {% if doc.delivery_date %} \n <div> <strong> {{_(\"Delivery Date\")}} </strong> {{frappe.utils.formatdate(doc.delivery_date, \"dd.MM.YYYY\")}} </div>\n {% endif %}\n {% if doc.qty %} \n <div> <strong>{{_(\"Qty\")}} </strong> {{ doc.qty }}</div>\n {% endif %}\n {% if doc.batch %}\n <div><strong>{{_(\"Batch\")}} </strong> {{doc.batch}}</div>\n {% endif %}\n \n {% if doc.information%} \n <div> {{doc.information}} </div>\n {% endif %} \n </div>\n <div class=\"right-wrapper\"> <img src=\"/files/hp_logo_black.jpg\" style=\"width: 30px;\"> </div>\n</div>\n{% endif %}", "html": "{% if not doc.is_warehouse_label == true %} \n<div class=\"label-wrapper\">\n <div class=\"left-wrapper\">\n {% if doc.customer %} \n <h5><strong>{{doc.customer}}</strong></h5>\n {% endif %}\n {% if doc.item_code %} \n <h4><strong>{{doc.item_code}}</strong></h4>\n {% endif %}\n {% if doc.item_name%} \n <h5>{{doc.item_name}}</h5>\n {% endif %}\n {% if doc.delivery_date %} \n <div> <strong> {{_(\"Delivery Date\")}} </strong> {{frappe.utils.formatdate(doc.delivery_date, \"dd.MM.YYYY\")}} </div>\n {% endif %}\n {% if doc.qty %} \n <div> <strong>{{_(\"Qty\")}} </strong> {{ doc.qty }}</div>\n {% endif %}\n {% if doc.batch %}\n <div><strong>{{_(\"Batch\")}} </strong> {{doc.batch}}</div>\n {% endif %}\n \n {% if doc.information%} \n <div> {{doc.information}} </div>\n {% endif %} \n </div>\n <div class=\"right-wrapper\"> <img src=\"/files/hp_logo_black.jpg\" style=\"width: 30px;\"> </div>\n</div>\n{% else %} \n<div class=\"label-wrapper\">\n <div class=\"left-wrapper\">\n {% if doc.customer %} \n <h5 style=\"font-size: 40px;\"><strong>{{doc.customer}}</strong></h5>\n {% endif %}\n {% if doc.item_code %} \n <h4 style=\"font-size: 30px;\"><strong>{{doc.item_code}}</strong></h4>\n {% endif %}\n {% if doc.item_name%} \n <h5 style=\"font-size: 20px;\">{{doc.item_name}}</h5>\n {% endif %}\n \n {% if doc.batch %}\n <div><strong>{{_(\"Batch\")}} </strong> {{doc.batch}}</div>\n {% endif %}\n \n {% if doc.information%} \n <div> {{doc.information}} </div>\n {% endif %} \n </div>\n</div>\n{% endif %}\n",
"idx": 0, "idx": 0,
"line_breaks": 0, "line_breaks": 0,
"margin_bottom": 0.0, "margin_bottom": 0.0,
"margin_left": 0.0, "margin_left": 0.0,
"margin_right": 0.0, "margin_right": 0.0,
"margin_top": 0.0, "margin_top": 0.0,
"modified": "2023-05-11 12:22:16.686076", "modified": "2023-08-28 13:06:58.300849",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Label Printing", "module": "Label Printing",
"name": "Label", "name": "Label",

View File

@@ -257,7 +257,7 @@ function setupLabelsDialog(page) {
fields = d.get_values() fields = d.get_values()
let newRow = { let newRow = {
item_qty: 0, item_qty: 0,
label_qty: 0, label_qty: 1,
is_warehouse_label: true, is_warehouse_label: true,
} }
let tempValues = d.get_values() let tempValues = d.get_values()

View File

@@ -1 +1 @@
/home/frappe/frappe-bench/apps/label_printing/node_modules /workspace/development/frappe-bench/apps/label_printing/node_modules