2
2
##############################################################################
4
4
# Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com)
5
# @author Guewen Baconnier
7
# WARNING: This program as such is intended to be used by professional
8
# programmers who take the whole responsability of assessing all potential
9
# consequences resulting from its eventual inadequacies and bugs
10
# End users who are looking for a ready-to-use solution with commercial
11
# garantees and support are strongly adviced to contract a Free Software
14
# This program is Free Software; you can redistribute it and/or
15
# modify it under the terms of the GNU General Public License
16
# as published by the Free Software Foundation; either version 2
17
# of the License, or (at your option) any later version.
19
# This program is distributed in the hope that it will be useful,
20
# but WITHOUT ANY WARRANTY; without even the implied warranty of
21
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
# GNU General Public License for more details.
24
# You should have received a copy of the GNU General Public License
25
# along with this program; if not, write to the Free Software
26
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5
# @author Nicolas Bessi, Vincent Renaville, Guewen Baconnier
7
# This program is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU Affero General Public License as
9
# published by the Free Software Foundation, either version 3 of the
10
# License, or (at your option) any later version.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU Affero General Public License for more details.
17
# You should have received a copy of the GNU Affero General Public License
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
28
20
##############################################################################
31
from report import report_sxw
33
class sale_report_webkit(report_sxw.rml_parse):
23
from openerp.report import report_sxw
24
from openerp import pooler
27
class SaleOrderReport(report_sxw.rml_parse):
34
28
def __init__(self, cr, uid, name, context):
35
super(sale_report_webkit, self).__init__(cr, uid, name, context=context)
36
self.localcontext.update({
29
super(SaleOrderReport, self).__init__(cr, uid, name, context=context)
30
self.localcontext.update({'time': time,
31
'company_vat': self._get_company_vat})
33
def _get_company_vat(self):
34
res_users_obj = pooler.get_pool(self.cr.dbname).get('res.users')
35
company_vat = res_users_obj.browse(self.cr, self.uid, self.uid).company_id.partner_id.vat
42
41
report_sxw.report_sxw('report.sale.order.webkit',
44
'addons/sale_report_webkit/report/sale_order.mako',
45
parser=sale_report_webkit)
43
'addons/sale_report_webkit/report/sale_order.mako',
44
parser=SaleOrderReport)