summaryrefslogtreecommitdiff
path: root/addons/pos_mercury/static/src/xml
diff options
context:
space:
mode:
authorJoren Van Onder <jov@odoo.com>2015-04-17 17:53:13 +0200
committerFrédéric van der Essen <fva@odoo.com>2015-07-02 16:42:36 +0200
commit04fb3dfcfffe5d2abfcf6f3ebe9d693101d5aa20 (patch)
tree4cfe24f22bfefa25903ff6106842ad36410a515e /addons/pos_mercury/static/src/xml
parent3a26daeb296a1efdae9c5514c0ef142d82fb8702 (diff)
[IMP] pos_mercury: pos extension for electronic card payment.
This new module integrate the 'Mercury Pay' electronic payment provider with the point of sale. This commit is the end result of a large branch whose main author is Joren Van Onder <jov@odoo.com>, with additional contributions from Martin Donies <mdo@odoo.com> and Frederic van der Essen <fva@odoo.com>
Diffstat (limited to 'addons/pos_mercury/static/src/xml')
-rw-r--r--addons/pos_mercury/static/src/xml/pos_mercury.xml88
1 files changed, 88 insertions, 0 deletions
diff --git a/addons/pos_mercury/static/src/xml/pos_mercury.xml b/addons/pos_mercury/static/src/xml/pos_mercury.xml
new file mode 100644
index 00000000000..bb8071a5a59
--- /dev/null
+++ b/addons/pos_mercury/static/src/xml/pos_mercury.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<templates id="template" inherit_id="point_of_sale.template">
+ <t t-name="PaymentTransactionPopupWidget">
+ <div class="modal-dialog">
+ <div class="popup">
+ <p class="title">Electronic Payment</p>
+ <p class="body"></p>
+ </div>
+ </div>
+ </t>
+
+ <t t-extend="PaymentScreen-Paymentlines">
+ <t t-jquery=".col-name" t-operation="inner">
+ <t t-if="line.cashregister.journal.type === 'bank'">
+ <t t-if="line.mercury_swipe_pending">
+ <div>WAITING FOR SWIPE</div>
+ </t>
+ <t t-if="! line.mercury_swipe_pending">
+ <t t-esc='line.name' />
+ </t>
+ </t>
+ <t t-if="line.cashregister.journal.type !== 'bank'">
+ <t t-esc='line.name' />
+ </t>
+ </t>
+ <t t-jquery="tbody tr.paymentline.selected">
+ this.removeAttr("class");
+ this.attr('t-attf-class', 'paymentline selected #{line.mercury_swipe_pending ? "o_pos_mercury_swipe_pending" : ""}');
+ </t>
+ <t t-jquery="tbody tr.paymentline[t-att-data-cid*='line.cid']">
+ this.removeAttr("class");
+ this.attr('t-attf-class', 'paymentline #{line.mercury_swipe_pending ? "o_pos_mercury_swipe_pending" : ""}');
+ </t>
+ <t t-jquery="tbody tr td.col-tendered.edit">
+ this.removeAttr("class");
+ this.attr('t-attf-class', 'col-tendered edit #{line.mercury_swipe_pending ? "o_pos_mercury_swipe_pending" : ""}');
+ </t>
+ </t>
+
+ <t t-name="PosMercurySignature">
+ <t t-foreach="paymentlines" t-as="paymentline">
+ <t t-if="paymentline.mercury_data &amp;&amp; ! printed_signature">
+ <br />
+ <div>CARDHOLDER WILL PAY CARD ISSUER</div>
+ <div>ABOVE AMOUNT PURSUANT</div>
+ <div>TO CARDHOLDER AGREEMENT</div>
+ <br />
+ <br />
+ <div>X______________________________</div>
+ <t t-set="printed_signature" t-value="true"/>
+ </t>
+ </t>
+ </t>
+
+ <t t-extend="XmlReceipt">
+ <t t-jquery="t[t-foreach*='paymentlines'][t-as*='line']" t-operation="append">
+ <t t-debug="true"/>
+ <t t-if="line.mercury_data">
+ <line line-ratio="1">
+ <left><pre> APPROVAL CODE:</pre><t t-esc="line.mercury_auth_code"/></left>
+ </line>
+ </t>
+ </t>
+ <t t-jquery="receipt" t-operation="append">
+ <div>
+ <t t-call="PosMercurySignature"/>
+ </div>
+ </t>
+ </t>
+
+ <t t-extend="PosTicket">
+ <t t-jquery="t[t-foreach*='paymentlines'][t-as*='line']" t-operation="append">
+ <tr>
+ <td colspan="2">
+ <t t-if="line.mercury_data">
+ &amp;nbsp;&amp;nbsp;APPROVAL CODE: <t t-esc="line.mercury_auth_code"/>
+ </t>
+ </td>
+ </tr>
+ </t>
+ <t t-jquery="t[t-if*='receipt.footer']" t-operation="after">
+ <div class="pos-center-align">
+ <t t-call="PosMercurySignature"/>
+ </div>
+ </t>
+ </t>
+</templates>