Browse Source

[pep8] - account_financial_report_horizontal

pull/6/head
laetitia.gangloff@acsone.eu 11 years ago
parent
commit
b611fddb1c
  1. 2
      account_financial_report_horizontal/report/__init__.py
  2. 18
      account_financial_report_horizontal/report/account_balance_sheet.py
  3. 10
      account_financial_report_horizontal/report/account_profit_loss.py
  4. 4
      account_financial_report_horizontal/report/common_report_header.py

2
account_financial_report_horizontal/report/__init__.py

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

18
account_financial_report_horizontal/report/account_balance_sheet.py

@ -24,18 +24,19 @@
import time
import pooler
from report import report_sxw
import openerp.pooler as pooler
from openerp.report import report_sxw
from openerp.addons.account_financial_report_horizontal.report import (
account_profit_loss
)
from common_report_header import common_report_header
from tools.translate import _
from openerp.tools.translate import _
class report_balancesheet_horizontal(
report_sxw.rml_parse, common_report_header
):
def __init__(self, cr, uid, name, context=None):
super(report_balancesheet_horizontal, self).__init__(
cr, uid, name, context=context)
@ -69,11 +70,9 @@ class report_balancesheet_horizontal(
def set_context(self, objects, data, ids, report_type=None):
new_ids = ids
if (data['model'] == 'ir.ui.menu'):
new_ids = 'chart_account_id' in data['form'] and data[
'form'
]['chart_account_id'] and [data[
'form'
]['chart_account_id'][0]] or []
new_ids = 'chart_account_id' in data['form']\
and data['form']['chart_account_id']\
and [data['form']['chart_account_id'][0]] or []
objects = self.pool.get('account.account').browse(
self.cr, self.uid, new_ids)
lang_dict = self.pool.get('res.users').read(
@ -100,7 +99,7 @@ class report_balancesheet_horizontal(
cr, uid = self.cr, self.uid
db_pool = pooler.get_pool(self.cr.dbname)
#Getting Profit or Loss Balance from profit and Loss report
# Getting Profit or Loss Balance from profit and Loss report
self.obj_pl.get_data(data)
self.res_bl = self.obj_pl.final_result()
@ -124,7 +123,6 @@ class report_balancesheet_horizontal(
ctx['date_to'] = data['form'].get('date_to', False)
ctx['state'] = data['form'].get('target_move', 'all')
cal_list = {}
pl_dict = {}
account_dict = {}
account_id = data['form'].get('chart_account_id', False)
if account_id:

10
account_financial_report_horizontal/report/account_profit_loss.py

@ -22,10 +22,10 @@
##############################################################################
import time
import pooler
from report import report_sxw
import openerp.pooler as pooler
from openerp.report import report_sxw
from common_report_header import common_report_header
from tools.translate import _
from openerp.tools.translate import _
class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
@ -63,8 +63,8 @@ class report_pl_account_horizontal(report_sxw.rml_parse, common_report_header):
new_ids = ids
if (data['model'] == 'ir.ui.menu'):
new_ids = 'chart_account_id' in data['form'] and data['form'][
'chart_account_id'] and [data['form'][
'chart_account_id'][0]] or []
'chart_account_id'] and [data['form']['chart_account_id'][0]]\
or []
objects = self.pool.get('account.account').browse(
self.cr, self.uid, new_ids)
lang_dict = self.pool.get('res.users').read(

4
account_financial_report_horizontal/report/common_report_header.py

@ -19,8 +19,8 @@
#
##############################################################################
import pooler
from tools.translate import _
import openerp.pooler as pooler
from openerp.tools.translate import _
class common_report_header(object):

Loading…
Cancel
Save