diff --git a/l10n_us_gaap/README.rst b/l10n_us_gaap/README.rst index e4ed711d..f34a3a96 100644 --- a/l10n_us_gaap/README.rst +++ b/l10n_us_gaap/README.rst @@ -59,7 +59,7 @@ classification is proposed by function. This module contains in the 'docs' folder a a sample Trial Balance generated using the `OCA Account Financial Report -module `__. +module `__. Bug Tracker =========== diff --git a/l10n_us_gaap/__init__.py b/l10n_us_gaap/__init__.py index e69de29b..0650744f 100644 --- a/l10n_us_gaap/__init__.py +++ b/l10n_us_gaap/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/l10n_us_gaap/__manifest__.py b/l10n_us_gaap/__manifest__.py index eeec63bd..64cda7bb 100644 --- a/l10n_us_gaap/__manifest__.py +++ b/l10n_us_gaap/__manifest__.py @@ -1,16 +1,14 @@ { "name": "United States Sample GAAP Chart of Accounts", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "development_status": "Mature", - "category": "Localization", + "category": "Accounting/Localizations/Account Charts", + "countries": ["us"], "author": "ForgeFlow, Odoo Community Association (OCA)", "maintainers": ["JordiBForgeFlow"], "website": "https://github.com/OCA/l10n-usa", "depends": ["account"], "data": [ - "data/account_chart_template_data.xml", - "data/account_group.xml", - "data/account_us_gaap_data.xml", "data/account_chart_template_data_load.xml", "data/res_company_data.xml", ], diff --git a/l10n_us_gaap/data/account_chart_template_data.xml b/l10n_us_gaap/data/account_chart_template_data.xml deleted file mode 100644 index 0436d77c..00000000 --- a/l10n_us_gaap/data/account_chart_template_data.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - US GAAP Chart of Accounts - 6 - 1111 - 1112 - 1119 - - - - - diff --git a/l10n_us_gaap/data/account_chart_template_data_load.xml b/l10n_us_gaap/data/account_chart_template_data_load.xml index 1967c666..1e3fc99a 100644 --- a/l10n_us_gaap/data/account_chart_template_data_load.xml +++ b/l10n_us_gaap/data/account_chart_template_data_load.xml @@ -1,6 +1,11 @@ - + + us_gaap + diff --git a/l10n_us_gaap/data/account_group.xml b/l10n_us_gaap/data/account_group.xml deleted file mode 100644 index 628d40a7..00000000 --- a/l10n_us_gaap/data/account_group.xml +++ /dev/null @@ -1,849 +0,0 @@ - - - - - - Assets - 1 - - - - Cash And Investments - 11 - - - - - Cash And Cash Equivalents - 111 - - - - - Investments and Securities - 112 - - - - - Derivative Instruments And Hedges - 113 - - - - - Capital Leases, Lessor - 114 - - - - - Restricted Assets - 115 - - - - - Intercompany Investments - 116 - - - - - Receivables - 12 - - - - - Accounts, Notes And Loans - 121 - - - - - Notes And Loans Receivable - 122 - - - - - Receivables With Imputed Interest - 123 - - - - - Contracts Or Programs - 124 - - - - - Other Receivables - 125 - - - - - Inventory - 13 - - - - - Merchandise, Material And Supplies - 131 - - - - - Work In Process - 132 - - - - - Finished Goods - 133 - - - - - Capitalized Contract Cost - 134 - - - - - Other Inventory - 135 - - - - - Inventory For Long-Term Contracts Or Programs - 136 - - - - - Allowances And Adjustments - 137 - - - - - Accrued, Deferred And Other Assets - 14 - - - - - Prepaid Expense - 141 - - - - - Returnable Deposits - 142 - - - - - Accrued Revenue - 143 - - - - - Deferred Costs - 144 - - - - - Other Accrued And Deferred Assets - 145 - - - - - Investments And Other Assets - 146 - - - - - Property, Plant And Equipment - 15 - - - - - Land, Buildings And Improvements - 151 - - - - - Machinery And Equipment - 152 - - - - - Other Property, Plant And Equipment - 153 - - - - - Assets Under Construction - 154 - - - - - Intangible Assets - 16 - - - - - Intangible Assets Excluding Goodwill - 161 - - - - - Goodwill - 162 - - - - - Acquisitions In Progress - 163 - - - - - - Liabilities - 2 - - - - Accounts Payable And Accrued Liabilities - 21 - - - - - Accounts Payable - 211 - - - - - Accrued Liabilities - 212 - - - - - Employee-Related Liabilities - 213 - - - - - Taxes Payable - 214 - - - - - Interest And Dividends Payable - 215 - - - - - Debt And Capital Lease Obligations - 22 - - - - - Debts - 221 - - - - - Notes And Loans Payable - 22.2 - - - - - Special Assessment Bond - 223 - - - - - Long-Term Federal Home Loan Bank Advances - 224 - - - - - Capital Lease Obligations - 225 - - - - - Deferred Revenue And Credits - 23 - - - - - Contracts Or Programs - 24 - - - - - Billings In Excess Of Cost - 241 - - - - - Derivative Instruments And Hedges - 25 - - - - - Derivative Liability - 251 - - - - - Hedging Liabilities - 252 - - - - - Energy Marketing Contract Liabilities - 253 - - - - - Liabilities Other Than Debt - 26 - - - - - Related Party Liabilities - 27 - - - - - Related Party Accounts Payable - 271 - - - - - Related Party Notes Payable - 272 - - - - - Due To Employees - 273 - - - - - Due To Officers Or Stockholders - 274 - - - - - Due To Affiliate - 275 - - - - - Due To Other Related Parties - 276 - - - - - Other Liabilities - 28 - - - - - - Equity - 3 - - - - Paid-In Capital - 31 - - - - - Common Stock - 311 - - - - - Preferred Stock - 312 - - - - - Additional Paid-In Capital - 313 - - - - - Legal Equity (Statutory Capital) - 314 - - - - - Retained Earnings - 32 - - - - - Appropriated - 321 - - - - - Unappropriated - 322 - - - - - Retained Earnings Deficit - 323 - - - - - Suspense Account - 324 - - - - - Accumulated Other Comprehensive Income - 33 - - - - - Foreign Currency Translation Gain (Loss) - 331 - - - - - Available For Sale Securities Gain (Loss) - 332 - - - - - Impairment Debt Securities - 33.3 - - - - - Cash Flow Hedges Gain (Loss) - 334 - - - - - Defined Benefit Plan Income (Loss) - 335 - - - - - Other Equity - 34 - - - - - Unearned Sop Shares - 341 - - - - - Receivable From Officers, Directors For Issuance Of Capital Stock - 342 - - - - - Receivable From Shareholders Or Affiliates For Issuance Of Capital Stock - 343 - - - - - Stockholders' Equity Note, Subscriptions Receivable - 344 - - - - - Warrants, Rights Outstanding - 345 - - - - - Other Additional Capital - 346 - - - - - Treasury Stock - 347 - - - - - Additional Items - 348 - - - - - Equity Attributable To Non-Controlling Interest - 35 - - - - - - Revenue - 4 - - - - Goods - 41 - - - - - Products And Merchandise - 411 - - - - - Products - 4111 - - - - - Merchandise - 4112 - - - - - Allowances, Discounts - 412 - - - - - Returns, Allowances - 4121 - - - - - Sales Discounts (Consideration Paid To Customers) - 4122 - - - - - Services - 42 - - - - - General Services - 421 - - - - - Allowances, Discounts - 422 - - - - - Sales Allowances - 4221 - - - - - Sales Discounts - 422.2 - - - - - Itemized Services - 423 - - - - - Other Sales Revenues - 4231 - - - - - Other Operating Income - 43 - - - - - Other Recurring Income - 431 - - - - - - Expenses - 5 - - - - Expenses Classified By Function - 51 - - - - - Cost Of Revenue - 511 - - - - - Cost Of Goods Sold - 5111 - - - - - Cost Of Services Rendered - 5112 - - - - - Other Costs Of Sales - 5113 - - - - - Selling, General, Administrative - 512 - - - - - Selling And Marketing - 5121 - - - - - General, Administrative Expenses - 5122 - - - - - Other Operating Expenses - 5123 - - - - - Doubtful Accounts - 513 - - - - - - Other Revenue, Expenses, Gains And Losses - 6 - - - - Gains And Losses - 61 - - - - - Foreign Currency - 611 - - - - - Other Non-Operating Income Or Loss - 612 - - - - - Restructuring Charge - 613 - - - - - Inventory Write-Downs (Not Recognized In Cost Of Sales) - 614 - - - - - Impairment Charge - 615 - - - - - Extinguishment Of Debt - 616 - - - - - Business Combination, Acquisition Related Costs - 617 - - - - - Gain (Loss) Related To Litigation Settlement - 618 - - - - - Asset Retirement Obligation - 619 - - - - - Unusual And/Or Infrequent Items - 6110 - - - - - Additional Itemized Gains And Losses - 6111 - - - - - Non-Operating Revenues, Expenses - 62 - - - - - Non-Operating Revenues - 621 - - - - - Non-Operating Expenses - 622 - - - - - Non-Monetary Transactions - 63 - - - - - - Income Tax (Benefit) - 7 - - diff --git a/l10n_us_gaap/data/account_us_gaap_data.xml b/l10n_us_gaap/data/account_us_gaap_data.xml deleted file mode 100644 index cbcdf880..00000000 --- a/l10n_us_gaap/data/account_us_gaap_data.xml +++ /dev/null @@ -1,720 +0,0 @@ - - - - - - - - Stock Interim (Received) - 2121 - asset_current - - - - Stock Interim (Delivered) - 1331 - asset_current - - - - Investments And Securities - 112 - asset_current - - - - Derivative Instruments And Hedges - 113 - asset_current - - - - Capital Leases, Lessor - 114 - asset_current - - - - Restricted Assets - 115 - asset_current - - - - Intercompany Investments - 116 - asset_current - - - - - - Accounts Receivable - 121 - asset_receivable - - - - - Notes And Loans Receivable - 122 - asset_receivable - - - - - Receivables With Imputed Interest - 123 - asset_receivable - - - - - Contracts Or Programs - 124 - asset_receivable - - - - - Other Receivables - 125 - asset_receivable - - - - Merchandise, Material And Supplies - 131 - asset_current - - - - Work In Process - 132 - asset_current - - - - Finished Goods - 133 - asset_current - - - - Capitalized Contract Cost - 134 - asset_current - - - - Other Inventory - 135 - asset_current - - - - Inventory For Long-Term Contracts Or Programs - 136 - asset_current - - - - Allowances And Adjustments - 137 - asset_current - - - - Prepaid Expense - 141 - asset_current - - - - Returnable Deposits - 142 - asset_current - - - - Accrued Revenue - 143 - asset_current - - - - Deferred Costs - 144 - asset_current - - - - Other Accrued And Deferred Assets - 145 - asset_current - - - - Investments And Other Assets - 146 - asset_current - - - - Land, Buildings And Improvements - 151 - asset_non_current - - - - Machinery And Equipment - 152 - asset_non_current - - - - Other Property, Plant And Equipment - 153 - asset_non_current - - - - Assets Under Construction - 154 - asset_non_current - - - - Intangible Assets Excluding Goodwill - 161 - asset_non_current - - - - Goodwill - 162 - asset_non_current - - - - Acquisitions In Progress - 163 - asset_non_current - - - - - Accounts Payable - 211 - liability_payable - - - - - Accrued Liabilities - 212 - liability_current - - - - - Employee-Related Liabilities - 213 - liability_current - - - - - Taxes Payable - 214 - liability_current - - - - - Interest And Dividends Payable - 215 - liability_current - - - - Debts - 221 - liability_current - - - - Notes And Loans Payable - 222 - liability_current - - - - Special Assessment Bond - 223 - liability_current - - - - Long-Term Federal Home Loan Bank Advances - 224 - liability_current - - - - Capital Lease Obligations - 225 - liability_current - - - - Deferred Revenue And Credits - 23 - liability_current - - - - Billings In Excess Of Cost - 241 - liability_current - - - - Derivative Liability - 251 - liability_current - - - - Hedging Liabilities - 252 - liability_current - - - - Energy Marketing Contract Liabilities - 253 - liability_current - - - - - Related Party Accounts Payable - 271 - liability_payable - - - - Related Party Notes Payable - 272 - liability_current - - - - Due To Employees - 273 - liability_current - - - - Due To Officers Or Stockholders - 274 - liability_current - - - - Due To Affiliate - 275 - liability_current - - - - Due To Other Related Parties - 276 - liability_current - - - - Other Liabilities - 28 - liability_current - - - - Common Stock - 311 - equity - - - - Preferred Stock - 312 - equity - - - - Additional Paid-In Capital - 313 - equity - - - - Legal Equity (Statutory Capital) - 314 - equity - - - - Retained Earnings - Appropriated - 321 - equity - - - - Current Year Earnings - 32201 - equity_unaffected - - - - Retained Earnings - Unappropriated - 32202 - equity - - - - Retained Earnings Deficit - 323 - equity - - - - Retained Earnings - Suspense Account - 324 - equity - - - - Foreign Currency Translation Gain (Loss) - 331 - equity - - - - Available For Sale Securities Gain (Loss) - 332 - equity - - - - Impairment Debt Securities - 333 - equity - - - - Cash Flow Hedges Gain (Loss) - 334 - equity - - - - Defined Benefit Plan Income (Loss) - 335 - equity - - - - Unearned Sop Shares - 341 - equity - - - - Receivable From Officers, Directors For Issuance Of Capital Stock - 342 - equity - - - - Receivable From Shareholders Or Affiliates For Issuance Of Capital Stock - 343 - equity - - - - Stockholders' Equity Note, Subscriptions Receivable - 344 - equity - - - - Warrants, Rights Outstanding - 345 - equity - - - - Other Additional Capital - 346 - equity - - - - Treasury Stock - 347 - equity - - - - Additional Items - 348 - equity - - - - Equity Attributable To Non-Controlling Interest - 35 - equity - - - - Product Sales - 41101 - income - - - - Merchandise Sales - 41102 - income - - - - Returns, Allowances - 41201 - income - - - - Sales Discounts (Consideration Paid To Customers) - 41202 - income - - - - General Services - 421 - income - - - - Sales Allowances - 42201 - income - - - - Sales Discounts - 42202 - income - - - - Itemized Services - 423 - income - - - - Other Recurring Income - 431 - income - - - - Cost Of Goods Sold - 5111 - expense - - - - Cost Of Services Rendered - 51102 - expense - - - - Other Costs Of Sales - 51103 - expense - - - - Selling And Marketing - 51201 - expense - - - - General, Administrative Expenses - 51202 - expense - - - - Other Operating Expenses - 51203 - expense - - - - Price Differences - 51204 - expense - - - - Inventory Adjustments - 51205 - expense - - - - Doubtful Accounts - 513 - expense - - - - Foreign Currency Gain - 61101 - income_other - - - - Foreign Currency Loss - 61102 - expense - - - - Other Non-Operating Income - 61201 - income_other - - - - Other Non-Operating Loss - 61202 - expense - - - - Restructuring Charge - 613 - expense - - - - Inventory Write-Downs (Not Recognized In Cost Of Sales) - 614 - expense - - - - Impairment Charge - 615 - expense - - - - Extinguishment Of Debt - 616 - expense - - - - Business Combination, Acquisition Related Costs - 617 - expense - - - - Gain (Loss) Related To Litigation Settlement - 618 - expense - - - - Asset Retirement Obligation - 619 - expense - - - - Unusual And/Or Infrequent Items - 6110 - expense - - - - Additional Itemized Gains And Losses - 6111 - income_other - - - - Non-Operating Revenues - 621 - income_other - - - - Non-Operating Expenses - 622 - expense - - - - Non-Monetary Transactions - 63 - expense - - - - Income Tax (Benefit) - 7 - income - - - - - - - - - - - - - - diff --git a/l10n_us_gaap/data/template/account.account-us_gaap.csv b/l10n_us_gaap/data/template/account.account-us_gaap.csv new file mode 100644 index 00000000..640d37f8 --- /dev/null +++ b/l10n_us_gaap/data/template/account.account-us_gaap.csv @@ -0,0 +1,113 @@ +id,name,code,account_type +l10n_us_gaap_account_2121,Stock Interim (Received),2121,asset_current +l10n_us_gaap_account_1331,Stock Interim (Delivered),1331,asset_current +l10n_us_gaap_account_112,Investments And Securities,112,asset_current +l10n_us_gaap_account_113,Derivative Instruments And Hedges,113,asset_current +l10n_us_gaap_account_114,"Capital Leases, Lessor",114,asset_current +l10n_us_gaap_account_115,Restricted Assets,115,asset_current +l10n_us_gaap_account_116,Intercompany Investments,116,asset_current +l10n_us_gaap_account_121,Accounts Receivable,121,asset_receivable +l10n_us_gaap_account_122,Notes And Loans Receivable,122,asset_receivable +l10n_us_gaap_account_123,Receivables With Imputed Interest,123,asset_receivable +l10n_us_gaap_account_124,Contracts Or Programs,124,asset_receivable +l10n_us_gaap_account_125,Other Receivables,125,asset_receivable +l10n_us_gaap_account_131,"Merchandise, Material And Supplies",131,asset_current +l10n_us_gaap_account_132,Work In Process,132,asset_current +l10n_us_gaap_account_133,Finished Goods,133,asset_current +l10n_us_gaap_account_134,Capitalized Contract Cost,134,asset_current +l10n_us_gaap_account_135,Other Inventory,135,asset_current +l10n_us_gaap_account_136,Inventory For Long-Term Contracts Or Programs,136,asset_current +l10n_us_gaap_account_137,Allowances And Adjustments,137,asset_current +l10n_us_gaap_account_141,Prepaid Expense,141,asset_current +l10n_us_gaap_account_142,Returnable Deposits,142,asset_current +l10n_us_gaap_account_143,Accrued Revenue,143,asset_current +l10n_us_gaap_account_144,Deferred Costs,144,asset_current +l10n_us_gaap_account_145,Other Accrued And Deferred Assets,145,asset_current +l10n_us_gaap_account_146,Investments And Other Assets,146,asset_current +l10n_us_gaap_account_151,"Land, Buildings And Improvements",151,asset_non_current +l10n_us_gaap_account_152,Machinery And Equipment,152,asset_non_current +l10n_us_gaap_account_153,"Other Property, Plant And Equipment",153,asset_non_current +l10n_us_gaap_account_154,Assets Under Construction,154,asset_non_current +l10n_us_gaap_account_161,Intangible Assets Excluding Goodwill,161,asset_non_current +l10n_us_gaap_account_162,Goodwill,162,asset_non_current +l10n_us_gaap_account_163,Acquisitions In Progress,163,asset_non_current +l10n_us_gaap_account_211,Accounts Payable,211,liability_payable +l10n_us_gaap_account_212,Accrued Liabilities,212,liability_current +l10n_us_gaap_account_213,Employee-Related Liabilities,213,liability_current +l10n_us_gaap_account_214,Taxes Payable,214,liability_current +l10n_us_gaap_account_215,Interest And Dividends Payable,215,liability_current +l10n_us_gaap_account_221,Debts,221,liability_current +l10n_us_gaap_account_222,Notes And Loans Payable,222,liability_current +l10n_us_gaap_account_223,Special Assessment Bond,223,liability_current +l10n_us_gaap_account_224,Long-Term Federal Home Loan Bank Advances,224,liability_current +l10n_us_gaap_account_225,Capital Lease Obligations,225,liability_current +l10n_us_gaap_account_23,Deferred Revenue And Credits,23,liability_current +l10n_us_gaap_account_241,Billings In Excess Of Cost,241,liability_current +l10n_us_gaap_account_251,Derivative Liability,251,liability_current +l10n_us_gaap_account_252,Hedging Liabilities,252,liability_current +l10n_us_gaap_account_253,Energy Marketing Contract Liabilities,253,liability_current +l10n_us_gaap_account_271,Related Party Accounts Payable,271,liability_payable +l10n_us_gaap_account_272,Related Party Notes Payable,272,liability_current +l10n_us_gaap_account_273,Due To Employees,273,liability_current +l10n_us_gaap_account_274,Due To Officers Or Stockholders,274,liability_current +l10n_us_gaap_account_275,Due To Affiliate,275,liability_current +l10n_us_gaap_account_276,Due To Other Related Parties,276,liability_current +l10n_us_gaap_account_28,Other Liabilities,28,liability_current +l10n_us_gaap_account_311,Common Stock,311,equity +l10n_us_gaap_account_312,Preferred Stock,312,equity +l10n_us_gaap_account_313,Additional Paid-In Capital,313,equity +l10n_us_gaap_account_314,Legal Equity (Statutory Capital),314,equity +l10n_us_gaap_account_321,Retained Earnings - Appropriated,321,equity +l10n_us_gaap_account_32201,Current Year Earnings,32201,equity_unaffected +l10n_us_gaap_account_32202,Retained Earnings - Unappropriated,32202,equity +l10n_us_gaap_account_323,Retained Earnings Deficit,323,equity +l10n_us_gaap_account_324,Retained Earnings - Suspense Account,324,equity +l10n_us_gaap_account_331,Foreign Currency Translation Gain (Loss),331,equity +l10n_us_gaap_account_332,Available For Sale Securities Gain (Loss),332,equity +l10n_us_gaap_account_333,Impairment Debt Securities,333,equity +l10n_us_gaap_account_334,Cash Flow Hedges Gain (Loss),334,equity +l10n_us_gaap_account_335,Defined Benefit Plan Income (Loss),335,equity +l10n_us_gaap_account_341,Unearned Sop Shares,341,equity +l10n_us_gaap_account_342,"Receivable From Officers, Directors For Issuance Of Capital Stock",342,equity +l10n_us_gaap_account_343,Receivable From Shareholders Or Affiliates For Issuance Of Capital Stock,343,equity +l10n_us_gaap_account_344,"Stockholders' Equity Note, Subscriptions Receivable",344,equity +l10n_us_gaap_account_345,"Warrants, Rights Outstanding",345,equity +l10n_us_gaap_account_346,Other Additional Capital,346,equity +l10n_us_gaap_account_347,Treasury Stock,347,equity +l10n_us_gaap_account_348,Additional Items,348,equity +l10n_us_gaap_account_35,Equity Attributable To Non-Controlling Interest,35,equity +l10n_us_gaap_account_41101,Product Sales,41101,income +l10n_us_gaap_account_41102,Merchandise Sales,41102,income +l10n_us_gaap_account_41201,"Returns, Allowances",41201,income +l10n_us_gaap_account_41202,Sales Discounts (Consideration Paid To Customers),41202,income +l10n_us_gaap_account_421,General Services,421,income +l10n_us_gaap_account_42201,Sales Allowances,42201,income +l10n_us_gaap_account_42202,Sales Discounts,42202,income +l10n_us_gaap_account_423,Itemized Services,423,income +l10n_us_gaap_account_431,Other Recurring Income,431,income +l10n_us_gaap_account_5112,Cost Of Services Rendered,51102,expense +l10n_us_gaap_account_51103,Other Costs Of Sales,51103,expense +l10n_us_gaap_account_51101,Cost Of Goods Sold,5111,expense +l10n_us_gaap_account_51201,Selling And Marketing,51201,expense +l10n_us_gaap_account_51202,"General, Administrative Expenses",51202,expense +l10n_us_gaap_account_51203,Other Operating Expenses,51203,expense +l10n_us_gaap_account_51204,Price Differences,51204,expense +l10n_us_gaap_account_51205,Inventory Adjustments,51205,expense +l10n_us_gaap_account_513,Doubtful Accounts,513,expense +l10n_us_gaap_account_6110,Unusual And/Or Infrequent Items,6110,expense +l10n_us_gaap_account_61101,Foreign Currency Gain,61101,income_other +l10n_us_gaap_account_61102,Foreign Currency Loss,61102,expense +l10n_us_gaap_account_6111,Additional Itemized Gains And Losses,6111,income_other +l10n_us_gaap_account_61201,Other Non-Operating Income,61201,income_other +l10n_us_gaap_account_61202,Other Non-Operating Loss,61202,expense +l10n_us_gaap_account_613,Restructuring Charge,613,expense +l10n_us_gaap_account_614,Inventory Write-Downs (Not Recognized In Cost Of Sales),614,expense +l10n_us_gaap_account_615,Impairment Charge,615,expense +l10n_us_gaap_account_616,Extinguishment Of Debt,616,expense +l10n_us_gaap_account_617,"Business Combination, Acquisition Related Costs",617,expense +l10n_us_gaap_account_618,Gain (Loss) Related To Litigation Settlement,618,expense +l10n_us_gaap_account_619,Asset Retirement Obligation,619,expense +l10n_us_gaap_account_621,Non-Operating Revenues,621,income_other +l10n_us_gaap_account_622,Non-Operating Expenses,622,expense +l10n_us_gaap_account_63,Non-Monetary Transactions,63,expense +l10n_us_gaap_account_7,Income Tax (Benefit),7,income diff --git a/l10n_us_gaap/data/template/account.tax.group-us_gaap.csv b/l10n_us_gaap/data/template/account.tax.group-us_gaap.csv new file mode 100644 index 00000000..04491840 --- /dev/null +++ b/l10n_us_gaap/data/template/account.tax.group-us_gaap.csv @@ -0,0 +1,141 @@ +id,name,code_prefix_start +l10n_us_gaap_account_group_1,Assets,1 +l10n_us_gaap_account_group_1_1,Cash And Investments,11 +l10n_us_gaap_account_group_1_1_1,Cash And Cash Equivalents,111 +l10n_us_gaap_account_group_1_1_2,Investments and Securities,112 +l10n_us_gaap_account_group_1_1_3,Derivative Instruments And Hedges,113 +l10n_us_gaap_account_group_1_1_4,"Capital Leases, Lessor",114 +l10n_us_gaap_account_group_1_1_5,Restricted Assets,115 +l10n_us_gaap_account_group_1_1_6,Intercompany Investments,116 +l10n_us_gaap_account_group_1_2,Receivables,12 +l10n_us_gaap_account_group_1_2_1,"Accounts, Notes And Loans",121 +l10n_us_gaap_account_group_1_2_2,Notes And Loans Receivable,122 +l10n_us_gaap_account_group_1_2_3,Receivables With Imputed Interest,123 +l10n_us_gaap_account_group_1_2_4,Contracts Or Programs,124 +l10n_us_gaap_account_group_1_2_5,Other Receivables,125 +l10n_us_gaap_account_group_1_3,Inventory,13 +l10n_us_gaap_account_group_1_3_1,"Merchandise, Material And Supplies",131 +l10n_us_gaap_account_group_1_3_2,Work In Process,132 +l10n_us_gaap_account_group_1_3_3,Finished Goods,133 +l10n_us_gaap_account_group_1_3_4,Capitalized Contract Cost,134 +l10n_us_gaap_account_group_1_3_5,Other Inventory,135 +l10n_us_gaap_account_group_1_3_6,Inventory For Long-Term Contracts Or Programs,136 +l10n_us_gaap_account_group_1_3_7,Allowances And Adjustments,137 +l10n_us_gaap_account_group_1_4,"Accrued, Deferred And Other Assets",14 +l10n_us_gaap_account_group_1_4_1,Prepaid Expense,141 +l10n_us_gaap_account_group_1_4_2,Returnable Deposits,142 +l10n_us_gaap_account_group_1_4_3,Accrued Revenue,143 +l10n_us_gaap_account_group_1_4_4,Deferred Costs,144 +l10n_us_gaap_account_group_1_4_5,Other Accrued And Deferred Assets,145 +l10n_us_gaap_account_group_1_4_6,Investments And Other Assets,146 +l10n_us_gaap_account_group_1_5,"Property, Plant And Equipment",15 +l10n_us_gaap_account_group_1_5_1,"Land, Buildings And Improvements",151 +l10n_us_gaap_account_group_1_5_2,Machinery And Equipment,152 +l10n_us_gaap_account_group_1_5_3,"Other Property, Plant And Equipment",153 +l10n_us_gaap_account_group_1_5_4,Assets Under Construction,154 +l10n_us_gaap_account_group_1_6,Intangible Assets,16 +l10n_us_gaap_account_group_1_6_1,Intangible Assets Excluding Goodwill,161 +l10n_us_gaap_account_group_1_6_2,Goodwill,162 +l10n_us_gaap_account_group_1_6_3,Acquisitions In Progress,163 +l10n_us_gaap_account_group_2,Liabilities,2 +l10n_us_gaap_account_group_2_1,Accounts Payable And Accrued Liabilities,21 +l10n_us_gaap_account_group_2_1_1,Accounts Payable,211 +l10n_us_gaap_account_group_2_1_2,Accrued Liabilities,212 +l10n_us_gaap_account_group_2_1_3,Employee-Related Liabilities,213 +l10n_us_gaap_account_group_2_1_4,Taxes Payable,214 +l10n_us_gaap_account_group_2_1_5,Interest And Dividends Payable,215 +l10n_us_gaap_account_group_2_2,Debt And Capital Lease Obligations,22 +l10n_us_gaap_account_group_2_2_1,Debts,221 +l10n_us_gaap_account_group_2_2_2,Notes And Loans Payable,22.2 +l10n_us_gaap_account_group_2_2_3,Special Assessment Bond,223 +l10n_us_gaap_account_group_2_2_4,Long-Term Federal Home Loan Bank Advances,224 +l10n_us_gaap_account_group_2_2_5,Capital Lease Obligations,225 +l10n_us_gaap_account_group_2_3,Deferred Revenue And Credits,23 +l10n_us_gaap_account_group_2_4,Contracts Or Programs,24 +l10n_us_gaap_account_group_2_4_1,Billings In Excess Of Cost,241 +l10n_us_gaap_account_group_2_5,Derivative Instruments And Hedges,25 +l10n_us_gaap_account_group_2_5_1,Derivative Liability,251 +l10n_us_gaap_account_group_2_5_2,Hedging Liabilities,252 +l10n_us_gaap_account_group_2_5_3,Energy Marketing Contract Liabilities,253 +l10n_us_gaap_account_group_2_6,Liabilities Other Than Debt,26 +l10n_us_gaap_account_group_2_7,Related Party Liabilities,27 +l10n_us_gaap_account_group_2_7_1,Related Party Accounts Payable,271 +l10n_us_gaap_account_group_2_7_2,Related Party Notes Payable,272 +l10n_us_gaap_account_group_2_7_3,Due To Employees,273 +l10n_us_gaap_account_group_2_7_4,Due To Officers Or Stockholders,274 +l10n_us_gaap_account_group_2_7_5,Due To Affiliate,275 +l10n_us_gaap_account_group_2_7_6,Due To Other Related Parties,276 +l10n_us_gaap_account_group_2_8,Other Liabilities,28 +l10n_us_gaap_account_group_3,Equity,3 +l10n_us_gaap_account_group_3_1,Paid-In Capital,31 +l10n_us_gaap_account_group_3_1_1,Common Stock,311 +l10n_us_gaap_account_group_3_1_2,Preferred Stock,312 +l10n_us_gaap_account_group_3_1_3,Additional Paid-In Capital,313 +l10n_us_gaap_account_group_3_1_4,Legal Equity (Statutory Capital),314 +l10n_us_gaap_account_group_3_2,Retained Earnings,32 +l10n_us_gaap_account_group_3_2_1,Appropriated,321 +l10n_us_gaap_account_group_3_2_2,Unappropriated,322 +l10n_us_gaap_account_group_3_2_3,Retained Earnings Deficit,323 +l10n_us_gaap_account_group_3_2_4,Suspense Account,324 +l10n_us_gaap_account_group_3_3,Accumulated Other Comprehensive Income,33 +l10n_us_gaap_account_group_3_3_1,Foreign Currency Translation Gain (Loss),331 +l10n_us_gaap_account_group_3_3_2,Available For Sale Securities Gain (Loss),332 +l10n_us_gaap_account_group_3_3_3,Impairment Debt Securities,33.3 +l10n_us_gaap_account_group_3_3_4,Cash Flow Hedges Gain (Loss),334 +l10n_us_gaap_account_group_3_3_5,Defined Benefit Plan Income (Loss),335 +l10n_us_gaap_account_group_3_4,Other Equity,34 +l10n_us_gaap_account_group_3_4_1,Unearned Sop Shares,341 +l10n_us_gaap_account_group_3_4_2,"Receivable From Officers, Directors For Issuance Of Capital Stock",342 +l10n_us_gaap_account_group_3_4_3,Receivable From Shareholders Or Affiliates For Issuance Of Capital Stock,343 +l10n_us_gaap_account_group_3_4_4,"Stockholders' Equity Note, Subscriptions Receivable",344 +l10n_us_gaap_account_group_3_4_5,"Warrants, Rights Outstanding",345 +l10n_us_gaap_account_group_3_4_6,Other Additional Capital,346 +l10n_us_gaap_account_group_3_4_7,Treasury Stock,347 +l10n_us_gaap_account_group_3_4_8,Additional Items,348 +l10n_us_gaap_account_group_3_5,Equity Attributable To Non-Controlling Interest,35 +l10n_us_gaap_account_group_4,Revenue,4 +l10n_us_gaap_account_group_4_1,Goods,41 +l10n_us_gaap_account_group_4_1_1,Products And Merchandise,411 +l10n_us_gaap_account_group_4_1_1_1,Products,4111 +l10n_us_gaap_account_group_4_1_1_2,Merchandise,4112 +l10n_us_gaap_account_group_4_1_2,"Allowances, Discounts",412 +l10n_us_gaap_account_group_4_1_2_1,"Returns, Allowances",4121 +l10n_us_gaap_account_group_4_1_2_2,Sales Discounts (Consideration Paid To Customers),4122 +l10n_us_gaap_account_group_4_2,Services,42 +l10n_us_gaap_account_group_4_2_1,General Services,421 +l10n_us_gaap_account_group_4_2_2,"Allowances, Discounts",422 +l10n_us_gaap_account_group_4_2_2_1,Sales Allowances,4221 +l10n_us_gaap_account_group_4_2_2_2,Sales Discounts,422.2 +l10n_us_gaap_account_group_4_2_3,Itemized Services,423 +l10n_us_gaap_account_group_4_2_3_1,Other Sales Revenues,4231 +l10n_us_gaap_account_group_4_3,Other Operating Income,43 +l10n_us_gaap_account_group_4_3_1,Other Recurring Income,431 +l10n_us_gaap_account_group_5,Expenses,5 +l10n_us_gaap_account_group_5_1,Expenses Classified By Function,51 +l10n_us_gaap_account_group_5_1_1,Cost Of Revenue,511 +l10n_us_gaap_account_group_5_1_1_1,Cost Of Goods Sold,5111 +l10n_us_gaap_account_group_5_1_1_2,Cost Of Services Rendered,5112 +l10n_us_gaap_account_group_5_1_1_3,Other Costs Of Sales,5113 +l10n_us_gaap_account_group_5_1_2,"Selling, General, Administrative",512 +l10n_us_gaap_account_group_5_1_2_1,Selling And Marketing,5121 +l10n_us_gaap_account_group_5_1_2_2,"General, Administrative Expenses",5122 +l10n_us_gaap_account_group_5_1_2_3,Other Operating Expenses,5123 +l10n_us_gaap_account_group_5_1_3,Doubtful Accounts,513 +l10n_us_gaap_account_group_6,"Other Revenue, Expenses, Gains And Losses",6 +l10n_us_gaap_account_group_6_1,Gains And Losses,61 +l10n_us_gaap_account_group_6_1_1,Foreign Currency,611 +l10n_us_gaap_account_group_6_1_10,Unusual And/Or Infrequent Items,6110 +l10n_us_gaap_account_group_6_1_11,Additional Itemized Gains And Losses,6111 +l10n_us_gaap_account_group_6_1_2,Other Non-Operating Income Or Loss,612 +l10n_us_gaap_account_group_6_1_3,Restructuring Charge,613 +l10n_us_gaap_account_group_6_1_4,Inventory Write-Downs (Not Recognized In Cost Of Sales),614 +l10n_us_gaap_account_group_6_1_5,Impairment Charge,615 +l10n_us_gaap_account_group_6_1_6,Extinguishment Of Debt,616 +l10n_us_gaap_account_group_6_1_7,"Business Combination, Acquisition Related Costs",617 +l10n_us_gaap_account_group_6_1_8,Gain (Loss) Related To Litigation Settlement,618 +l10n_us_gaap_account_group_6_1_9,Asset Retirement Obligation,619 +l10n_us_gaap_account_group_6_2,"Non-Operating Revenues, Expenses",62 +l10n_us_gaap_account_group_6_2_1,Non-Operating Revenues,621 +l10n_us_gaap_account_group_6_2_2,Non-Operating Expenses,622 +l10n_us_gaap_account_group_6_3,Non-Monetary Transactions,63 +l10n_us_gaap_account_group_7,Income Tax (Benefit),7 diff --git a/l10n_us_gaap/models/__init__.py b/l10n_us_gaap/models/__init__.py new file mode 100644 index 00000000..3fde270f --- /dev/null +++ b/l10n_us_gaap/models/__init__.py @@ -0,0 +1 @@ +from . import template_us_gaap diff --git a/l10n_us_gaap/models/template_us_gaap.py b/l10n_us_gaap/models/template_us_gaap.py new file mode 100644 index 00000000..1ba158bc --- /dev/null +++ b/l10n_us_gaap/models/template_us_gaap.py @@ -0,0 +1,37 @@ +# ruff: noqa: E501 +from odoo import models + +from odoo.addons.account.models.chart_template import template + + +class AccountChartTemplate(models.AbstractModel): + _inherit = "account.chart.template" + + @template("us_gaap") + def _get_us_gaap_template_data(self): + return { + "name": "US GAAP Chart of Accounts", + "country": "base.us", + "code_digits": "6", + } + + @template("us_gaap", "res.company") + def _get_us_gaap_res_company(self): + return { + self.env.company.id: { + "anglo_saxon_accounting": True, + "account_fiscal_country_id": "base.us", + "bank_account_code_prefix": "1111", + "cash_account_code_prefix": "1112", + "transfer_account_code_prefix": "1117", + "currency_id": "base.USD", + "property_account_receivable_id": "l10n_us_gaap_account_121", + "property_account_payable_id": "l10n_us_gaap_account_211", + "property_account_expense_categ_id": "l10n_us_gaap_account_51202", + "property_account_income_categ_id": "l10n_us_gaap_account_421", + "expense_currency_exchange_account_id": "l10n_us_gaap_account_61102", + "income_currency_exchange_account_id": "l10n_us_gaap_account_61101", + "account_journal_early_pay_discount_loss_account_id": "l10n_us_gaap_account_41202", + "account_journal_early_pay_discount_gain_account_id": "l10n_us_gaap_account_42202", + } + } diff --git a/l10n_us_gaap/readme/USAGE.md b/l10n_us_gaap/readme/USAGE.md index 731082a3..827c1255 100644 --- a/l10n_us_gaap/readme/USAGE.md +++ b/l10n_us_gaap/readme/USAGE.md @@ -11,4 +11,4 @@ classification is proposed by function. This module contains in the 'docs' folder a a sample Trial Balance generated using the [OCA Account Financial Report -module](https://github.com/OCA/account-financial-reporting/blob/12.0/account_financial_report). +module](https://github.com/OCA/account-financial-reporting/blob/17.0/account_financial_report). diff --git a/l10n_us_gaap/static/description/index.html b/l10n_us_gaap/static/description/index.html index ea3e2197..1c5c39f2 100644 --- a/l10n_us_gaap/static/description/index.html +++ b/l10n_us_gaap/static/description/index.html @@ -404,7 +404,7 @@

Additional remarks

U.S. SEC not allow the classification of expenses by nature, thus the classification is proposed by function.

This module contains in the ‘docs’ folder a a sample Trial Balance -generated using the OCA Account Financial Report +generated using the OCA Account Financial Report module.

diff --git a/l10n_us_gaap/tests/test_base_us.py b/l10n_us_gaap/tests/test_base_us.py index 5064d540..9ee5b206 100644 --- a/l10n_us_gaap/tests/test_base_us.py +++ b/l10n_us_gaap/tests/test_base_us.py @@ -4,13 +4,11 @@ import logging -from odoo.tests import tagged from odoo.tests.common import TransactionCase _logger = logging.getLogger("us_gaap") -@tagged("post_install") class TestChartAcount(TransactionCase): def with_context(self, *args, **kwargs): context = dict(args[0] if args else self.env.context, **kwargs) @@ -20,18 +18,19 @@ def with_context(self, *args, **kwargs): def test_basic(self): _logger.debug("Creating chart of account") self.company = self.env["res.company"].create({"name": "US test company"}) - chart_us = self.env.ref("l10n_us_gaap.l10n_us_gaap_chart_template") self.env.ref("base.group_multi_company").write({"users": [(4, self.env.uid)]}) self.env.user.write( {"company_ids": [(4, self.company.id)], "company_id": self.company.id} ) - chart_us.try_loading() + self.env["account.chart.template"].try_loading( + template_code="us_gaap", company=self.company, install_demo=False + ) self.with_context(company_id=self.company.id, force_company=self.company.id) bank_account = self.env["account.account"].search( - [("code", "=", "111101"), ("company_id", "=", self.company.id)] + [("code", "=", "111102"), ("company_id", "=", self.company.id)] ) liquidity_transfer = self.env["account.account"].search( - [("code", "=", "111901"), ("company_id", "=", self.company.id)] + [("code", "=", "111701"), ("company_id", "=", self.company.id)] ) finished_goods = self.env["account.account"].search( [("code", "=", "133000"), ("company_id", "=", self.company.id)]