This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in $@ | |
do | |
echo $i | |
name=`otfinfo -a $i`.otf | |
name=`echo $name | sed 's/ //g'` | |
cp $i "$name" | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from requests import Session | |
from zeep import helpers, Client | |
from zeep.transports import Transport | |
import pprint | |
session = Session() | |
session.verify = '/home/poonlap/all.cer' | |
# session.verify =False | |
transport = Transport(session=session) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<odoo> | |
<template id="payment_promptpay_web_display" inherit_id="website_sale.confirmation"> | |
<xpath expr="//table" position="after"> | |
<t t-set="payment_tx_id" t-value="order.get_portal_last_transaction()" /> | |
<t | |
t-if="payment_tx_id.acquirer_id.qr_code_promptpay and payment_tx_id.acquirer_id.provider == 'transfer'" | |
> | |
<div class="oe_website_sale_tx_status mt-3"> | |
<div class="card bg-info"> | |
<div class="card-header"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class L10nTHPromptpay(models.Model): | |
_inherit = "payment.acquirer" | |
qr_code_promptpay = fields.Boolean("Use PromptPay QR code") | |
promptpay_id = fields.Char( | |
string="PromptPay ID", | |
help="13 digits for company's tax ID or 10 digits for mobile phone number", | |
) | |
def promptpayPayload(self, data): | |
return qrcode.generate_payload(self.promptpay_id, float(data)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="demo.odoo.com/report/barcode/?type=QR&value=promptpay&width=200&height=200 /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s'%('QR', 'text', 200, 200)"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s'%('QR', doc.payment_tx_id.promptpay_qrcode , 200, 200)"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ pip3 install promptpay | |
❯ promptpay qrcode --id=1111111111111 | |
payload of 1111111111111: 00020101021129370016A000000677010111021311111111111115802TH530376463047B5A | |
❯ promptpay qrcode --id=1111111111111 --file=qrcode.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<t t-name="website.language_selector"> | |
<ul class="nav-link" t-if="(request and request.is_frontend_multilang and len(languages) > 1) or (website and (editable or translatable))"> | |
<li class="nav-item list-inline-item"> | |
<div class="dropdown"> | |
<button class="btn btn-sm btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> | |
<span t-esc="list(filter(lambda lg : lg[0] == lang, languages))[0][2].split('/').pop()"/> | |
<span class="caret ml4"/> | |
</button> | |
<div class="dropdown-menu" role="menu"> | |
<t t-foreach="languages" t-as="lg"> |
NewerOlder