From f9981f991012be7ea6c1af340d230e9fab494ed5 Mon Sep 17 00:00:00 2001 From: tong-odoo Date: Thu, 7 Sep 2023 10:12:10 +0000 Subject: [PATCH] [IMP] l10n_sg: adds new tax rates for 2024 SG Government has announced to change the GST-rate on 01 Jan 2024 MN from 8% to 9% Changes: - Added new taxes (8% -> 9%) - Added tax groups - Added migration script to l10n_sg to apply those changes task-3454556 closes odoo/odoo#145686 X-original-commit: 3d406214fb226ffe3aa222c422472bcc549a53cd Signed-off-by: Nicolas Viseur (vin) --- addons/l10n_sg/__manifest__.py | 2 +- .../data/template/account.account-sg.csv | 38 ++++++++-------- .../l10n_sg/data/template/account.tax-sg.csv | 44 +++++++++++++++++++ .../data/template/account.tax.group-sg.csv | 1 + .../2.2/post-migrate_update_taxes.py | 8 ++++ 5 files changed, 73 insertions(+), 20 deletions(-) create mode 100644 addons/l10n_sg/migrations/2.2/post-migrate_update_taxes.py diff --git a/addons/l10n_sg/__manifest__.py b/addons/l10n_sg/__manifest__.py index 28b7cec2371..fee2d369fa1 100644 --- a/addons/l10n_sg/__manifest__.py +++ b/addons/l10n_sg/__manifest__.py @@ -5,7 +5,7 @@ 'icon': '/account/static/description/l10n.png', 'countries': ['sg'], 'author': 'Tech Receptives', - 'version': '2.1', + 'version': '2.2', 'category': 'Accounting/Localizations/Account Charts', 'description': """ Singapore accounting chart and localization. diff --git a/addons/l10n_sg/data/template/account.account-sg.csv b/addons/l10n_sg/data/template/account.account-sg.csv index da7d053cff8..087b2b99e6f 100644 --- a/addons/l10n_sg/data/template/account.account-sg.csv +++ b/addons/l10n_sg/data/template/account.account-sg.csv @@ -37,19 +37,19 @@ "account_account_735","Trade Receivable Account","100010","asset_receivable","True" "account_account_736","Other Receivable Account","100020","asset_receivable","True" "account_account_737","Trade Receivable Account (PoS)","100030","asset_receivable","True" -"account_account_738","Purchase Tax Account 8% TX-N33","101260","asset_current","False" -"account_account_739","Purchase Tax Account 8% TX-E33","101270","asset_current","False" -"account_account_740","Purchase Tax Account 8% BL","101280","asset_current","False" -"account_account_741","Purchase Tax Account 8% IM","101290","asset_current","False" -"account_account_742","Purchase Tax Account 8% TX-RE","101300","asset_current","False" -"account_account_743","Purchase Tax Account 8% IGDS","101310","asset_current","False" -"account_account_744","Purchase Tax Account 0% NR","101320","asset_current","False" -"account_account_745","Purchase Tax Account 0% ZP","101330","asset_current","False" -"account_account_746","Purchase Tax Account 0% OP","101340","asset_current","False" -"account_account_747","Purchase Tax Account 0% EP","101350","asset_current","False" +"account_account_738","Purchase Tax Account TX-N33","101260","asset_current","False" +"account_account_739","Purchase Tax Account TX-E33","101270","asset_current","False" +"account_account_740","Purchase Tax Account BL","101280","asset_current","False" +"account_account_741","Purchase Tax Account IM","101290","asset_current","False" +"account_account_742","Purchase Tax Account TX-RE","101300","asset_current","False" +"account_account_743","Purchase Tax Account IGDS","101310","asset_current","False" +"account_account_744","Purchase Tax Account NR","101320","asset_current","False" +"account_account_745","Purchase Tax Account ZP","101330","asset_current","False" +"account_account_746","Purchase Tax Account OP","101340","asset_current","False" +"account_account_747","Purchase Tax Account EP","101350","asset_current","False" "account_account_748","Purchase Tax Account MES","101360","asset_current","False" -"account_account_749","Purchase Tax Account 8% TX8","101370","asset_current","False" -"account_account_750","Purchase Tax Account 8% TXCA","101380","asset_current","False" +"account_account_749","Purchase Tax Account TX8","101370","asset_current","False" +"account_account_750","Purchase Tax Account TXCA","101380","asset_current","False" "account_account_752","Current Portion of Employee Benefits Obligations","201000","liability_current","False" "account_account_753","Current Portion of Obligations under Finance Leases","201010","liability_current","False" "account_account_754","Current Tax Liability","201020","liability_current","False" @@ -85,14 +85,14 @@ "account_account_787","Retained Earnings","203070","equity","False" "account_account_788","Share Capital","203080","equity","False" "account_account_789","Treasury Shares","203090","equity","False" -"account_account_791","Sales Tax Account 0% ES33","201170","liability_current","False" -"account_account_792","Sales Tax Account 8% DS","201180","liability_current","False" -"account_account_793","Sales Tax Account 0% ESN33","201190","liability_current","False" -"account_account_794","Sales Tax Account 0% OS","201200","liability_current","False" -"account_account_795","Sales Tax Account 0% ZR","201210","liability_current","False" -"account_account_796","Sales Tax Account 8% SR","201220","liability_current","False" +"account_account_791","Sales Tax Account ES33","201170","liability_current","False" +"account_account_792","Sales Tax Account DS","201180","liability_current","False" +"account_account_793","Sales Tax Account ESN33","201190","liability_current","False" +"account_account_794","Sales Tax Account OS","201200","liability_current","False" +"account_account_795","Sales Tax Account ZR","201210","liability_current","False" +"account_account_796","Sales Tax Account SR","201220","liability_current","False" "account_account_797","Sales Tax Account SRCA-S","201230","liability_current","False" -"account_account_798","Sales Tax Account 8% SRCA-C","201240","liability_current","False" +"account_account_798","Sales Tax Account SRCA-C","201240","liability_current","False" "account_account_800","Discounts/Refunds -Given","300001","income","False" "account_account_801","Non-profit Revenue","300002","income","False" "account_account_802","Other Primary Revenue","300003","income","False" diff --git a/addons/l10n_sg/data/template/account.tax-sg.csv b/addons/l10n_sg/data/template/account.tax-sg.csv index 2f6344e8104..dc4c689a5ab 100644 --- a/addons/l10n_sg/data/template/account.tax-sg.csv +++ b/addons/l10n_sg/data/template/account.tax-sg.csv @@ -3,6 +3,10 @@ "","","","","","","","","","100","tax","invoice","+Box 6","account_account_796" "","","","","","","","","","100","base","refund","-Box 1","" "","","","","","","","","","100","tax","refund","-Box 6","account_account_796" +"sg_sale_tax_sr_9","9% SR","Sales Tax 9% SR","9% SR","False","9.0","percent","sale","tax_group_9","100","base","invoice","+Box 1","" +"","","","","","","","","","100","tax","invoice","+Box 6","account_account_796" +"","","","","","","","","","100","base","refund","-Box 1","" +"","","","","","","","","","100","tax","refund","-Box 6","account_account_796" "sg_sale_tax_es_0","0% ES33","Sales Tax 0% ES33","0% ES33","False","0.0","percent","sale","tax_group_0","100","base","invoice","+Box 3","" "","","","","","","","","","100","tax","invoice","","" "","","","","","","","","","100","base","refund","-Box 3","" @@ -15,6 +19,10 @@ "","","","","","","","","","100","tax","invoice","+Box 6","account_account_792" "","","","","","","","","","100","base","refund","-Box 1","" "","","","","","","","","","100","tax","refund","-Box 6","account_account_792" +"sg_sale_tax_ds_9","9% DS","Sales Tax 9% DS","9% DS","False","9.0","percent","sale","tax_group_9","100","base","invoice","+Box 1","" +"","","","","","","","","","100","tax","invoice","+Box 6","account_account_792" +"","","","","","","","","","100","base","refund","-Box 1","" +"","","","","","","","","","100","tax","refund","-Box 6","account_account_792" "sg_sale_tax_esn_0","0% ESN33","Sales Tax 0% ESN33","0% ESN33","False","0.0","percent","sale","tax_group_0","100","base","invoice","+Box 3","" "","","","","","","","","","100","tax","invoice","","" "","","","","","","","","","100","base","refund","-Box 3","" @@ -43,10 +51,18 @@ "","","","","","","","","","100","tax","invoice","+Box 6","account_account_798" "","","","","","","","","","100","base","refund","-Box 1","" "","","","","","","","","","100","tax","refund","-Box 6","account_account_798" +"sg_sale_tax_srca_c_9","9% SRCA-C","Sales Tax 9% SRCA-C","9% SRCA-C","False","9.0","percent","sale","tax_group_9","100","base","invoice","+Box 1","" +"","","","","","","","","","100","tax","invoice","+Box 6","account_account_798" +"","","","","","","","","","100","base","refund","-Box 1","" +"","","","","","","","","","100","tax","refund","-Box 6","account_account_798" "sg_purchase_tax_tx8_8","8% TX8","Purchase Tax 8% TX8","8% TX8","False","8.0","percent","purchase","tax_group_8","100","base","invoice","+Box 5","" "","","","","","","","","","100","tax","invoice","+Box 7","account_account_749" "","","","","","","","","","100","base","refund","-Box 5","" "","","","","","","","","","100","tax","refund","-Box 7","account_account_749" +"sg_purchase_tax_tx8_9","9% TX9","Purchase Tax 9% TX9","9% TX9","False","9.0","percent","purchase","tax_group_9","100","base","invoice","+Box 5","" +"","","","","","","","","","100","tax","invoice","+Box 7","account_account_749" +"","","","","","","","","","100","base","refund","-Box 5","" +"","","","","","","","","","100","tax","refund","-Box 7","account_account_749" "sg_purchase_tax_txn33_7","7% TX-N33","Purchase Tax 7% TX-N33","7% TX-N33","False","7.0","percent","purchase","tax_group_7","100","base","invoice","+Box 5","" "","","","","","","","","","100","tax","invoice","+Box 7","account_account_738" "","","","","","","","","","100","base","refund","-Box 5","" @@ -55,6 +71,10 @@ "","","","","","","","","","100","tax","invoice","+Box 7","account_account_738" "","","","","","","","","","100","base","refund","-Box 5","" "","","","","","","","","","100","tax","refund","-Box 7","account_account_738" +"sg_purchase_tax_txn33_9","9% TX-N33","Purchase Tax 9% TX-N33","9% TX-N33","False","9.0","percent","purchase","tax_group_9","100","base","invoice","+Box 5","" +"","","","","","","","","","100","tax","invoice","+Box 7","account_account_738" +"","","","","","","","","","100","base","refund","-Box 5","" +"","","","","","","","","","100","tax","refund","-Box 7","account_account_738" "sg_purchase_tax_txe33_7","7% TX-E33","Purchase Tax 7% TX-E33","7% TX-E33","False","7.0","percent","purchase","tax_group_7","100","base","invoice","+Box 5","" "","","","","","","","","","100","tax","invoice","+Box 7","account_account_739" "","","","","","","","","","100","base","refund","-Box 5","" @@ -63,6 +83,10 @@ "","","","","","","","","","100","tax","invoice","+Box 7","account_account_739" "","","","","","","","","","100","base","refund","-Box 5","" "","","","","","","","","","100","tax","refund","-Box 7","account_account_739" +"sg_purchase_tax_txe33_9","9% TX-E33","Purchase Tax 9% TX-E33","9% TX-E33","False","9.0","percent","purchase","tax_group_9","100","base","invoice","+Box 5","" +"","","","","","","","","","100","tax","invoice","+Box 7","account_account_739" +"","","","","","","","","","100","base","refund","-Box 5","" +"","","","","","","","","","100","tax","refund","-Box 7","account_account_739" "sg_purchase_tax_bl_7","7% BL","Purchase Tax 7% BL","7% BL","False","7.0","percent","purchase","tax_group_7","100","base","invoice","","" "","","","","","","","","","100","tax","invoice","","account_account_740" "","","","","","","","","","100","base","refund","","" @@ -71,6 +95,10 @@ "","","","","","","","","","100","tax","invoice","","account_account_740" "","","","","","","","","","100","base","refund","","" "","","","","","","","","","100","tax","refund","","account_account_740" +"sg_purchase_tax_bl_9","9% BL","Purchase Tax 9% BL","9% BL","False","9.0","percent","purchase","tax_group_9","100","base","invoice","","" +"","","","","","","","","","100","tax","invoice","","account_account_740" +"","","","","","","","","","100","base","refund","","" +"","","","","","","","","","100","tax","refund","","account_account_740" "sg_purchase_tax_im_7","7% IM","Purchase Tax 7% IM","7% IM","False","7.0","percent","purchase","tax_group_7","100","base","invoice","+Box 5","" "","","","","","","","","","100","tax","invoice","+Box 7","account_account_741" "","","","","","","","","","100","base","refund","-Box 5","" @@ -79,6 +107,10 @@ "","","","","","","","","","100","tax","invoice","+Box 7","account_account_741" "","","","","","","","","","100","base","refund","-Box 5","" "","","","","","","","","","100","tax","refund","-Box 7","account_account_741" +"sg_purchase_tax_im_9","9% IM","Purchase Tax 9% IM","9% IM","False","9.0","percent","purchase","tax_group_9","100","base","invoice","+Box 5","" +"","","","","","","","","","100","tax","invoice","+Box 7","account_account_741" +"","","","","","","","","","100","base","refund","-Box 5","" +"","","","","","","","","","100","tax","refund","-Box 7","account_account_741" "sg_purchase_tax_txre_7","7% TX-RE","Purchase Tax 7% TX-RE","7% TX-RE","False","7.0","percent","purchase","tax_group_7","100","base","invoice","+Box 5","" "","","","","","","","","","100","tax","invoice","+Box 7","account_account_742" "","","","","","","","","","100","base","refund","-Box 5","" @@ -87,6 +119,10 @@ "","","","","","","","","","100","tax","invoice","+Box 7","account_account_742" "","","","","","","","","","100","base","refund","-Box 5","" "","","","","","","","","","100","tax","refund","-Box 7","account_account_742" +"sg_purchase_tax_txre_9","9% TX-RE","Purchase Tax 9% TX-RE","9% TX-RE","False","9.0","percent","purchase","tax_group_9","100","base","invoice","+Box 5","" +"","","","","","","","","","100","tax","invoice","+Box 7","account_account_742" +"","","","","","","","","","100","base","refund","-Box 5","" +"","","","","","","","","","100","tax","refund","-Box 7","account_account_742" "sg_purchase_tax_me_0","7% IGDS","Purchase Tax 7% IGDS","7% IGDS","False","7.0","percent","purchase","tax_group_7","100","base","invoice","+Box 5","" "","","","","","","","","","100","tax","invoice","+Box 7","account_account_743" "","","","","","","","","","100","base","refund","-Box 5","" @@ -95,6 +131,10 @@ "","","","","","","","","","100","tax","invoice","+Box 7","account_account_743" "","","","","","","","","","100","base","refund","-Box 5","" "","","","","","","","","","100","tax","refund","-Box 7","account_account_743" +"sg_purchase_tax_igds_9","9% IGDS","Purchase Tax 9% IGDS","9% IGDS","False","9.0","percent","purchase","tax_group_9","100","base","invoice","+Box 5","" +"","","","","","","","","","100","tax","invoice","+Box 7","account_account_743" +"","","","","","","","","","100","base","refund","-Box 5","" +"","","","","","","","","","100","tax","refund","-Box 7","account_account_743" "sg_purchase_tax_nr_0","0% NR","Purchase Tax 0% NR","0% NR","False","0.0","percent","purchase","tax_group_0","100","base","invoice","","" "","","","","","","","","","100","tax","invoice","","" "","","","","","","","","","100","base","refund","","" @@ -127,3 +167,7 @@ "","","","","","","","","","100","tax","invoice","+Box 6||+Box 7","account_account_750" "","","","","","","","","","100","base","refund","-Box 1||-Box 5","" "","","","","","","","","","100","tax","refund","-Box 6||-Box 7","account_account_750" +"sg_purchase_tax_txca_9","9% TXCA","Purchase Tax 9% TXCA","9% TXCA","False","9.0","percent","purchase","tax_group_9","100","base","invoice","+Box 1||+Box 5","" +"","","","","","","","","","100","tax","invoice","+Box 6||+Box 7","account_account_750" +"","","","","","","","","","100","base","refund","-Box 1||-Box 5","" +"","","","","","","","","","100","tax","refund","-Box 6||-Box 7","account_account_750" diff --git a/addons/l10n_sg/data/template/account.tax.group-sg.csv b/addons/l10n_sg/data/template/account.tax.group-sg.csv index d418e78e491..4ed661928fb 100644 --- a/addons/l10n_sg/data/template/account.tax.group-sg.csv +++ b/addons/l10n_sg/data/template/account.tax.group-sg.csv @@ -1,4 +1,5 @@ "id","name","country_id" "tax_group_0","TAX 0%","base.sg" +"tax_group_9","TAX 9%","base.sg" "tax_group_8","TAX 8%","base.sg" "tax_group_7","TAX 7%","base.sg" diff --git a/addons/l10n_sg/migrations/2.2/post-migrate_update_taxes.py b/addons/l10n_sg/migrations/2.2/post-migrate_update_taxes.py new file mode 100644 index 00000000000..0e920fb0ede --- /dev/null +++ b/addons/l10n_sg/migrations/2.2/post-migrate_update_taxes.py @@ -0,0 +1,8 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +from odoo import api, SUPERUSER_ID + + +def migrate(cr, version): + env = api.Environment(cr, SUPERUSER_ID, {}) + for company in env['res.company'].search([('chart_template', '=', 'sg')]): + env['account.chart.template'].try_loading('sg', company)