Browse Source

[pep8] - review on account_export_csv, account_move_line_report_xls, account_journal_report_xls, account_financial_report_horizontal, account_financial_report_webkit_xls

pull/745/head
laetitia.gangloff@acsone.eu 10 years ago
committed by dsolanki
parent
commit
38bf7e911e
  1. 4
      account_financial_report_horizontal/__init__.py
  2. 4
      account_financial_report_horizontal/report/__init__.py
  3. 8
      account_financial_report_horizontal/report/account_balance_sheet.py
  4. 8
      account_financial_report_horizontal/report/account_profit_loss.py
  5. 25
      account_financial_report_horizontal/report/common_report_header.py
  6. 8
      account_financial_report_horizontal/wizard/__init__.py
  7. 2
      account_financial_report_horizontal/wizard/account_report_balance_sheet.py
  8. 4
      account_financial_report_horizontal/wizard/account_report_common.py
  9. 2
      account_financial_report_horizontal/wizard/account_report_common_account.py
  10. 2
      account_financial_report_horizontal/wizard/account_report_profit_loss.py

4
account_financial_report_horizontal/__init__.py

@ -1,2 +1,2 @@
import report
import wizard
from . import report
from . import wizard

4
account_financial_report_horizontal/report/__init__.py

@ -1,3 +1,3 @@
# import account_balance
import account_balance_sheet
import account_profit_loss
from . import account_balance_sheet
from . import account_profit_loss

8
account_financial_report_horizontal/report/account_balance_sheet.py

@ -24,7 +24,6 @@
import time
import openerp.pooler as pooler
from openerp.report import report_sxw
from openerp.addons.account_financial_report_horizontal.report import (
account_profit_loss
@ -97,14 +96,13 @@ class report_balancesheet_horizontal(
def get_data(self, data):
cr, uid = self.cr, self.uid
db_pool = pooler.get_pool(self.cr.dbname)
# Getting Profit or Loss Balance from profit and Loss report
self.obj_pl.get_data(data)
self.res_bl = self.obj_pl.final_result()
account_pool = db_pool.get('account.account')
currency_pool = db_pool.get('res.currency')
account_pool = self.pool['account.account']
currency_pool = self.pool['res.currency']
types = [
'liability',
@ -276,5 +274,3 @@ report_sxw.report_sxw(
'account_balance_sheet.rml',
parser=report_balancesheet_horizontal,
header='internal')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

8
account_financial_report_horizontal/report/account_profit_loss.py

@ -22,7 +22,6 @@
##############################################################################
import time
import openerp.pooler as pooler
from openerp.report import report_sxw
from common_report_header import common_report_header
from openerp.tools.translate import _
@ -101,10 +100,9 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
}
cr, uid = self.cr, self.uid
db_pool = pooler.get_pool(self.cr.dbname)
account_pool = db_pool.get('account.account')
currency_pool = db_pool.get('res.currency')
account_pool = self.pool['account.account']
currency_pool = self.pool['res.currency']
types = [
'expense',
@ -247,5 +245,3 @@ report_sxw.report_sxw(
'addons/account_financial_report_horizontal/report/'
'account_profit_loss.rml',
parser=report_pl_account_horizontal, header='internal')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

25
account_financial_report_horizontal/report/common_report_header.py

@ -19,7 +19,6 @@
#
##############################################################################
import openerp.pooler as pooler
from openerp.tools.translate import _
@ -44,25 +43,25 @@ class common_report_header(object):
def get_start_period(self, data):
if data.get('form', False) and data['form'].get('period_from', False):
return pooler.get_pool(self.cr.dbname).get(
'account.period').browse(self.cr, self.uid, data[
'form']['period_from'][0]).name
return self.pool['account.period'].browse(
self.cr, self.uid,
data['form']['period_from'][0]).name
return ''
def get_end_period(self, data):
if data.get('form', False) and data['form'].get('period_to', False):
return pooler.get_pool(self.cr.dbname).get(
'account.period').browse(self.cr, self.uid, data[
'form']['period_to'][0]).name
return self.pool['account.period'].browse(
self.cr, self.uid,
data['form']['period_to'][0]).name
return ''
def _get_account(self, data):
if data.get('form', False) and data['form'].get(
'chart_account_id', False
):
return pooler.get_pool(self.cr.dbname).get(
'account.account').browse(self.cr, self.uid, data[
'form']['chart_account_id'][0]).name
return self.pool['account.account'].browse(
self.cr, self.uid,
data['form']['chart_account_id'][0]).name
return ''
def _get_sortby(self, data):
@ -80,7 +79,7 @@ class common_report_header(object):
if data.get('form', False) and data['form'].get(
'fiscalyear_id', False
):
return pooler.get_pool(self.cr.dbname).get(
'account.fiscalyear').browse(self.cr, self.uid, data[
'form']['fiscalyear_id'][0]).name
return self.pool['account.fiscalyear'].browse(
self.cr, self.uid,
data['form']['fiscalyear_id'][0]).name
return ''

8
account_financial_report_horizontal/wizard/__init__.py

@ -1,4 +1,4 @@
import account_report_common
import account_report_common_account
import account_report_balance_sheet
import account_report_profit_loss
from . import account_report_common
from . import account_report_common_account
from . import account_report_balance_sheet
from . import account_report_profit_loss

2
account_financial_report_horizontal/wizard/account_report_balance_sheet.py

@ -21,7 +21,7 @@
#
##############################################################################
from osv import orm, fields
from openerp.osv import orm, fields
class account_bs_report(orm.TransientModel):

4
account_financial_report_horizontal/wizard/account_report_common.py

@ -24,8 +24,8 @@
import time
from lxml import etree
from osv import fields, orm
from tools.translate import _
from openerp.osv import fields, orm
from openerp.tools.translate import _
class account_common_report(orm.TransientModel):

2
account_financial_report_horizontal/wizard/account_report_common_account.py

@ -21,7 +21,7 @@
#
##############################################################################
from osv import orm, fields
from openerp.osv import orm, fields
class account_common_account_report(orm.TransientModel):

2
account_financial_report_horizontal/wizard/account_report_profit_loss.py

@ -21,7 +21,7 @@
#
##############################################################################
from osv import orm, fields
from openerp.osv import orm, fields
class account_pl_report(orm.TransientModel):

Loading…
Cancel
Save