Register 'spayd' as a proper qr_code_method on res.partner.bank (same extension point account_qr_code_sepa uses for EPC/'sct_qr'), sequence=6 so it's tried before EPC (sequence 20). Eligibility now requires CZK/EUR currency AND a Czech customer country - previously the report template replaced EPC for *any* customer as long as the invoice currency was CZK or EUR, which would incorrectly show a Czech SPAYD code to e.g. a German customer being invoiced in EUR. account.move._generate_qr_code() already tries all registered methods in priority order and the existing div#qrcode block in account.report_invoice_document already renders whatever comes back, so this needs no report template override at all. - Move get_cz_qr_code_base64()/cz_to_iban() from account_move.py into res_partner_bank.py (as _get_qr_code_generation_params/_spayd_to_iban); fix bank_code not being zero-padded to 4 digits, which could throw off the mod-97 checksum for short local bank codes. Verified the checksum against the standard 19-2000145399/0800 -> CZ6508000000192000145399 reference example and general IBAN mod-97 validity. - Remove views/report_invoice.xml (nothing left to override) and the now unnecessary qrcode Python dependency (Odoo's own barcode report action renders the image; this module only supplies the SPAYD string). - Update README FAQ to match the new eligibility rule. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
49 lines
2.1 KiB
Python
49 lines
2.1 KiB
Python
{
|
|
'name': 'Czech QR Payment (SPAYD)',
|
|
'version': '19.0.1.0.0',
|
|
'depends': ['account', 'base', 'l10n_cz'],
|
|
'countries': ['cz'],
|
|
'category': 'Accounting',
|
|
'summary': 'Add Czech standard QR codes (SPAYD) for payment to your invoices.',
|
|
'description': """
|
|
|
|
Czech QR Payment Generator (SPAYD)
|
|
===================================
|
|
Allow to generate Czech banks compliant QR code for payment on the invoice.
|
|
|
|
Supports:
|
|
---------
|
|
* **CZK currency** - Standard Czech payments
|
|
* **EUR currency** - For Slovak companies and international businesses invoicing Czech customers
|
|
|
|
Key Features:
|
|
-------------
|
|
* **Standard SPAYD Support:** Fully compatible with all major Czech banking apps (ČSOB, Komerční banka, Česká spořitelna, etc.)
|
|
* **Smart IBAN Conversion:** Automatically converts local account numbers (e.g. 123-456/0800) to IBAN format.
|
|
* **Multi-country IBAN Support:** Works with Czech (CZ), Slovak (SK), and other IBANs.
|
|
* **Integration:** Registers as a native Odoo QR-code method (res.partner.bank
|
|
qr_code_method='spayd', same mechanism account_qr_code_sepa uses for EPC) -
|
|
no changes to the invoice print template are needed, and it's automatically
|
|
preferred over EPC for Czech customers, falling back to EPC otherwise.
|
|
Users can still switch manually via the "Payment QR-code" field.
|
|
* **Currency Support:** CZK and EUR (for cross-border payments).
|
|
|
|
Usage for Slovak Companies:
|
|
---------------------------
|
|
If you are a Slovak company invoicing Czech customers in EUR:
|
|
1. Set up your EUR bank account in Odoo
|
|
2. Create invoice for Czech customer in EUR currency
|
|
3. QR code will be automatically generated in SPAYD format
|
|
4. Czech customer can scan and pay via their banking app
|
|
|
|
Note: Czech banks will process EUR payments if the recipient has a EUR account.
|
|
""",
|
|
'author': 'Ash technology s.r.o.',
|
|
'website': 'https://github.com/ash-technology/l10n_cz_extra',
|
|
'license': 'LGPL-3',
|
|
'data': [],
|
|
'installable': True,
|
|
'auto_install': False,
|
|
'application': False,
|
|
'images': ['static/description/qr_payment_main_screenshot.png'],
|
|
} |