~vauxoo/addons-vauxoo/7.0-average_stock_valuation_journal_items-dev-yani

« back to all changes in this revision

Viewing changes to crm_profile_reporting/report/crm_profile_report.py

  • Committer: Yanina Aular
  • Date: 2014-04-25 23:42:42 UTC
  • mfrom: (0.1.1005 trunk)
  • Revision ID: yanina.aular@vauxoo.com-20140425234242-k4jkk1gd5t34r4c0

[MERGE] from addons-vauxoo-7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- encoding: utf-8 -*-
 
2
import time
 
3
import pooler
 
4
from report import report_sxw
 
5
from openerp.tools.translate import _
 
6
 
 
7
import smtplib
 
8
import mimetypes
 
9
import base64
 
10
from email.MIMEText import MIMEText
 
11
from email.Encoders import encode_base64
 
12
 
 
13
 
 
14
class crm_report_profile(report_sxw.rml_parse):
 
15
    """
 
16
    Description about crm_report_profile
 
17
    """
 
18
 
 
19
    def __init__(self, cr, uid, name, context=None):
 
20
        """
 
21
        Initlize a report parser, add custome methods to localcontext
 
22
        @param cr: cursor to database
 
23
        @param user: id of current user
 
24
        @param name: name of the reports it self
 
25
        @param context: context arguments, like lang, time zone
 
26
        """
 
27
        super(crm_report_profile, self).__init__(
 
28
            cr, uid, name, context=context)
 
29
        self.localcontext.update({
 
30
                                 'time': time,
 
31
                                 })
 
32
 
 
33
report_sxw.report_sxw(
 
34
    'report.crm.profile.reporting',
 
35
    'res.partner',
 
36
    'addons/crm_profile_reporting/report/crm_profile_report.rml',
 
37
    parser=crm_report_profile
 
38
)