Browse Source

[FIX] PEP8 and change get company_id

pull/7/merge
Sebastien LANGE 11 years ago
parent
commit
b75c0617a4
  1. 8
      account_financial_report_webkit/report/print_journal.py
  2. 1
      account_financial_report_webkit/wizard/print_journal.py

8
account_financial_report_webkit/report/print_journal.py

@ -30,6 +30,7 @@ from datetime import datetime
from common_reports import CommonReportHeaderWebkit
from webkit_parser_header_fix import HeaderFooterTextWebKitParser
class PrintJournalWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):
def __init__(self, cursor, uid, name, context):
@ -37,7 +38,10 @@ class PrintJournalWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):
self.pool = pooler.get_pool(self.cr.dbname)
self.cursor = self.cr
company = self.pool.get('res.users').browse(self.cr, uid, uid, context=context).company_id
company_obj = self.pool.get('res.company')
company_id = company_obj._company_default_get(self.cr, uid, 'res.users', context=context)
company = company_obj.browse(self.cr, uid, company_id, context=context)
header_report_name = ' - '.join((_('JOURNALS'), company.name, company.currency_id.name))
footer_date_time = self.formatLang(str(datetime.today()), date_time=True)
@ -135,8 +139,6 @@ class PrintJournalWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):
return super(PrintJournalWebkit, self).set_context(objects, data, new_ids, report_type=report_type)
HeaderFooterTextWebKitParser('report.account.account_report_print_journal_webkit',
'account.journal.period',
'addons/account_financial_report_webkit/report/templates/account_report_print_journal.mako',

1
account_financial_report_webkit/wizard/print_journal.py

@ -31,7 +31,6 @@ from lxml import etree
class AccountReportPrintJournalWizard(osv.osv_memory):
"""Will launch print journal report and pass requiered args"""
_inherit = "account.common.account.report"
_name = "print.journal.webkit"
_description = "Journals Report"

Loading…
Cancel
Save