From 31566dfe2903138fa5cd7667e071201dbf47ea42 Mon Sep 17 00:00:00 2001 From: "Nicolas Viseur (vin)" Date: Wed, 27 Sep 2023 14:10:02 +0800 Subject: [PATCH] [IMP] l10n_my: add tax report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds the SST-02 tax report to the Malaysian localisation Task id # 2868179 closes odoo/odoo#140030 Signed-off-by: de Wouters de Bouchout Jean-BenoƮt (jbw) --- addons/l10n_my/__manifest__.py | 5 +- .../l10n_my/data/account_tax_report_data.xml | 148 ++++++++++++++++++ .../l10n_my/data/template/account.tax-my.csv | 18 +-- addons/l10n_my/i18n/l10n_my.pot | 101 ++++++++++++ addons/l10n_my/i18n/ms_MY.po | 101 ++++++++++++ .../1.1/post-migrate_update_taxes.py | 9 ++ 6 files changed, 372 insertions(+), 10 deletions(-) create mode 100644 addons/l10n_my/data/account_tax_report_data.xml create mode 100644 addons/l10n_my/i18n/l10n_my.pot create mode 100644 addons/l10n_my/i18n/ms_MY.po create mode 100644 addons/l10n_my/migrations/1.1/post-migrate_update_taxes.py diff --git a/addons/l10n_my/__manifest__.py b/addons/l10n_my/__manifest__.py index e0f6a7ea015..256ec7b8730 100644 --- a/addons/l10n_my/__manifest__.py +++ b/addons/l10n_my/__manifest__.py @@ -5,7 +5,7 @@ 'icon': '/account/static/description/l10n.png', 'countries': ['my'], 'author': 'Odoo PS', - 'version': '1.0', + 'version': '1.1', 'category': 'Accounting/Localizations/Account Charts', 'description': """ This is the base module to manage the accounting chart for Malaysia in Odoo. @@ -14,6 +14,9 @@ This is the base module to manage the accounting chart for Malaysia in Odoo. 'depends': [ 'account', ], + 'data': [ + 'data/account_tax_report_data.xml', + ], 'demo': [ 'demo/demo_company.xml', ], diff --git a/addons/l10n_my/data/account_tax_report_data.xml b/addons/l10n_my/data/account_tax_report_data.xml new file mode 100644 index 00000000000..ce3dfc1d81e --- /dev/null +++ b/addons/l10n_my/data/account_tax_report_data.xml @@ -0,0 +1,148 @@ + + + + SST-02 (B2) + + + + country + + + Balance + balance + + + + + 11) Total Value of Tax Payable as Per Tax Rate + 0 + + + a) Taxable Goods at 5% Rate + SST_5 + + + balance + tax_tags + A + + + + + b) Taxable Goods at 10% Rate + SST_10 + + + balance + tax_tags + B + + + + + c) Taxable Services other than from Group H + SST_6 + + + balance + tax_tags + C + + + + + d) Taxable Services from Group H + SST_H + + + balance + tax_tags + D + + + + + + + 12) Total Value of Tax Payable + 0 + SST_PTV + SST_5.balance + SST_10.balance + SST_6.balance + SST_H.balance + + + 13) Amount of Tax Deduction + 0 + + + a) Tax Deduction from Credit Note + SST_CN + + + balance + tax_tags + CN + + + + + b) Sales Tax Deduction + SST_SAD + + + balance + tax_tags + SAD + + + + + c) Service Tax Deduction + SST_SED + + + balance + tax_tags + SED + + + + + + + 13A) Adjustment under Sales Tax Deduction + 0 + SST_TDA + + + balance + tax_tags + DA + + + + + 14) Total Tax Payable Before Penalty Imposed + 0 + SST_PTBP + SST_PTV.balance - SST_CN.balance + SST_SAD.balance + SST_SED.balance + SST_TDA.balance + + + 15) Penalty Rate / Penalty Amount + 0 + SST_P + + + balance + tax_tags + P + + + + + 16) Total of Tax Payable Inclusive Penalty + 0 + SST_PTBP.balance + SST_P.balance + + + + diff --git a/addons/l10n_my/data/template/account.tax-my.csv b/addons/l10n_my/data/template/account.tax-my.csv index 612ef5cb6a4..a1fe7d8552d 100644 --- a/addons/l10n_my/data/template/account.tax-my.csv +++ b/addons/l10n_my/data/template/account.tax-my.csv @@ -1,13 +1,13 @@ -"id","description","sequence","name","invoice_label","type_tax_use","amount_type","tax_scope","amount","price_include","tax_group_id","repartition_line_ids/factor_percent","repartition_line_ids/repartition_type","repartition_line_ids/document_type","repartition_line_ids/account_id" +"id","description","sequence","name","invoice_label","type_tax_use","amount_type","tax_scope","amount","price_include","tax_group_id","repartition_line_ids/factor_percent","repartition_line_ids/repartition_type","repartition_line_ids/document_type","repartition_line_ids/account_id","repartition_line_ids/tag_ids" "l10n_my_tax_sale_5","SST 5%","1","5%","5%","sale","percent","consu","5.0","False","tax_group_sst","100","base","invoice","" -"","","","","","","","","","","","100","tax","invoice","l10n_my_2213" +"","","","","","","","","","","",100,"tax","invoice","l10n_my_2213","+A" +"","","","","","","","","","","","100",base,"refund", +"","","","","","","","","","","","100","tax","refund","l10n_my_2213","+CN" +"l10n_my_tax_sale_6","SST 6%","1","6%","6%","sale","percent","service","6.0","False","tax_group_sst",100,"base","invoice","" +"","","","","","","","","","","","100","tax","invoice","l10n_my_2213","+C" "","","","","","","","","","","","100","base","refund","" -"","","","","","","","","","","","100","tax","refund","l10n_my_2213" -"l10n_my_tax_sale_6","SST 6%","1","6%","6%","sale","percent","service","6.0","False","tax_group_sst","100","base","invoice","" -"","","","","","","","","","","","100","tax","invoice","l10n_my_2213" -"","","","","","","","","","","","100","base","refund","" -"","","","","","","","","","","","100","tax","refund","l10n_my_2213" +"","","","","","","","","","","","100","tax","refund","l10n_my_2213","+CN" "l10n_my_tax_sale_10","SST 10%","1","10%","10%","sale","percent","consu","10.0","False","tax_group_sst","100","base","invoice","" -"","","","","","","","","","","","100","tax","invoice","l10n_my_2213" +"","","","","","","","","","","","100","tax","invoice","l10n_my_2213","+B" "","","","","","","","","","","","100","base","refund","" -"","","","","","","","","","","","100","tax","refund","l10n_my_2213" +"","","","","","","","","","","","100","tax","refund","l10n_my_2213","+CN" diff --git a/addons/l10n_my/i18n/l10n_my.pot b/addons/l10n_my/i18n/l10n_my.pot new file mode 100644 index 00000000000..16ede22744a --- /dev/null +++ b/addons/l10n_my/i18n/l10n_my.pot @@ -0,0 +1,101 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_my +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-02 11:38+0000\n" +"PO-Revision-Date: 2023-11-02 11:38+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_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_taxable_per_rate +msgid "11) Total Value of Tax Payable as Per Tax Rate" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_payable_total_value +msgid "12) Total Value of Tax Payable" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_deduction +msgid "13) Amount of Tax Deduction" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_deduction_adjustment +msgid "13A) Adjustment under Sales Tax Deduction" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_payable_total_before_penalty +msgid "14) Total Tax Payable Before Penalty Imposed" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_penalty_amount +msgid "15) Penalty Rate / Penalty Amount" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_total_including_penalty +msgid "16) Total of Tax Payable Inclusive Penalty" +msgstr "" + +#. module: l10n_my +#: model:ir.model,name:l10n_my.model_account_chart_template +msgid "Account Chart Template" +msgstr "" + +#. module: l10n_my +#: model:account.report.column,name:l10n_my.l10n_my_tax_report_balance +msgid "Balance" +msgstr "" + +#. module: l10n_my +#: model:account.report,name:l10n_my.tax_report_vat +msgid "SST-02 (B2)" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_deduction_from_cn +msgid "a) Tax Deduction from Credit Note" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_taxable_5 +msgid "a) Taxable Goods at 5% Rate" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_sale_tax_deduction +msgid "b) Sales Tax Deduction" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_taxable_10 +msgid "b) Taxable Goods at 10% Rate" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_service_tax_deduction +msgid "c) Service Tax Deduction" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_services_other_than_group_h +msgid "c) Taxable Services other than from Group H" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_services_group_h +msgid "d) Taxable Services from Group H" +msgstr "" diff --git a/addons/l10n_my/i18n/ms_MY.po b/addons/l10n_my/i18n/ms_MY.po new file mode 100644 index 00000000000..860faa2720e --- /dev/null +++ b/addons/l10n_my/i18n/ms_MY.po @@ -0,0 +1,101 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_my +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-02 11:39+0000\n" +"PO-Revision-Date: 2023-11-02 11:39+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_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_taxable_per_rate +msgid "11) Total Value of Tax Payable as Per Tax Rate" +msgstr "11) Jumlah Nilai Jualan dan Cukai Yang Kena dibayar Mengikut Kadar Cukai" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_payable_total_value +msgid "12) Total Value of Tax Payable" +msgstr "12) Jumlah Nilai Cukai Yang Kena Dibayar" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_deduction +msgid "13) Amount of Tax Deduction" +msgstr "13) Amaun Potongan Cukai" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_deduction_adjustment +msgid "13A) Adjustment under Sales Tax Deduction" +msgstr "13A) Pelarasan di bawah Potong Cukai Jualan" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_payable_total_before_penalty +msgid "14) Total Tax Payable Before Penalty Imposed" +msgstr "14) Jumlah Cukai Yang Kena Dibayar Seblum Penalti Dikenakan" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_penalty_amount +msgid "15) Penalty Rate / Penalty Amount" +msgstr "15) Kadar Penalti" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_total_including_penalty +msgid "16) Total of Tax Payable Inclusive Penalty" +msgstr "16) Jumlah Cukai Kena Dibayar Termasuk Penalti" + +#. module: l10n_my +#: model:ir.model,name:l10n_my.model_account_chart_template +msgid "Account Chart Template" +msgstr "" + +#. module: l10n_my +#: model:account.report.column,name:l10n_my.l10n_my_tax_report_balance +msgid "Balance" +msgstr "" + +#. module: l10n_my +#: model:account.report,name:l10n_my.tax_report_vat +msgid "SST-02 (B2)" +msgstr "" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_tax_deduction_from_cn +msgid "a) Tax Deduction from Credit Note" +msgstr "a) Potongan Cukai Melalui Nota Kredit" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_taxable_5 +msgid "a) Taxable Goods at 5% Rate" +msgstr "a) Barang Bercukai Berkadar 5%" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_sale_tax_deduction +msgid "b) Sales Tax Deduction" +msgstr "b) Potongan Cukai Jualan" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_taxable_10 +msgid "b) Taxable Goods at 10% Rate" +msgstr "b) Barang Bercukai Berkadar 10%" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_service_tax_deduction +msgid "c) Service Tax Deduction" +msgstr "c) Potongan Cukai Perkhidmatan" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_services_other_than_group_h +msgid "c) Taxable Services other than from Group H" +msgstr "c) Perkhidmatan Bercukai selain dari Kumpulan H" + +#. module: l10n_my +#: model:account.report.line,name:l10n_my.l10n_my_sst_services_group_h +msgid "d) Taxable Services from Group H" +msgstr "d) Perkhidmatan Bercukai dari Kumpulan H" diff --git a/addons/l10n_my/migrations/1.1/post-migrate_update_taxes.py b/addons/l10n_my/migrations/1.1/post-migrate_update_taxes.py new file mode 100644 index 00000000000..8fa2c521919 --- /dev/null +++ b/addons/l10n_my/migrations/1.1/post-migrate_update_taxes.py @@ -0,0 +1,9 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +from odoo import api, SUPERUSER_ID + + +def migrate(cr, version): + """ Update taxes for existing companies, in order to apply the new tags to them. """ + env = api.Environment(cr, SUPERUSER_ID, {}) + for company in env['res.company'].search([('chart_template', '=', 'my')]): + env['account.chart.template'].try_loading('my', company)