Browse Source

[MRG] [FIX]account_financial_report_webkit: Open Invoices Report: fix wrong xmlid in report definition, removed useless import of addons in template, hasattr cannot be used on browse object - replaced by 'field' in browse_object

pull/7/merge
unknown 11 years ago
committed by Yannick Vaucher
parent
commit
960e20e2a1
  1. 2
      account_financial_report_webkit/report/open_invoices.py
  2. 6
      account_financial_report_webkit/report/print_journal.py
  3. 3
      account_financial_report_webkit/report/templates/account_report_open_invoices.mako
  4. 4
      account_financial_report_webkit/report/webkit_parser_header_fix.py
  5. 5
      account_financial_report_webkit/wizard/print_journal.py
  6. 4
      account_financial_report_webkit/wizard/trial_balance_wizard.py

2
account_financial_report_webkit/report/open_invoices.py

@ -20,7 +20,6 @@
############################################################################## ##############################################################################
from collections import defaultdict from collections import defaultdict
from report import report_sxw
from datetime import datetime from datetime import datetime
from itertools import groupby from itertools import groupby
from operator import itemgetter from operator import itemgetter
@ -30,6 +29,7 @@ from mako.template import Template
import openerp.addons import openerp.addons
from openerp import pooler from openerp import pooler
from openerp.osv import osv from openerp.osv import osv
from openerp.report import report_sxw
from openerp.tools.translate import _ from openerp.tools.translate import _
from openerp.addons.report_webkit import report_helper from openerp.addons.report_webkit import report_helper
from .common_partner_reports import CommonPartnersReportHeaderWebkit from .common_partner_reports import CommonPartnersReportHeaderWebkit

6
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 datetime import datetime
from common_reports import CommonReportHeaderWebkit from common_reports import CommonReportHeaderWebkit

3
account_financial_report_webkit/report/templates/account_report_open_invoices.mako

@ -22,7 +22,6 @@
</head> </head>
<body> <body>
<% import addons %>
<% template1 = helper.get_mako_template('account_financial_report_webkit','report', 'templates', 'open_invoices_inclusion.mako.html') %> <% 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) %> <% 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') %> <% template2 = helper.get_mako_template('account_financial_report_webkit','report', 'templates', 'grouped_by_curr_open_invoices_inclusion.mako.html') %>
@ -74,7 +73,7 @@
</div> </div>
</div> </div>
%for acc in objects: %for acc in objects:
%if hasattr(acc, 'grouped_ledger_lines'):
%if 'grouped_ledger_lines' in acc:
<% fl = formatLang %> <% fl = formatLang %>
<%include file="grouped_by_curr_open_invoices_inclusion.mako.html" args="account=acc,formatLang=fl"/> <%include file="grouped_by_curr_open_invoices_inclusion.mako.html" args="account=acc,formatLang=fl"/>
%else: %else:

4
account_financial_report_webkit/report/webkit_parser_header_fix.py

@ -31,8 +31,6 @@ import os
import subprocess import subprocess
import tempfile import tempfile
import time import time
import pooler
import tools
import logging import logging
@ -40,6 +38,8 @@ from mako import exceptions
from openerp.osv.osv import except_osv from openerp.osv.osv import except_osv
from openerp.tools.translate import _ from openerp.tools.translate import _
from openerp import addons 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 import webkit_report
from openerp.addons.report_webkit.webkit_report import mako_template from openerp.addons.report_webkit.webkit_report import mako_template
from openerp.addons.report_webkit.report_helper import WebKitHelper from openerp.addons.report_webkit.report_helper import WebKitHelper

5
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 import time
from lxml import etree from lxml import etree
class AccountReportPrintJournalWizard(osv.osv_memory):
class AccountReportPrintJournalWizard(orm.TransientModel):
"""Will launch print journal report and pass requiered args""" """Will launch print journal report and pass requiered args"""
_inherit = "account.common.account.report" _inherit = "account.common.account.report"

4
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""" """Will launch trial balance report and pass required args"""
_inherit = "account.common.balance.report" _inherit = "account.common.balance.report"

Loading…
Cancel
Save