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: Maria Gabriela Quilarque <gabrielaquilarque97@gmail.com> #
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. #
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. #
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
############################################################################
27
from report import report_sxw
28
from openerp.tools.translate import _
31
class m321_cs_report(report_sxw.rml_parse):
33
def __init__(self, cr, uid, name, context=None):
36
super(m321_cs_report, self).__init__(cr, uid, name, context=context)
37
self.localcontext.update({
38
'get_date': self._get_date,
39
'get_wh': self._get_wh,
42
def _get_date(self, obj, aux):
43
aux2 = obj.date_invoice
53
def _get_wh(self, obj):
57
aux.append(wh.tax_id.amount*100)
60
report_sxw.report_sxw(
61
'report.m321_reports.m321_cs_report',
63
'addons/m321_reports/report/amd_computer_shop_report.rml',
66
# 1 addons/nombre del modulo/carpeta(report)/nombre del archivo rml
67
# 2 A modo didactico vamos a poner que el modulo al que le vamos a poner el reporte es a res.partner
68
# pero podria ser cualquier modulo.
69
# 3 report."modulo"."clase"