[IMP]: account: Added log messages for Fiscalyear, Period and Bank Statement

bzr revid: rpa@tinyerp.com-20100722073045-1exnuvh585je7s2c
This commit is contained in:
rpa (Open ERP) 2010-07-22 13:00:45 +05:30
parent d519022d12
commit 5b96d2c6be
3 changed files with 11 additions and 0 deletions

View File

@ -335,6 +335,7 @@ class account_bank_statement(osv.osv):
if st.journal_id.entry_posted:
account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
self.log(cr, uid, st.id, 'Statement %s is confirmed and entries are created.' % st.name)
done.append(st.id)
self.write(cr, uid, done, {'state':'confirm'}, context=context)
return True

View File

@ -58,6 +58,11 @@ cancelled, please check the box !'))
'WHERE fiscalyear_id = %s', ('done', fy_id))
cr.execute('UPDATE account_fiscalyear ' \
'SET state = %s WHERE id = %s', ('done', fy_id))
# Log message for Fiscalyear
fy_pool = self.pool.get('account.fiscalyear')
fy_code = fy_pool.browse(cr, uid, fy_id, context=context).code
fy_pool.log(cr, uid, fy_id, "Fiscal year '%s' is closed, no more modification allowed." % (fy_code))
return {}
account_fiscalyear_close_state()

View File

@ -46,6 +46,11 @@ class account_period_close(osv.osv_memory):
for id in context['active_ids']:
cr.execute('update account_journal_period set state=%s where period_id=%s', (mode, id))
cr.execute('update account_period set state=%s where id=%s', (mode, id))
# Log message for Period
period_pool = self.pool.get('account.period')
for period_id, name in period_pool.name_get(cr, uid, [id]):
period_pool.log(cr, uid, period_id, "Period '%s' is closed, no more modification allowed for this period." % (name))
return {}
account_period_close()