[IMP] demo data for marketing campaign
bzr revid: dsh@tinyerp.com-20100526082002-5a0xa1c8jjm0b5vj
This commit is contained in:
parent
8a7bd64d61
commit
5cb4c1e1b5
|
@ -37,10 +37,12 @@
|
|||
'update_xml': [
|
||||
'marketing_campaign_view.xml',
|
||||
'marketing_campaign_data.xml',
|
||||
'marketing_campaign_workflow.xml',
|
||||
'marketing_campaign_workflow.xml',
|
||||
'report/campaign_analysis_view.xml',
|
||||
],
|
||||
'demo_xml': [],
|
||||
'demo_xml': [
|
||||
'marketing_campaign_demo.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ class marketing_campaign_activity(osv.osv): #{{{
|
|||
workitem = workitem_obj.browse(cr, uid, wi_id)
|
||||
if activity.type == 'paper' :
|
||||
service = netsvc.LocalService('report.%s'%activity.report_id.report_name)
|
||||
(report_data, format) = service.create(cr, uid, [activity.report_id.id], {}, {})
|
||||
(report_data, format) = service.create(cr, uid, [], {}, {})
|
||||
attach_vals = {
|
||||
'name': '%s_%s_%s'%(activity.report_id.report_name,
|
||||
activity.name,workitem.partner_id.name),
|
||||
|
@ -377,7 +377,7 @@ class marketing_campaign_workitem(osv.osv): #{{{
|
|||
'object': wi.activity_id,
|
||||
'transition' : wi.activity_id.to_ids
|
||||
}
|
||||
expr = eval(str(wi.activity_id.condition), cxt)
|
||||
expr = eval(str(wi.activity_id.condition), eval_context)
|
||||
if expr:
|
||||
try :
|
||||
res = self.pool.get('marketing.campaign.activity').process(
|
||||
|
|
|
@ -139,18 +139,18 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Campaigns">
|
||||
<filter icon="terp-project" string="Draft" name = "draft" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-project" string="Running" domain="[('state','=','running')]"/>
|
||||
<filter icon="terp-marketing" string="Draft" name = "draft" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-marketing" string="Running" domain="[('state','=','running')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-project" string="Test Mode" name = "test" domain="[('mode','=','test')]"/>
|
||||
<filter icon="terp-project" string="Manual Mode" domain="[('mode','=','manual')]"/>
|
||||
<filter icon="terp-marketing" string="Test Mode" name = "test" domain="[('mode','=','test')]"/>
|
||||
<filter icon="terp-marketing" string="Manual Mode" domain="[('mode','=','manual')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="object_id" select="1"/>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Object" name="Object" icon="terp-project" context="{'group_by':'object_id'}" />
|
||||
<filter string="State" name="State" icon="terp-project" context="{'group_by':'state'}" />
|
||||
<filter string="Object" name="Object" icon="terp-marketing" context="{'group_by':'object_id'}" />
|
||||
<filter string="State" name="State" icon="terp-marketing" context="{'group_by':'state'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -231,11 +231,11 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Segments">
|
||||
<filter icon="terp-project" string="Draft" name="draft" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-project" string="Running" domain="[('state','=','running')]"/>
|
||||
<filter icon="terp-marketing" string="Draft" name="draft" domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-marketing" string="Running" domain="[('state','=','running')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-project" string="Create Date" name="create_date" domain="[('sync_mode','=','create_date')]"/>
|
||||
<filter icon="terp-project" string="Write Date" domain="[('sync_mode','=','write_date')]"/>
|
||||
<filter icon="terp-marketing" string="Create Date" name="create_date" domain="[('sync_mode','=','create_date')]"/>
|
||||
<filter icon="terp-marketing" string="Write Date" domain="[('sync_mode','=','write_date')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1"/>
|
||||
<field name="object_id" select="1"/>
|
||||
|
@ -243,9 +243,9 @@
|
|||
<field name="date_run" select="1"/>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Campaign" name="Campaign" icon="terp-project" context="{'group_by':'campaign_id'}" />
|
||||
<filter string="Date Run" name="Date Run" icon="terp-project" context="{'group_by':'date_run'}" />
|
||||
<filter string="State" name="State" icon="terp-project" context="{'group_by':'state'}" />
|
||||
<filter string="Campaign" name="Campaign" icon="terp-marketing" context="{'group_by':'campaign_id'}" />
|
||||
<filter string="Date Run" name="Date Run" icon="terp-marketing" context="{'group_by':'date_run'}" />
|
||||
<filter string="State" name="State" icon="terp-marketing" context="{'group_by':'state'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
@ -30,14 +30,14 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Marketing Reports">
|
||||
<group>
|
||||
<filter icon="terp-account"
|
||||
<filter icon="terp-marketing"
|
||||
string="This Year"
|
||||
domain="[('year','=',time.strftime('%%Y'))]"/>
|
||||
<filter icon="terp-account"
|
||||
<filter icon="terp-marketing"
|
||||
string="This Month"
|
||||
domain="[('month','=',time.strftime('%%m'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-account"
|
||||
<filter icon="terp-marketing"
|
||||
string="Date"
|
||||
domain="[('date','=',time.strftime('%%Y/%%m/%%d'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -49,12 +49,12 @@
|
|||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="10" col="12">
|
||||
<filter string="Campaign" name="Campaign" icon="terp-sale" context="{'group_by':'campaign_id'}" />
|
||||
<filter string="Segment" name ="Segment" icon="terp-sale" context="{'group_by':'segment_id'}" />
|
||||
<filter string="Partner" icon="terp-sale" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Campaign" name="Campaign" icon="terp-marketing" context="{'group_by':'campaign_id'}" />
|
||||
<filter string="Segment" name ="Segment" icon="terp-marketing" context="{'group_by':'segment_id'}" />
|
||||
<filter string="Partner" icon="terp-marketing" context="{'group_by':'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Month" icon="terp-sale" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-sale" context="{'group_by':'year'}"/>
|
||||
<filter string="Month" icon="terp-marketing" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-marketing" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0"?>
|
||||
<document filename="test.pdf">
|
||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||
<pageTemplate id="first">
|
||||
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
|
||||
</pageTemplate>
|
||||
</template>
|
||||
<stylesheet>
|
||||
<blockTableStyle id="Standard_Outline">
|
||||
<blockAlignment value="LEFT"/>
|
||||
<blockValign value="TOP"/>
|
||||
</blockTableStyle>
|
||||
<initialize>
|
||||
<paraStyle name="all" alignment="justify"/>
|
||||
</initialize>
|
||||
<paraStyle name="Standard" fontName="Helvetica"/>
|
||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||
<paraStyle name="Index" fontName="Helvetica"/>
|
||||
<images/>
|
||||
</stylesheet>
|
||||
<story>
|
||||
<para style="Standard">[[ repeatIn(objects,'lead') ]]</para>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="Text body">Partner : [[ lead.company_id.partner_id.name ]]</para>
|
||||
<para style="Standard">Company : [[ lead.company_id.parent_id.name ]]</para>
|
||||
</story>
|
||||
</document>
|
Loading…
Reference in New Issue