~vauxoo/addons-vauxoo/8.0-import_tax_tariff-dev-yani-rev-2

« back to all changes in this revision

Viewing changes to project_issue_report/report/project_issue_report.py

  • Committer: Tulio Ruiz
  • Date: 2012-03-30 19:36:02 UTC
  • Revision ID: tulio@vauxoo.com-20120330193602-zsuqrxk335x40j09
[ADD] Added issue report

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- encoding: utf-8 -*-
 
2
###########################################################################
 
3
#    Module Writen to OpenERP, Open Source Management Solution
 
4
#    Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
 
5
#    All Rights Reserved
 
6
###############Credits######################################################
 
7
#    Coded by: María Gabriela Quilarque <gabriela@openerp.com.ve>
 
8
#    Planified by: Nhomar Hernandez
 
9
#    Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve
 
10
#    Audited by: Humberto Arocha humberto@openerp.com.ve
 
11
#############################################################################
 
12
#    This program is free software: you can redistribute it and/or modify
 
13
#    it under the terms of the GNU General Public License as published by
 
14
#    the Free Software Foundation, either version 3 of the License, or
 
15
#    (at your option) any later version.
 
16
#
 
17
#    This program is distributed in the hope that it will be useful,
 
18
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
#    GNU General Public License for more details.
 
21
#
 
22
#    You should have received a copy of the GNU General Public License
 
23
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
24
##############################################################################
 
25
 
 
26
import time
 
27
import ir
 
28
from osv import osv
 
29
from report import report_sxw
 
30
import pooler
 
31
 
 
32
class Late_payments(report_sxw.rml_parse):
 
33
    def __init__(self, cr, uid, name, context):
 
34
        super(Late_payments, self).__init__(cr, uid, name, context=context)
 
35
        self.localcontext.update( {
 
36
            'message' : self._message,
 
37
        })
 
38
        self.context = context
 
39
        
 
40
    def _message(self, obj, company):
 
41
        company_pool = pooler.get_pool(self.cr.dbname).get('res.company')
 
42
        message = company_pool.browse(self.cr, self.uid, company.id, {'lang':obj.lang}).overdue_msg 
 
43
        return message
 
44
 
 
45
report_sxw.report_sxw('report.account.late.payments.l10n.ve', 'res.partner',
 
46
        'addons/late_payments_report/report/late_payments.rml', parser=Late_payments)
 
47
 
 
48
 
 
49
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
 
50