[MRG] from upstream

(lp:c2c-addons/6.1  rev 24.1.2)
Guewen Baconnier @ Camptocamp 2012-04-18 16:35:42 +02:00
parent d705c764ba
commit c57188fcea
5 changed files with 11 additions and 9 deletions

View File

@ -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>

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)