Add timesheet / AI-audit time tracking (wraps account.analytic.line)
- fl.timesheet via delegation inheritance on account.analytic.line so billable hours flow through standard Odoo Accounting; duration_hours maps to unit_amount - Fields: case_id, employee_id, is_billable, ai_agent, duration_hours, computed hourly_rate/billable_amount (rate from hr.employee.fl_hourly_rate, else firm default ir.config_parameter fl_timesheet.default_hourly_rate) - _resolve_analytic_account: prefers the case project's analytic account (version-agnostic field lookup), falls back to a cached firm account under any available analytic plan — handles the required account_id on the wrapped line - Add 'analytic' to manifest depends; ACL for fl.timesheet and account.analytic.line (admin + paralegal) so non-admins can post entries - fl.case: timesheet_ids + total_billable_hours/amount + total_ai_audit_hours + currency_id; new Time & Billing tab; Timesheets menu + standalone views - Both AI agents now log non-billable audit entries via sudo() (paralegal + attorney, ai_agent set); logging stays a guarded no-op if creation fails Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -81,6 +81,12 @@ access_fl_income_withholding_petitioner,fl.income.withholding petitioner,model_f
|
||||
# ── fl.conflict.check ────────────────────────────────────────────────────────
|
||||
access_fl_conflict_check_admin,fl.conflict.check admin,model_fl_conflict_check,group_admin,1,1,1,1
|
||||
access_fl_conflict_check_paralegal,fl.conflict.check paralegal,model_fl_conflict_check,group_paralegal,1,1,1,0
|
||||
# ── fl.timesheet ─────────────────────────────────────────────────────────────
|
||||
access_fl_timesheet_admin,fl.timesheet admin,model_fl_timesheet,group_admin,1,1,1,1
|
||||
access_fl_timesheet_paralegal,fl.timesheet paralegal,model_fl_timesheet,group_paralegal,1,1,1,0
|
||||
# ── account.analytic.line (timesheet wraps it — ensure non-admins can post) ───
|
||||
access_account_analytic_line_fl_admin,account.analytic.line fl admin,analytic.model_account_analytic_line,group_admin,1,1,1,1
|
||||
access_account_analytic_line_fl_paralegal,account.analytic.line fl paralegal,analytic.model_account_analytic_line,group_paralegal,1,1,1,0
|
||||
# ── fl.intake.wizard ─────────────────────────────────────────────────────────
|
||||
access_fl_intake_wizard_admin,fl.intake.wizard admin,model_fl_intake_wizard,group_admin,1,1,1,1
|
||||
access_fl_intake_wizard_paralegal,fl.intake.wizard paralegal,model_fl_intake_wizard,group_paralegal,1,1,1,1
|
||||
|
||||
|
Reference in New Issue
Block a user