Browse Source

Merge pull request #336 from hbrunn/8.0-account_financial_report_webkit-warnings

[IMP] squelch account financial report webkit warnings
pull/320/merge
Pedro M. Baeza 7 years ago
committed by GitHub
parent
commit
366add9a32
  1. 4
      account_financial_report_webkit/report/aged_open_invoices.py
  2. 4
      account_financial_report_webkit/report/aged_partner_balance.py
  3. 4
      account_financial_report_webkit/report/general_ledger.py
  4. 4
      account_financial_report_webkit/report/open_invoices.py
  5. 4
      account_financial_report_webkit/report/partner_balance.py
  6. 4
      account_financial_report_webkit/report/partners_ledger.py
  7. 4
      account_financial_report_webkit/report/print_journal.py
  8. 4
      account_financial_report_webkit/report/trial_balance.py
  9. 4
      account_financial_report_webkit/report/webkit_parser_header_fix.py
  10. 10
      account_financial_report_webkit/test/partner_ledger.yml
  11. 10
      account_financial_report_webkit_xls/tests/partner_ledger.yml

4
account_financial_report_webkit/report/aged_open_invoices.py

@ -23,7 +23,7 @@
from __future__ import division
from datetime import datetime
from openerp import pooler
from openerp.modules.registry import RegistryManager
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
from openerp.tools.translate import _
from .open_invoices import PartnersOpenInvoicesWebkit
@ -76,7 +76,7 @@ class AccountAgedOpenInvoicesWebkit(PartnersOpenInvoicesWebkit):
refer to :class:`openerp.report.report_sxw.rml_parse`"""
super(AccountAgedOpenInvoicesWebkit, self).__init__(cursor, uid, name,
context=context)
self.pool = pooler.get_pool(self.cr.dbname)
self.pool = RegistryManager.get(self.cr.dbname)
self.cursor = self.cr
company = self.pool.get('res.users').browse(self.cr, uid, uid,
context=context).company_id

4
account_financial_report_webkit/report/aged_partner_balance.py

@ -21,7 +21,7 @@
from __future__ import division
from datetime import datetime
from openerp import pooler
from openerp.modules.registry import RegistryManager
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
from openerp.tools.translate import _
from .open_invoices import PartnersOpenInvoicesWebkit
@ -74,7 +74,7 @@ class AccountAgedTrialBalanceWebkit(PartnersOpenInvoicesWebkit):
refer to :class:`openerp.report.report_sxw.rml_parse`"""
super(AccountAgedTrialBalanceWebkit, self).__init__(cursor, uid, name,
context=context)
self.pool = pooler.get_pool(self.cr.dbname)
self.pool = RegistryManager.get(self.cr.dbname)
self.cursor = self.cr
company = self.pool.get('res.users').browse(self.cr, uid, uid,
context=context).company_id

4
account_financial_report_webkit/report/general_ledger.py

@ -24,7 +24,7 @@ from itertools import groupby
from datetime import datetime
from openerp.report import report_sxw
from openerp import pooler
from openerp.modules.registry import RegistryManager
from openerp.tools.translate import _
from .common_reports import CommonReportHeaderWebkit
from .webkit_parser_header_fix import HeaderFooterTextWebKitParser
@ -35,7 +35,7 @@ class GeneralLedgerWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):
def __init__(self, cursor, uid, name, context):
super(GeneralLedgerWebkit, self).__init__(
cursor, uid, name, context=context)
self.pool = pooler.get_pool(self.cr.dbname)
self.pool = RegistryManager.get(self.cr.dbname)
self.cursor = self.cr
company = self.pool.get('res.users').browse(

4
account_financial_report_webkit/report/open_invoices.py

@ -26,7 +26,7 @@ from operator import itemgetter
from mako.template import Template
from openerp import pooler
from openerp.modules.registry import RegistryManager
from openerp.osv import osv
from openerp.report import report_sxw
from openerp.tools.translate import _
@ -50,7 +50,7 @@ class PartnersOpenInvoicesWebkit(report_sxw.rml_parse,
def __init__(self, cursor, uid, name, context):
super(PartnersOpenInvoicesWebkit, self).__init__(
cursor, uid, name, context=context)
self.pool = pooler.get_pool(self.cr.dbname)
self.pool = RegistryManager.get(self.cr.dbname)
self.cursor = self.cr
company = self.pool.get('res.users').browse(

4
account_financial_report_webkit/report/partner_balance.py

@ -22,7 +22,7 @@
from datetime import datetime
from openerp import pooler
from openerp.modules.registry import RegistryManager
from openerp.report import report_sxw
from openerp.tools.translate import _
from .common_partner_balance_reports \
@ -36,7 +36,7 @@ class PartnerBalanceWebkit(report_sxw.rml_parse,
def __init__(self, cursor, uid, name, context):
super(PartnerBalanceWebkit, self).__init__(
cursor, uid, name, context=context)
self.pool = pooler.get_pool(self.cr.dbname)
self.pool = RegistryManager.get(self.cr.dbname)
self.cursor = self.cr
company = self.pool.get('res.users').browse(

4
account_financial_report_webkit/report/partners_ledger.py

@ -22,7 +22,7 @@
from collections import defaultdict
from datetime import datetime
from openerp import pooler
from openerp.modules.registry import RegistryManager
from openerp.osv import osv
from openerp.report import report_sxw
from openerp.tools.translate import _
@ -36,7 +36,7 @@ class PartnersLedgerWebkit(report_sxw.rml_parse,
def __init__(self, cursor, uid, name, context):
super(PartnersLedgerWebkit, self).__init__(
cursor, uid, name, context=context)
self.pool = pooler.get_pool(self.cr.dbname)
self.pool = RegistryManager.get(self.cr.dbname)
self.cursor = self.cr
company = self.pool.get('res.users').browse(

4
account_financial_report_webkit/report/print_journal.py

@ -25,7 +25,7 @@
from openerp.report import report_sxw
from openerp.tools.translate import _
from openerp import pooler
from openerp.modules.registry import RegistryManager
from datetime import datetime
from .common_reports import CommonReportHeaderWebkit
@ -37,7 +37,7 @@ class PrintJournalWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):
def __init__(self, cursor, uid, name, context):
super(PrintJournalWebkit, self).__init__(cursor, uid, name,
context=context)
self.pool = pooler.get_pool(self.cr.dbname)
self.pool = RegistryManager.get(self.cr.dbname)
self.cursor = self.cr
company_obj = self.pool.get('res.company')

4
account_financial_report_webkit/report/trial_balance.py

@ -22,7 +22,7 @@
from datetime import datetime
from openerp import pooler
from openerp.modules.registry import RegistryManager
from openerp.report import report_sxw
from openerp.tools.translate import _
from .common_balance_reports import CommonBalanceReportHeaderWebkit
@ -39,7 +39,7 @@ class TrialBalanceWebkit(report_sxw.rml_parse,
def __init__(self, cursor, uid, name, context):
super(TrialBalanceWebkit, self).__init__(cursor, uid, name,
context=context)
self.pool = pooler.get_pool(self.cr.dbname)
self.pool = RegistryManager.get(self.cr.dbname)
self.cursor = self.cr
company = self.pool.get('res.users').browse(self.cr, uid, uid,

4
account_financial_report_webkit/report/webkit_parser_header_fix.py

@ -40,7 +40,7 @@ from functools import partial
from mako import exceptions
from openerp.osv.orm import except_orm
from openerp.tools.translate import _
from openerp import pooler
from openerp.modules.registry import RegistryManager
from openerp import tools
from openerp.addons.report_webkit import webkit_report
from openerp.addons.report_webkit.report_helper import WebKitHelper
@ -199,7 +199,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
self.name2,
context=context)
self.pool = pooler.get_pool(cursor.dbname)
self.pool = RegistryManager.get(cursor.dbname)
objs = self.getObjects(cursor, uid, ids, context)
parser_instance.set_context(objs, data, ids, report_xml.report_type)

10
account_financial_report_webkit/test/partner_ledger.yml

@ -4,7 +4,7 @@
!python {model: account.account}: |
from datetime import datetime
ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)}
data_dict = {'chart_account_id':ref('account.chart0')}
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
@ -15,7 +15,7 @@
from datetime import datetime
ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier'}
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
@ -27,7 +27,7 @@
from datetime import datetime
ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier',
'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]}
from openerp.tools import test_reports
@ -40,7 +40,7 @@
from datetime import datetime
ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
from openerp.tools import test_reports
@ -53,7 +53,7 @@
from datetime import datetime
ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
from openerp.tools import test_reports

10
account_financial_report_webkit_xls/tests/partner_ledger.yml

@ -4,7 +4,7 @@
!python {model: account.account}: |
from datetime import datetime
ctx={'xls_export':1}
data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)}
data_dict = {'chart_account_id':ref('account.chart0')}
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls')
@ -15,7 +15,7 @@
from datetime import datetime
ctx={'xls_export':1}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier'}
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls')
@ -27,7 +27,7 @@
from datetime import datetime
ctx={'xls_export':1}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier',
'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]}
from openerp.tools import test_reports
@ -40,7 +40,7 @@
from datetime import datetime
ctx={'xls_export':1}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
from openerp.tools import test_reports
@ -53,7 +53,7 @@
from datetime import datetime
ctx={'xls_export':1}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
from openerp.tools import test_reports

Loading…
Cancel
Save