Commit ca72d8b4 by François C.

Use of base64 src for Curtlery picto when send to printer

parent 07d82be9
......@@ -139,7 +139,8 @@ odoo.define("pos_meal_voucher.models", function (require) {
},
currency: this.pos.currency,
meal_voucher_used: this.is_meal_voucher_used(),
total_meal_voucher_eligible: this.get_total_meal_voucher_eligible()
total_meal_voucher_eligible: this.get_total_meal_voucher_eligible(),
curtlery_img_src = " data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAgCAQAAABJYMuwAAABI2lDQ1BJQ0MgcHJvZmlsZQAAKJGdkLFKw1AUhr+0oiLqYnEQhQyOFlzM5FIVgqAQYwWrU5qkWExiSFKKb+Cb6MN0EAQfwQdQcPa/0cHBLF44/B+Hc/7/3gstOwnTcm4X0qwqXL83uBxc2QtvtNlilQ47QVjmPc87ofF8vmIZfekar+a5P898FJehdKbKwryowNoXO9MqN6yic9v3D8UPYjtKs0j8JN6O0siw2fXTZBL+eJrbLMfZxbnpqzZxOeYUD5shE8YkVHSlmTpHOOxJXQoC7ikJpQmxelPNVNyISjm5HIj6It2mIW+jzvOUMpTHWF4m4Y5UniYP87/fax9n9aa1PsuDIqhbbVVrNIL3R1gZwNozLF03ZC3+flvDjFPP/PONXwa+UHRuacLOAAAACXBIWXMAAAsTAAALEwEAmpwYAAABWUlEQVQ4y93UTUvUURTH8c+9IyEygxoxi3KRVApBL6CHhSv3afsWSvgKqpcQbSpw0dYWBe7ciAtLwVWL1r6BVpI2yBRqDcdNTY7+/c8wi4guXLicc7/3d564KfS1ghGvPTYgm/PO1WDCstkQgmzKK6s2bNq04a3LIeOKW+4YVHHPdZO4adztlEgXPPHcXXU1VVU119xgoEM6deyUeOi+fDbGXJpB3YPiG+XYhNFiRzk2IvWDpfMcub+2/a5kzUVNoxhL2dj5Op3YsDdahvHIjEu9qlFth13vHmQun7syrOmowPO1m9pnH8/YD61FlOYWrfTMD9MqbeuOFz51zS0aFu2fsK5bj+i3JH8bi+7tLlpbnqqgbsFgz1g0vIc0bv7fLcn/iEWv2DfNE9CXU4O873v73LLXxqLppZ1f5g9WTonvWtQAB5Zsk/48m5Ih2VEcFn6Z2RAO4iccAzBJUmYVC7MHAAAAAElFTkSuQmCC"
};
if (is_xml(this.pos.config.receipt_header)){
......
......@@ -111,13 +111,13 @@
<t t-extend="XmlReceipt"> <!-- Ticket sent to the printer -->
<t t-jquery="div.orderlines line:not([indent]) left" t-operation="prepend"> <!-- hack to get product name line (lines with qty have 'indent' attr) -->
<t t-if='receipt.meal_voucher_used === true and line.product_meal_voucher_ok === true'>
<i class="fa fa-cutlery" />
<img src="receipt.curtlery_img_src" alt="#" />
</t>
</t>
<t t-jquery="div.orderlines" t-operation="after">
<t t-if="receipt.meal_voucher_used === true">
<line><right>--------</right></line>
<line><left><i class="fa fa-cutlery"/> Eligible subtotal for</left></line>
<line><left><img src="receipt.curtlery_img_src" alt="#" /> Eligible subtotal for</left></line>
<line>
<left>meal vouchers:</left>
<right><value t-att-value-decimals='pos.currency.decimals'><t t-esc='receipt.total_meal_voucher_eligible' /></value></right>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment