[REM] Account: Cash statement => remove journal_id and its default method (will use bank statement)
bzr revid: mra@mra-laptop-20100927065027-3t0mfmqn2nwroqfc
This commit is contained in:
parent
a5b8f7058f
commit
99a2e3c981
|
@ -203,19 +203,7 @@ class account_cash_statement(osv.osv):
|
|||
res.append((0,0,dct))
|
||||
return res
|
||||
|
||||
def _default_journal_id(self, cr, uid, context={}):
|
||||
journal_pool = self.pool.get('account.journal')
|
||||
journal_type = context.get('journal_type', False)
|
||||
journal_id = False
|
||||
if journal_type:
|
||||
ids = journal_pool.search(cr, uid, [('type', '=', journal_type)])
|
||||
if ids:
|
||||
journal_id = ids[0]
|
||||
|
||||
return journal_id
|
||||
|
||||
_columns = {
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'draft': [('readonly', False)]}, readonly=True),
|
||||
'balance_end_real': fields.float('Closing Balance', digits_compute=dp.get_precision('Account'), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"),
|
||||
'state': fields.selection(
|
||||
[('draft', 'Draft'),
|
||||
|
@ -235,7 +223,6 @@ class account_cash_statement(osv.osv):
|
|||
'date': lambda *a:time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'user_id': lambda self, cr, uid, context=None: uid,
|
||||
'starting_details_ids':_get_cash_open_box_lines,
|
||||
'journal_id': _default_journal_id,
|
||||
'ending_details_ids':_get_default_cash_close_box_lines
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue