Files
famlaw/activeblue_familylaw/views/fl_timesheet_views.xml
tocmo0nlord c1b5947b7c Make module installable on stock Odoo 18 (verified via test DB install)
Caught and fixed by running an actual install on a throwaway DB:

- Strip 29 # comment lines from ir.model.access.csv (Odoo CSV loader treats
  them as malformed rows → IndexError); 79 data rows preserved
- Remove obsolete ir.cron.numbercall field (removed in Odoo 17+) from 4 cron
  records in fl_deadline_rules.xml
- Rename <tree>→<list> across 26 sites; inside x2many inline views Odoo 18 no
  longer recognizes <tree>, which made it fall back to the outer model and
  reject inner fields ("Field 'partner_id' does not exist in model 'fl.case'")
- Add store=True to non-stored computed fields referenced by search filters,
  which Odoo 18 now rejects as unsearchable:
  - fl.case: overdue_deadline_count, next_deadline_label
  - fl.deposition: notice_valid

Module loads cleanly: 31 fl.* models registered, no errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 03:28:55 +00:00

85 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_fl_timesheet_tree" model="ir.ui.view">
<field name="name">fl.timesheet.tree</field>
<field name="model">fl.timesheet</field>
<field name="arch" type="xml">
<list string="Timesheet Entries" editable="bottom"
decoration-muted="is_billable == False">
<field name="date"/>
<field name="case_id"/>
<field name="name"/>
<field name="employee_id"/>
<field name="duration_hours" sum="Hours"/>
<field name="is_billable"/>
<field name="ai_agent" readonly="1"/>
<field name="hourly_rate" readonly="1"/>
<field name="billable_amount" readonly="1" sum="Amount"/>
<field name="currency_id" column_invisible="1"/>
</list>
</field>
</record>
<record id="view_fl_timesheet_form" model="ir.ui.view">
<field name="name">fl.timesheet.form</field>
<field name="model">fl.timesheet</field>
<field name="arch" type="xml">
<form string="Timesheet Entry">
<sheet>
<group>
<group>
<field name="case_id"/>
<field name="employee_id"/>
<field name="date"/>
<field name="name"/>
</group>
<group>
<field name="duration_hours"/>
<field name="is_billable"/>
<field name="ai_agent" readonly="1"/>
<field name="hourly_rate" readonly="1"/>
<field name="billable_amount" readonly="1"/>
<field name="currency_id" invisible="1"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_fl_timesheet_search" model="ir.ui.view">
<field name="name">fl.timesheet.search</field>
<field name="model">fl.timesheet</field>
<field name="arch" type="xml">
<search string="Search Timesheets">
<field name="case_id"/>
<field name="employee_id"/>
<filter string="Billable" name="billable"
domain="[('is_billable', '=', True)]"/>
<filter string="AI Audit" name="ai_audit"
domain="[('ai_agent', '!=', False)]"/>
<group expand="0" string="Group By">
<filter string="Case" name="group_case"
context="{'group_by': 'case_id'}"/>
<filter string="Employee" name="group_employee"
context="{'group_by': 'employee_id'}"/>
<filter string="AI Agent" name="group_ai"
context="{'group_by': 'ai_agent'}"/>
</group>
</search>
</field>
</record>
<record id="action_fl_timesheet_list" model="ir.actions.act_window">
<field name="name">Timesheets</field>
<field name="res_model">fl.timesheet</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_fl_timesheet_search"/>
<field name="context">{'search_default_billable': 1}</field>
</record>
</data>
</odoo>