Browse Source

[IMP] use RegistryManager.get instead of deprecated pooler

pull/336/head
Holger Brunn 8 years ago
parent
commit
55abf04675
No known key found for this signature in database GPG Key ID: 1C9760FECA3AE18
  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

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)

Loading…
Cancel
Save