Skip to content
Snippets Groups Projects
Commit 5b96d2c6 authored by Rucha Patel's avatar Rucha Patel
Browse files

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

bzr revid: rpa@tinyerp.com-20100722073045-1exnuvh585je7s2c
parent d519022d
Branches
Tags
No related merge requests found
......@@ -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
......
......@@ -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()
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment