Initial commit: L10N_Asia Pacific packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:52 +02:00
commit 54c86b612c
828 changed files with 58224 additions and 0 deletions

View file

@ -0,0 +1,51 @@
# Thailand - Accounting
Chart of Accounts for Thailand.
===============================
Thai accounting chart and localization.
## Installation
```bash
pip install odoo-bringout-oca-ocb-l10n_th
```
## Dependencies
This addon depends on:
- account
## Manifest Information
- **Name**: Thailand - Accounting
- **Version**: 2.0
- **Category**: Accounting/Localizations/Account Charts
- **License**: LGPL-3
- **Installable**: False
## Source
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_th`.
## License
This package maintains the original LGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Reports: doc/REPORTS.md
- Security: doc/SECURITY.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md

View file

@ -0,0 +1,32 @@
# Architecture
```mermaid
flowchart TD
U[Users] -->|HTTP| V[Views and QWeb Templates]
V --> C[Controllers]
V --> W[Wizards Transient Models]
C --> M[Models and ORM]
W --> M
M --> R[Reports]
DX[Data XML] --> M
S[Security ACLs and Groups] -. enforces .-> M
subgraph L10n_th Module - l10n_th
direction LR
M:::layer
W:::layer
C:::layer
V:::layer
R:::layer
S:::layer
DX:::layer
end
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
```
Notes
- Views include tree/form/kanban templates and report templates.
- Controllers provide website/portal routes when present.
- Wizards are UI flows implemented with `models.TransientModel`.
- Data XML loads data/demo records; Security defines groups and access.

View file

@ -0,0 +1,3 @@
# Configuration
Refer to Odoo settings for l10n_th. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,3 @@
# Controllers
This module does not define custom HTTP controllers.

View file

@ -0,0 +1,5 @@
# Dependencies
This addon depends on:
- [account](../../odoo-bringout-oca-ocb-account)

View file

@ -0,0 +1,4 @@
# FAQ
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
- Q: How to enable? A: Start server with --addon l10n_th or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-ocb-l10n_th"
# or
uv pip install odoo-bringout-oca-ocb-l10n_th"
```

View file

@ -0,0 +1,14 @@
# Models
Detected core models and extensions in l10n_th.
```mermaid
classDiagram
class account_move
class ir_actions_report
class res_partner
```
Notes
- Classes show model technical names; fields omitted for brevity.
- Items listed under _inherit are extensions of existing models.

View file

@ -0,0 +1,6 @@
# Overview
Packaged Odoo addon: l10n_th. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon l10n_th
- License: LGPL-3

View file

@ -0,0 +1,3 @@
# Reports
This module does not define custom reports.

View file

@ -0,0 +1,8 @@
# Security
This module does not define custom security rules or access controls beyond Odoo defaults.
Default Odoo security applies:
- Base user access through standard groups
- Model access inherited from dependencies
- No custom row-level security rules

View file

@ -0,0 +1,5 @@
# Troubleshooting
- Ensure Python and Odoo environment matches repo guidance.
- Check database connectivity and logs if startup fails.
- Validate that dependent addons listed in DEPENDENCIES.md are installed.

View file

@ -0,0 +1,7 @@
# Usage
Start Odoo including this addon (from repo root):
```bash
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon l10n_th
```

View file

@ -0,0 +1,3 @@
# Wizards
This module does not include UI wizards.

View file

@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import models
def _preserve_tag_on_taxes(cr, registry):
from odoo.addons.account.models.chart_template import preserve_existing_tags_on_taxes
preserve_existing_tags_on_taxes(cr, registry, 'l10n_th')

View file

@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Thailand - Accounting',
'version': '2.0',
'category': 'Accounting/Localizations/Account Charts',
'description': """
Chart of Accounts for Thailand.
===============================
Thai accounting chart and localization.
""",
'author': 'Almacom',
'website': 'http://almacom.co.th/',
'depends': ['account'],
'data': [
'data/account_tax_group_data.xml',
'data/l10n_th_chart_data.xml',
'data/account.account.template.csv',
'data/l10n_th_chart_post_data.xml',
'data/account_tax_report_data.xml',
'data/account_tax_template_data.xml',
'data/account_chart_template_data.xml',
'views/report_invoice.xml',
],
'demo': [
'demo/demo_company.xml',
],
'post_init_hook': '_preserve_tag_on_taxes',
'license': 'LGPL-3',
}

View file

@ -0,0 +1,28 @@
"id","name","code","account_type","chart_template_id/id","reconcile"
"a_recv","Account Receivable","1200","asset_receivable","l10n_th.chart","True"
"a_recv_pos","Account Receivable (PoS)","1210","asset_receivable","l10n_th.chart","True"
"a_cheque","Outstanding Cheques","1201","liability_current","l10n_th.chart","True"
"a_invent","Inventory","1300","asset_current","l10n_th.chart","False"
"a_building_depr","Accumulated Depreciation - Building","1411","expense_depreciation","l10n_th.chart","False"
"a_equipment_dept","Accumulated Depreciation - Equipment","1421","expense_depreciation","l10n_th.chart","False"
"a_input_vat","Input VAT","1510","asset_current","l10n_th.chart","False"
"a_wht_income","Withholding Income Tax","1520","asset_current","l10n_th.chart","False"
"a_pay","Account Payable","2101","liability_payable","l10n_th.chart","True"
"a_accr_exp","Accrued Expenses","2102","liability_current","l10n_th.chart","True"
"a_uninvoiced_receipts","Uninvoiced Receipts","2103","liability_current","l10n_th.chart","True"
"a_loan","Loans","2200","liability_current","l10n_th.chart","True"
"a_output_vat","Output VAT","2310","liability_current","l10n_th.chart","False"
"a_wht","Withholding Tax","2320","liability_current","l10n_th.chart","False"
"a_common_stock","Capital Stock","3100","equity","l10n_th.chart","False"
"a_retained_earnings","Retained Earnings","3200","equity","l10n_th.chart","False"
"a_dividends","Dividends","3300","equity","l10n_th.chart","False"
"a_income_summary","Income Summary","3400","equity","l10n_th.chart","False"
"a_sales","Income","4100","income","l10n_th.chart","False"
"a_income_gain","Gain Account","4200","income_other","l10n_th.chart","False"
"a_exp_cogs","Cost of Revenue","5100","expense_direct_cost","l10n_th.chart","False"
"a_exp_salary","Salary","5201","expense","l10n_th.chart","False"
"a_exp_rent","Rent","5202","expense","l10n_th.chart","False"
"a_exp_office","Office Expenses","5203","expense","l10n_th.chart","False"
"a_exp_interest","Interest expenses","5300","expense","l10n_th.chart","False"
"a_exp_income_tax","Income tax expenses","5400","expense","l10n_th.chart","False"
"a_exp_loss","Loss Account","5500","expense","l10n_th.chart","False"
1 id name code account_type chart_template_id/id reconcile
2 a_recv Account Receivable 1200 asset_receivable l10n_th.chart True
3 a_recv_pos Account Receivable (PoS) 1210 asset_receivable l10n_th.chart True
4 a_cheque Outstanding Cheques 1201 liability_current l10n_th.chart True
5 a_invent Inventory 1300 asset_current l10n_th.chart False
6 a_building_depr Accumulated Depreciation - Building 1411 expense_depreciation l10n_th.chart False
7 a_equipment_dept Accumulated Depreciation - Equipment 1421 expense_depreciation l10n_th.chart False
8 a_input_vat Input VAT 1510 asset_current l10n_th.chart False
9 a_wht_income Withholding Income Tax 1520 asset_current l10n_th.chart False
10 a_pay Account Payable 2101 liability_payable l10n_th.chart True
11 a_accr_exp Accrued Expenses 2102 liability_current l10n_th.chart True
12 a_uninvoiced_receipts Uninvoiced Receipts 2103 liability_current l10n_th.chart True
13 a_loan Loans 2200 liability_current l10n_th.chart True
14 a_output_vat Output VAT 2310 liability_current l10n_th.chart False
15 a_wht Withholding Tax 2320 liability_current l10n_th.chart False
16 a_common_stock Capital Stock 3100 equity l10n_th.chart False
17 a_retained_earnings Retained Earnings 3200 equity l10n_th.chart False
18 a_dividends Dividends 3300 equity l10n_th.chart False
19 a_income_summary Income Summary 3400 equity l10n_th.chart False
20 a_sales Income 4100 income l10n_th.chart False
21 a_income_gain Gain Account 4200 income_other l10n_th.chart False
22 a_exp_cogs Cost of Revenue 5100 expense_direct_cost l10n_th.chart False
23 a_exp_salary Salary 5201 expense l10n_th.chart False
24 a_exp_rent Rent 5202 expense l10n_th.chart False
25 a_exp_office Office Expenses 5203 expense l10n_th.chart False
26 a_exp_interest Interest expenses 5300 expense l10n_th.chart False
27 a_exp_income_tax Income tax expenses 5400 expense l10n_th.chart False
28 a_exp_loss Loss Account 5500 expense l10n_th.chart False

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<function model="account.chart.template" name="try_loading">
<value eval="[ref('l10n_th.chart')]"/>
</function>
</data>
</odoo>

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="tax_group_1" model="account.tax.group">
<field name="name">TAX 1%</field>
<field name="country_id" ref="base.th"/>
</record>
<record id="tax_group_2" model="account.tax.group">
<field name="name">TAX 2%</field>
<field name="country_id" ref="base.th"/>
</record>
<record id="tax_group_3" model="account.tax.group">
<field name="name">TAX 3%</field>
<field name="country_id" ref="base.th"/>
</record>
<record id="tax_group_5" model="account.tax.group">
<field name="name">TAX 5%</field>
<field name="country_id" ref="base.th"/>
</record>
<record id="tax_group_vat_7" model="account.tax.group">
<field name="name">VAT 7%</field>
<field name="country_id" ref="base.th"/>
</record>
</data>
</odoo>

View file

@ -0,0 +1,286 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="tax_report" model="account.report">
<field name="name">Tax Report</field>
<field name="root_report_id" ref="account.generic_tax_report"/>
<field name="country_id" ref="base.th"/>
<field name="filter_fiscal_position" eval="True"/>
<field name="availability_condition">country</field>
<field name="column_ids">
<record id="tax_report_balance" model="account.report.column">
<field name="name">Balance</field>
<field name="expression_label">balance</field>
</record>
</field>
<field name="line_ids">
<record id="tax_report_out_tax_title" model="account.report.line">
<field name="name">Output Tax</field>
<field name="aggregation_formula">OUTPUTTAX_SALEAMOUNT.balance + OUTPUTTAX_SALE_ZERO.balance + OUTPUTTAX_EXEMPTED.balance + OUTPUTTAX_TAX.balance</field>
<field name="children_ids">
<record id="tax_report_out_tax_sale" model="account.report.line">
<field name="name">1. Sales amount</field>
<field name="code">OUTPUTTAX_SALEAMOUNT</field>
<field name="expression_ids">
<record id="tax_report_out_tax_sale_tag" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">1. Sales amount</field>
</record>
</field>
</record>
<record id="tax_report_out_tax_less_sales_0_rate" model="account.report.line">
<field name="name">2. Less sales subject to 0% tax rate </field>
<field name="code">OUTPUTTAX_SALE_ZERO</field>
<field name="expression_ids">
<record id="tax_report_out_tax_less_sales_0_rate_tag" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">2. Less sales subject to 0% tax rate </field>
</record>
</field>
</record>
<record id="tax_report_out_tax_less_exempted_sales" model="account.report.line">
<field name="name">3. Less exempted sales</field>
<field name="code">OUTPUTTAX_EXEMPTED</field>
<field name="expression_ids">
<record id="tax_report_out_tax_less_exempted_sales_tag" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">3. Less exempted sales</field>
</record>
</field>
</record>
<record id="tax_report_out_tax_taxable_sales_amount" model="account.report.line">
<field name="name">4. Taxable sales amount(1. -2. -3.)</field>
<field name="aggregation_formula">OUTPUTTAX_SALEAMOUNT.balance-(OUTPUTTAX_SALE_ZERO.balance+OUTPUTTAX_EXEMPTED.balance)</field>
</record>
<record id="tax_report_out_tax" model="account.report.line">
<field name="name">5. Output tax</field>
<field name="code">OUTPUTTAX_TAX</field>
<field name="expression_ids">
<record id="tax_report_out_tax_tag" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">5. Output tax</field>
</record>
</field>
</record>
</field>
</record>
<record id="tax_report_input_tax_title" model="account.report.line">
<field name="name">Input Tax</field>
<field name="code">INPUTTAX</field>
<field name="aggregation_formula">6_PURCHASE_AMOUNT_THAT_IS_ENTITLED_TO_DEDUCTION_OF_INPUT_TAX_FROM_OUTPUT_TAX_IN_TAX_COMPUTATION.balance + INPUTTAX_TAX.balance</field>
<field name="children_ids">
<record id="tax_report_input_tax_purchase_from_out_tax" model="account.report.line">
<field name="name">6. Purchase amount that is entitled to deduction of input tax from output tax in tax computation</field>
<field name="code">6_PURCHASE_AMOUNT_THAT_IS_ENTITLED_TO_DEDUCTION_OF_INPUT_TAX_FROM_OUTPUT_TAX_IN_TAX_COMPUTATION</field>
<field name="expression_ids">
<record id="tax_report_input_tax_purchase_from_out_tax_tag" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">6. Purchase amount that is entitled to deduction of input tax from output tax in tax computation</field>
</record>
</field>
</record>
<record id="tax_report_input_tax" model="account.report.line">
<field name="name">7. Input tax (according to invoice of purchase amount in 6.)</field>
<field name="code">INPUTTAX_TAX</field>
<field name="expression_ids">
<record id="tax_report_input_tax_tag" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">7. Input tax (according to invoice of purchase amount in 6.)</field>
</record>
</field>
</record>
</field>
</record>
<record id="tax_report_vat" model="account.report.line">
<field name="name">Value Added Tax</field>
<field name="aggregation_formula">10_EXCESS_TAX_PAYMENT_CARRIED_FORWARD_FROM_LAST_PERIOD.balance</field>
<field name="children_ids">
<record id="tax_report_vat_payable" model="account.report.line">
<field name="name">8. Tax payable (5. minus 7. (if 5. is greater than 7.))</field>
<field name="expression_ids">
<record id="tax_report_vat_payable_balance" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">aggregation</field>
<field name="formula">OUTPUTTAX_TAX.balance - INPUTTAX_TAX.balance</field>
<field name="subformula">if_above(THB(0))</field>
</record>
</field>
</record>
<record id="tax_report_vat_excess" model="account.report.line">
<field name="name">9. Excess tax payable (7. minus 5. (if 5. is less than 7.))</field>
<field name="expression_ids">
<record id="tax_report_vat_excess_balance" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">aggregation</field>
<field name="formula">INPUTTAX_TAX.balance - OUTPUTTAX_TAX.balance</field>
<field name="subformula">if_above(THB(0))</field>
</record>
</field>
</record>
<record id="tax_report_vat_payment_last_period" model="account.report.line">
<field name="name">10. Excess tax payment carried forward from last period</field>
<field name="code">10_EXCESS_TAX_PAYMENT_CARRIED_FORWARD_FROM_LAST_PERIOD</field>
<field name="expression_ids">
<record id="tax_report_vat_payment_last_period_formula" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">external</field>
<field name="formula">sum</field>
<field name="subformula">editable;rounding=2</field>
</record>
</field>
</record>
</field>
</record>
<record id="tax_report_net_vat" model="account.report.line">
<field name="name">Net Tax</field>
<field name="aggregation_formula">11_NET_TAX_PAYABLE_IF_8_IS_GREATER_THAN_10.balance + 12_NET_EXCESS_TAX_PAYABLE_IF_10_IS_GREATER_THAN_8_OR_9_PLUS_10.balance</field>
<field name="children_ids">
<record id="tax_report_net_vat_payable" model="account.report.line">
<field name="name">11. Net tax payable (if 8. is greater than 10.)</field>
<field name="code">11_NET_TAX_PAYABLE_IF_8_IS_GREATER_THAN_10</field>
<field name="expression_ids">
<record id="tax_report_net_vat_payable_tag" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">11. Net tax payable (if 8. is greater than 10.)</field>
</record>
</field>
</record>
<record id="tax_report_net_vat_excess" model="account.report.line">
<field name="name">12. Net excess tax payable ((if 10. is greater than 8.) or (9. plus 10.))</field>
<field name="code">12_NET_EXCESS_TAX_PAYABLE_IF_10_IS_GREATER_THAN_8_OR_9_PLUS_10</field>
<field name="expression_ids">
<record id="tax_report_net_vat_excess_tag" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">12. Net excess tax payable ((if 10. is greater than 8.) or (9. plus 10.))</field>
</record>
</field>
</record>
</field>
</record>
</field>
</record>
<record id="tax_report_pnd53" model="account.report">
<field name="name">PND53</field>
<field name="root_report_id" ref="account.generic_tax_report" />
<field name="country_id" ref="base.th" />
<field name="availability_condition">country</field>
<field name="column_ids">
<record id="tax_report_pnd53_balance" model="account.report.column">
<field name="name">Balance</field>
<field name="expression_label">balance</field>
</record>
</field>
<field name="line_ids">
<record id="tax_report_total_income_pnd53_line" model="account.report.line">
<field name="name">Total Income</field>
<field name="code">INCOME_PND53</field>
<field name="expression_ids">
<record id="tax_report_total_income_pnd53" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">Income PND53</field>
</record>
</field>
</record>
<record id="tax_report_total_remittance_pnd53_line" model="account.report.line">
<field name="name">Total Remittance</field>
<field name="code">P53</field>
<field name="expression_ids">
<record id="tax_report_total_remittance_pnd53" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">PND53</field>
</record>
</field>
</record>
<record id="tax_report_surcharge_pnd53_line" model="account.report.line">
<field name="name">Surcharge</field>
<field name="code">S53</field>
<field name="expression_ids">
<record id="tax_report_surcharge_pnd53" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">SUR53</field>
</record>
</field>
</record>
<record id="tax_report_total_pnd53_line" model="account.report.line">
<field name="name">Total</field>
<field name="expression_ids">
<record id="tax_report_total_pnd53" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">aggregation</field>
<field name="formula">P53.balance + S53.balance</field>
</record>
</field>
</record>
</field>
</record>
<record id="tax_report_pnd3" model="account.report">
<field name="name">PND3</field>
<field name="root_report_id" ref="account.generic_tax_report" />
<field name="country_id" ref="base.th" />
<field name="availability_condition">country</field>
<field name="column_ids">
<record id="tax_report_pnd3_balance" model="account.report.column">
<field name="name">Balance</field>
<field name="expression_label">balance</field>
</record>
</field>
<field name="line_ids">
<record id="tax_report_total_income_pnd3_line" model="account.report.line">
<field name="name">Total Income</field>
<field name="code">INCOME_PND3</field>
<field name="expression_ids">
<record id="tax_report_total_income_pnd3" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">Income PND3</field>
</record>
</field>
</record>
<record id="tax_report_total_remittance_pnd3_line" model="account.report.line">
<field name="name">Total Remittance</field>
<field name="code">P3</field>
<field name="expression_ids">
<record id="tax_report_total_remittance_pnd3" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">PND3</field>
</record>
</field>
</record>
<record id="tax_report_surcharge_pnd3_line" model="account.report.line">
<field name="name">Surcharge</field>
<field name="code">S3</field>
<field name="expression_ids">
<record id="tax_report_surcharge_pnd3" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">tax_tags</field>
<field name="formula">SUR3</field>
</record>
</field>
</record>
<record id="tax_report_total_pnd3_line" model="account.report.line">
<field name="name">Total</field>
<field name="expression_ids">
<record id="tax_report_total_pnd3" model="account.report.expression">
<field name="label">balance</field>
<field name="engine">aggregation</field>
<field name="formula">P3.balance + S3.balance</field>
</record>
</field>
</record>
</field>
</record>
</odoo>

View file

@ -0,0 +1,507 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="tax_input_vat" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Input VAT 7%</field>
<field name="amount_type">percent</field>
<field name="amount" eval="7"/>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_vat_7"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_input_tax_purchase_from_out_tax_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_input_vat'),
'plus_report_expression_ids': [ref('tax_report_input_tax_tag')],
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_input_tax_purchase_from_out_tax_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_input_vat'),
'minus_report_expression_ids': [ref('tax_report_input_tax_tag')],
}),
]"/>
</record>
<record id="tax_output_vat" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Output VAT 7%</field>
<field name="amount_type">percent</field>
<field name="amount" eval="7"/>
<field name="type_tax_use">sale</field>
<field name="tax_group_id" ref="tax_group_vat_7"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_out_tax_sale_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_output_vat'),
'plus_report_expression_ids': [ref('tax_report_out_tax_tag')],
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_out_tax_sale_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_output_vat'),
'minus_report_expression_ids': [ref('tax_report_out_tax_tag')],
}),
]"/>
</record>
<record id="tax_input_vat_0" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Input VAT 0%</field>
<field name="amount_type">percent</field>
<field name="amount" eval="0"/>
<field name="type_tax_use">purchase</field>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_input_tax_purchase_from_out_tax_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_input_vat'),
'plus_report_expression_ids': [ref('tax_report_input_tax_tag')],
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_input_tax_purchase_from_out_tax_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_input_vat'),
'plus_report_expression_ids': [ref('tax_report_input_tax_tag')],
}),
]"/>
</record>
<record id="tax_output_vat_0" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Output VAT 0%</field>
<field name="amount_type">percent</field>
<field name="amount" eval="0"/>
<field name="type_tax_use">sale</field>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_out_tax_sale_tag'), ref('tax_report_out_tax_less_sales_0_rate_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_output_vat'),
'plus_report_expression_ids': [ref('tax_report_out_tax_tag')],
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_out_tax_sale_tag'), ref('tax_report_out_tax_less_sales_0_rate_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_output_vat'),
'minus_report_expression_ids': [ref('tax_report_out_tax_tag')],
}),
]"/>
</record>
<record id="tax_input_vat_exempted" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Input VAT Exempted</field>
<field name="amount_type">percent</field>
<field name="amount" eval="0"/>
<field name="type_tax_use">purchase</field>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_input_tax_purchase_from_out_tax_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_input_vat'),
'plus_report_expression_ids': [ref('tax_report_input_tax_tag')],
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_input_tax_purchase_from_out_tax_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_input_vat'),
'minus_report_expression_ids': [ref('tax_report_input_tax_tag')],
}),
]"/>
</record>
<record id="tax_output_vat_exempted" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Output VAT Exempted</field>
<field name="amount_type">percent</field>
<field name="amount" eval="0"/>
<field name="type_tax_use">sale</field>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_out_tax_sale_tag'), ref('tax_report_out_tax_less_exempted_sales_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_output_vat'),
'plus_report_expression_ids': [ref('tax_report_out_tax_tag')],
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_out_tax_sale_tag'), ref('tax_report_out_tax_less_exempted_sales_tag')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_output_vat'),
'minus_report_expression_ids': [ref('tax_report_out_tax_tag')],
}),
]"/>
</record>
<record id="tax_wht_co_1" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Company Withholding Tax 1% (Transportation)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-1"/>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_1"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_total_income_pnd53')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'minus_report_expression_ids': [ref('tax_report_total_remittance_pnd53')]
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_total_income_pnd53')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'plus_report_expression_ids': [ref('tax_report_total_remittance_pnd53')]
}),
]"/>
</record>
<record id="tax_wht_co_2" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Company Withholding Tax 2% (Advertising)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-2"/>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_2"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_total_income_pnd53')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'minus_report_expression_ids': [ref('tax_report_total_remittance_pnd53')]
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_total_income_pnd53')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'plus_report_expression_ids': [ref('tax_report_total_remittance_pnd53')]
}),
]"/>
</record>
<record id="tax_wht_co_3" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Company Withholding Tax 3% (Service)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-3"/>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_3"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_total_income_pnd53')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'minus_report_expression_ids': [ref('tax_report_total_remittance_pnd53')]
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_total_income_pnd53')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'plus_report_expression_ids': [ref('tax_report_total_remittance_pnd53')]
}),
]"/>
</record>
<record id="tax_wht_co_5" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Company Withholding Tax 5% (Rental)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-5"/>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_5"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_total_income_pnd53')],
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'minus_report_expression_ids': [ref('tax_report_total_remittance_pnd53')]
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_total_income_pnd53')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'plus_report_expression_ids': [ref('tax_report_total_remittance_pnd53')]
}),
]"/>
</record>
<record id="tax_wht_pers_1" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Personal Withholding Tax 1% (Transportation)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-1"/>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_1"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_total_income_pnd3')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'minus_report_expression_ids': [ref('tax_report_total_remittance_pnd3')]
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_total_income_pnd3')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'plus_report_expression_ids': [ref('tax_report_total_remittance_pnd3')]
}),
]"/>
</record>
<record id="tax_wht_pers_2" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Personal Withholding Tax 2% (Advertising)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-2"/>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_2"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_total_income_pnd3')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'minus_report_expression_ids': [ref('tax_report_total_remittance_pnd3')]
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_total_income_pnd3')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'plus_report_expression_ids': [ref('tax_report_total_remittance_pnd3')]
}),
]"/>
</record>
<record id="tax_wht_pers_3" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Personal Withholding Tax 3% (Service)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-3"/>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_3"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_total_income_pnd3')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'minus_report_expression_ids': [ref('tax_report_total_remittance_pnd3')]
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_total_income_pnd3')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'plus_report_expression_ids': [ref('tax_report_total_remittance_pnd3')]
}),
]"/>
</record>
<record id="tax_wht_pers_5" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Personal Withholding Tax 5% (Rental)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-5"/>
<field name="type_tax_use">purchase</field>
<field name="tax_group_id" ref="tax_group_5"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'plus_report_expression_ids': [ref('tax_report_total_income_pnd3')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'minus_report_expression_ids': [ref('tax_report_total_remittance_pnd3')]
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {
'repartition_type': 'base',
'minus_report_expression_ids': [ref('tax_report_total_income_pnd3')]
}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht'),
'plus_report_expression_ids': [ref('tax_report_total_remittance_pnd3')]
}),
]"/>
</record>
<record id="tax_wht_income_1" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Withholding Income Tax 1% (Transportation)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-1"/>
<field name="type_tax_use">sale</field>
<field name="tax_group_id" ref="tax_group_1"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {'repartition_type': 'base'}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht_income'),
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {'repartition_type': 'base'}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht_income'),
}),
]"/>
</record>
<record id="tax_wht_income_2" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Withholding Income Tax 2% (Advertising)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-2"/>
<field name="type_tax_use">sale</field>
<field name="tax_group_id" ref="tax_group_2"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {'repartition_type': 'base'}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht_income'),
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {'repartition_type': 'base'}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht_income'),
}),
]"/>
</record>
<record id="tax_wht_income_3" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Withholding Income Tax 3% (Service)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-3"/>
<field name="type_tax_use">sale</field>
<field name="tax_group_id" ref="tax_group_3"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {'repartition_type': 'base'}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht_income'),
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {'repartition_type': 'base'}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht_income'),
}),
]"/>
</record>
<record id="tax_wht_income_5" model="account.tax.template">
<field name="chart_template_id" ref="chart"/>
<field name="name">Withholding Income Tax 5% (Rental)</field>
<field name="amount_type">percent</field>
<field name="amount" eval="-5"/>
<field name="type_tax_use">sale</field>
<field name="tax_group_id" ref="tax_group_5"/>
<field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {'repartition_type': 'base'}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht_income'),
}),
]"/>
<field name="refund_repartition_line_ids" eval="[(5, 0, 0),
(0,0, {'repartition_type': 'base'}),
(0,0, {
'repartition_type': 'tax',
'account_id': ref('a_wht_income'),
}),
]"/>
</record>
</odoo>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- CHART OF Template -->
<record id="chart" model="account.chart.template">
<field name="name">Thailand - Chart of Accounts</field>
<field name="cash_account_code_prefix">1100</field>
<field name="bank_account_code_prefix">1110</field>
<field name="transfer_account_code_prefix">16</field>
<field name="currency_id" ref="base.THB"/>
<field name="country_id" ref="base.th"/>
</record>
</odoo>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="chart" model="account.chart.template">
<field name="property_account_receivable_id" ref="a_recv"/>
<field name="property_account_payable_id" ref="a_pay"/>
<field name="property_account_expense_categ_id" ref="a_exp_cogs"/>
<field name="property_account_income_categ_id" ref="a_sales"/>
<field name="income_currency_exchange_account_id" ref="a_income_gain"/>
<field name="expense_currency_exchange_account_id" ref="a_exp_loss"/>
<field name="default_pos_receivable_account_id" ref="a_recv_pos"/>
</record>
</odoo>

View file

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="partner_demo_company_th" model="res.partner">
<field name="name">TH Company</field>
<field name="vat"></field>
<field name="street">A5</field>
<field name="city">บ้านสันทราย</field>
<field name="country_id" ref="base.th"/>
<field name="zip">50220</field>
<field name="phone">+66 81 234 5678</field>
<field name="email">info@company.thexample.com</field>
<field name="website">www.thexample.com</field>
</record>
<record id="demo_company_th" model="res.company">
<field name="name">TH Company</field>
<field name="partner_id" ref="partner_demo_company_th"/>
</record>
<function model="res.company" name="_onchange_country_id">
<value eval="[ref('demo_company_th')]"/>
</function>
<function model="res.users" name="write">
<value eval="[ref('base.user_root'), ref('base.user_admin'), ref('base.user_demo')]"/>
<value eval="{'company_ids': [(4, ref('l10n_th.demo_company_th'))]}"/>
</function>
<function model="account.chart.template" name="try_loading">
<value eval="[ref('l10n_th.chart')]"/>
<value model="res.company" eval="obj().env.ref('l10n_th.demo_company_th')"/>
</function>
</odoo>

View file

@ -0,0 +1,170 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_th
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-22 02:16+0000\n"
"PO-Revision-Date: 2023-03-22 02:16+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_out_tax_sale
msgid "1. Sales amount"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_vat_payment_last_period
msgid "10. Excess tax payment carried forward from last period"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_net_vat_payable
msgid "11. Net tax payable (if 8. is greater than 10.)"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_net_vat_excess
msgid ""
"12. Net excess tax payable ((if 10. is greater than 8.) or (9. plus 10.))"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_out_tax_less_sales_0_rate
msgid "2. Less sales subject to 0% tax rate "
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_out_tax_less_exempted_sales
msgid "3. Less exempted sales"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_out_tax_taxable_sales_amount
msgid "4. Taxable sales amount(1. -2. -3.)"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_out_tax
msgid "5. Output tax"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_input_tax_purchase_from_out_tax
msgid ""
"6. Purchase amount that is entitled to deduction of input tax from output "
"tax in tax computation"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_input_tax
msgid "7. Input tax (according to invoice of purchase amount in 6.)"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_vat_payable
msgid "8. Tax payable (5. minus 7. (if 5. is greater than 7.))"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_vat_excess
msgid "9. Excess tax payable (7. minus 5. (if 5. is less than 7.))"
msgstr ""
#. module: l10n_th
#: model:account.report.column,name:l10n_th.tax_report_balance
#: model:account.report.column,name:l10n_th.tax_report_pnd3_balance
#: model:account.report.column,name:l10n_th.tax_report_pnd53_balance
msgid "Balance"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_input_tax_title
msgid "Input Tax"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_net_vat
msgid "Net Tax"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_out_tax_title
msgid "Output Tax"
msgstr ""
#. module: l10n_th
#: model:account.report,name:l10n_th.tax_report_pnd3
msgid "PND3"
msgstr ""
#. module: l10n_th
#: model:account.report,name:l10n_th.tax_report_pnd53
msgid "PND53"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_surcharge_pnd3_line
#: model:account.report.line,name:l10n_th.tax_report_surcharge_pnd53_line
msgid "Surcharge"
msgstr "เงินเพิ่ม (ถ้ามี)"
#. module: l10n_th
#: model:account.tax.group,name:l10n_th.tax_group_1
msgid "TAX 1%"
msgstr ""
#. module: l10n_th
#: model:account.tax.group,name:l10n_th.tax_group_2
msgid "TAX 2%"
msgstr ""
#. module: l10n_th
#: model:account.tax.group,name:l10n_th.tax_group_3
msgid "TAX 3%"
msgstr ""
#. module: l10n_th
#: model:account.tax.group,name:l10n_th.tax_group_5
msgid "TAX 5%"
msgstr ""
#. module: l10n_th
#: model:account.report,name:l10n_th.tax_report
msgid "Tax Report"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_total_pnd3_line
#: model:account.report.line,name:l10n_th.tax_report_total_pnd53_line
msgid "Total"
msgstr "รวมยอดภาษีที่นำส่งทั้งสิ้น และเงินเพิ่ม (2. + 3.)"
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_total_income_pnd3_line
#: model:account.report.line,name:l10n_th.tax_report_total_income_pnd53_line
msgid "Total Income"
msgstr "รวมยอดเงินได้ทั้งสิ้น"
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_total_remittance_pnd3_line
#: model:account.report.line,name:l10n_th.tax_report_total_remittance_pnd53_line
msgid "Total Remittance"
msgstr "รวมยอดภาษีที่นำส่งทั้งสิ้น"
#. module: l10n_th
#: model:account.tax.group,name:l10n_th.tax_group_vat_7
msgid "VAT 7%"
msgstr ""
#. module: l10n_th
#: model:account.report.line,name:l10n_th.tax_report_vat
msgid "Value Added Tax"
msgstr ""

View file

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import res_partner
from . import account_move
from . import ir_actions_report

View file

@ -0,0 +1,10 @@
from odoo import models
class AccountMove(models.Model):
_inherit = "account.move"
def _get_name_invoice_report(self):
self.ensure_one()
if self.company_id.account_fiscal_country_id.code == 'TH':
return 'l10n_th.report_invoice_document'
return super()._get_name_invoice_report()

View file

@ -0,0 +1,15 @@
from odoo import _, models
from odoo.exceptions import UserError
class IrActionsReport(models.Model):
_inherit = 'ir.actions.report'
def _render_qweb_pdf(self, report_ref, res_ids=None, data=None):
# Check for reports only available for invoices.
if self._get_report(report_ref).report_name == 'l10n_th.report_commercial_invoice':
invoices = self.env['account.move'].browse(res_ids)
if any(not x.is_invoice(include_receipts=True) for x in invoices):
raise UserError(_("Only invoices could be printed."))
return super()._render_qweb_pdf(report_ref, res_ids=res_ids, data=data)

View file

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields
class ResPartner(models.Model):
_inherit = "res.partner"
l10n_th_branch_name = fields.Char(compute="_l10n_th_get_branch_name")
def _l10n_th_get_branch_name(self):
for partner in self:
if not partner.is_company or partner.country_code != 'TH':
partner.l10n_th_branch_name = ""
else:
code = partner.company_registry
partner.l10n_th_branch_name = f"Branch {code}" if code else "Headquarter"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,51 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 106 106">
<defs>
<mask id="a" x="0" y="0" width="106" height="106" maskUnits="userSpaceOnUse">
<path d="M6.06,0H98.43C104.49,0,106,1.51,106,7.57V98.43c0,6.06-1.51,7.57-7.57,7.57H6.06C1.51,106,0,104.49,0,98.43V7.57C0,1.51,1.51,0,6.06,0Z" style="fill: #fff;fill-rule: evenodd"/>
</mask>
<mask id="b" x="4.6" y="7.2" width="52.8" height="32.97" maskUnits="userSpaceOnUse">
<rect x="6.09" y="7.47" width="48.45" height="31.57" rx="1" style="fill: #fff"/>
</mask>
<symbol id="c" data-name="account icon" viewBox="0 0 106 106">
<g style="mask: url(#a)">
<g>
<path d="M0,0H106V106H0Z" style="fill: #5a5a64;fill-rule: evenodd"/>
<path d="M6.06,1.51H98.43q6.06,0,7.57,3V0H0V4.54Q1.52,1.51,6.06,1.51Z" style="fill: #fff;fill-opacity: 0.382999986410141;fill-rule: evenodd"/>
<path d="M6.06,104.49H98.43q6.06,0,7.57-4.55V106H0V99.94Q1.52,104.49,6.06,104.49Z" style="fill-opacity: 0.382999986410141;fill-rule: evenodd"/>
<g>
<path d="M70.38,104.49H6.06C3,104.49,0,103,0,98.43V61.28L28.77,19.69H59.06a77.33,77.33,0,0,0,21.2,13.87c.07,11.31.07,4.86,0,16.17h3.12l.21,36.82Z" style="fill: #393939;fill-rule: evenodd;opacity: 0.324000000953674;isolation: isolate"/>
<g style="opacity: 0.30000000000000004">
<g>
<path d="M68.77,58.54H76c.76,0,1,.12,1,.46v2.45c0,.31-.24.43-.93.43H61.44c-.66,0-.92-.12-.92-.42,0-.83,0-1.67,0-2.51,0-.29.26-.4.92-.41Z"/>
<path d="M64.33,77.42c.42.39.76.66,1,1a.89.89,0,0,1,0,1.31.92.92,0,0,1-1.32,0,4.25,4.25,0,0,1-.48-.47c-.14-.15-.26-.31-.49-.6-.32.37-.54.66-.79.91-.53.53-1.08.58-1.5.15s-.36-.94.15-1.45c.26-.26.54-.5.91-.83-.38-.34-.72-.61-1-.91a.9.9,0,0,1,0-1.36.91.91,0,0,1,1.36,0c.29.28.54.6.93,1A12.1,12.1,0,0,1,64,75.18a.91.91,0,0,1,1.36,0,.87.87,0,0,1,0,1.31C65.07,76.79,64.73,77.06,64.33,77.42Z"/>
<path d="M62.13,66.9c0-.47,0-.88,0-1.28a.92.92,0,0,1,.92-1,.91.91,0,0,1,1,1c0,.41,0,.81,0,1.3h1.14a1.16,1.16,0,0,1,1.22,1c0,.55-.42.85-1.18.86H64.12c0,.49,0,.91,0,1.34a.94.94,0,1,1-1.88,0c0-.41,0-.81,0-1.3H60.92a.94.94,0,1,1,0-1.88C61.3,66.89,61.68,66.9,62.13,66.9Z"/>
<path d="M74.31,76H72.23c-.67,0-1-.34-1-.93a.89.89,0,0,1,1-1q2.18,0,4.35,0a1,1,0,1,1,0,1.91c-.74,0-1.47,0-2.21,0Z"/>
<path d="M74.28,68.61c-.71,0-1.43,0-2.14,0a.86.86,0,0,1-1-.9.85.85,0,0,1,.92-1c1.5,0,3,0,4.48,0a.93.93,0,0,1,1,1,.91.91,0,0,1-1,.91c-.75,0-1.51,0-2.27,0Z"/>
<path d="M74.36,78.09c.72,0,1.44,0,2.15,0a1,1,0,0,1,1,1c0,.57-.38.93-1,.94H72.28c-.75,0-1.09-.32-1.09-.94s.37-1,1.09-1,1.39,0,2.08,0Z"/>
<path d="M81.29,90.55H56.14a4,4,0,0,1-4-4V53.73a4,4,0,0,1,4-4H81.29a4,4,0,0,1,4,4V86.55A4,4,0,0,1,81.29,90.55ZM56.14,53.73V86.55H81.29V53.73Z"/>
</g>
<path d="M43.49,83.26H31.8V25.71H56v10.6q0,4.55,4.54,4.55H75.71v5.78h4.55V34.8c-4.55-3-16.66-12.11-19.69-13.63H30.29a2.68,2.68,0,0,0-3,3V84.77a2.68,2.68,0,0,0,3,3H48.45V83.26ZM60.57,25.71l15.14,10.6H60.57Z"/>
</g>
<path d="M60.57,18.68H30.29a2.68,2.68,0,0,0-3,3V82.28a2.68,2.68,0,0,0,3,3H48.45V80.77H31.8V23.22H56v10.6q0,4.55,4.54,4.55H75.71v5.78h4.55V32.31C75.71,29.28,63.6,20.2,60.57,18.68Zm0,15.14V23.22l15.14,10.6Z" style="fill: #a8a9ab"/>
<g>
<path d="M68.77,55.78H76c.76,0,1,.13,1,.53v2.85c0,.37-.24.5-.93.5q-7.3,0-14.61,0c-.66,0-.92-.14-.92-.48,0-1,0-2,0-2.93,0-.34.26-.47.92-.47Z" style="fill: #a8a9ab"/>
<path d="M64.33,76.53c.42.38.76.65,1,1a.89.89,0,0,1,0,1.31.92.92,0,0,1-1.32,0,5.44,5.44,0,0,1-.48-.48c-.14-.14-.26-.31-.49-.59-.32.36-.54.65-.79.91-.53.53-1.08.57-1.5.14s-.36-.94.15-1.45c.26-.26.54-.49.91-.82-.38-.35-.72-.61-1-.92a.9.9,0,0,1,0-1.36.92.92,0,0,1,1.36,0c.29.28.54.61.93,1A13.78,13.78,0,0,1,64,74.28a.91.91,0,0,1,1.36,0,.88.88,0,0,1,0,1.32C65.07,75.89,64.73,76.16,64.33,76.53Z" style="fill: #a8a9ab"/>
<path d="M62.13,65.88c0-.48,0-.88,0-1.29a1,1,0,1,1,1.91,0c0,.4,0,.81,0,1.3h1.14a1.15,1.15,0,0,1,1.22,1c0,.54-.42.85-1.18.85H64.12c0,.49,0,.92,0,1.34a.94.94,0,1,1-1.88,0c0-.4,0-.81,0-1.3H60.92a.94.94,0,1,1,0-1.88Z" style="fill: #a8a9ab"/>
<path d="M74.31,75.11c-.69,0-1.38,0-2.08,0s-1-.35-1-.94a.89.89,0,0,1,1-1q2.18,0,4.35,0a.91.91,0,0,1,1,1,.93.93,0,0,1-1,1c-.74,0-1.47,0-2.21,0Z" style="fill: #a8a9ab"/>
<path d="M74.28,67.76H72.14a.87.87,0,0,1-1-.9.84.84,0,0,1,.92-1c1.5,0,3,0,4.48,0a.94.94,0,0,1,1,1,.91.91,0,0,1-1,.91H74.28Z" style="fill: #a8a9ab"/>
<path d="M74.36,77.2c.72,0,1.44,0,2.15,0a1,1,0,0,1,1,1c0,.56-.38.93-1,.93q-2.12,0-4.23,0c-.75,0-1.09-.32-1.09-.94s.37-.94,1.09-1,1.39,0,2.08,0Z" style="fill: #a8a9ab"/>
<path d="M81.29,88.06H56.14a4,4,0,0,1-4-4V51.24a4,4,0,0,1,4-4H81.29a4,4,0,0,1,4,4V84.06A4,4,0,0,1,81.29,88.06ZM56.14,51.24V84.06H81.29V51.24Z" style="fill: #a8a9ab"/>
</g>
</g>
</g>
</g>
</symbol>
</defs>
<g>
<use width="106" height="106" transform="translate(-0.07 0)" xlink:href="#c"/>
<rect x="6.2" y="10.57" width="48.45" height="31.57" rx="1" style="fill: #393939;opacity: 0.44;isolation: isolate"/>
<g style="mask: url(#b)">
<image width="400" height="267" transform="translate(4.6 7.2) scale(0.13 0.12)" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAD6CAYAAACPpxFEAAAACXBIWXMAAFPQAABT0AEFpKxXAAAD2UlEQVR4Xu3ZsUkFURRF0TcyiWBPhrZjD2Z2YWIf04EtiPADzcXsmf8RHu54rfjkG+7d5hhzAMD/HDerBQD8RUAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEj28fS82gDAyTbnnKsRAFw5nLAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEj27++f1QYATvaH+8fVBgBO9o/3z9UGAE78QABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAREAASAQEgERAAEgEBIBEQABIBASAZL+7u11tAOBku1y+5moEAFeObc4pIAD81+EHAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAso+X19UGAE62OcZcjQDgyuGEBUAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJAICQCIgACQCAkAiIAAkAgJAIiAAJPsY41iNAODK2y8UnB/7L9tHEgAAAABJRU5ErkJggg=="/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_invoice_document" inherit_id="account.report_invoice_document" primary="True">
<xpath expr="//div[@name='address_not_same_as_shipping']//span[@t-field='o.partner_id.vat']" position="after">
<span t-esc="o.partner_id.l10n_th_branch_name"/>
</xpath>
<xpath expr="//div[@name='address_same_as_shipping']//span[@t-field='o.partner_id.vat']" position="after">
<span t-esc="o.partner_id.l10n_th_branch_name"/>
</xpath>
<xpath expr="//div[@name='no_shipping']//span[@t-field='o.partner_id.vat']" position="after">
<span t-esc="o.partner_id.l10n_th_branch_name"/>
</xpath>
<xpath expr="//h2/span[contains(@t-if, 'posted')]" position="replace">
<t t-if="o.move_type == 'out_invoice' and o.state == 'posted'">
<span t-if="o.company_id.account_fiscal_country_id.code == 'TH' and not commercial_invoice">Tax Invoice</span>
<span t-else="">Invoice</span>
</t>
</xpath>
</template>
<template id="report_commercial_invoice">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-set="lang" t-value="o.partner_id.lang"/>
<t t-call="account.report_invoice_document" t-lang="lang"/>
</t>
</t>
</template>
<template id="report_invoice" inherit_id="account.report_invoice">
<xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
<t t-if="o._get_name_invoice_report() == 'l10n_th.report_invoice_document'"
t-call="l10n_th.report_invoice_document" t-lang="lang"/>
</xpath>
</template>
<template id="report_invoice_with_payments" inherit_id="account.report_invoice_with_payments">
<xpath expr='//t[@t-call="account.report_invoice_document"]' position="after">
<t t-if="o._get_name_invoice_report() == 'l10n_th.report_invoice_document'"
t-call="l10n_th.report_invoice_document" t-lang="lang"/>
</xpath>
</template>
<record id="action_report_commercial_invoice" model="ir.actions.report">
<field name="name">Commercial Invoice</field>
<field name="model">account.move</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">l10n_th.report_commercial_invoice</field>
<field name="report_file">l10n_th.report_commercial_invoice</field>
<field name="binding_model_id" ref="account.model_account_move"/>
<field name="binding_type">report</field>
</record>
</odoo>

View file

@ -0,0 +1,42 @@
[project]
name = "odoo-bringout-oca-ocb-l10n_th"
version = "16.0.0"
description = "Thailand - Accounting - Odoo addon"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ocb-account>=16.0.0",
"requests>=2.25.1"
]
readme = "README.md"
requires-python = ">= 3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]
[project.urls]
homepage = "https://github.com/bringout/0"
repository = "https://github.com/bringout/0"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["l10n_th"]
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.4.1",
]