[FIX] point_of_sale, pos_reprint: write duplicata on reprint
When a receipt is reprinted, the word 'DUPLICATA' is printed at the bottom of the receipt. We are also allowing to reprint ticket even if no printer is selected on the POS config as nothing prevent to do this. TASK-ID: 47990
This commit is contained in:
@@ -445,7 +445,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box pos_reprint_receipt" attrs="{'invisible': [('iface_print_via_proxy','=',False)]}">
|
||||
<div class="col-12 col-lg-6 o_setting_box pos_reprint_receipt">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name='module_pos_reprint'/>
|
||||
</div>
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
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>
|
||||
|
||||
@@ -23,6 +23,7 @@ var ReprintReceiptScreenWidget = screens.ReceiptScreenWidget.extend({
|
||||
this.gui.show_screen('products');
|
||||
},
|
||||
get_receipt_render_env: function() {
|
||||
this.pos.last_receipt_render_env.receipt.reprint = true;
|
||||
return this.pos.last_receipt_render_env;
|
||||
},
|
||||
});
|
||||
@@ -46,7 +47,7 @@ screens.define_action_button({
|
||||
'name': 'reprint',
|
||||
'widget': ReprintButton,
|
||||
'condition': function(){
|
||||
return this.pos.config.module_pos_reprint && this.pos.proxy.printer;
|
||||
return this.pos.config.module_pos_reprint;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -16,4 +16,12 @@
|
||||
</t>
|
||||
</t>
|
||||
|
||||
<t t-extend="OrderReceipt">
|
||||
<t t-jquery='.pos-receipt-order-data' t-operation='append'>
|
||||
<t t-if='receipt.reprint === true'>
|
||||
<div>DUPLICATA</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
||||
Reference in New Issue
Block a user