odoo/addons/crm_fundraising/crm_fundraising_view.xml

215 lines
11 KiB
XML

<?xml version="1.0"?>
<openerp>
<data>
<!-- Fund Raising Configuration Menu -->
<menuitem id="menu_config_fundrising" name="Fund Raising"
groups="base.group_no_one"
parent="base.menu_base_config" sequence="65" />
<!-- Fund Raising Categories Form View -->
<record id="crm_fund_categ_action" model="ir.actions.act_window">
<field name="name">Fundraising Categories</field>
<field name="res_model">crm.case.categ</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
<field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
<field name="context" eval="{'object_id': ref('model_crm_fundraising')}"/>
<field name="help">Manage and define the fund raising categories you want to be maintained in the system.</field>
</record>
<menuitem action="crm_fund_categ_action" name="Categories"
id="menu_crm_case_fundraising-act" groups="base.group_no_one"
parent="menu_config_fundrising" />
<!-- Fund Stage Form View -->
<record id="crm_fundraising_stage_act" model="ir.actions.act_window">
<field name="name">Fundraising Stages</field>
<field name="res_model">crm.case.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_stage_tree"/>
<field name="context">{'search_default_fundraising':1}</field>
<field name="help">Create and manage fund raising activity categories you want to be maintained in the system.</field>
</record>
<!-- Fund Raising Tree View -->
<record model="ir.ui.view" id="crm_case_tree_view_fund">
<field name="name">CRM - Funds Tree</field>
<field name="model">crm.fundraising</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Funds Tree"
colors="blue:state=='pending';grey:state in ('cancel', 'done')">
<field name="name" string="Fund Description" />
<field name="categ_id" />
<field name="type_id" string="Payment Mode" />
<field name="planned_cost" string="Amount" />
<field name="probability" />
<field name="user_id" />
<field name="state" />
<field name="partner_id" invisible="1"/>
</tree>
</field>
</record>
<!-- Fund Raising Form View -->
<record model="ir.ui.view" id="crm_case_form_view_fund">
<field name="name">CRM - Funds Form</field>
<field name="model">crm.fundraising</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form version="7.0">
<header>
<button name="case_close" string="Done" states="open,pending" type="object" />
<button name="case_open" string="Open" states="draft,pending" type="object" />
<button name="case_pending" string="Pending" states="draft,open" type="object" />
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" groups="base.group_extended" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" />
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" />
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
</header>
<sheet string="Funds Form">
<group col="4">
<field name="name" string="Name"/>
<field name="section_id" colspan="1" widget="selection"/>
<field name="user_id" string="Responsible"/>
<field name="date"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
<field name="type_id" string="Payment Mode" widget="selection"/>
</group>
<notebook>
<page string="Funds">
<group>
<group string="Communication">
<field name="partner_id"
on_change="onchange_partner_id(partner_id, email_from)"
/>
<field name="email_from"/>
</group>
<group string="Estimates">
<field name="planned_cost"/>
<field name="planned_revenue"/>
<field name="probability"/>
</group>
</group>
<separator colspan="4" string="Notes"/>
<field name="description"/>
</page>
<page string="Extra Info">
<group>
<group string="Misc">
<field name="active"/>
<field name="id"/>
<field name="priority" string="Priority"/>
</group>
<group groups="base.group_no_one" string="Dates">
<field name="create_date"/>
<field name="date_closed"/>
<field name="duration"/>
</group>
<group string="References">
<field name="ref"/>
<field name="ref2"/>
</group>
</group>
</page>
</notebook>
</sheet>
<footer>
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
</footer>
</form>
</field>
</record>
<!-- Fund Raising Calendar View -->
<record model="ir.ui.view" id="crm_case_calendar_view_fund">
<field name="name">CRM - Funds Calendar</field>
<field name="model">crm.fundraising</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Funds" date_start="date" color="user_id" date_delay="duration">
<field name="name"/>
<field name="partner_id"/>
</calendar>
</field>
</record>
<!-- Fund Raising Graph View -->
<record model="ir.ui.view" id="crm_case_graph_view_fund">
<field name="name">CRM - Funds Graph</field>
<field name="model">crm.fundraising</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Funds by Categories" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="planned_cost" operator="+"/>
<field name="state" group="True"/>
</graph>
</field>
</record>
<!-- Fund Raising Search View -->
<record id="view_crm_case_fund_filter" model="ir.ui.view">
<field name="name">CRM - Funds Search</field>
<field name="model">crm.fundraising</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Funds">
<group>
<field name="name" string="Fund Description"/>
<separator orientation="vertical" />
<filter icon="terp-check" string="New"
domain="[('state','=','draft')]" name="current"
help="New Funds" />
<filter icon="terp-camera_test" string="Open"
domain="[('state','=','open')]"
help="Open Funds" />
<filter icon="terp-gtk-media-pause"
string="Pending"
domain="[('state','=','pending')]"
help="Pending Funds" />
<separator orientation="vertical" />
<filter string="Unassigned"
icon="terp-personal-"
domain="[('user_id','=', False)]"
help="Unassigned" />
<filter string="Assigned to Me or to My Sales Team(s)"
icon="terp-personal+"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="Fund Raisings that are assigned to me or to one of the sale teams I manage" />
<separator orientation="vertical" />
<field name="state"/>
<field name="user_id"
widget="selection"/>
<field name="section_id" widget="selection" string="Sales Team"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner"
domain="[]"
context="{'group_by':'partner_id'}" />
<filter string="Responsible" icon="terp-personal"
domain="[]"
context="{'group_by':'user_id'}" />
<filter string="Category" help="Fund Category"
icon="terp-stock_symbol-selection" domain="[]"
context="{'group_by':'categ_id'}" />
<filter string="Payment Mode" help="Payment Mode"
icon="terp-dolar" domain="[]"
context="{'group_by':'type_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]"
context="{'group_by':'state'}" />
</group>
</search>
</field>
</record>
</data>
</openerp>