[FIX] pos_{*}: Reprint receipt with ePOS printer
The "Reprint receipt" button was not showing if an ePOS printer was selected. When the pos_reprint module was installed, the "Reprint Receipt" button was always present, even if the checkbox in pos_config was unchecked.
This commit is contained in:
@@ -445,7 +445,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box" attrs="{'invisible': [('iface_print_via_proxy','=',False)]}">
|
||||
<div class="col-12 col-lg-6 o_setting_box pos_reprint_receipt" attrs="{'invisible': [('iface_print_via_proxy','=',False)]}">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name='module_pos_reprint'/>
|
||||
</div>
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
The Epson receipt printer will be used instead of the receipt printer connected to the IoT Box.
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('pos_reprint_receipt')]" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('iface_print_via_proxy','=',False), ('epson_printer_ip', 'in', [False, ''])]}</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -46,7 +46,7 @@ screens.define_action_button({
|
||||
'name': 'reprint',
|
||||
'widget': ReprintButton,
|
||||
'condition': function(){
|
||||
return this.pos.config.iface_print_via_proxy;
|
||||
return this.pos.config.module_pos_reprint && this.pos.proxy.printer;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user