diff --git a/addons/l10n_mu_account/__init__.py b/addons/l10n_mu_account/__init__.py new file mode 100644 index 00000000000..d581b39cea7 --- /dev/null +++ b/addons/l10n_mu_account/__init__.py @@ -0,0 +1,2 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +from . import models diff --git a/addons/l10n_mu_account/__manifest__.py b/addons/l10n_mu_account/__manifest__.py new file mode 100644 index 00000000000..76bcc81acf8 --- /dev/null +++ b/addons/l10n_mu_account/__manifest__.py @@ -0,0 +1,27 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +{ + "name": "Mauritius - Accounting", + "version": "1.0", + 'countries': ['mu'], + "category": "Accounting/Localizations/Account Charts", + "description": """ +This is the base module to manage the accounting chart for the Republic of Mauritius in Odoo. +============================================================================================== + - Chart of accounts + - Taxes + - Fiscal positions + - Default settings + """, + "author": "Odoo SA", + "depends": [ + "account", + ], + "data": [ + "data/tax_report-mu.xml", + "views/report_invoice.xml", + ], + "demo": [ + "demo/demo_company.xml", + ], + "license": "LGPL-3", +} diff --git a/addons/l10n_mu_account/data/tax_report-mu.xml b/addons/l10n_mu_account/data/tax_report-mu.xml new file mode 100644 index 00000000000..ad65f5cdd58 --- /dev/null +++ b/addons/l10n_mu_account/data/tax_report-mu.xml @@ -0,0 +1,472 @@ + + + + VAT3 Tax Report + + + + country + + + Percent + percent + percentage + + + Value + value + + + VAT + vat + + + + + OUTPUT + 0 + + + 1. Taxable supplies + + + 1.1. Zero-rated supplies (Exports) + T1_1 + + + value + tax_tags + T1_1_value + + + + + 1.2. Zero-rated supplies other than exports + T1_2 + + + value + tax_tags + T1_2_value + + + + + 1.3. Taxable supplies made to exempt bodies or persons + T1_3 + + + value + tax_tags + T1_3_value + + + + + 1.4. Other taxable supplies + T1_4 + + + value + tax_tags + T1_4_value + + + vat + tax_tags + T1_4_vat + + + + + + + 2. Deferred VAT on importations + T2 + + + vat + tax_tags + T2_vat + + + + + 3. Exempt supplies + T3 + + + value + tax_tags + T3_value + + + + + 4. Penalty on excess amount overclaimed + T4 + + + vat + external + sum + editable;rounding=2 + + + + + 5. Total + T5 + + + value + aggregation + T1_1.value + T1_2.value + T1_3.value + T1_4.value + T3.value + + + vat + aggregation + T1_4.vat + T2.vat + T4.vat + + + + + + + INPUT - Imports and Purchases + 0 + + + 6. Taxable input on which input tax is allowed as credit + + + 6.1. Capital goods imported + T6_1 + + + value + tax_tags + T6_1_value + + + vat + tax_tags + T6_1_vat + + + + + 6.2. Zero-rated imports + T6_2 + + + value + tax_tags + T6_2_value + + + + + 6.3. Other imports + T6_3 + + + value + tax_tags + T6_3_value + + + vat + tax_tags + T6_3_vat + + + + + 6.4. Capital goods purchased locally + T6_4 + + + value + tax_tags + T6_4_value + + + vat + tax_tags + T6_4_vat + + + + + 6.5. Zero-rated goods and services purchased locally + T6_5 + + + value + tax_tags + T6_5_value + + + + + 6.6. Other goods and services purchased locally + T6_6 + + + value + tax_tags + T6_6_value + + + vat + tax_tags + T6_6_vat + + + + + + + 7. Taxable input on which no input tax is allowed as credit + T7 + + + value + external + sum + editable;rounding=2 + + + + + 8. Exempt input + + + 8.1. Imported goods + T8_1 + + + value + tax_tags + T8_1_value + + + + + 8.2. Goods and services purchased locally + T8_2 + + + value + tax_tags + T8_2_value + + + + + + + 9. Total + T9 + + + value + aggregation + T6_1.value + T6_2.value + T6_3.value + T6_4.value + T6_5.value + T6_6.value + T7.value + T8_1.value + T8_2.value + + + vat + aggregation + T6_1.vat + T6_3.vat + T6_4.vat + T6_6.vat + + + + + 10. Input tax deductible + T10 + + + vat + aggregation + T6_1.vat + T6_6.vat + + + + + + + VAT ACCOUNT + 0 + + + 11. VAT due and payable / (Excess VAT) (5B minus 10B) + T11 + + + vat + aggregation + T5.vat - T10.vat + + + + + 12. Excess amount of VAT brought forward + T12 + + + _applied_carryover_balance + external + most_recent + previous_tax_period + + + tag + tax_tags + T12_tag + + + vat + aggregation + T12.tag + T12._applied_carryover_balance + + + + + 13. VAT adjustment: Increase /(Decrease) + T13 + + + vat + external + sum + editable;rounding=2 + + + + + 14. VAT due and payable / (Excess VAT) + T14 + + + vat + aggregation + T11.vat - T12.vat + T13.vat + + + + + 15. Claim for repayment of VAT - Proportion claimable + T15 + + + _rounded + aggregation + (T1_1.value + T1_2.value) / (T5.value - T3.value) * 100 + round(0) + + + percent + aggregation + T15._rounded + if_other_expr_below(T14.vat, MUR(0)) + percentage + + + + + 15.1. On capital goods + T15_1 + + + value + external + sum + editable;rounding=2 + + + + + 15.2. In respect of other goods and services + T15_2 + + + value + external + sum + editable;rounding=2 + + + + + 15.3. Total repayment claimed + T15_3 + + + vat + aggregation + (T15.percent / 100) * (T15_1.value + T15_2.value) + if_other_expr_below(T14.vat, MUR(0)) + + + + + + + 16. Excess VAT carried forward + T16 + + + vat + aggregation + T14.vat + T15_3.vat + + + _carryover_balance + aggregation + T16.vat + T12._applied_carryover_balance + + + + + + 17. Penalty for submission after due date + T17 + + + vat + external + sum + editable;rounding=2 + + + + + 18. Penalty and interest for payment of VAT after due date + T18 + + + vat + external + sum + editable;rounding=2 + + + + + 19. Total VAT / Penalties / Interests due and payable + T19 + + + vat + aggregation + T16.vat + T17.vat + T18.vat + + + + + + + + diff --git a/addons/l10n_mu_account/data/template/account.account-mu.csv b/addons/l10n_mu_account/data/template/account.account-mu.csv new file mode 100644 index 00000000000..6012ec5b41f --- /dev/null +++ b/addons/l10n_mu_account/data/template/account.account-mu.csv @@ -0,0 +1,41 @@ +"id","name","code","account_type","tag_ids","reconcile" +"mu_current_assets","Current Assets","1010","asset_current","","False" +"mu_stock_in","Stock Interim (Received)","1102","asset_current","","True" +"mu_stock_valuation","Stock Valuation","1101","asset_current","","False" +"mu_stock_out","Stock Interim (Delivered)","1103","asset_current","","True" +"mu_cost_of_production","Cost of Production","1104","asset_current","","True" +"mu_receivable","Account Receivable","1210","asset_receivable","","True" +"mu_pos_receivable","Account Receivable (PoS)","122O","asset_receivable","","True" +"mu_to_receive_rec","Products to receive","1230","asset_current","","True" +"mu_tax_paid","Tax Paid","1310","asset_current","","False" +"mu_tax_receivable","Tax Receivable","1320","asset_current","","False" +"mu_prepayments","Prepayments","1410","asset_prepayments","","False" +"mu_fixed_assets","Fixed Asset","1510","asset_fixed","","False" +"mu_non_current_assets","Non-current assets","1910","asset_non_current","","False" +"mu_current_liabilities","Current Liabilities","2010","liability_current","","False" +"mu_payable","Account Payable","2110","liability_payable","","True" +"mu_to_receive_pay","Bills to receive","2111","liability_current","","True" +"mu_salary_payable","Salary Payable","2300","liability_current","","True" +"mu_employee_payroll_taxes","Employee Payroll Taxes","2301","liability_current","","True" +"mu_employer_payroll_taxes","Employer Payroll Taxes","2302","liability_current","","True" +"mu_tax_received","Tax Received","2510","liability_current","","False" +"mu_tax_payable","Tax Payable","2520","liability_current","","False" +"mu_non_current_liabilities","Non-current Liabilities","2910","liability_non_current","","False" +"mu_capital","Capital","3010","equity","","False" +"mu_dividends","Dividends","3020","equity","","False" +"mu_income","Product Sales","4000","income","account.account_tag_operating","False" +"mu_income_currency_exchange","Foreign Exchange Gain","4410","income","account.account_tag_financing","False" +"mu_cash_diff_income","Cash Difference Gain","4420","income","account.account_tag_investing","False" +"mu_cash_discount_loss","Cash Discount Loss","4430","expense","","False" +"mu_other_income","Other Income","4500","income_other","","False" +"mu_cost_of_goods_sold","Cost of Goods Sold","5000","expense_direct_cost","account.account_tag_operating","False" +"mu_expense","Expenses","6000","expense","account.account_tag_operating","False" +"mu_expense_invest","Purchase of Equipments","6110","expense","account.account_tag_investing","False" +"mu_expense_rent","Rent","6120","expense","account.account_tag_investing","False" +"mu_expense_finance","Bank Fees","6200","expense","account.account_tag_financing","False" +"mu_expense_salary","Salary Expenses","6300","expense","account.account_tag_operating","False" +"mu_expense_currency_exchange","Foreign Exchange Loss","6410","expense","account.account_tag_financing","False" +"mu_cash_diff_expense","Cash Difference Loss","6420","expense","account.account_tag_investing","False" +"mu_cash_discount_gain","Cash Discount Gain","6430","income","","False" +"mu_expense_rd","RD Expenses","9610","expense","account.account_tag_investing","False" +"mu_expense_sales","Sales Expenses","9620","expense","account.account_tag_investing","False" diff --git a/addons/l10n_mu_account/data/template/account.fiscal.position-mu.csv b/addons/l10n_mu_account/data/template/account.fiscal.position-mu.csv new file mode 100644 index 00000000000..d82909c65ee --- /dev/null +++ b/addons/l10n_mu_account/data/template/account.fiscal.position-mu.csv @@ -0,0 +1,6 @@ +"id","sequence","name","auto_apply","vat_required","country_id","country_group_id","tax_ids/tax_src_id","tax_ids/tax_dest_id","account_ids/account_src_id","account_ids/account_dest_id" +"mu_fp_domestic","1","Domestic","1","1","base.mu","","","","","" +"mu_fp_ex","4","Import/Export (EX)","1","","","","mu_tax_sale_15","mu_tax_sale_0_export","","" +"","","","","","","","mu_tax_purchase_15","mu_tax_purchase_15_import","","" +"","","","","","","","mu_tax_purchase_15_capital","mu_tax_purchase_15_import_capital","","" +"","","","","","","","mu_tax_purchase_exempt","mu_tax_purchase_import_exempt","","" diff --git a/addons/l10n_mu_account/data/template/account.tax-mu.csv b/addons/l10n_mu_account/data/template/account.tax-mu.csv new file mode 100644 index 00000000000..8f6df07a7fa --- /dev/null +++ b/addons/l10n_mu_account/data/template/account.tax-mu.csv @@ -0,0 +1,49 @@ +"id","name","description","invoice_label","type_tax_use","amount_type","amount","tax_group_id","active","repartition_line_ids/repartition_type","repartition_line_ids/document_type","repartition_line_ids/factor_percent","repartition_line_ids/account_id","repartition_line_ids/tag_ids" +"mu_tax_sale_15","15%","15% Standard rate","15%","sale","percent","15","mu_tax_group_vat_15","True","base","invoice","","","+T1_4_value" +"","","","","","","","","","tax","invoice","","mu_tax_received","+T1_4_vat" +"","","","","","","","","","base","refund","","","-T1_4_value" +"","","","","","","","","","tax","refund","","mu_tax_received","-T1_4_vat" +"mu_tax_sale_0","0%","0% Zero rated","0%","sale","percent","0","mu_tax_group_vat_0","True","base","invoice","","","+T1_2_value" +"","","","","","","","","","tax","invoice","","","" +"","","","","","","","","","base","refund","","","-T1_2_value" +"","","","","","","","","","tax","refund","","","" +"mu_tax_sale_0_export","0% EX","0% Export","0%","sale","percent","0","mu_tax_group_vat_0","True","base","invoice","","","+T1_1_value" +"","","","","","","","","","tax","invoice","","","" +"","","","","","","","","","base","refund","","","-T1_1_value" +"","","","","","","","","","tax","refund","","","" +"mu_tax_sale_exempt","0% Exempt","0% Exempt","0%","sale","percent","0","mu_tax_group_vat_0","True","base","invoice","","","+T3_value" +"","","","","","","","","","tax","invoice","","","" +"","","","","","","","","","base","refund","","","-T3_value" +"","","","","","","","","","tax","refund","","","" +"mu_tax_purchase_15","15%","15%","15%","purchase","percent","15","mu_tax_group_vat_15","True","base","invoice","","","+T6_6_value" +"","","","","","","","","","tax","invoice","","mu_tax_paid","+T6_6_vat" +"","","","","","","","","","base","refund","","","-T6_6_value" +"","","","","","","","","","tax","refund","","mu_tax_paid","-T6_6_vat" +"mu_tax_purchase_15_import","15% EX","15% Import","15%","purchase","percent","15","mu_tax_group_vat_15","True","base","invoice","","","+T6_3_value" +"","","","","","","","","","tax","invoice","","mu_tax_paid","+T6_3_vat" +"","","","","","","","","","base","refund","","","-T6_3_value" +"","","","","","","","","","tax","refund","","mu_tax_paid","-T6_3_vat" +"mu_tax_purchase_15_capital","15% Capital","15% Capital","15%","purchase","percent","15","mu_tax_group_vat_15","True","base","invoice","","","+T6_4_value" +"","","","","","","","","","tax","invoice","","mu_tax_paid","+T6_4_vat" +"","","","","","","","","","base","refund","","","-T6_4_value" +"","","","","","","","","","tax","refund","","mu_tax_paid","-T6_4_vat" +"mu_tax_purchase_15_import_capital","15% EX Capital","15% Import Capital","15%","purchase","percent","15","mu_tax_group_vat_15","True","base","invoice","","","+T6_1_value" +"","","","","","","","","","tax","invoice","","mu_tax_paid","+T6_1_vat" +"","","","","","","","","","base","refund","","","-T6_1_value" +"","","","","","","","","","tax","refund","","mu_tax_paid","-T6_1_vat" +"mu_tax_purchase_0","0%","0% Zero rated","0%","purchase","percent","0","mu_tax_group_vat_0","True","base","invoice","","","+T6_5_value" +"","","","","","","","","","tax","invoice","","","" +"","","","","","","","","","base","refund","","","-T6_5_value" +"","","","","","","","","","tax","refund","","","" +"mu_tax_purchase_0_import","0% EX","0% Import","0%","purchase","percent","0","mu_tax_group_vat_0","True","base","invoice","","","+T6_2_value" +"","","","","","","","","","tax","invoice","","","" +"","","","","","","","","","base","refund","","","-T6_2_value" +"","","","","","","","","","tax","refund","","","" +"mu_tax_purchase_exempt","0% Exempt","0% Exempt","0%","purchase","percent","0","mu_tax_group_vat_0","True","base","invoice","","","+T8_2_value" +"","","","","","","","","","tax","invoice","","","" +"","","","","","","","","","base","refund","","","-T8_2_value" +"","","","","","","","","","tax","refund","","","" +"mu_tax_purchase_import_exempt","0% EX Exempt","0% Import Exempt","0%","purchase","percent","0","mu_tax_group_vat_0","True","base","invoice","","","+T8_1_value" +"","","","","","","","","","tax","invoice","","","" +"","","","","","","","","","base","refund","","","-T8_1_value" +"","","","","","","","","","tax","refund","","","" diff --git a/addons/l10n_mu_account/data/template/account.tax.group-mu.csv b/addons/l10n_mu_account/data/template/account.tax.group-mu.csv new file mode 100644 index 00000000000..297a8fbf565 --- /dev/null +++ b/addons/l10n_mu_account/data/template/account.tax.group-mu.csv @@ -0,0 +1,3 @@ +"id","name","country_id","tax_receivable_account_id","tax_payable_account_id" +"mu_tax_group_vat_15","VAT 15%","base.mu","mu_tax_receivable","mu_tax_payable" +"mu_tax_group_vat_0","VAT 0%","base.mu","mu_tax_receivable","mu_tax_payable" diff --git a/addons/l10n_mu_account/demo/demo_company.xml b/addons/l10n_mu_account/demo/demo_company.xml new file mode 100644 index 00000000000..6336141820b --- /dev/null +++ b/addons/l10n_mu_account/demo/demo_company.xml @@ -0,0 +1,40 @@ + + + + MU Company + 29999999 + Mauritius Road + Port Louis + + 11201 + +230 01 234 5678 + info@company.muexample.com + www.muexample.com + + + + MU Company + + + + + MU84BOFI900017484771 + + + + + + + + + + + + + + + + mu + + + diff --git a/addons/l10n_mu_account/models/__init__.py b/addons/l10n_mu_account/models/__init__.py new file mode 100644 index 00000000000..e189d2b1739 --- /dev/null +++ b/addons/l10n_mu_account/models/__init__.py @@ -0,0 +1,3 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +from . import account_move +from . import template_mu diff --git a/addons/l10n_mu_account/models/account_move.py b/addons/l10n_mu_account/models/account_move.py new file mode 100644 index 00000000000..fe106e13c14 --- /dev/null +++ b/addons/l10n_mu_account/models/account_move.py @@ -0,0 +1,12 @@ +from odoo import models + + +class AccountMove(models.Model): + _inherit = 'account.move' + + def _get_name_invoice_report(self): + # EXTENDS account + self.ensure_one() + if self.company_id.account_fiscal_country_id.code == 'MU': + return 'l10n_mu_account.report_invoice_document' + return super()._get_name_invoice_report() diff --git a/addons/l10n_mu_account/models/template_mu.py b/addons/l10n_mu_account/models/template_mu.py new file mode 100644 index 00000000000..9db985a2102 --- /dev/null +++ b/addons/l10n_mu_account/models/template_mu.py @@ -0,0 +1,42 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +from odoo import models +from odoo.addons.account.models.chart_template import template + + +class AccountChartTemplate(models.AbstractModel): + _inherit = 'account.chart.template' + + @template('mu') + def _get_mu_template_data(self): + return { + 'property_account_receivable_id': 'mu_receivable', + 'property_account_payable_id': 'mu_payable', + 'property_account_expense_categ_id': 'mu_expense', + 'property_account_income_categ_id': 'mu_income', + 'property_stock_valuation_account_id': 'mu_stock_valuation', + 'property_advance_tax_payment_account_id': 'mu_tax_paid', + 'property_tax_payable_account_id': 'mu_tax_payable', + 'property_tax_receivable_account_id': 'mu_tax_receivable', + 'use_anglo_saxon': False, + 'code_digits': '6', + } + + @template('mu', 'res.company') + def _get_mu_res_company(self): + return { + self.env.company.id: { + 'account_fiscal_country_id': 'base.mu', + 'bank_account_code_prefix': '230', + 'cash_account_code_prefix': '231', + 'transfer_account_code_prefix': '232', + 'account_default_pos_receivable_account_id': 'mu_pos_receivable', + 'income_currency_exchange_account_id': 'mu_income_currency_exchange', + 'expense_currency_exchange_account_id': 'mu_expense_currency_exchange', + 'account_journal_early_pay_discount_gain_account_id': 'mu_cash_discount_gain', + 'account_journal_early_pay_discount_loss_account_id': 'mu_cash_discount_loss', + 'default_cash_difference_income_account_id': 'mu_cash_diff_income', + 'default_cash_difference_expense_account_id': 'mu_cash_diff_expense', + 'account_sale_tax_id': 'mu_tax_sale_15', + 'account_purchase_tax_id': 'mu_tax_purchase_15', + }, + } diff --git a/addons/l10n_mu_account/views/report_invoice.xml b/addons/l10n_mu_account/views/report_invoice.xml new file mode 100644 index 00000000000..dd18ceb5962 --- /dev/null +++ b/addons/l10n_mu_account/views/report_invoice.xml @@ -0,0 +1,28 @@ + + + + +