From ff4ee2c17ed8ca4fd311070009846b744a526639 Mon Sep 17 00:00:00 2001 From: Pierre Rousseau Date: Thu, 4 Jan 2018 14:45:56 +0100 Subject: [PATCH] [IMP] l10n_sg: improved localisation Added Unique Entity Number (UEN) to company and partner to use them in the IRAS Audit File (l10n_sg_reports) Changed vat_label on Singapore Added new taxes (2019) Fixed the Chart of Account (account codes and types) Added 'Permit Number' and 'Permit Number Date' on invoices --- addons/l10n_sg/__init__.py | 2 +- addons/l10n_sg/__manifest__.py | 26 +- addons/l10n_sg/data/account_tax_data.xml | 78 ++- addons/l10n_sg/data/l10n_sg_chart_data.xml | 452 +++++++++--------- addons/l10n_sg/models/__init__.py | 8 + addons/l10n_sg/models/account_invoice.py | 11 + addons/l10n_sg/models/res_company.py | 9 + addons/l10n_sg/models/res_partner.py | 9 + addons/l10n_sg/views/account_invoice_view.xml | 16 + addons/l10n_sg/views/res_company_view.xml | 18 + addons/l10n_sg/views/res_partner_view.xml | 15 + odoo/addons/base/data/res_country_data.xml | 1 + 12 files changed, 405 insertions(+), 240 deletions(-) create mode 100644 addons/l10n_sg/models/__init__.py create mode 100644 addons/l10n_sg/models/account_invoice.py create mode 100644 addons/l10n_sg/models/res_company.py create mode 100644 addons/l10n_sg/models/res_partner.py create mode 100644 addons/l10n_sg/views/account_invoice_view.xml create mode 100644 addons/l10n_sg/views/res_company_view.xml create mode 100644 addons/l10n_sg/views/res_partner_view.xml diff --git a/addons/l10n_sg/__init__.py b/addons/l10n_sg/__init__.py index e2f7da260d0..db21f743bc4 100644 --- a/addons/l10n_sg/__init__.py +++ b/addons/l10n_sg/__init__.py @@ -2,7 +2,7 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2014 Tech Receptives (). - +from . import models def _preserve_tag_on_taxes(cr, registry): from odoo.addons.account.models.chart_template import preserve_existing_tags_on_taxes diff --git a/addons/l10n_sg/__manifest__.py b/addons/l10n_sg/__manifest__.py index 3520aca1721..13064a9c618 100644 --- a/addons/l10n_sg/__manifest__.py +++ b/addons/l10n_sg/__manifest__.py @@ -13,25 +13,21 @@ Singapore accounting chart and localization. ======================================================= -After installing this module, the Configuration wizard for accounting is launched. - * The Chart of Accounts consists of the list of all the general ledger accounts - required to maintain the transactions of Singapore. - * On that particular wizard, you will be asked to pass the name of the company, - the chart template to follow, the no. of digits to generate, the code for your - account and bank account, currency to create journals. - - * The Chart of Taxes would display the different types/groups of taxes such as - Standard Rates, Zeroed, Exempted, MES and Out of Scope. - * The tax codes are specified considering the Tax Group and for easy accessibility of - submission of GST Tax Report. +This module add, for accounting: + - The Chart of Accounts of Singapore + - Field UEN (Unique Entity Number) on company and partner + - Field PermitNo and PermitNoDate on invoice """, 'depends': ['base', 'account'], 'data': [ - 'data/l10n_sg_chart_data.xml', - 'data/account_data.xml', - 'data/account_tax_data.xml', - 'data/account_chart_template_data.xml', + 'data/l10n_sg_chart_data.xml', + 'data/account_data.xml', + 'data/account_tax_data.xml', + 'data/account_chart_template_data.xml', + 'views/account_invoice_view.xml', + 'views/res_company_view.xml', + 'views/res_partner_view.xml', ], 'post_init_hook': '_preserve_tag_on_taxes', } diff --git a/addons/l10n_sg/data/account_tax_data.xml b/addons/l10n_sg/data/account_tax_data.xml index e37eef5c499..3ca0a064296 100644 --- a/addons/l10n_sg/data/account_tax_data.xml +++ b/addons/l10n_sg/data/account_tax_data.xml @@ -56,7 +56,7 @@ taxes - Tax Paid @ 0% ME + Tax Paid @ 7% IGDS taxes @@ -164,7 +164,7 @@ taxes - Purchase 0% Standard ME + Purchase 7% Standard IGDS taxes @@ -191,6 +191,30 @@ Sales Out Of Scope taxes + + Tax Received SRCA-S + taxes + + + Tax Received @ 7% SRCA-C + taxes + + + Tax Paid @ 7% TXCA + taxes + + + Sales Standard SRCA-S + taxes + + + Sales 7% Standard SRCA-C + taxes + + + Purchase 7% Standard TXCA + taxes + @@ -278,6 +302,34 @@ + + Sales Tax SRCA-S + SRCA-S + + 0 + percent + sale + + + + + + + + + Sales Tax 7% SRCA-C + 7% SRCA-C + + 7 + percent + sale + + + + + + + @@ -351,17 +403,17 @@ - Purchase Tax 0% ME - 0% ME + Purchase Tax 7% IGDS + 7% IGDS - 0 + 7 percent purchase - + @@ -448,5 +500,19 @@ + + Purchase Tax 7% TXCA + 7% TXCA + + + + 7 + percent + purchase + + + + + diff --git a/addons/l10n_sg/data/l10n_sg_chart_data.xml b/addons/l10n_sg/data/l10n_sg_chart_data.xml index 67e93ce24f8..12fd0eed68e 100644 --- a/addons/l10n_sg/data/l10n_sg_chart_data.xml +++ b/addons/l10n_sg/data/l10n_sg_chart_data.xml @@ -4,15 +4,15 @@ Transfer Accounts - 100301 + 101100 Singapore Chart of Accounts - Standard - 1001 - 1002 + 10140 + 10141 6 @@ -23,24 +23,24 @@ - Allowance for bad debts - 101001 + Allowance for Bad Debts + 101110 - Development costs - 101002 - + Development Costs + 104100 + - Employee cash advances - 101003 + Employee Cash Advances + 101120 @@ -48,47 +48,47 @@ Inventory - 101004 + 101130 - Investments - other - 101005 + Investments - Other + 101140 - Loans to officers - 101006 + Loans to Officers + 101150 - Loans to others - 101007 + Loans to Others + 101160 - Loans to shareholders - 101008 + Loans to Shareholders + 101170 - Prepaid expenses - 101009 + Prepaid Expenses + 101180 @@ -96,15 +96,15 @@ Retainage - 101010 + 101190 - Undeposited funds - 101011 + Undeposited Funds + 101200 @@ -112,119 +112,119 @@ Other Current Assets - 101012 + 101210 - Accumulated amortisation - 102001 - + Accumulated Amortisation + 103100 + - Accumulated depreciation - 102002 - + Accumulated Depreciation + 103110 + - Accumulated depletion - 102003 - + Accumulated Depletion + 103120 + Buildings - 102004 - + 102100 + - Depletable assets - 102005 - + Depletable Assets + 102110 + - Furniture and fixtures - 102006 - + Furniture and Fixtures + 102120 + - Leasehold improvements - 102007 - + Leasehold Improvements + 102130 + - Machinery and equipment - 102008 - + Machinery and Equipment + 102140 + Vehicles - 102009 - + 102150 + Other Assets - 102010 - + 102160 + Intangible Assets - 103001 - + 104110 + - Accumulated amortization of non-current assets - 103002 - + Accumulated Amortization of Non-current Assets + 103130 + - Available-for-sale financial assets - 103003 + Available-for-sale Financial Assets + 101220 - Deferred tax - 103004 + Deferred Tax + 101230 @@ -232,63 +232,63 @@ Goodwill - 103005 - + 104120 + Investments - 103006 - + 104130 + Lease Buyout - 103007 - + 104140 + Licences - 103008 - + 104150 + - Organisational costs - 103009 - + Organisational Costs + 104160 + - Other intangible assets - 103010 - + Other Intangible Assets + 104170 + - Other non-current assets - 103011 - + Other Non-current Assets + 104180 + - Prepayments and accrued income - 103012 + Prepayments and Accrued Income + 101240 @@ -296,23 +296,15 @@ Security Deposits - 103013 + 101250 - - - Other non-current assets - 103014 - - - - - + Trade Receivable Account - 104001 + 100010 @@ -320,7 +312,7 @@ Other Receivable Account - 104002 + 100020 @@ -328,7 +320,7 @@ Purchase Tax Account 7% TX-N33 - 105001 + 101260 @@ -336,7 +328,7 @@ Purchase Tax Account 7% TX-E33 - 105002 + 101270 @@ -344,7 +336,7 @@ Purchase Tax Account 7% BL - 105003 + 101280 @@ -352,7 +344,7 @@ Purchase Tax Account 7% IM - 105004 + 101290 @@ -360,15 +352,15 @@ Purchase Tax Account 7% TX-RE - 105005 + 101300 - Purchase Tax Account 0% ME - 105006 + Purchase Tax Account 7% IGDS + 101310 @@ -376,7 +368,7 @@ Purchase Tax Account 0% NR - 105007 + 101320 @@ -384,7 +376,7 @@ Purchase Tax Account 0% ZP - 105008 + 101330 @@ -392,7 +384,7 @@ Purchase Tax Account 0% OP - 105009 + 101340 @@ -400,7 +392,7 @@ Purchase Tax Account 0% EP - 105010 + 101350 @@ -408,7 +400,7 @@ Purchase Tax Account MES - 105011 + 101360 @@ -416,23 +408,31 @@ Purchase Tax Account 7% TX7 - 105012 + 101370 + + + + + + + Purchase Tax Account 7% TXCA + 101380 - Current portion of employee benefits obligations - 200001 + Current Portion of Employee Benefits Obligations + 201000 - Current portion of obligations under finance leases - 200002 + Current Portion of Obligations under Finance Leases + 201010 @@ -440,7 +440,7 @@ Current Tax Liability - 200003 + 201020 @@ -448,15 +448,15 @@ Insurance Payable - 200004 + 201030 - Interest payables - 200005 + Interest Payables + 201040 @@ -464,7 +464,7 @@ Line of Credit - 200006 + 201050 @@ -472,7 +472,7 @@ Loan Payable - 200007 + 201060 @@ -480,15 +480,15 @@ Payroll Clearing - 200008 + 201070 - Payroll liabilities - 200009 + Payroll Liabilities + 201080 @@ -496,23 +496,23 @@ Prepaid Expenses Payable - 200010 + 201090 - Provision for warranty obligations - 200011 + Provision for Warranty Obligations + 201100 - Rents in trust - Liability - 200012 + Rents in Trust - Liability + 201110 @@ -520,15 +520,15 @@ GST Payable - 200013 + 201120 - Short term borrowings - 200014 + Short Term Borrowings + 201130 @@ -536,7 +536,7 @@ Client Trust Accounts - Liabilities - 200015 + 201140 @@ -544,71 +544,71 @@ Accruals and Deferred Income - 201001 + 201150 - Bank loans - 201002 - + Bank Loans + 202000 + - Obligations under finance leases - 201003 + Obligations under Finance Leases + 201160 - Long term borrowings - 201004 - + Long Term Borrowings + 202010 + - Long term employee benefit obligations - 201005 - + Long Term Employee Benefit Obligations + 202020 + Notes Payable - 201006 - + 202030 + Shareholder Notes Payable - 201007 - + 202040 + - Other non-current liabilities - 201008 - + Other Non-current Liabilities + 202050 + Trade Payable Account - 202001 + 200010 @@ -616,7 +616,7 @@ Other Payable Account - 202002 + 200020 @@ -624,7 +624,7 @@ Partner's Equity - 203001 + 203000 @@ -632,15 +632,15 @@ Accumulated Adjustment - 203002 + 203010 - Ordinary shares - 203003 + Ordinary Shares + 203020 @@ -648,7 +648,7 @@ Opening Balance Equity - 203004 + 203030 @@ -656,23 +656,23 @@ Owner's Equity - 203005 + 203040 - Paid-in capital or surplus - 203006 + Paid-in Capital or Surplus + 203050 - Preferred shares - 203007 + Preferred Shares + 203060 @@ -680,15 +680,15 @@ Retained Earnings - 203008 + 203070 - Share capital - 203009 + Share Capital + 203080 @@ -696,7 +696,7 @@ Treasury Shares - 203010 + 203090 @@ -704,7 +704,7 @@ Sales Tax Account 0% ES33 - 204001 + 201170 @@ -712,7 +712,7 @@ Sales Tax Account 7% DS - 204002 + 201180 @@ -720,7 +720,7 @@ Sales Tax Account 0% ESN33 - 204003 + 201190 @@ -728,7 +728,7 @@ Sales Tax Account 0% OS - 204004 + 201200 @@ -736,7 +736,7 @@ Sales Tax Account 0% ZR - 204005 + 201210 @@ -744,14 +744,30 @@ Sales Tax Account 7% SR - 204006 + 201220 + + + + + + + Sales Tax Account SRCA-S + 201230 + + + + + + + Sales Tax Account 7% SRCA-C + 201240 - Discounts/refunds given + Discounts/Refunds -Given 300001 @@ -759,7 +775,7 @@ - Non-profit revenue + Non-profit Revenue 300002 @@ -767,7 +783,7 @@ - Other primary revenue + Other Primary Revenue 300003 @@ -775,7 +791,7 @@ - Sales of product revenue + Sales of Product Revenue 300004 @@ -783,7 +799,7 @@ - Service/fee revenue + Service/Fee Revenue 300005 @@ -791,7 +807,7 @@ - Unapplied cash payment income + Unapplied Cash Payment Income 300006 @@ -799,49 +815,49 @@ - Dividend revenue + Dividend Revenue 301001 - + - Gain/loss on sale of fixed assets or investments + Gain/Loss on Sale of Fixed Assets or Investments 301002 - + - Interest earned + Interest Earned 301003 - + - Other investment revenue + Other Investment Revenue 301004 - + - Other miscellaneous revenue + Other Miscellaneous Revenue 301005 - + - Tax-exempt interest + Tax-exempt Interest 301006 - + @@ -849,45 +865,45 @@ Cost of Labour - COS 401001 - + - Equipment rental - COS + Equipment Rental - COS 401002 - + - Freight and delivery - COS + Freight and Delivery - COS 401003 - + - Other costs of sales - COS + Other Costs of Sales - COS 401004 - + - Supplies and materials - COS + Supplies and Materials - COS 401005 - + - Administrative expenses + Administrative Expenses 501001 @@ -895,7 +911,7 @@ - Advertising/promotional + Advertising/Promotional 501002 @@ -911,7 +927,7 @@ - Bad debts + Bad Debts 501004 @@ -919,7 +935,7 @@ - Bank charges + Bank Charges 501005 @@ -927,7 +943,7 @@ - Charitable contributions + Charitable Contributions 501006 @@ -935,7 +951,7 @@ - Cost of labour + Cost of Labour 501007 @@ -943,7 +959,7 @@ - Distribution costs + Distribution Costs 501008 @@ -951,7 +967,7 @@ - Dues and subscriptions + Dues and Subscriptions 501009 @@ -967,7 +983,7 @@ - Meals and entertainment + Meals and Entertainment 501011 @@ -975,7 +991,7 @@ - Equipment rental + Equipment Rental 501012 @@ -983,7 +999,7 @@ - Finance costs + Finance Costs 501013 @@ -999,7 +1015,7 @@ - Interest paid + Interest Paid 501015 @@ -1007,7 +1023,7 @@ - Legal and professional fees + Legal and Professional Fees 501016 @@ -1015,7 +1031,7 @@ - Other miscellaneous service cost + Other Miscellaneous Service Cost 501017 @@ -1023,7 +1039,7 @@ - Payroll expenses + Payroll Expenses 501018 @@ -1031,7 +1047,7 @@ - Promotional meals + Promotional Meals 501019 @@ -1039,7 +1055,7 @@ - Rent or lease of buildings + Rent or Lease of Buildings 501020 @@ -1047,7 +1063,7 @@ - Repair and maintenance + Repair and Maintenance 501021 @@ -1055,7 +1071,7 @@ - Shipping, freight, and delivery + Shipping, Freight, and Delivery 501022 @@ -1071,7 +1087,7 @@ - Taxes paid + Taxes Paid 501024 @@ -1087,7 +1103,7 @@ - Travel meals + Travel Meals 501026 @@ -1103,7 +1119,7 @@ - Unapplied cash bill payment expense + Unapplied Cash Bill Payment Expense 501028 @@ -1143,7 +1159,7 @@ - Penalties and settlements + Penalties and Settlements 502005 diff --git a/addons/l10n_sg/models/__init__.py b/addons/l10n_sg/models/__init__.py new file mode 100644 index 00000000000..a4f534641a6 --- /dev/null +++ b/addons/l10n_sg/models/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +# Copyright (C) 2014 Tech Receptives (). + +from . import account_invoice +from . import res_company +from . import res_partner diff --git a/addons/l10n_sg/models/account_invoice.py b/addons/l10n_sg/models/account_invoice.py new file mode 100644 index 00000000000..3821eb7c69e --- /dev/null +++ b/addons/l10n_sg/models/account_invoice.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from odoo import fields, models + +class AccountInvoice(models.Model): + _name = 'account.invoice' + _inherit = 'account.invoice' + + l10n_sg_permit_number = fields.Char(string="Permit No.") + + l10n_sg_permit_number_date = fields.Date(string="Date of permit number") diff --git a/addons/l10n_sg/models/res_company.py b/addons/l10n_sg/models/res_company.py new file mode 100644 index 00000000000..c894cf1a1a9 --- /dev/null +++ b/addons/l10n_sg/models/res_company.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +from odoo import fields, models + +class ResCompany(models.Model): + _name = 'res.company' + _inherit = 'res.company' + + l10n_sg_unique_entity_number = fields.Char(string='UEN', related="partner_id.l10n_sg_unique_entity_number") diff --git a/addons/l10n_sg/models/res_partner.py b/addons/l10n_sg/models/res_partner.py new file mode 100644 index 00000000000..1bf9802a9a5 --- /dev/null +++ b/addons/l10n_sg/models/res_partner.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +from odoo import fields, models + +class ResPartner(models.Model): + _name = 'res.partner' + _inherit = 'res.partner' + + l10n_sg_unique_entity_number = fields.Char(string='UEN') diff --git a/addons/l10n_sg/views/account_invoice_view.xml b/addons/l10n_sg/views/account_invoice_view.xml new file mode 100644 index 00000000000..5987650a7a9 --- /dev/null +++ b/addons/l10n_sg/views/account_invoice_view.xml @@ -0,0 +1,16 @@ + + + + + l10n_sg.invoice.form + account.invoice + + + + + + + + + + diff --git a/addons/l10n_sg/views/res_company_view.xml b/addons/l10n_sg/views/res_company_view.xml new file mode 100644 index 00000000000..0d012bd4621 --- /dev/null +++ b/addons/l10n_sg/views/res_company_view.xml @@ -0,0 +1,18 @@ + + + + + l10n_sg.company.form + res.company + + + + + + + GST No. + + + + + diff --git a/addons/l10n_sg/views/res_partner_view.xml b/addons/l10n_sg/views/res_partner_view.xml new file mode 100644 index 00000000000..c1c7ac47f79 --- /dev/null +++ b/addons/l10n_sg/views/res_partner_view.xml @@ -0,0 +1,15 @@ + + + + + l10n_sg.partner.form + res.partner + + + + + + + + + diff --git a/odoo/addons/base/data/res_country_data.xml b/odoo/addons/base/data/res_country_data.xml index 031af455c5b..bdc333b8610 100644 --- a/odoo/addons/base/data/res_country_data.xml +++ b/odoo/addons/base/data/res_country_data.xml @@ -1415,6 +1415,7 @@ + GST No. Saint Helena, Ascension and Tristan da Cunha