Commit defe69a2 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_printer: only show print button when in normal view

not from fast input
parent d31d03d8
......@@ -168,14 +168,15 @@
<div class="footer_button">
<button id="print_button"><span>{{Print_by_Epson}}</span></button>
{{#if auto_print}}
<button class="confirm_return" type="submit" value="SaleOrder_confirmAndReturn">
<span>{{Confirm_Order_and_Return}}</span>
</button>
<button class="confirm_return" type="submit" value="SaleOrder_confirmAndReturn">
<span>{{Confirm_Order_and_Return}}</span>
</button>
<button class="cancel_return" type="submit" value="SaleOrder_cancelAndReturn">
<span>{{Cancel_Order_and_Return}}</span>
</button>
<button class="cancel_return" type="submit" value="SaleOrder_cancelAndReturn">
<span>{{Cancel_Order_and_Return}}</span>
</button>
{{/if}}
</div>
<hr>
<div id="js_error_log"> </div>
......
......@@ -250,7 +250,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>984.42457.24733.27289</string> </value>
<value> <string>984.58233.19545.12100</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -268,7 +268,7 @@
</tuple>
<state>
<tuple>
<float>1592474753.59</float>
<float>1593421374.82</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -58,6 +58,7 @@
//example: sale_order_module/356, total price is 30464.8, but return 30464.79999999999
data_dict.total_price_with_discount = Math.round(data_dict.total_price_with_discount * 100) / 100;
data_dict.total_price = Math.round(data_dict.total_price * 100) / 100;
data_dict.auto_print = options.auto_print;
gadget.element.querySelector('.container').innerHTML = epson_print_template(data_dict);
......
......@@ -252,7 +252,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>984.44071.55409.13482</string> </value>
<value> <string>984.44075.1419.10496</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -270,7 +270,7 @@
</tuple>
<state>
<tuple>
<float>1592571541.29</float>
<float>1593420843.63</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -253,7 +253,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:{"jio_key": context.getRelativeUrl(), "data_dict": context.Order_getODTDataDict(), "printer_url": context.SaleOrder_getPrinterUrl()}</string> </value>
<value> <string>python:{"jio_key": context.getRelativeUrl(), "data_dict": context.Order_getODTDataDict(), "printer_url": context.SaleOrder_getPrinterUrl(), "auto_print": context.REQUEST.get("auto_print", 0)}</string> </value>
</item>
</dictionary>
</pickle>
......
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