Browse Source

[MRG] from upstream

(lp:c2c-addons/6.1  rev 24.1.2)
Guewen Baconnier @ Camptocamp 12 years ago
parent
commit
c57188fcea
  1. 4
      account_financial_report_webkit/account_move_line_view.xml
  2. 8
      account_financial_report_webkit/report/webkit_parser_header_fix.py
  3. 4
      account_financial_report_webkit/wizard/balance_common.py
  4. 2
      account_financial_report_webkit/wizard/general_ledger_wizard.py
  5. 2
      account_financial_report_webkit/wizard/partners_ledger_wizard.py

4
account_financial_report_webkit/account_move_line_view.xml

@ -10,7 +10,7 @@
<!-- modulename.view -->
<field name="type">form</field>
<field name="arch" type="xml">
<separator string="Narration" colspan="4" position="before">
<separator string="Internal Note" colspan="4" position="before">
<separator string="Misc."/>
<newline/>
<group>
@ -20,4 +20,4 @@
</field>
</record>
</data>
</openerp>
</openerp>

8
account_financial_report_webkit/report/webkit_parser_header_fix.py

@ -33,6 +33,7 @@ import tempfile
import time
import pooler
import tools
import logging
import openerp.addons
@ -43,6 +44,7 @@ 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
_logger = logging.getLogger('financial.reports.webkit')
# Class used only as a workaround to bug :
# http://code.google.com/p/wkhtmltopdf/issues/detail?id=656
@ -188,7 +190,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
htmls.append(html)
except Exception, e:
msg = exceptions.text_error_template().render()
logger.error(msg)
_logger.error(msg)
raise except_osv(_('Webkit render'), msg)
else:
try :
@ -199,7 +201,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
htmls.append(html)
except Exception, e:
msg = exceptions.text_error_template().render()
logger.error(msg)
_logger.error(msg)
raise except_osv(_('Webkit render'), msg)
# NO html footer and header because we write them as text with wkhtmltopdf
@ -214,7 +216,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
**self.parser_instance.localcontext)
except Exception, e:
msg = exceptions.text_error_template().render()
logger.error(msg)
_logger.error(msg)
raise except_osv(_('Webkit render'), msg)
return (deb, 'html')
bin = self.get_lib(cursor, uid)

4
account_financial_report_webkit/wizard/balance_common.py

@ -190,7 +190,7 @@ class AccountBalanceCommonWizard(osv.osv_memory):
AND COALESCE(p.special, FALSE) = FALSE
ORDER BY p.date_start ASC
LIMIT 1) AS period_start
UNION
UNION ALL
SELECT * FROM (SELECT p.id
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)
@ -249,7 +249,7 @@ class AccountBalanceCommonWizard(osv.osv_memory):
AND COALESCE(p.special, FALSE) = FALSE
ORDER BY p.date_start ASC
LIMIT 1) AS period_start
UNION
UNION ALL
SELECT * FROM (SELECT p.id
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)

2
account_financial_report_webkit/wizard/general_ledger_wizard.py

@ -104,7 +104,7 @@ class AccountReportGeneralLedgerWizard(osv.osv_memory):
AND COALESCE(p.special, FALSE) = FALSE
ORDER BY p.date_start ASC
LIMIT 1) AS period_start
UNION
UNION ALL
SELECT * FROM (SELECT p.id
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)

2
account_financial_report_webkit/wizard/partners_ledger_wizard.py

@ -76,7 +76,7 @@ class AccountReportPartnersLedgerWizard(osv.osv_memory):
AND COALESCE(p.special, FALSE) = FALSE
ORDER BY p.date_start ASC
LIMIT 1) AS period_start
UNION
UNION ALL
SELECT * FROM (SELECT p.id
FROM account_period p
LEFT JOIN account_fiscalyear f ON (p.fiscalyear_id = f.id)

Loading…
Cancel
Save