diff --git a/account_financial_report_webkit/report/open_invoices.py b/account_financial_report_webkit/report/open_invoices.py index c49c82f4..237f9e4f 100644 --- a/account_financial_report_webkit/report/open_invoices.py +++ b/account_financial_report_webkit/report/open_invoices.py @@ -20,7 +20,6 @@ ############################################################################## from collections import defaultdict -from report import report_sxw from datetime import datetime from itertools import groupby from operator import itemgetter @@ -30,6 +29,7 @@ from mako.template import Template import openerp.addons from openerp import pooler from openerp.osv import osv +from openerp.report import report_sxw from openerp.tools.translate import _ from openerp.addons.report_webkit import report_helper from .common_partner_reports import CommonPartnersReportHeaderWebkit diff --git a/account_financial_report_webkit/report/print_journal.py b/account_financial_report_webkit/report/print_journal.py index 71d386de..7d14059e 100644 --- a/account_financial_report_webkit/report/print_journal.py +++ b/account_financial_report_webkit/report/print_journal.py @@ -22,9 +22,9 @@ # ############################################################################## -from report import report_sxw -from tools.translate import _ -import pooler +from openerp.report import report_sxw +from openerp.tools.translate import _ +from openerp import pooler from datetime import datetime from common_reports import CommonReportHeaderWebkit diff --git a/account_financial_report_webkit/report/templates/account_report_open_invoices.mako b/account_financial_report_webkit/report/templates/account_report_open_invoices.mako index b6d345f8..a4410820 100644 --- a/account_financial_report_webkit/report/templates/account_report_open_invoices.mako +++ b/account_financial_report_webkit/report/templates/account_report_open_invoices.mako @@ -22,7 +22,6 @@ - <% import addons %> <% template1 = helper.get_mako_template('account_financial_report_webkit','report', 'templates', 'open_invoices_inclusion.mako.html') %> <% context.lookup.put_template('open_invoices_inclusion.mako.html', template1) %> <% template2 = helper.get_mako_template('account_financial_report_webkit','report', 'templates', 'grouped_by_curr_open_invoices_inclusion.mako.html') %> @@ -74,7 +73,7 @@ %for acc in objects: - %if hasattr(acc, 'grouped_ledger_lines'): + %if 'grouped_ledger_lines' in acc: <% fl = formatLang %> <%include file="grouped_by_curr_open_invoices_inclusion.mako.html" args="account=acc,formatLang=fl"/> %else: diff --git a/account_financial_report_webkit/report/webkit_parser_header_fix.py b/account_financial_report_webkit/report/webkit_parser_header_fix.py index 7240604a..29d458ba 100644 --- a/account_financial_report_webkit/report/webkit_parser_header_fix.py +++ b/account_financial_report_webkit/report/webkit_parser_header_fix.py @@ -31,8 +31,6 @@ import os import subprocess import tempfile import time -import pooler -import tools import logging @@ -40,6 +38,8 @@ from mako import exceptions from openerp.osv.osv import except_osv from openerp.tools.translate import _ from openerp import addons +from openerp import pooler +from openerp import tools from openerp.addons.report_webkit import webkit_report from openerp.addons.report_webkit.webkit_report import mako_template from openerp.addons.report_webkit.report_helper import WebKitHelper diff --git a/account_financial_report_webkit/wizard/print_journal.py b/account_financial_report_webkit/wizard/print_journal.py index 191d1daf..dfb514c5 100644 --- a/account_financial_report_webkit/wizard/print_journal.py +++ b/account_financial_report_webkit/wizard/print_journal.py @@ -22,13 +22,12 @@ # ############################################################################## -from osv import osv -from osv import fields +from openerp.osv import fields, orm import time from lxml import etree -class AccountReportPrintJournalWizard(osv.osv_memory): +class AccountReportPrintJournalWizard(orm.TransientModel): """Will launch print journal report and pass requiered args""" _inherit = "account.common.account.report" diff --git a/account_financial_report_webkit/wizard/trial_balance_wizard.py b/account_financial_report_webkit/wizard/trial_balance_wizard.py index 25e14359..6981a947 100644 --- a/account_financial_report_webkit/wizard/trial_balance_wizard.py +++ b/account_financial_report_webkit/wizard/trial_balance_wizard.py @@ -19,10 +19,10 @@ # ############################################################################## -from osv import osv +from openerp.osv import orm -class AccountTrialBalanceWizard(osv.osv_memory): +class AccountTrialBalanceWizard(orm.TransientModel): """Will launch trial balance report and pass required args""" _inherit = "account.common.balance.report"