From cf305bec85ada6544908ad2d9b653057b32f7b5d Mon Sep 17 00:00:00 2001 From: Lorenzo Battistini Date: Tue, 25 Jun 2013 11:14:02 +0200 Subject: [PATCH] [fix] no more property_reserve_and_surplus_account field --- .../wizard/account_report_balance_sheet.py | 17 ----------------- .../account_report_balance_sheet_view.xml | 2 +- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/account_financial_report_horizontal/wizard/account_report_balance_sheet.py b/account_financial_report_horizontal/wizard/account_report_balance_sheet.py index 119c13f8..91468576 100644 --- a/account_financial_report_horizontal/wizard/account_report_balance_sheet.py +++ b/account_financial_report_horizontal/wizard/account_report_balance_sheet.py @@ -30,13 +30,6 @@ class account_bs_report(osv.osv_memory): _inherit = "account_financial_report_horizontal.common.account.report" _description = 'Account Balance Sheet Report' - def _get_def_reserve_account(self, cr, uid, context=None): - chart_id = self._get_account(cr, uid, context=context) - res = self.onchange_chart_id(cr, uid, [], chart_id, context=context) - if not res: - return False - return res['value']['reserve_account_id'] - _columns = { 'display_type': fields.boolean("Landscape Mode"), 'reserve_account_id': fields.many2one('account.account', 'Reserve & Profit/Loss Account', @@ -50,18 +43,8 @@ class account_bs_report(osv.osv_memory): _defaults={ 'display_type': True, 'journal_ids': [], - 'reserve_account_id': _get_def_reserve_account, } - def onchange_chart_id(self, cr, uid, ids, chart_id, context=None): - if not chart_id: - return {} - account = self.pool.get('account.account').browse(cr, uid, chart_id , context=context) - if not account.company_id.property_reserve_and_surplus_account: - return {'value': {'reserve_account_id': False}} - return {'value': {'reserve_account_id': account.company_id.property_reserve_and_surplus_account.id}} - - def _print_report(self, cr, uid, ids, data, context=None): if context is None: context = {} diff --git a/account_financial_report_horizontal/wizard/account_report_balance_sheet_view.xml b/account_financial_report_horizontal/wizard/account_report_balance_sheet_view.xml index 67f6d7aa..dc5c93cc 100644 --- a/account_financial_report_horizontal/wizard/account_report_balance_sheet_view.xml +++ b/account_financial_report_horizontal/wizard/account_report_balance_sheet_view.xml @@ -10,7 +10,7 @@ - +