← Back to team overview

openerp-community-reviewer team mailing list archive

lp:~bcim/account-financial-report/fix-account_financial_report_webkit-imports into lp:account-financial-report

 

Jacques-Etienne Baudoux has proposed merging lp:~bcim/account-financial-report/fix-account_financial_report_webkit-imports into lp:account-financial-report.

Requested reviews:
  Account Report Core Editors (account-report-core-editor)

For more details, see:
https://code.launchpad.net/~bcim/account-financial-report/fix-account_financial_report_webkit-imports/+merge/195187

Hello,
I tested the module "account_financial_report_webkit" on the openerp saas1 branch and I had to fix few things that are worth being merged:
- imports must now be prefixed by openerp
- there was an error in the xmlid of the Open Invoices report
- wrong use of hasattr on browse object was creating a stacktrace in the server log

kr,
J-E
-- 
https://code.launchpad.net/~bcim/account-financial-report/fix-account_financial_report_webkit-imports/+merge/195187
Your team Account Report Core Editors is requested to review the proposed merge of lp:~bcim/account-financial-report/fix-account_financial_report_webkit-imports into lp:account-financial-report.
=== modified file 'account_financial_report_webkit/report/open_invoices.py'
--- account_financial_report_webkit/report/open_invoices.py	2012-12-11 16:32:26 +0000
+++ account_financial_report_webkit/report/open_invoices.py	2013-11-14 09:47:36 +0000
@@ -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 @@
 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

=== modified file 'account_financial_report_webkit/report/print_journal.py'
--- account_financial_report_webkit/report/print_journal.py	2013-09-13 22:48:50 +0000
+++ account_financial_report_webkit/report/print_journal.py	2013-11-14 09:47:36 +0000
@@ -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

=== modified file 'account_financial_report_webkit/report/report.xml'
--- account_financial_report_webkit/report/report.xml	2013-09-12 20:53:27 +0000
+++ account_financial_report_webkit/report/report.xml	2013-11-14 09:47:36 +0000
@@ -124,7 +124,7 @@
              <field name="report_rml">account_financial_report_webkit/report/templates/account_report_print_journal.mako</field>
              <field name="report_file">account_financial_report_webkit/report/templates/account_report_print_journal.mako</field>
          </record>
-        <record id="property_account_report_open_invoices_webkit" model="ir.property">
+        <record id="property_account_report_print_journal_webkit" model="ir.property">
             <field name="name">account_report_print_journal_webkit</field>
             <field name="fields_id" ref="report_webkit.field_ir_act_report_xml_webkit_header"/>
             <field eval="'ir.header_webkit,'+str(ref('account_financial_report_webkit.financial_landscape_header'))" model="ir.header_webkit" name="value"/>

=== modified file 'account_financial_report_webkit/report/templates/account_report_open_invoices.mako'
--- account_financial_report_webkit/report/templates/account_report_open_invoices.mako	2012-12-11 14:05:02 +0000
+++ account_financial_report_webkit/report/templates/account_report_open_invoices.mako	2013-11-14 09:47:36 +0000
@@ -21,7 +21,6 @@
     </head>
     <body>
  
-    <% 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') %>
@@ -73,7 +72,7 @@
             </div>
         </div>
         %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:

=== modified file 'account_financial_report_webkit/report/webkit_parser_header_fix.py'
--- account_financial_report_webkit/report/webkit_parser_header_fix.py	2012-12-12 10:36:14 +0000
+++ account_financial_report_webkit/report/webkit_parser_header_fix.py	2013-11-14 09:47:36 +0000
@@ -31,8 +31,6 @@
 import subprocess
 import tempfile
 import time
-import pooler
-import tools
 import logging
 
 
@@ -40,6 +38,8 @@
 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

=== modified file 'account_financial_report_webkit/wizard/print_journal.py'
--- account_financial_report_webkit/wizard/print_journal.py	2013-09-13 22:48:50 +0000
+++ account_financial_report_webkit/wizard/print_journal.py	2013-11-14 09:47:36 +0000
@@ -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"

=== modified file 'account_financial_report_webkit/wizard/trial_balance_wizard.py'
--- account_financial_report_webkit/wizard/trial_balance_wizard.py	2012-03-06 09:13:59 +0000
+++ account_financial_report_webkit/wizard/trial_balance_wizard.py	2013-11-14 09:47:36 +0000
@@ -19,10 +19,10 @@
 #
 ##############################################################################
 
-from osv import osv
-
-
-class AccountTrialBalanceWizard(osv.osv_memory):
+from openerp.osv import orm
+
+
+class AccountTrialBalanceWizard(orm.TransientModel):
     """Will launch trial balance report and pass required args"""
 
     _inherit = "account.common.balance.report"


Follow ups