2026-08-30 10:47:59 -04:00

104 lines
5.2 KiB
XML

<odoo>
<record id="view_mcs_ceo_action_tree" model="ir.ui.view">
<field name="name">mcs.ceo.action.tree</field>
<field name="model">mcs.ceo.action</field>
<field name="arch" type="xml">
<tree decoration-danger="priority == 'critical' or state == 'blocked'" decoration-warning="priority == 'high' or state == 'waiting'" decoration-muted="state in ('completed','cancelled')">
<field name="title"/>
<field name="category"/>
<field name="priority"/>
<field name="state"/>
<field name="date_due"/>
<field name="responsible_user_id"/>
<field name="partner_id"/>
<field name="project_id"/>
<field name="expected_financial_impact"/>
<field name="next_action"/>
</tree>
</field>
</record>
<record id="view_mcs_ceo_action_form" model="ir.ui.view">
<field name="name">mcs.ceo.action.form</field>
<field name="model">mcs.ceo.action</field>
<field name="arch" type="xml">
<form>
<header>
<button name="action_open" type="object" string="Open" invisible="state == 'open'"/>
<button name="action_waiting" type="object" string="Waiting" invisible="state == 'waiting'"/>
<button name="action_blocked" type="object" string="Blocked" invisible="state == 'blocked'"/>
<button name="action_completed" type="object" string="Complete" class="btn-primary" invisible="state == 'completed'"/>
<button name="action_cancelled" type="object" string="Cancel" invisible="state == 'cancelled'"/>
<field name="state" widget="statusbar" statusbar_visible="open,waiting,blocked,completed"/>
</header>
<sheet>
<group>
<group>
<field name="title"/>
<field name="category"/>
<field name="priority"/>
<field name="date_due"/>
<field name="responsible_user_id"/>
</group>
<group>
<field name="currency_id" invisible="1"/>
<field name="expected_financial_impact"/>
<field name="date_created"/>
<field name="date_completed"/>
</group>
</group>
<group>
<field name="partner_id"/>
<field name="project_id"/>
<field name="lead_id"/>
</group>
<group string="Decision Context">
<field name="business_impact"/>
<field name="next_action"/>
<field name="blocker"/>
</group>
<field name="notes"/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="view_mcs_ceo_action_search" model="ir.ui.view">
<field name="name">mcs.ceo.action.search</field>
<field name="model">mcs.ceo.action</field>
<field name="arch" type="xml">
<search>
<field name="title"/>
<field name="category"/>
<field name="priority"/>
<field name="state"/>
<field name="responsible_user_id"/>
<field name="partner_id"/>
<field name="project_id"/>
<filter string="Open" name="open" domain="[('state','in',('open','waiting','blocked'))]"/>
<filter string="Must Do Today" name="due_today" domain="[('date_due','&lt;=',context_today().strftime('%Y-%m-%d')),('state','in',('open','waiting','blocked'))]"/>
<filter string="Revenue Actions" name="revenue" domain="[('category','in',('sales','finance','collection'))]"/>
<filter string="Strategic Decisions" name="strategy" domain="[('category','in',('strategy','approval','partnership'))]"/>
<group expand="0" string="Group By">
<filter string="Category" name="group_category" context="{'group_by':'category'}"/>
<filter string="Priority" name="group_priority" context="{'group_by':'priority'}"/>
<filter string="State" name="group_state" context="{'group_by':'state'}"/>
<filter string="Responsible" name="group_responsible" context="{'group_by':'responsible_user_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_mcs_ceo_action" model="ir.actions.act_window">
<field name="name">CEO Actions</field>
<field name="res_model">mcs.ceo.action</field>
<field name="view_mode">tree,form,pivot,graph</field>
<field name="context">{'search_default_open': 1}</field>
</record>
</odoo>