Browse Source

pos_payment_terminal : bigger button for start transaction with touchscreen

pull/10/head
Auélien DUMAINE 10 years ago
parent
commit
44122e4ce3
  1. 4
      pos_customer_display/static/src/js/customer_display.js
  2. 6
      pos_payment_terminal/pos_payment_terminal_view.xml
  3. 2
      pos_payment_terminal/static/src/js/pos_payment_terminal.js
  4. 5
      pos_payment_terminal/static/src/xml/pos_payment_terminal.xml

4
pos_customer_display/static/src/js/customer_display.js

@ -88,9 +88,9 @@ openerp.pos_customer_display = function(instance){
//FIXME : this function is call twice. The first time, it is not called by prepare_text_customer_display : WHY ?
// alert("In sent_text_customer_display " + line_length);
if (data[0].length != line_length)
console.warn(data[0].length + " " + data[0]);
console.warn(data[0].length + " -> " + data[0]);
if (data[1].length != line_length)
console.warn(data[1].length + " " + data[1]);
console.warn(data[1].length + " ->" + data[1]);
if (data[0].length != line_length || data[1].length != line_length){
console.warn("Data components have to have " + line_length + " chars.");
console.log(data[0].length + " -> "+ data[0] + "\n" + data[1].length + " -> " + data[1]);

6
pos_payment_terminal/pos_payment_terminal_view.xml

@ -21,5 +21,11 @@
</field>
</field>
</record>
<template id="index" name="pos_payment_terminal index" inherit_id="point_of_sale.index">
<xpath expr="//link[@id='pos-stylesheet']" position="after">
<link rel="stylesheet" href="/pos_payment_terminal/static/src/css/pos_payment_terminal.css" id="pos_payment_terminal-stylesheet"/>
</xpath>
</template>
</data>
</openerp>

2
pos_payment_terminal/static/src/js/pos_payment_terminal.js

@ -7,7 +7,7 @@ openerp.pos_payment_terminal = function(instance){
'currency_iso' : currency_iso,
'currency_iso_numeric' : currency_iso_numeric,
'payment_mode' : line.cashregister.journal.payment_mode};
alert(JSON.stringify(data));
// alert(JSON.stringify(data));
this.message('payment_terminal_transaction_start', {'payment_info' : JSON.stringify(data)});
},
});

5
pos_payment_terminal/static/src/xml/pos_payment_terminal.xml

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="Paymentline" >
<t t-jquery=".paymentline-name" t-operation="append">
<t t-jquery=".paymentline-input" t-operation="append">
<t t-if="line.cashregister.journal.payment_mode">
<!-- <t t-if="pos.config.iface_payment_terminal">-->
<span class="payment-terminal-transaction-start">
<button>
<t t-esc="line.cashregister.journal.payment_mode"/>
Start transaction
<!--<t t-esc="line.cashregister.journal.payment_mode"/> -->
</button>
</span>
<!-- </t> -->

Loading…
Cancel
Save