Thai Localization - Base Bank Payment Export
Base export payment text file to bank
Thai Localization - Base Bank Payment Export
The l10n_th_bank_payment_export module provides a base wizard model to support exporting payment files in text format, which is commonly required by Thai banks.
This module itself does not generate a payment file directly, but serves as a foundation that other modules can extend to support bank-specific formats (e.g. KTB, BBL, SCB, etc.)
Key Features:
- Supports exporting payments to a bank-specific text format.
- Includes a flexible template system to define default values.
- Export structure can be configured dynamically using conditions and expressions.
Note
This module requires further development to be functional with a specific bank. See module l10n_th_bank_payment_export_ktb as a reference implementation.
Important
This is an alpha version, the data model and design can change at any time without warning. Only for development or testing purpose, do not use in production. More details on development status
Table of contents
Bank Payment Template
Used to group default values for easier user selection and error reduction during data entry.
Steps:
- Go to Invoicing > Configuration > Payments > Bank Payment Templates
- Create a new template and:
- Select the bank.
- In the template lines, define field names and default values.
- When a user selects this template during payment export, the system will auto-fill the corresponding values.
Note
Values must be valid (existing in the system). Invalid or incorrect entries will result in an error.
Bank Export Format
Defines the structure of the output text file according to the specific bank's requirements.
Menu: Settings > Technical > Bank Export Format
Format Fields:
- Description: Explanation of the line.
- Condition Line: Logic to determine whether this line should be included.
- Group: Used to group lines for looping purposes.
- Loop: Repeats the line for each bank.payment.export.line.
- Sub Loop: Nested loop (e.g. all invoices related to a payment line).
- Sub Value Loop: Field needed to drive the sub loop.
- End Line: Adds /r/t at the end of the line (if checked).
- Length: Max length of the value (required for Fixed values).
- From/To: Character position range (start-end).
- Alignment: Align value to left or right.
- Blank Space: Filler if the value doesn’t reach the defined length.
- Value Type: Fixed for hardcoded value, Python for dynamic value.
- Value:
- If Fixed: static value to be printed.
- If Python: expression evaluated dynamically.
Python Dynamic Fields:
- rec: The export document (bank.payment.export)
- line:
- If no Loop, refers to rec.export_line_ids
- If Loop, refers to the current line
- sub_line: Object in the Sub Loop
- today: Current date
- today_datetime: Current date and time
- idx: Index of the current line
- idx_line: Index within the loop
- idx_sub_line: Index within the sub loop
- wht_cert: Withholding tax certificate (requires l10n_th_account_tax)
- invoices: Invoices related to the payment
Usage
There are two ways to use this module:
1. From a Payment
- Go to Invoicing > Vendors > Payments
- Select a payment
- Click Action > Create Bank Payment Export
2. Directly Create Export
- Go to Invoicing > Accounting > Bank Payment Export
- Click Create
- Select the payment(s), or click Get All Payments
- Click Confirm
You can now Export the file:
- Export Text File: Generates a .txt file, status changes to Done.
- Export Excel: Previews data in .xlsx format.
Additional Notes:
- Rejected lines can be re-generated using the Reject action.
- Cancel stops export before sending to the bank.
- Enable Show Full Accounting Features to access the menu.
- Only Account Managers can confirm and export files.
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.
Do not contact contributors directly about support or help with technical issues.
Credits
Authors
- Ecosoft
Contributors
- Ecosoft:
- Saran Lim. <saranl@ecosoft.co.th>
Maintainers
This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
Current maintainer:
This module is part of the OCA/l10n-thailand project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Once the user has seen at least one product this snippet will be visible.