Browse Source

[FIX]Error display barcode ticket

12.0
Juliana 3 years ago
parent
commit
c56bafa6c9
  1. 2
      __manifest__.py
  2. BIN
      models/__pycache__/__init__.cpython-37.pyc
  3. BIN
      models/__pycache__/pos_config.cpython-37.pyc
  4. BIN
      models/__pycache__/pos_order.cpython-37.pyc
  5. BIN
      models/__pycache__/report_ticketformat.cpython-37.pyc
  6. 7
      static/src/js/screens.js
  7. 12
      static/src/xml/pos.xml

2
__manifest__.py

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

BIN
models/__pycache__/__init__.cpython-37.pyc

BIN
models/__pycache__/pos_config.cpython-37.pyc

BIN
models/__pycache__/pos_order.cpython-37.pyc

BIN
models/__pycache__/report_ticketformat.cpython-37.pyc

7
static/src/js/screens.js

@ -46,10 +46,11 @@ odoo.define('vracoop_balance_ticketing.screens', function (require) {
}
},
get_barcode_data: function () {
get_barcode_url: function () {
var transaction = this.gui.get_current_screen_param('transaction');
var num_ean13 = this.pos.config.prefix + transaction.ean13.slice(2)
return num_ean13;
var num_ean13 = this.pos.config.prefix + transaction.ean13.slice(2);
var url_barcode = "/report/barcode/?type=EAN13&value=" + num_ean13 + "&width=600&height=150"
return url_barcode;
},
should_auto_print: function() {

12
static/src/xml/pos.xml

@ -28,7 +28,7 @@
</t>
<t t-name="PosTicketBls">
<div class="pos-sale-ticket" t-attf-style="width:#{width}">
<div class="pos-sale-ticket" t-attf-style="width:300px">
<div class="pos-center-align title-mag">Rayon vrac</div>
<br />
@ -63,8 +63,7 @@
<table class='pos-center-align'>
<tr class="title-info bloc-barcode">
<td>
<img t-att-src="'/report/barcode/EAN13/' + widget.get_barcode_data()" />
<span class="caption"><t t-esc="num_ean13"/></span>
<img t-att-src="widget.get_barcode_url()" style="width:100%;height:35%;" />
</td>
</tr>
</table>
@ -76,7 +75,6 @@
<receipt align='center' width='40' value-thousands-separator='' >
<div class="pos-sale-ticket">
<div class="pos-center-align title-mag">Rayon vrac</div>
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', widget.get_barcode_data(), 300, 50)" style="width:100%;height:35%;" />
<br/>
<br/>
<div font='b'>
@ -112,10 +110,14 @@
<br />
<line>
<left>
<!-- <img t-att-src="'/report/barcode/EAN13/' + widget.get_barcode_data()" /> -->
<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%;" />
<span class="caption"><t t-esc="num_ean13"/></span>
</line>
</div>
</div>
</receipt>

Loading…
Cancel
Save