{"en_US": "<t t-name=\"mrp.label_production_view_pdf\">\n    <t t-call=\"web.basic_layout\">\n        <t t-set=\"nRows\" t-value=\"12\"/>\n        <t t-set=\"nCols\" t-value=\"4\"/>\n        <t t-set=\"uom_categ_unit\" t-value=\"env.ref('uom.product_uom_categ_unit')\"/>\n        <div class=\"oe_structure\"/>\n        <t t-set=\"move_lines\" t-value=\"docs.move_finished_ids.move_line_ids.filtered(lambda ml: ml.move_id.production_id.state == 'done' and ml.state == 'done' and ml.quantity)\"/>\n        <t t-set=\"move_line_qtys\" t-value=\"[]\"/>\n        <t t-foreach=\"move_lines\" t-as=\"move_line\">\n            <t t-if=\"move_line.product_uom_id.category_id == uom_categ_unit\">\n                <!-- print 1 label per 1 uom when uom category = units -->\n                <t t-set=\"move_line_qtys\" t-value=\"move_line_qtys + [int(move_line.quantity)]\"/>\n            </t>\n            <t t-else=\"\">\n                <t t-set=\"move_line_qtys\" t-value=\"move_line_qtys + [1]\"/>\n            </t>\n        </t>\n        <t t-set=\"index_to_qtys\" t-value=\"{i: qty for i, qty in zip(range(0, len(move_line_qtys)), move_line_qtys)}\"/>\n        <t t-set=\"num_pages\" t-value=\"sum(move_line_qtys)// (nRows * nCols) + 1\"/>\n        <div class=\"oe_structure\"/>\n        <div t-foreach=\"range(num_pages)\" t-as=\"page\" class=\"o_label_sheet\" t-att-style=\"'padding: 20mm 8mm'\">\n        <div class=\"oe_structure\"/>\n            <table class=\"my-0 table table-sm table-borderless\">\n                <t t-foreach=\"range(nRows)\" t-as=\"row\">\n                    <tr>\n                        <t t-foreach=\"range(nCols)\" t-as=\"column\">\n                            <t t-if=\"index_to_qtys and not current_quantity\">\n                                <t t-set=\"index_to_qty\" t-value=\"index_to_qtys.popitem()\"/>\n                                <t t-set=\"move_line\" t-value=\"move_lines[index_to_qty[0]]\"/>\n                                <t t-set=\"current_quantity\" t-value=\"index_to_qty[1]\"/>\n                            </t>\n                            <t t-if=\"current_quantity\">\n                                <t t-set=\"make_invisible\" t-value=\"False\"/>\n                                <t t-set=\"current_quantity\" t-value=\"current_quantity - 1\"/>\n                            </t>\n                            <t t-else=\"\">\n                                <t t-set=\"make_invisible\" t-value=\"True\"/>\n                            </t>\n                            <td t-att-style=\"make_invisible and 'visibility:hidden'\">\n                                <div t-if=\"move_line\" t-translation=\"off\" t-att-style=\"'position:relative; width:43mm; height:19mm; border: 1px solid %s;' % (move_line.env.user.company_id.primary_color or 'black')\">\n                                    <div class=\"o_label_name o_label_4x12 fw-bold\">\n                                        <span t-out=\"move_line.product_id.display_name\">Product</span>\n                                        <div><span>Quantity: </span>\n                                            <span t-if=\"move_line.product_uom_id.category_id == uom_categ_unit\">1.0</span>\n                                            <span t-else=\"\" t-out=\"move_line.quantity\">5</span>\n                                            <span t-field=\"move_line.product_uom_id\" groups=\"uom.group_uom\">UOM id</span>\n                                        </div>\n                                    </div>\n                                    <t t-if=\"move_line.product_id.tracking != 'none' and (move_line.lot_name or move_line.lot_id)\">\n                                        <div t-field=\"move_line.lot_name or move_line.lot_id.name\" t-options=\"{'widget': 'barcode', 'img_style': 'width:100%;height:35%'}\"/>\n                                        <div class=\"o_label_4x12 text-center\"><span t-out=\"move_line.lot_name or move_line.lot_id.name\">Demo Barcode</span></div>\n                                    </t>\n                                    <t t-elif=\"move_line.product_id.tracking == 'none' and move_line.product_id.barcode\">\n                                        <div t-field=\"move_line.product_id.barcode\" t-options=\"{'widget': 'barcode', 'img_style': 'width:100%;height:35%'}\"/>\n                                        <div class=\"o_label_4x12 text-center\"><span t-out=\"move_line.product_id.barcode\">12345678901</span></div>\n                                    </t>\n                                    <t t-else=\"\">\n                                        <span class=\"text-muted\">No barcode available</span>\n                                    </t>\n                                </div>\n                            </td>\n                        </t>\n                    </tr>\n                </t>\n            </table>\n            <div class=\"oe_structure\"/>\n        </div>\n    </t>\n</t>"}