Browse Source

[FIX] Remove references to obsolete field 'reserve_account_id'

pull/605/head
Stefan Rijnhart 12 years ago
committed by mreficent
parent
commit
7706c82b04
  1. 10
      account_financial_report_horizontal/wizard/account_report_balance_sheet.py
  2. 1
      account_financial_report_horizontal/wizard/account_report_balance_sheet_view.xml

10
account_financial_report_horizontal/wizard/account_report_balance_sheet.py

@ -34,12 +34,6 @@ class account_bs_report(orm.TransientModel):
_columns = { _columns = {
'display_type': fields.boolean("Landscape Mode"), 'display_type': fields.boolean("Landscape Mode"),
'reserve_account_id': fields.many2one('account.account', 'Reserve & Profit/Loss Account',
required=True,
help='This Account is used for transfering Profit/Loss ' \
'(Profit: Amount will be added, Loss: Amount will be duducted), ' \
'which is calculated from Profilt & Loss Report',
domain = [('type','=','other')]),
} }
_defaults={ _defaults={
@ -50,9 +44,7 @@ class account_bs_report(orm.TransientModel):
def _print_report(self, cr, uid, ids, data, context=None): def _print_report(self, cr, uid, ids, data, context=None):
if context is None: if context is None:
context = {} context = {}
data['form'].update(self.read(cr, uid, ids, ['display_type','reserve_account_id'])[0])
if not data['form']['reserve_account_id']:
raise orm.except_orm(_('Warning'),_('Please define the Reserve and Profit/Loss account for current user company !'))
data['form'].update(self.read(cr, uid, ids, ['display_type'])[0])
data = self.pre_print_report(cr, uid, ids, data, context=context) data = self.pre_print_report(cr, uid, ids, data, context=context)
if data['form']['display_type']: if data['form']['display_type']:
return { return {

1
account_financial_report_horizontal/wizard/account_report_balance_sheet_view.xml

@ -21,7 +21,6 @@
</xpath> </xpath>
<xpath expr="//field[@name='target_move']" position="after"> <xpath expr="//field[@name='target_move']" position="after">
<field name="display_account"/> <field name="display_account"/>
<field name="reserve_account_id" required="1"/>
<field name="display_type"/> <field name="display_type"/>
<newline/> <newline/>
</xpath> </xpath>

Loading…
Cancel
Save