binhexsystems
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
45 additions and
2 deletions
-
pos_ticket_without_price/static/src/js/screens.js
-
pos_ticket_without_price/static/src/xml/pos.xml
|
|
@ -28,8 +28,14 @@ odoo.define('pos_ticket_without_price.screens', function (require) { |
|
|
|
var button_print_ticket_without_price = |
|
|
|
this.$('.button.print_ticket_without_price'); |
|
|
|
button_print_ticket_without_price.click(function () { |
|
|
|
self.render_ticket_without_price(); |
|
|
|
self.print(); |
|
|
|
console.log("self.pos.config.iface_print_via_proxy") |
|
|
|
console.log(self.pos.config.iface_print_via_proxy) |
|
|
|
if (!self.pos.config.iface_print_via_proxy) { |
|
|
|
self.render_ticket_without_price(); |
|
|
|
self.print(); |
|
|
|
} else { |
|
|
|
self.proxy_render_ticket_without_price(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
@ -40,6 +46,12 @@ odoo.define('pos_ticket_without_price.screens', function (require) { |
|
|
|
this.get_receipt_render_env())); |
|
|
|
}, |
|
|
|
|
|
|
|
proxy_render_ticket_without_price: function() { |
|
|
|
var receipt = QWeb.render('XmlReceiptWithoutPrice', this.get_receipt_render_env()); |
|
|
|
this.pos.proxy.print_receipt(receipt); |
|
|
|
this.pos.get_order()._printed = true; |
|
|
|
}, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
@ -30,4 +30,35 @@ |
|
|
|
</t> |
|
|
|
</t> |
|
|
|
|
|
|
|
<t t-name="XmlReceiptWithoutPrice" t-extend="XmlReceipt"> |
|
|
|
<t t-jquery="t[t-if='receipt.company.logo']" t-operation="before"> |
|
|
|
<h1>TICKET WITHOUT PRICE</h1> |
|
|
|
</t> |
|
|
|
|
|
|
|
<t t-jquery="t[t-foreach='receipt.orderlines']" t-operation="replace"> |
|
|
|
<t t-foreach='receipt.orderlines' t-as='line'> |
|
|
|
<value t-att-value-decimals='pos.dp["Product Unit of Measure"]' value-autoint='on'> |
|
|
|
<t t-esc='line.quantity' /> |
|
|
|
</value> |
|
|
|
x |
|
|
|
<t t-esc='line.product_name_wrapped[0]' /> |
|
|
|
<br/> |
|
|
|
</t> |
|
|
|
</t> |
|
|
|
|
|
|
|
<t t-jquery="t[t-set='taxincluded']" t-operation="replace" /> |
|
|
|
<t t-jquery="t[t-set='!taxincluded']" t-operation="replace" /> |
|
|
|
<t t-jquery="t[t-set='taxincluded']" t-operation="replace" /> |
|
|
|
|
|
|
|
<t t-jquery="line > right" t-operation="replace" /> |
|
|
|
<t t-jquery="line > left" t-operation="replace" /> |
|
|
|
|
|
|
|
<t t-jquery="line[class='total']" t-operation="replace" /> |
|
|
|
<t t-jquery="t[t-foreach='paymentlines']" t-operation="replace" /> |
|
|
|
<t t-jquery="line[size='double-height']" t-operation="replace" /> |
|
|
|
<t t-jquery="line[class='before-footer']" t-operation="replace" /> |
|
|
|
|
|
|
|
|
|
|
|
</t> |
|
|
|
|
|
|
|
</templates> |