payment_custom_templates.xml 1.1 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="redirect_form">
  4. <form t-att-action="api_url" method="post">
  5. <input type="hidden" name="reference" t-att-value="reference"/>
  6. </form>
  7. </template>
  8. <template id="custom_transaction_status" inherit_id="payment.transaction_status">
  9. <xpath expr="//div[@id='o_payment_status_alert']" position="inside">
  10. <t t-if="tx.provider_id.sudo().code == 'custom'">
  11. <div t-if="tx.reference">
  12. <strong>Communication: </strong><span t-esc="tx.reference"/>
  13. </div>
  14. <div t-if="tx.provider_id.sudo().qr_code">
  15. <t t-set="qr_code" t-value="tx.company_id.sudo().partner_id.bank_ids[:1].build_qr_code_base64(tx.amount, tx.reference, None, tx.currency_id, tx.partner_id)"/>
  16. <div t-if="qr_code" class="mt-2">
  17. <h3>Or scan me with your banking app.</h3>
  18. <img class="border border-dark rounded" t-att-src="qr_code"/>
  19. </div>
  20. </div>
  21. </t>
  22. </xpath>
  23. </template>
  24. </odoo>