[MERGE] Improverment marketing_campaign

bzr revid: sbh@tinyerp.com-20110113132818-odferj606f6h8dtr
This commit is contained in:
Sbh (OpenERP)
2011-01-13 18:58:18 +05:30
3 changed files with 4 additions and 3 deletions
@@ -60,4 +60,4 @@ def get_precision(application):
return (16, res)
return change_digit
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -1
View File
@@ -25,7 +25,8 @@
"version" : "1.1",
"depends" : ["marketing",
"document",
"email_template"
"email_template",
"decimal_precision"
],
"author" : "OpenERP SA",
"category": 'Generic Modules/Marketing',
@@ -40,7 +40,7 @@ class campaign_analysis(osv.osv):
wi_ids = self.pool.get('marketing.campaign.workitem').search(cr, uid,
[('segment_id.campaign_id', '=', ca_obj.campaign_id.id)])
total_cost = ca_obj.activity_id.variable_cost + \
((ca_obj.campaign_id.fixed_cost or 0.00) / len(wi_ids))
((ca_obj.campaign_id.fixed_cost or 1.00) / len(wi_ids))
result[ca_obj.id] = total_cost
return result
_columns = {