diff --git a/addons/marketing_campaign/__openerp__.py b/addons/marketing_campaign/__openerp__.py
index aca6c2f6d28..992731c1332 100755
--- a/addons/marketing_campaign/__openerp__.py
+++ b/addons/marketing_campaign/__openerp__.py
@@ -24,10 +24,9 @@
"name" : "",
"version" : "1.1",
"depends" : ["marketing",
- "crm",
+ "crm",
"document",
- "poweremail" # need to get this module form the branch
- # lp:poweremail
+ "email_template"
],
"author" : "Tiny",
"category": 'Generic Modules/Marketing',
@@ -40,7 +39,6 @@
'marketing_campaign_data.xml',
'marketing_campaign_workflow.xml',
'report/campaign_analysis_view.xml',
- 'marketing_campaign_demo.xml'
],
'demo_xml': [
'marketing_campaign_demo.xml',
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 398e0e805be..3f29e03c968 100755
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -129,9 +129,7 @@ class marketing_campaign_segment(osv.osv): #{{{
curr_date = time.strftime('%Y-%m-%d %H:%M:%S')
vals = {'state': 'running'}
if not segment.date_run:
- vals['date_run'] = segment.campaign_id.date_run and \
- segment.campaign_id.date_run or \
- time.strftime('%Y-%m-%d %H:%M:%S')
+ vals['date_run'] = time.strftime('%Y-%m-%d %H:%M:%S')
if not segment.sync_last_date:
vals['sync_last_date']=curr_date
if not segment.date_done:
@@ -142,7 +140,7 @@ class marketing_campaign_segment(osv.osv): #{{{
def state_done_set(self, cr, uid, ids, *args):
date_done = self.browse(cr, uid, ids[0]).date_done
- if (date_done > time.strftime('%Y-%m-%d')):
+ if (date_done > time.strftime('%Y-%m-%d %H:%M:%S')):
raise osv.except_osv("Error", "Segment cannot be closed before end date")
wi_ids = self.pool.get("marketing.campaign.workitem").search(cr, uid,
@@ -186,7 +184,7 @@ class marketing_campaign_segment(osv.osv): #{{{
}
self.pool.get('marketing.campaign.workitem').create(
cr, uid, wi_vals)
- self.write(cr, uid, segment.id, {'sync_last_date':action_date})
+ self.write(cr, uid, segment.id, {'sync_last_date':action_date})
return True
marketing_campaign_segment()#}}}
@@ -196,7 +194,7 @@ class marketing_campaign_activity(osv.osv): #{{{
_description = "Campaign Activity"
_columns = {
- 'name': fields.char('Name', size=64, required=True),
+ 'name': fields.char('Name', size=128, required=True),
'campaign_id': fields.many2one('marketing.campaign', 'Campaign',
required = True, ondelete='cascade'),
'object_id': fields.related('campaign_id','object_id',
@@ -212,7 +210,7 @@ class marketing_campaign_activity(osv.osv): #{{{
('action', 'Action'),
('subcampaign', 'Sub-Campaign')],
'Type', required=True),
- 'email_template_id': fields.many2one('poweremail.templates','Email Template'),
+ 'email_template_id': fields.many2one('email.template','Email Template'),
'report_id': fields.many2one('ir.actions.report.xml', 'Reports', ),
'report_directory_id': fields.many2one('document.directory','Directory',
help="Folder is used to store the generated reports"),
@@ -254,8 +252,9 @@ class marketing_campaign_activity(osv.osv): #{{{
def process(self, cr, uid, act_id, wi_id, context={}):
activity = self.browse(cr, uid, act_id)
- workitem_obj = self.pool.get('marketing.campaign.workitem')
+ workitem_obj = self.pool.get('marketing.campaign.workitem')
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, [], {}, {})
@@ -278,12 +277,12 @@ class marketing_campaign_activity(osv.osv): #{{{
if not workitem.partner_id.email:
return {'error_msg' : "There is no email defined for the partner"}
vals = {
- 'pem_from': tools.ustr(accounts.name) + "<" + tools.ustr(accounts.email_id) + ">",
- 'pem_to': workitem.partner_id.email,
- 'pem_subject': template.def_subject,
- 'pem_body_text': template.def_body_text,
- 'pem_body_html': template.def_body_html,
- 'pem_account_id':accounts.id,
+ 'email_from': tools.ustr(accounts.name) + "<" + tools.ustr(accounts.email_id) + ">",
+ 'email_to': workitem.partner_id.email,
+ 'subject': template.def_subject,
+ 'body_text': template.def_body_text,
+ 'body_html': template.def_body_html,
+ 'account_id':accounts.id,
'state':'na',
'mail_type':'multipart/alternative' #Options:'multipart/mixed','multipart/alternative','text/plain','text/html'
}
@@ -294,12 +293,11 @@ class marketing_campaign_activity(osv.osv): #{{{
# vals['pem_body_html'] = tools.ustr(vals['pem_body_html'] or '') + signature
#Create partly the mail and later update attachments
- mail_id = self.pool.get('poweremail.mailbox').create(cr, uid, vals, context)
+ mail_id = self.pool.get('email_template.mailbox').create(cr, uid, vals, context)
elif activity.type == 'action' :
server_obj = self.pool.get('ir.actions.server')
server_obj.run(cr, uid, [activity.server_action_id.id], context)
#???
-
return True
marketing_campaign_activity()#}}}
@@ -410,13 +408,13 @@ class marketing_campaign_workitem(osv.osv): #{{{
marketing_campaign_workitem() #}}}
-class poweremail_templates(osv.osv):
- _inherit = "poweremail.templates"
+class email_template(osv.osv):
+ _inherit = "email.template"
_defaults = {
'object_name': lambda obj, cr, uid, context: context.get('object_id',False),
}
-poweremail_templates()
+email_template()
class report_xml(osv.osv):
diff --git a/addons/marketing_campaign/marketing_campaign_demo.xml b/addons/marketing_campaign/marketing_campaign_demo.xml
index 9c2211903c5..7296ebf9c50 100644
--- a/addons/marketing_campaign/marketing_campaign_demo.xml
+++ b/addons/marketing_campaign/marketing_campaign_demo.xml
@@ -21,8 +21,9 @@
-
-
+
+
+
Thanks for showing interest in OpenERP
info@tinyerp.com
@@ -32,17 +33,163 @@
- Hello,
-Thanks for generous interest you have shown in the open ERP.
-Regards,
-OpenERP Team,
+ Hello,Thanks for generous interest you have shown in the open ERP.Regards,OpenERP Team,
mako
For OpenERP OnDemand Free Trial 2010
crm.lead
-
+
+ Propose to subscribe to the Open ERP Discovery Day on May 2010
+ info@tinyerp.com
+
+
+
+
+
+
+
+ Hello,We have very good offer that might suit you.
+ We propose you to subscribe to the Open ERP Discovery Day on May 2010.
+ If any further information required kindly revert back.
+ We really appreciate your co-operation on this.
+ Regards,OpenERP Team,
+ mako
+
+ For Open ERP Discovery Day on May 2010
+ crm.lead
+
+
+
+
+ Thanks for subscribing to the Open ERP Discovery Day
+ info@tinyerp.com
+
+
+
+
+
+
+
+ Hello,Thanks for showing intrest and for subscribing to the Open ERP Discovery Day.
+ If any further information required kindly revert back.
+ I really appreciate your co-operation on this.
+ Regards,OpenERP Team,
+ mako
+
+ For Open ERP Discovery Day
+ crm.lead
+
+
+
+
+ Thanks for buying the Open ERP book
+ info@tinyerp.com
+
+
+
+
+
+
+
+ Hello,Thanks for showing intrest and buying the Open ERP book.
+ If any further information required kindly revert back.
+ I really appreciate your co-operation on this.
+ Regards,OpenERP Team,
+ mako
+
+ For Open ERP book
+ crm.lead
+
+
+
+
+ Propose a free technical training to Gold partners
+ info@tinyerp.com
+
+
+
+
+
+
+
+ Hello, We have very good offer that might suit you.
+ For our gold partners,We are arranging free technical training on june,2010.
+ If any further information required kindly revert back.
+ I really appreciate your co-operation on this.
+ Regards,OpenERP Team,
+ mako
+
+ For technical training to Gold partners
+ crm.lead
+
+
+
+
+ Propose paid training to Silver partners
+ info@tinyerp.com
+
+
+
+
+
+
+
+ Hello, We have very good offer that might suit you.
+ For our silver partners,We are paid technical training on june,2010.
+ If any further information required kindly revert back.
+ I really appreciate your co-operation on this.
+ Regards,OpenERP Team,
+ mako
+
+ For training to Silver partners
+ crm.lead
+
+
+
+
+ Propose gold partnership to silver partners
+ info@tinyerp.com
+
+
+
+
+
+
+
+ Hello, We have very good offer that might suit you.
+ For our silver partners,We are offering Gold partnership.
+ If any further information required kindly revert back.
+ I really appreciate your co-operation on this.
+ Regards,OpenERP Team,
+ mako
+
+ For gold partnership to silver partners
+ crm.lead
+
+
+
+
+ Thanks for subscribing to technical training
+ info@tinyerp.com
+
+
+
+
+
+
+
+ Hello, Thanks for showing intrest and for subscribing to technical training.If any further information required kindly revert back.I really appreciate your co-operation on this.
+ Regards,OpenERP Team,
+ mako
+
+ For subscribing to technical training
+ crm.lead
+
+
+
+
Marketing campaign demo report
ir.actions.report.xml
@@ -51,12 +198,15 @@ OpenERP Team,
marketing_campaign/report/crm_lead_mc_demo_report.rml
pdf
-
+
+
OpenERP OnDemand Free Trial 2010
-
+
+
+
Propose a 1 month free trial for an OnDemand offer
@@ -70,13 +220,112 @@ OpenERP Team,
Thanks for showing interest
+
-
+
+
+ Propose to subscribe to the Open ERP Discovery Day on May 2010
+
+
+
+
+
+
+ Thanks for subscribing to the Open ERP Discovery Day
+
+
+
+
+
+ Propose to buy the Open ERP Book
+
+
+
+ paper
+
+
+
+
+ Thanks for buying the Open ERP book
+
+
+
+
+
+ Propose a free technical training to Gold partners
+
+
+
+
+
+ Propose paid training to Silver partners
+
+
+
+
+
+
+ Propose gold partnership to silver partners
+
+
+
+
+
+
+ Thanks for subscribing to technical training
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
BossList US Associations List-0/90