Skip to content

Commit

Permalink
Merge branch '16.0' of https://github.com/OCA/l10n-thailand into 16.0…
Browse files Browse the repository at this point in the history
…-fix-account_wht_cert_form-address
  • Loading branch information
Saran440 committed Jun 13, 2024
2 parents b6e2393 + e941d9f commit 282f8c3
Show file tree
Hide file tree
Showing 38 changed files with 1,210 additions and 35 deletions.
5 changes: 4 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.17.2
_commit: v1.21.1
_src_path: gh:oca/oca-addons-repo-template
ci: GitHub
convert_readme_fragments_to_markdown: false
generate_requirements_txt: true
github_check_license: true
github_ci_extra_env: {}
Expand All @@ -19,4 +20,6 @@ repo_description: 'TODO: add repo description.'
repo_name: l10n-thailand
repo_slug: l10n-thailand
repo_website: https://github.com/OCA/l10n-thailand
use_pyproject_toml: false
use_ruff: false

4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Stale PRs and issues policy
uses: actions/stale@v4
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# General settings.
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
# * Issues that are pending more information
# * Except Issues marked as "no stale"
- name: Needs more information stale issues policy
uses: actions/stale@v4
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ascending: true
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ jobs:
run: oca_init_test_database
- name: Run tests
run: oca_run_tests
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Update .pot files
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/
*.py[cod]
/.venv
/.pytest_cache
/.ruff_cache

# C extensions
*.so
Expand Down
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ exclude: |
^docs/_templates/.*\.html$|
# Don't bother non-technical authors with formatting issues in docs
readme/.*\.(rst|md)$|
# Ignore build and dist directories in addons
/build/|/dist/|
# Ignore test files in addons
/tests/samples/.*|
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
Expand All @@ -35,7 +39,7 @@ repos:
language: fail
files: '[a-zA-Z0-9_]*/i18n/en\.po$'
- repo: https://github.com/oca/maintainer-tools
rev: 969238e47c07d0c40573acff81d170f63245d738
rev: 9a170331575a265c092ee6b24b845ec508e8ef75
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
Expand All @@ -48,6 +52,7 @@ repos:
- --org-name=OCA
- --repo-name=l10n-thailand
- --if-source-changed
- --keep-source-digest
- repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: v0.0.25
hooks:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[l10n_th_account_tax](l10n_th_account_tax/) | 16.0.1.1.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Thai Localization - VAT and Withholding Tax
[l10n_th_account_tax_report](l10n_th_account_tax_report/) | 16.0.1.1.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Thai Localization - VAT and Withholding Tax Reports
[l10n_th_account_tax](l10n_th_account_tax/) | 16.0.1.1.1 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Thai Localization - VAT and Withholding Tax
[l10n_th_account_tax_multi](l10n_th_account_tax_multi/) | 16.0.1.0.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Thai Localization - Tax with Payment Multi Deduction
[l10n_th_account_tax_report](l10n_th_account_tax_report/) | 16.0.1.3.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Thai Localization - VAT and Withholding Tax Reports
[l10n_th_account_wht_cert_form](l10n_th_account_wht_cert_form/) | 16.0.1.1.0 | [![Saran440](https://github.com/Saran440.png?size=30px)](https://github.com/Saran440) | Thai Localization - Withholding Tax Certificate Form
[l10n_th_amount_to_text](l10n_th_amount_to_text/) | 16.0.1.0.0 | [![Saran440](https://github.com/Saran440.png?size=30px)](https://github.com/Saran440) | Convert Amount Text to Thai
[l10n_th_base_location](l10n_th_base_location/) | 16.0.1.0.0 | | Thai Localization - Base Location
Expand Down
2 changes: 1 addition & 1 deletion l10n_th_account_tax/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Thai Localization - VAT and Withholding Tax
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:67a4d707cfb659bd90a23a99ad6c90e7ae3e1c54c38f0c6db08b3ef520b72cec
!! source digest: sha256:d30f9ad7e1a9c82e53faf868ce6f20b0c16ad1a66c1f50c610aeeeeaac47bd5d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion l10n_th_account_tax/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Thai Localization - VAT and Withholding Tax",
"version": "16.0.1.1.0",
"version": "16.0.1.1.1",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/l10n-thailand",
Expand Down
2 changes: 1 addition & 1 deletion l10n_th_account_tax/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def _compute_all_tax(self):
fixed_multiplicator=sign,
)
rate = line.amount_currency / line.balance if line.balance else 1
rounding = self.company_id.currency_id.rounding
rounding = line.currency_id.rounding
for tax in compute_all_currency["taxes"]:
# create tax lines with zero taxes
if (
Expand Down
2 changes: 1 addition & 1 deletion l10n_th_account_tax/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h1 class="title">Thai Localization - VAT and Withholding Tax</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:67a4d707cfb659bd90a23a99ad6c90e7ae3e1c54c38f0c6db08b3ef520b72cec
!! source digest: sha256:d30f9ad7e1a9c82e53faf868ce6f20b0c16ad1a66c1f50c610aeeeeaac47bd5d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-thailand/tree/16.0/l10n_th_account_tax"><img alt="OCA/l10n-thailand" src="https://img.shields.io/badge/github-OCA%2Fl10n--thailand-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-thailand-16-0/l10n-thailand-16-0-l10n_th_account_tax"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-thailand&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module address 2 main tax requirement in Thailand</p>
Expand Down
113 changes: 113 additions & 0 deletions l10n_th_account_tax_multi/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
====================================================
Thai Localization - Tax with Payment Multi Deduction
====================================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c6308090f4d9d0f932aeb736f767b1c58867fe2b5c7069dc6c22b48cffa0bad9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--thailand-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-thailand/tree/16.0/l10n_th_account_tax_multi
:alt: OCA/l10n-thailand
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-thailand-16-0/l10n-thailand-16-0-l10n_th_account_tax_multi
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-thailand&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module supported multi withholding tax in invoice.

.. 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 <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

Usage
=====

From vendor bill that want to withholding tax,

- Create invoice and multi invoice lines.
- Fill withholding tax in Field WHT each invoice lines.
- Post > Register Payment.
- System will auto computed amount include multi withholding tax.

User can flag some line in deduction table, to keep some amount open.
i..e, 100.0 will be reduced from AR/AP account, in order to keep it open.

Step to keep some amount open.

- Create invoice and multi invoice lines.
- Fill withholding tax in Field WHT each invoice lines.
- Post > Register Payment > check Open in deduction table that you need keep it. > Post
- Next time, Register Payment > Fill amount residual manual > Post

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-thailand/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 <https://github.com/OCA/l10n-thailand/issues/new?body=module:%20l10n_th_account_tax_multi%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Ecosoft

Contributors
~~~~~~~~~~~~

* `Ecosoft <http://ecosoft.co.th>`__:

* Kitti Upariphutthiphong <[email protected]>
* Komsan Somwong <[email protected]>
* Pimolnat Suntian <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-kittiu| image:: https://github.com/kittiu.png?size=40px
:target: https://github.com/kittiu
:alt: kittiu

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-kittiu|

This module is part of the `OCA/l10n-thailand <https://github.com/OCA/l10n-thailand/tree/16.0/l10n_th_account_tax_multi>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions l10n_th_account_tax_multi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

from . import wizard
17 changes: 17 additions & 0 deletions l10n_th_account_tax_multi/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2020 Ecosoft Co., Ltd (https://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

{
"name": "Thai Localization - Tax with Payment Multi Deduction",
"version": "16.0.1.0.0",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/l10n-thailand",
"category": "Localization / Accounting",
"depends": ["l10n_th_account_tax", "account_payment_multi_deduction"],
"data": ["wizard/account_payment_register_view.xml"],
"installable": True,
"development_status": "Alpha",
"maintainers": ["kittiu"],
"auto_install": True,
}
66 changes: 66 additions & 0 deletions l10n_th_account_tax_multi/i18n/l10n_th_account_tax_multi.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_th_account_tax_multi
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \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_account_tax_multi
#: model_terms:ir.ui.view,arch_db:l10n_th_account_tax_multi.view_account_payment_register_form
msgid "Base"
msgstr ""

#. module: l10n_th_account_tax_multi
#: model:ir.model.fields,help:l10n_th_account_tax_multi.field_account_payment_deduction__wht_amount_base
msgid "Based amount for the tax amount"
msgstr ""

#. module: l10n_th_account_tax_multi
#. odoo-python
#: code:addons/l10n_th_account_tax_multi/wizard/account_payment_register.py:0
#, python-format
msgid "No effective PIT rate for date %s"
msgstr ""

#. module: l10n_th_account_tax_multi
#: model:ir.model.fields,help:l10n_th_account_tax_multi.field_account_payment_deduction__wht_tax_id
msgid "Optional hidden field to keep wht_tax. Useful for case 1 tax only"
msgstr ""

#. module: l10n_th_account_tax_multi
#: model:ir.model.fields,field_description:l10n_th_account_tax_multi.field_account_payment_deduction__partner_id
msgid "Partner"
msgstr ""

#. module: l10n_th_account_tax_multi
#: model:ir.model,name:l10n_th_account_tax_multi.model_account_payment_deduction
msgid "Payment Deduction"
msgstr ""

#. module: l10n_th_account_tax_multi
#: model:ir.model,name:l10n_th_account_tax_multi.model_account_payment_register
msgid "Register Payment"
msgstr ""

#. module: l10n_th_account_tax_multi
#: model_terms:ir.ui.view,arch_db:l10n_th_account_tax_multi.view_account_payment_register_form
msgid "WHT"
msgstr ""

#. module: l10n_th_account_tax_multi
#: model:ir.model.fields,field_description:l10n_th_account_tax_multi.field_account_payment_deduction__wht_amount_base
msgid "Withholding Base"
msgstr ""

#. module: l10n_th_account_tax_multi
#: model:ir.model.fields,field_description:l10n_th_account_tax_multi.field_account_payment_deduction__wht_tax_id
msgid "Withholding Tax"
msgstr ""
5 changes: 5 additions & 0 deletions l10n_th_account_tax_multi/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* `Ecosoft <http://ecosoft.co.th>`__:

* Kitti Upariphutthiphong <[email protected]>
* Komsan Somwong <[email protected]>
* Pimolnat Suntian <[email protected]>
1 change: 1 addition & 0 deletions l10n_th_account_tax_multi/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module supported multi withholding tax in invoice.
16 changes: 16 additions & 0 deletions l10n_th_account_tax_multi/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
From vendor bill that want to withholding tax,

- Create invoice and multi invoice lines.
- Fill withholding tax in Field WHT each invoice lines.
- Post > Register Payment.
- System will auto computed amount include multi withholding tax.

User can flag some line in deduction table, to keep some amount open.
i..e, 100.0 will be reduced from AR/AP account, in order to keep it open.

Step to keep some amount open.

- Create invoice and multi invoice lines.
- Fill withholding tax in Field WHT each invoice lines.
- Post > Register Payment > check Open in deduction table that you need keep it. > Post
- Next time, Register Payment > Fill amount residual manual > Post
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 282f8c3

Please sign in to comment.