changes
This commit is contained in:
BIN
fusion_accounting/fusion_accounting_l10n_ca/.DS_Store
vendored
Normal file
BIN
fusion_accounting/fusion_accounting_l10n_ca/.DS_Store
vendored
Normal file
Binary file not shown.
1
fusion_accounting/fusion_accounting_l10n_ca/__init__.py
Normal file
1
fusion_accounting/fusion_accounting_l10n_ca/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
32
fusion_accounting/fusion_accounting_l10n_ca/__manifest__.py
Normal file
32
fusion_accounting/fusion_accounting_l10n_ca/__manifest__.py
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
'name': 'Fusion Accounting — Canadian Reports',
|
||||
'version': '19.0.1.1.1',
|
||||
'category': 'Accounting/Localizations/Reporting',
|
||||
'summary': 'Canadian-specific report definitions and tax return templates for Fusion Accounting.',
|
||||
'description': """
|
||||
Replaces Enterprise's l10n_ca_reports module with Fusion-native equivalents:
|
||||
- Canadian Balance Sheet (report definition for fusion_accounting_reports engine)
|
||||
- Canadian Profit & Loss (report definition)
|
||||
- Tax return tracking templates (GST/HST/PST periods)
|
||||
|
||||
Auto-installs when l10n_ca + fusion_accounting_reports are both present.
|
||||
""",
|
||||
'depends': [
|
||||
'fusion_accounting_core',
|
||||
'fusion_accounting_reports',
|
||||
'l10n_ca',
|
||||
],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'data/fusion_tax_return_data.xml',
|
||||
'data/report_ca_balance_sheet.xml',
|
||||
'data/report_ca_profit_loss.xml',
|
||||
'views/menu_views.xml',
|
||||
],
|
||||
'auto_install': ['l10n_ca', 'fusion_accounting_reports'],
|
||||
'installable': True,
|
||||
'application': False,
|
||||
'license': 'LGPL-3',
|
||||
'author': 'Westin / Fusion Suite',
|
||||
'icon': '/fusion_accounting_l10n_ca/static/description/icon.png',
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
<record id="seq_fusion_tax_return" model="ir.sequence">
|
||||
<field name="name">Fusion Tax Return</field>
|
||||
<field name="code">fusion.tax.return</field>
|
||||
<field name="prefix">TAX/%(year)s/</field>
|
||||
<field name="padding">4</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
<record id="report_ca_balance_sheet" model="fusion.report">
|
||||
<field name="name">Balance Sheet (Canada)</field>
|
||||
<field name="code">ca_balance_sheet</field>
|
||||
<field name="report_type">balance_sheet</field>
|
||||
<field name="sequence">21</field>
|
||||
<field name="default_comparison_mode">previous_period</field>
|
||||
<field name="description">Canadian-formatted balance sheet aligned to GAAP/IFRS classifications used in Canada.</field>
|
||||
<field name="line_specs" eval="[
|
||||
{'label': 'ASSETS', 'level': 0},
|
||||
{'label': 'Current Assets', 'level': 1},
|
||||
{'label': 'Cash and Bank', 'account_type_prefix': 'asset_cash', 'sign': 1, 'level': 2},
|
||||
{'label': 'Accounts Receivable', 'account_type_prefix': 'asset_receivable', 'sign': 1, 'level': 2},
|
||||
{'label': 'Inventory', 'account_type_prefix': 'asset_current', 'sign': 1, 'level': 2},
|
||||
{'label': 'Prepaid Expenses', 'account_type_prefix': 'asset_prepayments', 'sign': 1, 'level': 2},
|
||||
{'label': 'Total Current Assets', 'compute': 'subtotal', 'above': 4, 'sign': 1, 'level': 1},
|
||||
|
||||
{'label': 'Non-Current Assets', 'level': 1},
|
||||
{'label': 'Property, Plant and Equipment', 'account_type_prefix': 'asset_fixed', 'sign': 1, 'level': 2},
|
||||
{'label': 'Intangible Assets', 'account_type_prefix': 'asset_non_current', 'sign': 1, 'level': 2},
|
||||
{'label': 'Total Non-Current Assets', 'compute': 'subtotal', 'above': 2, 'sign': 1, 'level': 1},
|
||||
|
||||
{'label': 'TOTAL ASSETS', 'compute': 'subtotal', 'above': 2, 'sign': 1, 'level': 0},
|
||||
|
||||
{'label': 'LIABILITIES', 'level': 0},
|
||||
{'label': 'Current Liabilities', 'level': 1},
|
||||
{'label': 'Accounts Payable', 'account_type_prefix': 'liability_payable', 'sign': -1, 'level': 2},
|
||||
{'label': 'Tax Payable (GST/HST/PST)', 'account_type_prefix': 'liability_current', 'sign': -1, 'level': 2},
|
||||
{'label': 'Total Current Liabilities', 'compute': 'subtotal', 'above': 2, 'sign': 1, 'level': 1},
|
||||
|
||||
{'label': 'Long-Term Liabilities', 'account_type_prefix': 'liability_non_current', 'sign': -1, 'level': 1},
|
||||
|
||||
{'label': 'TOTAL LIABILITIES', 'compute': 'subtotal', 'above': 2, 'sign': 1, 'level': 0},
|
||||
|
||||
{'label': 'EQUITY', 'level': 0},
|
||||
{'label': 'Share Capital', 'account_type_prefix': 'equity', 'sign': -1, 'level': 1},
|
||||
{'label': 'Retained Earnings', 'account_type_prefix': 'equity_unaffected', 'sign': -1, 'level': 1},
|
||||
{'label': 'TOTAL EQUITY', 'compute': 'subtotal', 'above': 2, 'sign': 1, 'level': 0},
|
||||
|
||||
{'label': 'TOTAL LIABILITIES + EQUITY', 'compute': 'subtotal', 'above': 2, 'sign': 1, 'level': 0}
|
||||
]"/>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo noupdate="1">
|
||||
<record id="report_ca_profit_loss" model="fusion.report">
|
||||
<field name="name">Profit and Loss (Canada)</field>
|
||||
<field name="code">ca_profit_loss</field>
|
||||
<field name="report_type">pnl</field>
|
||||
<field name="sequence">12</field>
|
||||
<field name="default_comparison_mode">previous_year</field>
|
||||
<field name="description">Canadian-formatted income statement.</field>
|
||||
<field name="line_specs" eval="[
|
||||
{'label': 'OPERATING REVENUE', 'level': 0},
|
||||
{'label': 'Sales Revenue', 'account_type_prefix': 'income', 'sign': -1, 'level': 1},
|
||||
{'label': 'Other Operating Revenue', 'account_type_prefix': 'income_other', 'sign': -1, 'level': 1},
|
||||
{'label': 'Total Revenue', 'compute': 'subtotal', 'above': 2, 'sign': 1, 'level': 0},
|
||||
|
||||
{'label': 'COST OF GOODS SOLD', 'level': 0},
|
||||
{'label': 'Direct Costs', 'account_type_prefix': 'expense_direct_cost', 'sign': -1, 'level': 1},
|
||||
|
||||
{'label': 'GROSS PROFIT', 'compute': 'subtotal', 'above': 2, 'sign': 1, 'level': 0},
|
||||
|
||||
{'label': 'OPERATING EXPENSES', 'level': 0},
|
||||
{'label': 'Operating Expenses', 'account_type_prefix': 'expense', 'sign': -1, 'level': 1},
|
||||
{'label': 'Depreciation', 'account_type_prefix': 'expense_depreciation', 'sign': -1, 'level': 1},
|
||||
|
||||
{'label': 'OPERATING INCOME', 'compute': 'subtotal', 'above': 3, 'sign': 1, 'level': 0},
|
||||
|
||||
{'label': 'NET INCOME BEFORE TAX', 'compute': 'subtotal', 'above': 1, 'sign': 1, 'level': 0}
|
||||
]"/>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,88 @@
|
||||
# Graph Report - /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca (2026-04-22)
|
||||
|
||||
## Corpus Check
|
||||
- 7 files · ~3,102 words
|
||||
- Verdict: corpus is large enough that graph structure adds value.
|
||||
|
||||
## Summary
|
||||
- 19 nodes · 16 edges · 8 communities detected
|
||||
- Extraction: 94% EXTRACTED · 6% INFERRED · 0% AMBIGUOUS · INFERRED: 1 edges (avg confidence: 0.8)
|
||||
- Token cost: 0 input · 0 output
|
||||
|
||||
## Community Hubs (Navigation)
|
||||
- [[_COMMUNITY_Community 0|Community 0]]
|
||||
- [[_COMMUNITY_Community 1|Community 1]]
|
||||
- [[_COMMUNITY_Community 2|Community 2]]
|
||||
- [[_COMMUNITY_Community 3|Community 3]]
|
||||
- [[_COMMUNITY_Community 4|Community 4]]
|
||||
- [[_COMMUNITY_Community 5|Community 5]]
|
||||
- [[_COMMUNITY_Community 6|Community 6]]
|
||||
- [[_COMMUNITY_Community 7|Community 7]]
|
||||
|
||||
## God Nodes (most connected - your core abstractions)
|
||||
1. `TestL10nCa` - 5 edges
|
||||
2. `FusionTaxReturn` - 2 edges
|
||||
3. `create()` - 2 edges
|
||||
4. `Pre-migration: convert legacy act_window Canadian report actions. Sibling of fu` - 1 edges
|
||||
5. `Fusion-native tax return tracking. A simpler replacement for Enterprise's `acco` - 1 edges
|
||||
|
||||
## Surprising Connections (you probably didn't know these)
|
||||
- None detected - all connections are within the same source files.
|
||||
|
||||
## Communities
|
||||
|
||||
### Community 0 - "Community 0"
|
||||
Cohesion: 0.4
|
||||
Nodes (2): TestL10nCa, TransactionCase
|
||||
|
||||
### Community 1 - "Community 1"
|
||||
Cohesion: 0.4
|
||||
Nodes (2): FusionTaxReturn, Fusion-native tax return tracking. A simpler replacement for Enterprise's `acco
|
||||
|
||||
### Community 2 - "Community 2"
|
||||
Cohesion: 0.67
|
||||
Nodes (1): Pre-migration: convert legacy act_window Canadian report actions. Sibling of fu
|
||||
|
||||
### Community 3 - "Community 3"
|
||||
Cohesion: 1.0
|
||||
Nodes (1): create()
|
||||
|
||||
### Community 4 - "Community 4"
|
||||
Cohesion: 1.0
|
||||
Nodes (0):
|
||||
|
||||
### Community 5 - "Community 5"
|
||||
Cohesion: 1.0
|
||||
Nodes (0):
|
||||
|
||||
### Community 6 - "Community 6"
|
||||
Cohesion: 1.0
|
||||
Nodes (0):
|
||||
|
||||
### Community 7 - "Community 7"
|
||||
Cohesion: 1.0
|
||||
Nodes (0):
|
||||
|
||||
## Knowledge Gaps
|
||||
- **2 isolated node(s):** `Pre-migration: convert legacy act_window Canadian report actions. Sibling of fu`, `Fusion-native tax return tracking. A simpler replacement for Enterprise's `acco`
|
||||
These have ≤1 connection - possible missing edges or undocumented components.
|
||||
- **Thin community `Community 3`** (2 nodes): `create()`, `.test_tax_return_create()`
|
||||
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
||||
- **Thin community `Community 4`** (1 nodes): `__init__.py`
|
||||
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
||||
- **Thin community `Community 5`** (1 nodes): `__init__.py`
|
||||
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
||||
- **Thin community `Community 6`** (1 nodes): `__init__.py`
|
||||
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
||||
- **Thin community `Community 7`** (1 nodes): `__manifest__.py`
|
||||
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
|
||||
|
||||
## Suggested Questions
|
||||
_Questions this graph is uniquely positioned to answer:_
|
||||
|
||||
- **Why does `TestL10nCa` connect `Community 0` to `Community 3`?**
|
||||
_High betweenness centrality (0.222) - this node is a cross-community bridge._
|
||||
- **Why does `create()` connect `Community 3` to `Community 1`?**
|
||||
_High betweenness centrality (0.196) - this node is a cross-community bridge._
|
||||
- **What connects `Pre-migration: convert legacy act_window Canadian report actions. Sibling of fu`, `Fusion-native tax return tracking. A simpler replacement for Enterprise's `acco` to the rest of the system?**
|
||||
_2 weakly-connected nodes found - possible documentation gaps or missing edges._
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_migrations_19_0_1_1_1_pre_migration_py", "label": "pre-migration.py", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L1"}, {"id": "pre_migration_migrate", "label": "migrate()", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L18"}, {"id": "pre_migration_rationale_1", "label": "Pre-migration: convert legacy act_window Canadian report actions. Sibling of fu", "file_type": "rationale", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L1"}], "edges": [{"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_migrations_19_0_1_1_1_pre_migration_py", "target": "logging", "relation": "imports", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L7", "weight": 1.0}, {"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_migrations_19_0_1_1_1_pre_migration_py", "target": "pre_migration_migrate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L18", "weight": 1.0}, {"source": "pre_migration_rationale_1", "target": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_migrations_19_0_1_1_1_pre_migration_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L1", "weight": 1.0}], "raw_calls": [{"caller_nid": "pre_migration_migrate", "callee": "execute", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L23"}, {"caller_nid": "pre_migration_migrate", "callee": "fetchone", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L31"}, {"caller_nid": "pre_migration_migrate", "callee": "execute", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L37"}, {"caller_nid": "pre_migration_migrate", "callee": "execute", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L38"}, {"caller_nid": "pre_migration_migrate", "callee": "execute", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L39"}, {"caller_nid": "pre_migration_migrate", "callee": "info", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L41"}, {"caller_nid": "pre_migration_migrate", "callee": "info", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py", "source_location": "L44"}]}
|
||||
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_manifest_py", "label": "__manifest__.py", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/__manifest__.py", "source_location": "L1"}], "edges": [], "raw_calls": []}
|
||||
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/__init__.py", "source_location": "L1"}], "edges": [{"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_init_py", "target": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_init_py", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/__init__.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
|
||||
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/__init__.py", "source_location": "L1"}], "edges": [{"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_init_py", "target": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_init_py", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/__init__.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
|
||||
@@ -0,0 +1 @@
|
||||
{"nodes": [{"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/__init__.py", "source_location": "L1"}], "edges": [{"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_init_py", "target": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_init_py", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/__init__.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,373 @@
|
||||
{
|
||||
"directed": false,
|
||||
"multigraph": false,
|
||||
"graph": {},
|
||||
"nodes": [
|
||||
{
|
||||
"label": "__init__.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/__init__.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_init_py",
|
||||
"community": 4,
|
||||
"norm_label": "__init__.py"
|
||||
},
|
||||
{
|
||||
"label": "__manifest__.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/__manifest__.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_manifest_py",
|
||||
"community": 7,
|
||||
"norm_label": "__manifest__.py"
|
||||
},
|
||||
{
|
||||
"label": "pre-migration.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_migrations_19_0_1_1_1_pre_migration_py",
|
||||
"community": 2,
|
||||
"norm_label": "pre-migration.py"
|
||||
},
|
||||
{
|
||||
"label": "migrate()",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py",
|
||||
"source_location": "L18",
|
||||
"id": "pre_migration_migrate",
|
||||
"community": 2,
|
||||
"norm_label": "migrate()"
|
||||
},
|
||||
{
|
||||
"label": "Pre-migration: convert legacy act_window Canadian report actions. Sibling of fu",
|
||||
"file_type": "rationale",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py",
|
||||
"source_location": "L1",
|
||||
"id": "pre_migration_rationale_1",
|
||||
"community": 2,
|
||||
"norm_label": "pre-migration: convert legacy act_window canadian report actions. sibling of fu"
|
||||
},
|
||||
{
|
||||
"label": "__init__.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/__init__.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_init_py",
|
||||
"community": 5,
|
||||
"norm_label": "__init__.py"
|
||||
},
|
||||
{
|
||||
"label": "test_l10n_ca.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_test_l10n_ca_py",
|
||||
"community": 0,
|
||||
"norm_label": "test_l10n_ca.py"
|
||||
},
|
||||
{
|
||||
"label": "TestL10nCa",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L8",
|
||||
"id": "test_l10n_ca_testl10nca",
|
||||
"community": 0,
|
||||
"norm_label": "testl10nca"
|
||||
},
|
||||
{
|
||||
"label": "TransactionCase",
|
||||
"file_type": "code",
|
||||
"source_file": "",
|
||||
"source_location": "",
|
||||
"id": "transactioncase",
|
||||
"community": 0,
|
||||
"norm_label": "transactioncase"
|
||||
},
|
||||
{
|
||||
"label": ".test_canadian_reports_seeded()",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L10",
|
||||
"id": "test_l10n_ca_testl10nca_test_canadian_reports_seeded",
|
||||
"community": 0,
|
||||
"norm_label": ".test_canadian_reports_seeded()"
|
||||
},
|
||||
{
|
||||
"label": ".test_canadian_pnl_runs_via_engine()",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L19",
|
||||
"id": "test_l10n_ca_testl10nca_test_canadian_pnl_runs_via_engine",
|
||||
"community": 0,
|
||||
"norm_label": ".test_canadian_pnl_runs_via_engine()"
|
||||
},
|
||||
{
|
||||
"label": ".test_tax_return_create()",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L29",
|
||||
"id": "test_l10n_ca_testl10nca_test_tax_return_create",
|
||||
"community": 3,
|
||||
"norm_label": ".test_tax_return_create()"
|
||||
},
|
||||
{
|
||||
"label": "__init__.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/__init__.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_init_py",
|
||||
"community": 6,
|
||||
"norm_label": "__init__.py"
|
||||
},
|
||||
{
|
||||
"label": "fusion_tax_return.py",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L1",
|
||||
"id": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_fusion_tax_return_py",
|
||||
"community": 1,
|
||||
"norm_label": "fusion_tax_return.py"
|
||||
},
|
||||
{
|
||||
"label": "FusionTaxReturn",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L13",
|
||||
"id": "fusion_tax_return_fusiontaxreturn",
|
||||
"community": 1,
|
||||
"norm_label": "fusiontaxreturn"
|
||||
},
|
||||
{
|
||||
"label": "create()",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L68",
|
||||
"id": "fusion_tax_return_create",
|
||||
"community": 3,
|
||||
"norm_label": "create()"
|
||||
},
|
||||
{
|
||||
"label": "_check_period()",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L77",
|
||||
"id": "fusion_tax_return_check_period",
|
||||
"community": 1,
|
||||
"norm_label": "_check_period()"
|
||||
},
|
||||
{
|
||||
"label": ".action_mark_filed()",
|
||||
"file_type": "code",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L82",
|
||||
"id": "fusion_tax_return_fusiontaxreturn_action_mark_filed",
|
||||
"community": 1,
|
||||
"norm_label": ".action_mark_filed()"
|
||||
},
|
||||
{
|
||||
"label": "Fusion-native tax return tracking. A simpler replacement for Enterprise's `acco",
|
||||
"file_type": "rationale",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L1",
|
||||
"id": "fusion_tax_return_rationale_1",
|
||||
"community": 1,
|
||||
"norm_label": "fusion-native tax return tracking. a simpler replacement for enterprise's `acco"
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{
|
||||
"relation": "imports_from",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/__init__.py",
|
||||
"source_location": "L1",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_init_py",
|
||||
"_tgt": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_init_py",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_init_py",
|
||||
"target": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_init_py",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "contains",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py",
|
||||
"source_location": "L18",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_migrations_19_0_1_1_1_pre_migration_py",
|
||||
"_tgt": "pre_migration_migrate",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_migrations_19_0_1_1_1_pre_migration_py",
|
||||
"target": "pre_migration_migrate",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "rationale_for",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/migrations/19.0.1.1.1/pre-migration.py",
|
||||
"source_location": "L1",
|
||||
"weight": 1.0,
|
||||
"_src": "pre_migration_rationale_1",
|
||||
"_tgt": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_migrations_19_0_1_1_1_pre_migration_py",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_migrations_19_0_1_1_1_pre_migration_py",
|
||||
"target": "pre_migration_rationale_1",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "imports_from",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/__init__.py",
|
||||
"source_location": "L1",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_init_py",
|
||||
"_tgt": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_init_py",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_init_py",
|
||||
"target": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_init_py",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "contains",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L8",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_test_l10n_ca_py",
|
||||
"_tgt": "test_l10n_ca_testl10nca",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_tests_test_l10n_ca_py",
|
||||
"target": "test_l10n_ca_testl10nca",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "inherits",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L8",
|
||||
"weight": 1.0,
|
||||
"_src": "test_l10n_ca_testl10nca",
|
||||
"_tgt": "transactioncase",
|
||||
"source": "test_l10n_ca_testl10nca",
|
||||
"target": "transactioncase",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "method",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L10",
|
||||
"weight": 1.0,
|
||||
"_src": "test_l10n_ca_testl10nca",
|
||||
"_tgt": "test_l10n_ca_testl10nca_test_canadian_reports_seeded",
|
||||
"source": "test_l10n_ca_testl10nca",
|
||||
"target": "test_l10n_ca_testl10nca_test_canadian_reports_seeded",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "method",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L19",
|
||||
"weight": 1.0,
|
||||
"_src": "test_l10n_ca_testl10nca",
|
||||
"_tgt": "test_l10n_ca_testl10nca_test_canadian_pnl_runs_via_engine",
|
||||
"source": "test_l10n_ca_testl10nca",
|
||||
"target": "test_l10n_ca_testl10nca_test_canadian_pnl_runs_via_engine",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "method",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L29",
|
||||
"weight": 1.0,
|
||||
"_src": "test_l10n_ca_testl10nca",
|
||||
"_tgt": "test_l10n_ca_testl10nca_test_tax_return_create",
|
||||
"source": "test_l10n_ca_testl10nca",
|
||||
"target": "test_l10n_ca_testl10nca_test_tax_return_create",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "calls",
|
||||
"confidence": "INFERRED",
|
||||
"confidence_score": 0.8,
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/tests/test_l10n_ca.py",
|
||||
"source_location": "L30",
|
||||
"weight": 1.0,
|
||||
"_src": "test_l10n_ca_testl10nca_test_tax_return_create",
|
||||
"_tgt": "fusion_tax_return_create",
|
||||
"source": "test_l10n_ca_testl10nca_test_tax_return_create",
|
||||
"target": "fusion_tax_return_create"
|
||||
},
|
||||
{
|
||||
"relation": "imports_from",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/__init__.py",
|
||||
"source_location": "L1",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_init_py",
|
||||
"_tgt": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_init_py",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_init_py",
|
||||
"target": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_init_py",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "contains",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L13",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_fusion_tax_return_py",
|
||||
"_tgt": "fusion_tax_return_fusiontaxreturn",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_fusion_tax_return_py",
|
||||
"target": "fusion_tax_return_fusiontaxreturn",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "contains",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L68",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_fusion_tax_return_py",
|
||||
"_tgt": "fusion_tax_return_create",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_fusion_tax_return_py",
|
||||
"target": "fusion_tax_return_create",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "contains",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L77",
|
||||
"weight": 1.0,
|
||||
"_src": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_fusion_tax_return_py",
|
||||
"_tgt": "fusion_tax_return_check_period",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_fusion_tax_return_py",
|
||||
"target": "fusion_tax_return_check_period",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "rationale_for",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L1",
|
||||
"weight": 1.0,
|
||||
"_src": "fusion_tax_return_rationale_1",
|
||||
"_tgt": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_fusion_tax_return_py",
|
||||
"source": "users_gurpreet_github_odoo_modules_fusion_accounting_l10n_ca_models_fusion_tax_return_py",
|
||||
"target": "fusion_tax_return_rationale_1",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"relation": "method",
|
||||
"confidence": "EXTRACTED",
|
||||
"source_file": "/Users/gurpreet/Github/Odoo-Modules/fusion_accounting_l10n_ca/models/fusion_tax_return.py",
|
||||
"source_location": "L82",
|
||||
"weight": 1.0,
|
||||
"_src": "fusion_tax_return_fusiontaxreturn",
|
||||
"_tgt": "fusion_tax_return_fusiontaxreturn_action_mark_filed",
|
||||
"source": "fusion_tax_return_fusiontaxreturn",
|
||||
"target": "fusion_tax_return_fusiontaxreturn_action_mark_filed",
|
||||
"confidence_score": 1.0
|
||||
}
|
||||
],
|
||||
"hyperedges": []
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
"""Pre-migration: convert legacy act_window Canadian report actions.
|
||||
|
||||
Sibling of fusion_accounting_reports/migrations/19.0.1.1.2/pre-migration.py.
|
||||
See that file for the full rationale.
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
LEGACY_XIDS = (
|
||||
'action_fusion_report_ca_pnl',
|
||||
'action_fusion_report_ca_bs',
|
||||
)
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
if not version:
|
||||
return
|
||||
deleted = 0
|
||||
for name in LEGACY_XIDS:
|
||||
cr.execute(
|
||||
"""
|
||||
SELECT id, model, res_id
|
||||
FROM ir_model_data
|
||||
WHERE module = 'fusion_accounting_l10n_ca' AND name = %s
|
||||
""",
|
||||
(name,),
|
||||
)
|
||||
row = cr.fetchone()
|
||||
if not row:
|
||||
continue
|
||||
ir_md_id, model, res_id = row
|
||||
if model != 'ir.actions.act_window':
|
||||
continue
|
||||
cr.execute("DELETE FROM ir_act_window WHERE id = %s", (res_id,))
|
||||
cr.execute("DELETE FROM ir_actions WHERE id = %s", (res_id,))
|
||||
cr.execute("DELETE FROM ir_model_data WHERE id = %s", (ir_md_id,))
|
||||
deleted += 1
|
||||
_logger.info("Dropped legacy act_window for fusion_accounting_l10n_ca.%s", name)
|
||||
|
||||
if deleted:
|
||||
_logger.info(
|
||||
"fusion_accounting_l10n_ca pre-migration: dropped %d legacy "
|
||||
"act_window records to make way for ir.actions.client variants.",
|
||||
deleted,
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
from . import fusion_tax_return
|
||||
@@ -0,0 +1,92 @@
|
||||
"""Fusion-native tax return tracking.
|
||||
|
||||
A simpler replacement for Enterprise's `account.return` model: a tax
|
||||
return is a (return_type, period_from, period_to, status) record. Filers
|
||||
mark them filed once submitted to CRA / Revenu Quebec / provincial
|
||||
authorities.
|
||||
"""
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class FusionTaxReturn(models.Model):
|
||||
_name = "fusion.tax.return"
|
||||
_inherit = ["mail.thread"]
|
||||
_description = "Fusion Tax Return Filing"
|
||||
_order = "date_to desc, id desc"
|
||||
|
||||
name = fields.Char(
|
||||
string="Reference",
|
||||
required=True,
|
||||
copy=False,
|
||||
index=True,
|
||||
default=lambda self: _("New"),
|
||||
)
|
||||
return_type = fields.Selection(
|
||||
[
|
||||
("gst_hst", "GST/HST Return"),
|
||||
("pst", "PST Return"),
|
||||
("qst", "QST Return"),
|
||||
("t4", "T4 Slip"),
|
||||
("t5018", "T5018 Statement"),
|
||||
("payroll_remittance", "Payroll Source Deductions"),
|
||||
("other", "Other"),
|
||||
],
|
||||
required=True,
|
||||
default="gst_hst",
|
||||
tracking=True,
|
||||
)
|
||||
|
||||
company_id = fields.Many2one(
|
||||
"res.company",
|
||||
required=True,
|
||||
default=lambda self: self.env.company,
|
||||
)
|
||||
currency_id = fields.Many2one(related="company_id.currency_id")
|
||||
|
||||
date_from = fields.Date(string="Period Start", required=True)
|
||||
date_to = fields.Date(string="Period End", required=True)
|
||||
|
||||
state = fields.Selection(
|
||||
[
|
||||
("draft", "Draft"),
|
||||
("to_file", "To File"),
|
||||
("filed", "Filed"),
|
||||
("cancelled", "Cancelled"),
|
||||
],
|
||||
default="draft",
|
||||
required=True,
|
||||
tracking=True,
|
||||
)
|
||||
|
||||
filing_date = fields.Date(string="Filed On")
|
||||
filing_reference = fields.Char(string="Confirmation #")
|
||||
notes = fields.Text()
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
for vals in vals_list:
|
||||
if vals.get("name", _("New")) == _("New"):
|
||||
vals["name"] = self.env["ir.sequence"].next_by_code(
|
||||
"fusion.tax.return"
|
||||
) or _("New")
|
||||
return super().create(vals_list)
|
||||
|
||||
@api.constrains("date_from", "date_to")
|
||||
def _check_period(self):
|
||||
for r in self:
|
||||
if r.date_from and r.date_to and r.date_from > r.date_to:
|
||||
raise UserError(_("Period start must precede period end."))
|
||||
|
||||
def action_mark_filed(self):
|
||||
self.ensure_one()
|
||||
if self.state != "to_file":
|
||||
raise UserError(_("Can only mark 'To File' returns as filed."))
|
||||
self.write(
|
||||
{
|
||||
"state": "filed",
|
||||
"filing_date": fields.Date.context_today(self),
|
||||
}
|
||||
)
|
||||
return True
|
||||
@@ -0,0 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_fusion_tax_return_user,fusion.tax.return.user,model_fusion_tax_return,base.group_user,1,0,0,0
|
||||
access_fusion_tax_return_manager,fusion.tax.return.manager,model_fusion_tax_return,account.group_account_manager,1,1,1,1
|
||||
|
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
@@ -0,0 +1 @@
|
||||
from . import test_l10n_ca
|
||||
@@ -0,0 +1,36 @@
|
||||
from datetime import date
|
||||
|
||||
from odoo.tests import tagged
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestL10nCa(TransactionCase):
|
||||
|
||||
def test_canadian_reports_seeded(self):
|
||||
Report = self.env["fusion.report"].sudo()
|
||||
ca_bs = Report.search([("code", "=", "ca_balance_sheet")], limit=1)
|
||||
ca_pl = Report.search([("code", "=", "ca_profit_loss")], limit=1)
|
||||
self.assertTrue(ca_bs, "ca_balance_sheet not seeded")
|
||||
self.assertTrue(ca_pl, "ca_profit_loss not seeded")
|
||||
self.assertEqual(ca_bs.report_type, "balance_sheet")
|
||||
self.assertEqual(ca_pl.report_type, "pnl")
|
||||
|
||||
def test_canadian_pnl_runs_via_engine(self):
|
||||
from odoo.addons.fusion_accounting_reports.services.date_periods import Period
|
||||
|
||||
period = Period(date(2025, 1, 1), date(2025, 12, 31), "FY 2025")
|
||||
result = self.env["fusion.report.engine"].compute_pnl(
|
||||
period, report_code="ca_profit_loss",
|
||||
)
|
||||
self.assertEqual(result["report_name"], "Profit and Loss (Canada)")
|
||||
self.assertGreater(len(result["rows"]), 0)
|
||||
|
||||
def test_tax_return_create(self):
|
||||
ret = self.env["fusion.tax.return"].create({
|
||||
"return_type": "gst_hst",
|
||||
"date_from": date(2025, 1, 1),
|
||||
"date_to": date(2025, 3, 31),
|
||||
})
|
||||
self.assertNotEqual(ret.name, "New")
|
||||
self.assertEqual(ret.state, "draft")
|
||||
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!--
|
||||
Canadian-flavored P&L + BS menus. Live alongside the rest of the
|
||||
Fusion reports under Accounting > Reporting. Open the OWL
|
||||
ReportViewer with the Canadian report_code so the line_specs
|
||||
come from the Canadian definitions seeded in this module.
|
||||
-->
|
||||
|
||||
<record id="action_fusion_report_ca_pnl" model="ir.actions.client">
|
||||
<field name="name">Profit and Loss (Canada)</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'pnl', 'default_report_code': 'ca_profit_loss', 'default_comparison': 'previous_year'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_report_ca_bs" model="ir.actions.client">
|
||||
<field name="name">Balance Sheet (Canada)</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'balance_sheet', 'default_report_code': 'ca_balance_sheet', 'default_comparison': 'previous_period'}</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_fusion_report_ca_pnl"
|
||||
name="Profit and Loss (Canada)"
|
||||
parent="account.menu_finance_reports"
|
||||
action="action_fusion_report_ca_pnl"
|
||||
sequence="15"
|
||||
groups="fusion_accounting_core.group_fusion_show_when_enterprise_absent"/>
|
||||
<menuitem id="menu_fusion_report_ca_bs"
|
||||
name="Balance Sheet (Canada)"
|
||||
parent="account.menu_finance_reports"
|
||||
action="action_fusion_report_ca_bs"
|
||||
sequence="16"
|
||||
groups="fusion_accounting_core.group_fusion_show_when_enterprise_absent"/>
|
||||
|
||||
<!-- Tax-return tracking list -->
|
||||
<record id="action_fusion_tax_return" model="ir.actions.act_window">
|
||||
<field name="name">Tax Returns</field>
|
||||
<field name="res_model">fusion.tax.return</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">No tax returns recorded yet</p>
|
||||
<p>Track GST/HST/PST/T4/T5018/payroll-remittance filings.
|
||||
Each return covers a (date_from, date_to) window and moves
|
||||
from draft \u2192 to-file \u2192 filed as you submit it.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_fusion_tax_return"
|
||||
name="Tax Returns (CA)"
|
||||
parent="account.menu_finance_configuration"
|
||||
action="action_fusion_tax_return"
|
||||
sequence="100"
|
||||
groups="fusion_accounting_core.group_fusion_show_when_enterprise_absent"/>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user