455 lines
23 KiB
XML
455 lines
23 KiB
XML
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
<odoo>
|
||
|
<!-- Marketing Campaign -->
|
||
|
|
||
|
<record id="act_marketing_campaing_segment_opened" model="ir.actions.act_window">
|
||
|
<field name="res_model">marketing.campaign.segment</field>
|
||
|
<field name="view_type">form</field>
|
||
|
<field name="name">Segments</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="context">{'search_default_campaign_id': [active_id], 'default_campaign_id': active_id}</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Campaign Follow-ups -->
|
||
|
|
||
|
<record id="act_marketing_campaing_followup" model="ir.actions.act_window">
|
||
|
<field name="res_model">marketing.campaign.workitem</field>
|
||
|
<field name="view_type">form</field>
|
||
|
<field name="name">Workitems</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="context">{'search_default_campaign_id': [active_id], 'default_campaign_id': active_id}</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Campaign Statistics -->
|
||
|
|
||
|
<record id="act_marketing_campaing_stat" model="ir.actions.act_window" >
|
||
|
<field name="res_model">campaign.analysis</field>
|
||
|
<field name="view_type">form</field>
|
||
|
<field name="name">Campaign Follow-up</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="context">{'search_default_campaign_id': [active_id], 'default_campaign_id': active_id}</field>
|
||
|
</record>
|
||
|
|
||
|
<!-- Campaign Followups -->
|
||
|
|
||
|
<record model="ir.ui.view" id="view_marketing_campaign_form">
|
||
|
<field name="name">marketing.campaign.form</field>
|
||
|
<field name="model">marketing.campaign</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="Marketing Campaign">
|
||
|
<header>
|
||
|
<button name="state_running_set" type="object" string="Run" states="draft" class="oe_highlight"/>
|
||
|
<button name="state_done_set" type="object" string="Done" states="running" class="oe_highlight"/>
|
||
|
<button name="state_draft_set" type="object" string="Set to Draft" states="done,cancelled"/>
|
||
|
<button name="state_cancel_set" type="object" string="Cancel Campaign" states="running"/>
|
||
|
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,running,done"/>
|
||
|
</header>
|
||
|
<sheet string="Campaign">
|
||
|
<div class="oe_button_box" name="button_box">
|
||
|
<button type="action"
|
||
|
name="%(act_marketing_campaing_stat)d"
|
||
|
class="oe_stat_button"
|
||
|
icon="fa-keyboard-o"
|
||
|
help="Marketing Campaign Statistics">
|
||
|
<div class="o_form_field o_stat_info">
|
||
|
<span class="o_stat_text">Campaign</span>
|
||
|
<span class="o_stat_text">Statistics</span>
|
||
|
</div>
|
||
|
</button>
|
||
|
<button type="action"
|
||
|
name="%(act_marketing_campaing_segment_opened)d"
|
||
|
class="oe_stat_button"
|
||
|
icon="fa-table">
|
||
|
<field name="segments_count" widget="statinfo" string="Segments"/>
|
||
|
</button>
|
||
|
<button type="action"
|
||
|
name="%(act_marketing_campaing_followup)d"
|
||
|
class="oe_stat_button"
|
||
|
icon="fa-thumbs-up"
|
||
|
string="Follow-Up"/>
|
||
|
</div>
|
||
|
<div class="oe_title">
|
||
|
<label for="name" class="oe_edit_only"/>
|
||
|
<h1><field name="name" placeholder="Marketing Campaign"/></h1>
|
||
|
</div>
|
||
|
<group>
|
||
|
<group>
|
||
|
<field name="mode"/>
|
||
|
<field name="fixed_cost"/>
|
||
|
</group>
|
||
|
<group>
|
||
|
<field name="object_id"/>
|
||
|
<field name="partner_field_id"/>
|
||
|
<field name="unique_field_id"/>
|
||
|
</group>
|
||
|
</group>
|
||
|
<separator string="Activities"/>
|
||
|
<field name="activity_ids" context="{'default_object_id': object_id, 'default_campaign_id': active_id}"/>
|
||
|
</sheet>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.ui.view" id="view_marketing_campaign_tree">
|
||
|
<field name="name">marketing.campaign.tree</field>
|
||
|
<field name="model">marketing.campaign</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree decoration-info="state == 'draft'" decoration-muted="state in ('done','cancelled')" string="Campaigns">
|
||
|
<field name="name"/>
|
||
|
<field name="object_id"/>
|
||
|
<field name="mode"/>
|
||
|
<field name="fixed_cost"/>
|
||
|
<field name="state"/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="view_marketing_campaign_diagram" model="ir.ui.view">
|
||
|
<field name="name">marketing.campaign.diagram</field>
|
||
|
<field name="model">marketing.campaign</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<diagram string="Campaign Editor">
|
||
|
<node object="marketing.campaign.activity" shape="rectangle:action_type=='subcampaign'" bgcolor="gray:start==True">
|
||
|
<field name="name"/>
|
||
|
<field name="action_type"/>
|
||
|
<field name="start" invisible="1"/>
|
||
|
<field name="condition" widget="char"/>
|
||
|
</node>
|
||
|
<arrow object="marketing.campaign.transition" source="activity_from_id" destination="activity_to_id" label="['name']">
|
||
|
<field name="activity_from_id"/>
|
||
|
<field name="activity_to_id"/>
|
||
|
<field name="interval_nbr"/>
|
||
|
<field name="interval_type"/>
|
||
|
</arrow>
|
||
|
</diagram>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="view_marketing_campaign_search" model="ir.ui.view">
|
||
|
<field name="name">marketing.campaign.search</field>
|
||
|
<field name="model">marketing.campaign</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<search string="Campaigns">
|
||
|
<field name="name" string="Campaign"/>
|
||
|
<filter string="Draft" name="draft" domain="[('state','=','draft')]"/>
|
||
|
<filter string="Running" domain="[('state','=','running')]"/>
|
||
|
<separator/>
|
||
|
<filter string="Test Mode" name="test" domain="[('mode','=','test')]"/>
|
||
|
<filter string="Manual Mode" domain="[('mode','=','manual')]"/>
|
||
|
<field name="object_id" string="Resource"/>
|
||
|
<group expand="0" string="Group By">
|
||
|
<filter string="Resource" name="Object" context="{'group_by':'object_id'}"/>
|
||
|
<filter string="Mode" name="Mode" context="{'group_by':'mode'}"/>
|
||
|
<filter string="Status" name="Status" context="{'group_by':'state'}"/>
|
||
|
</group>
|
||
|
</search>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.actions.act_window" id="action_marketing_campaign_form">
|
||
|
<field name="name">Campaigns</field>
|
||
|
<field name="type">ir.actions.act_window</field>
|
||
|
<field name="res_model">marketing.campaign</field>
|
||
|
<field name="view_type">form</field>
|
||
|
<field name="view_mode">tree,form,diagram</field>
|
||
|
<field name="view_id" ref="view_marketing_campaign_tree"/>
|
||
|
<field name="context">{'group_by': []}</field>
|
||
|
<field name="search_view_id" ref="view_marketing_campaign_search"/>
|
||
|
<field name="help" type="html">
|
||
|
<p class="oe_view_nocontent_create">
|
||
|
Click to create a marketing campaign.
|
||
|
</p><p>
|
||
|
Odoo's marketing campaign allows you to automate communication
|
||
|
to your prospects. You can define a segment (set of conditions) on
|
||
|
your leads and partners to fulfill the campaign.
|
||
|
</p><p>
|
||
|
A campaign can have many activities like sending an email, printing
|
||
|
a letter, assigning to a team, etc. These activities are triggered
|
||
|
from specific situations; contact form, 10 days after first
|
||
|
contact, if a lead is not closed yet, etc.
|
||
|
</p>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<menuitem name="Lead Automation" id="menu_marketing_campaign_root" groups="marketing_campaign.group_lead_automation_user,marketing_campaign.group_lead_automation_manager" web_icon="marketing_campaign,static/description/icon.png"
|
||
|
sequence="10"/>
|
||
|
<menuitem id="menu_marketing_campaign_campaigns" sequence="1" name="Campaigns" parent="menu_marketing_campaign_root" web_icon="marketing_campaign,static/description/icon.png"/>
|
||
|
<menuitem id="menu_marketing_campaign_form" parent="menu_marketing_campaign_campaigns" action="action_marketing_campaign_form" sequence="1"/>
|
||
|
<menuitem name="Reports" id="report_marketing_campaign" parent="menu_marketing_campaign_root"
|
||
|
sequence="99"/>
|
||
|
|
||
|
<!-- Marketing Segments -->
|
||
|
<record model="ir.ui.view" id="view_marketing_campaign_segment_form">
|
||
|
<field name="name">marketing.campaign.segment.form</field>
|
||
|
<field name="model">marketing.campaign.segment</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="Marketing Campaign Segment">
|
||
|
<header>
|
||
|
<button name="state_running_set" type="object" string="Run" states="draft" class="oe_highlight"/>
|
||
|
<button name="state_done_set" type="object" string="Close" states="running" class="oe_highlight"/>
|
||
|
<button name="state_draft_set" type="object" string="Set to Draft" states="done,cancelled"/>
|
||
|
<button name="state_cancel_set" type="object" string="Cancel Segment" states="running"/>
|
||
|
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,running,done"/>
|
||
|
</header>
|
||
|
<sheet string="Segments" >
|
||
|
<group>
|
||
|
<group>
|
||
|
<field name="name"/>
|
||
|
<field name="campaign_id"/>
|
||
|
<field name="object_id" invisible="1"/>
|
||
|
<field name="sync_mode" required="True"/>
|
||
|
<label for="sync_last_date"/>
|
||
|
<div>
|
||
|
<field name="sync_last_date" class="oe_inline"/>
|
||
|
<button string="Synchronize Manually" states="running" name="process_segment" type="object"/>
|
||
|
</div>
|
||
|
<field name="date_next_sync"/>
|
||
|
</group>
|
||
|
<group>
|
||
|
<field name="ir_filter_id"/>
|
||
|
<field name="date_run" readonly="1"/>
|
||
|
<field name="date_done" readonly="1"/>
|
||
|
</group>
|
||
|
</group>
|
||
|
</sheet>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.ui.view" id="view_marketing_campaign_segment_tree">
|
||
|
<field name="name">marketing.campaign.segment.tree</field>
|
||
|
<field name="model">marketing.campaign.segment</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree decoration-info="state == 'draft'" decoration-muted="state in ('done','cancelled')" string="Segments">
|
||
|
<field name="name"/>
|
||
|
<field name="campaign_id"/>
|
||
|
<field name="date_run"/>
|
||
|
<field name="sync_last_date"/>
|
||
|
<field name="state"/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="view_marketing_campaign_segment_search" model="ir.ui.view">
|
||
|
<field name="name">marketing.campaign.segment.search</field>
|
||
|
<field name="model">marketing.campaign.segment</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<search string="Segments">
|
||
|
<field name="name" string="Segment"/>
|
||
|
<field name="date_run"/>
|
||
|
<filter string="Running" name="running" domain="[('state','=','running')]"/>
|
||
|
<filter string="Draft" domain="[('state','=','draft')]"/>
|
||
|
<separator/>
|
||
|
<filter string="Newly Created" help="Sync mode: only records created after last sync" domain="[('sync_mode','=','create_date')]"/>
|
||
|
<filter string="Newly Modified" help="Sync mode: only records updated after last sync" domain="[('sync_mode','=','write_date')]"/>
|
||
|
<filter string="All" help="Sync mode: all records" domain="[('sync_mode','=','all')]"/>
|
||
|
<field name="campaign_id"/>
|
||
|
<field name="object_id"/>
|
||
|
<group expand="0" string="Group By">
|
||
|
<filter string="Campaign" name="Campaign" context="{'group_by':'campaign_id'}"/>
|
||
|
<filter string="Status" name="Status" context="{'group_by':'state'}"/>
|
||
|
<filter string="Launch Month" name="Launch Date" context="{'group_by':'date_run'}"/>
|
||
|
</group>
|
||
|
</search>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.actions.act_window" id="action_marketing_campaign_segment_form">
|
||
|
<field name="name">Segments</field>
|
||
|
<field name="type">ir.actions.act_window</field>
|
||
|
<field name="res_model">marketing.campaign.segment</field>
|
||
|
<field name="view_type">form</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="view_id" ref="view_marketing_campaign_segment_tree"/>
|
||
|
<field name="search_view_id" ref="view_marketing_campaign_segment_search"/>
|
||
|
<field name="context">{'group_by': []}</field>
|
||
|
</record>
|
||
|
|
||
|
<menuitem id="menu_marketing_campaign_segment_form" parent="menu_marketing_campaign_campaigns" action="action_marketing_campaign_segment_form" sequence="2"/>
|
||
|
|
||
|
<!--
|
||
|
Marketing Activities
|
||
|
These views are not intended to be used outside the campaign context.
|
||
|
-->
|
||
|
<record model="ir.ui.view" id="view_marketing_campaign_activity_form">
|
||
|
<field name="name">marketing.campaign.activity.form</field>
|
||
|
<field name="model">marketing.campaign.activity</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="Activities">
|
||
|
<group>
|
||
|
<group>
|
||
|
<field name="name"/>
|
||
|
<field name="signal" groups="base.group_no_one"/>
|
||
|
<field name="start"/>
|
||
|
<field name="object_id" invisible="1"/>
|
||
|
<field name="campaign_id" invisible="1" required="0"/>
|
||
|
</group>
|
||
|
<group>
|
||
|
<field name="variable_cost"/>
|
||
|
<field name="revenue" widget="monetary"/>
|
||
|
</group>
|
||
|
</group>
|
||
|
<group >
|
||
|
<group>
|
||
|
<field name="condition" widget="char"/>
|
||
|
<field name="keep_if_condition_not_met"/>
|
||
|
</group>
|
||
|
<group>
|
||
|
<field name="action_type"/>
|
||
|
<field name="email_template_id" attrs="{'required':[('action_type','=','email')], 'invisible':[('action_type','!=','email')]}"
|
||
|
context="{'default_model_id':object_id}"/>
|
||
|
<field name="server_action_id" attrs="{'required':[('action_type','=','action')],'invisible':[('action_type','!=','action')]}" domain="[('model_id','=',object_id)]"/>
|
||
|
<field name="report_id" attrs="{'required':[('action_type','=','report')],'invisible':[('action_type','!=','report')]}" context="{'object_id':object_id}"/>
|
||
|
</group>
|
||
|
</group>
|
||
|
<separator string="Previous Activities"/>
|
||
|
<field name="from_ids" mode="tree" context="{'default_activity_to_id': active_id}">
|
||
|
<tree string="Incoming Transitions" editable="bottom">
|
||
|
<field name="activity_from_id" domain="[('campaign_id', '=', parent.campaign_id)]" options="{'no_create': True}" />
|
||
|
<field name='trigger'/>
|
||
|
<field name="interval_nbr"/>
|
||
|
<field name="interval_type"/>
|
||
|
</tree>
|
||
|
<form string="Incoming Transitions">
|
||
|
<group col="4">
|
||
|
<field name="activity_from_id" domain="[('campaign_id', '=', parent.campaign_id)]" options="{'no_create': True}" />
|
||
|
<field name='trigger'/>
|
||
|
<field name="interval_nbr"/>
|
||
|
<field name="interval_type"/>
|
||
|
</group>
|
||
|
</form>
|
||
|
</field>
|
||
|
<separator string="Next Activities"/>
|
||
|
<field name="to_ids" mode="tree" context="{'default_activity_from_id': active_id}">
|
||
|
<tree string="Outgoing Transitions" editable="bottom">
|
||
|
<field name="activity_to_id" domain="[('campaign_id', '=', parent.campaign_id)]" options="{'no_create': True}" />
|
||
|
<field name='trigger'/>
|
||
|
<field name="interval_nbr"/>
|
||
|
<field name="interval_type"/>
|
||
|
</tree>
|
||
|
<form string="Outgoing Transitions">
|
||
|
<group col="4">
|
||
|
<field name="activity_to_id" domain="[('campaign_id', '=', parent.campaign_id)]" options="{'no_create': True}" />
|
||
|
<field name='trigger'/>
|
||
|
<field name="interval_nbr"/>
|
||
|
<field name="interval_type"/>
|
||
|
</group>
|
||
|
</form>
|
||
|
</field>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.ui.view" id="view_marketing_campaign_activity_tree">
|
||
|
<field name="name">marketing.campaign.activity.tree</field>
|
||
|
<field name="model">marketing.campaign.activity</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree string="Activities">
|
||
|
<field name="name"/>
|
||
|
<field name="condition"/>
|
||
|
<field name="action_type"/>
|
||
|
<field name="start"/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
|
||
|
<!-- Marketing Workitems -->
|
||
|
<record model="ir.ui.view" id="view_marketing_campaign_workitem_tree">
|
||
|
<field name="name">marketing.campaign.workitem.tree</field>
|
||
|
<field name="model">marketing.campaign.workitem</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree decoration-danger="state == 'exception'" decoration-muted="state == 'cancelled'" string="Marketing Campaign Activities">
|
||
|
<field name="campaign_id"/>
|
||
|
<field name="segment_id"/>
|
||
|
<field name="activity_id"/>
|
||
|
<field name="object_id" invisible="1"/>
|
||
|
<field name="res_id" invisible="1"/>
|
||
|
<field name="res_name"/>
|
||
|
<field name="partner_id"/>
|
||
|
<field name="date"/>
|
||
|
<field name="state"/>
|
||
|
<button string="Cancel" states="todo" name="button_cancel" type="object" icon="fa-times-circle text-danger"/>
|
||
|
<button string="Preview" states="todo" name="preview" icon="fa-search-plus text-primary" type="object"/>
|
||
|
<button string="Process" states="todo" name="process" type="object" icon="fa-arrow-right text-success"/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.ui.view" id="view_marketing_campaign_workitem_form">
|
||
|
<field name="name">marketing.campaign.workitem.form</field>
|
||
|
<field name="model">marketing.campaign.workitem</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="Marketing Campaign Activities">
|
||
|
<header>
|
||
|
<button string="Process" states="todo" name="process" type="object"/>
|
||
|
<button string="Reset" states="exception,cancelled" name="button_draft" type="object"/>
|
||
|
<button string="Cancel Workitem" states="todo,exception" name="button_cancel" type="object"/>
|
||
|
<field name="state" readonly="True" widget="statusbar" statusbar_visible="todo,done"/>
|
||
|
<button string="Preview" states="todo" name="preview" icon="fa-search-plus fa-lg text-primary" type="object"/>
|
||
|
</header>
|
||
|
<sheet>
|
||
|
<group>
|
||
|
<group>
|
||
|
<field name="campaign_id"/>
|
||
|
<field name="segment_id"/>
|
||
|
<field name="activity_id" context="{'segment_id':segment_id}"/>
|
||
|
<field name="date"/>
|
||
|
</group>
|
||
|
<group>
|
||
|
<field name="object_id" readonly="True"/>
|
||
|
<field name="res_name"/>
|
||
|
<field name="res_id"/>
|
||
|
<field name="partner_id"/>
|
||
|
</group>
|
||
|
</group>
|
||
|
<group attrs="{'invisible':[('state','!=','exception')]}" string="Error Message">
|
||
|
<field name="error_msg" nolabel="1" colspan="2"/>
|
||
|
</group>
|
||
|
</sheet>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="view_marketing_campaign_workitem_search" model="ir.ui.view">
|
||
|
<field name="name">marketing.campaign.workitem.search</field>
|
||
|
<field name="model">marketing.campaign.workitem</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<search string="Marketing Campaign Activities">
|
||
|
<field name="res_name" string="Marketing Campaign Activity"/>
|
||
|
<field name="date"/>
|
||
|
<filter string="To Do" name="todo" domain="[('state','=','todo')]"/>
|
||
|
<filter string="Exception" domain="[('state','=','exception')]"/>
|
||
|
<field name="campaign_id"/>
|
||
|
<field name="segment_id"/>
|
||
|
<field name="object_id"/>
|
||
|
<field name="partner_id"/>
|
||
|
<field name="res_id"/>
|
||
|
<group expand="0" string="Group By">
|
||
|
<filter string="Campaign" name="campaign" context="{'group_by':'campaign_id'}"/>
|
||
|
<filter string="Segment" name="segment" context="{'group_by':'segment_id'}"/>
|
||
|
<filter string="Activity" name="activity" context="{'group_by':'activity_id'}"/>
|
||
|
<filter string="Resource" name="resource" context="{'group_by':'object_id'}"/>
|
||
|
<filter string="Resource ID" name="res_id" context="{'group_by':'res_id'}"/>
|
||
|
<filter string="Status" name="Status" context="{'group_by':'state'}"/>
|
||
|
<filter string="Execution Month" name="Date" context="{'group_by':'date'}"/>
|
||
|
</group>
|
||
|
</search>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.actions.act_window" id="action_marketing_campaign_workitem">
|
||
|
<field name="name">Follow-up</field>
|
||
|
<field name="type">ir.actions.act_window</field>
|
||
|
<field name="res_model">marketing.campaign.workitem</field>
|
||
|
<field name="view_type">form</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field name="view_id" ref="view_marketing_campaign_workitem_tree"/>
|
||
|
<field name="search_view_id" ref="view_marketing_campaign_workitem_search"/>
|
||
|
<field name="context">{'group_by': []}</field>
|
||
|
</record>
|
||
|
|
||
|
<menuitem id="menu_action_marketing_campaign_workitem" parent="report_marketing_campaign" action="action_marketing_campaign_workitem" sequence="3"/>
|
||
|
|
||
|
</odoo>
|