Browse Source

Print Barcode ticket

12.0
Juliana 2 years ago
parent
commit
63d1eef826
  1. 2
      __manifest__.py
  2. 3
      static/src/js/screens.js
  3. 11
      static/src/xml/pos.xml

2
__manifest__.py

@ -1,7 +1,7 @@
{ {
"name": "VRACOOP - POS Balance ticketing", "name": "VRACOOP - POS Balance ticketing",
"summary": "POS Balance ticketing", "summary": "POS Balance ticketing",
"version": "12.0.0.2",
"version": "12.0.1.0",
"development_status": "Beta", "development_status": "Beta",
"author": "Le Filament", "author": "Le Filament",
"maintainers": ["remi-filament"], "maintainers": ["remi-filament"],

3
static/src/js/screens.js

@ -71,6 +71,8 @@ odoo.define('vracoop_balance_ticketing.screens', function (require) {
var num_ean13 = this.pos.config.prefix + transaction.ean13.slice(2) var num_ean13 = this.pos.config.prefix + transaction.ean13.slice(2)
var width_pix = (Math.round(this.pos.config.page_width * 3.78)).toString() + "px"; var width_pix = (Math.round(this.pos.config.page_width * 3.78)).toString() + "px";
var url_barcode = "/report/barcode/?type=EAN13&value=" + num_ean13 + "&width=600&height=150"
return { return {
widget: this, widget: this,
pos: this.pos, pos: this.pos,
@ -78,6 +80,7 @@ odoo.define('vracoop_balance_ticketing.screens', function (require) {
transaction: transaction, transaction: transaction,
num_ean13: num_ean13, num_ean13: num_ean13,
width: width_pix, width: width_pix,
url_barcode: url_barcode,
}; };
}, },
print_web: function() { print_web: function() {

11
static/src/xml/pos.xml

@ -64,6 +64,7 @@
<tr class="title-info bloc-barcode"> <tr class="title-info bloc-barcode">
<td> <td>
<img t-att-src="widget.get_barcode_url()" style="width:100%;height:35%;" /> <img t-att-src="widget.get_barcode_url()" style="width:100%;height:35%;" />
<span class="caption"><t t-esc="num_ean13"/></span>
</td> </td>
</tr> </tr>
</table> </table>
@ -109,15 +110,11 @@
<br /> <br />
<br /> <br />
<line> <line>
<left>
<img t-att-src="widget.get_barcode_url()" style="width:100%;height:35%;" />
<span class="caption"><t t-esc="num_ean13"/></span>
</left>
</line>
<line>
<img t-att-src="widget.get_barcode_url()" style="width:100%;height:35%;" />
<img t-att-src="url_barcode" style="width:100%;height:35%;" />
<span class="caption"><t t-esc="num_ean13"/></span> <span class="caption"><t t-esc="num_ean13"/></span>
</line> </line>
<br />
<br />
</div> </div>
</div> </div>
</receipt> </receipt>

Loading…
Cancel
Save