[IMP]Removed the unwanted functional fields.
bzr revid: psa@tinyerp.com-20130925082507-oma2ttiy1kas9fsn
This commit is contained in:
@@ -171,35 +171,7 @@ class account_cash_statement(osv.osv):
|
||||
|
||||
return result
|
||||
|
||||
def _compute_cash_all(self, cr, uid, ids, fieldnames, args, context=None):
|
||||
result = dict()
|
||||
|
||||
for record in self.browse(cr, uid, ids, context=context):
|
||||
result[record.id] = {
|
||||
'cash_journal_id' : False,
|
||||
'cash_register_id' : False,
|
||||
'cash_control' : False,
|
||||
}
|
||||
for st in self.browse(cr, uid, ids, context=context):
|
||||
if st.journal_id.cash_control == True:
|
||||
result[record.id]['cash_control'] = True
|
||||
result[record.id]['cash_journal_id'] = st.journal_id.id
|
||||
result[record.id]['cash_register_id'] = st.id
|
||||
return result
|
||||
|
||||
|
||||
_columns = {
|
||||
'cash_control' : fields.function(_compute_cash_all,
|
||||
multi='cash',
|
||||
type='boolean', string='Has Cash Control'),
|
||||
'cash_journal_id' : fields.function(_compute_cash_all,
|
||||
multi='cash',
|
||||
type='many2one', relation='account.journal',
|
||||
string='Cash Journal', store=True),
|
||||
'cash_register_id' : fields.function(_compute_cash_all,
|
||||
multi='cash',
|
||||
type='many2one', relation='account.bank.statement',
|
||||
string='Cash Register', store=True),
|
||||
'total_entry_encoding': fields.function(_get_sum_entry_encoding, string="Total Transactions",
|
||||
store = {
|
||||
'account.bank.statement': (lambda self, cr, uid, ids, context=None: ids, ['line_ids','move_line_ids'], 10),
|
||||
|
||||
Reference in New Issue
Block a user