git mv preserves history. fusion_accounting/ retains only __manifest__.py, __init__.py, CLAUDE.md, and docs/ — the meta-module shell. All Python, data, views, security, services, static, tests, wizards, report move to fusion_accounting_ai/. Manifest data list updated; security.xml move to _core deferred to Task 12. Made-with: Cursor
61 lines
2.1 KiB
Python
61 lines
2.1 KiB
Python
import logging
|
|
from odoo import models, fields, api
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
class FusionAccountingTool(models.Model):
|
|
_name = 'fusion.accounting.tool'
|
|
_description = 'Fusion Accounting AI Tool'
|
|
_order = 'domain, sequence, name'
|
|
|
|
name = fields.Char(string='Technical Name', required=True, index=True)
|
|
display_name_field = fields.Char(string='Tool Label', required=True)
|
|
description = fields.Text(string='Description', required=True)
|
|
domain = fields.Selection(
|
|
selection=[
|
|
('bank_reconciliation', 'Bank Reconciliation'),
|
|
('hst_management', 'HST/GST Management'),
|
|
('accounts_receivable', 'Accounts Receivable'),
|
|
('accounts_payable', 'Accounts Payable'),
|
|
('journal_review', 'Journal Review'),
|
|
('month_end', 'Month-End / Year-End'),
|
|
('payroll_verification', 'Payroll Verification'),
|
|
('inventory', 'Inventory & COGS'),
|
|
('adp', 'ADP Reconciliation'),
|
|
('reporting', 'Financial Reporting'),
|
|
('audit', 'Audit & Integrity'),
|
|
('payroll_management', 'Payroll Management'),
|
|
],
|
|
string='Domain',
|
|
required=True,
|
|
index=True,
|
|
)
|
|
tier = fields.Selection(
|
|
selection=[
|
|
('1', 'Tier 1 - Free (Read-Only)'),
|
|
('2', 'Tier 2 - Auto-Approved'),
|
|
('3', 'Tier 3 - Requires Approval'),
|
|
],
|
|
string='Tier',
|
|
required=True,
|
|
default='1',
|
|
)
|
|
parameters_schema = fields.Text(string='Parameters (JSON Schema)')
|
|
required_groups = fields.Char(
|
|
string='Required Groups',
|
|
help='Comma-separated XML IDs of required groups.',
|
|
)
|
|
odoo_method = fields.Char(string='Odoo Method Reference')
|
|
sequence = fields.Integer(string='Sequence', default=10)
|
|
active = fields.Boolean(string='Active', default=True)
|
|
company_id = fields.Many2one(
|
|
'res.company', string='Company',
|
|
default=lambda self: self.env.company,
|
|
)
|
|
|
|
_sql_constraints = [
|
|
('name_company_uniq', 'UNIQUE(name, company_id)',
|
|
'Tool name must be unique per company.'),
|
|
]
|