Skip to content
Snippets Groups Projects
Commit f355f0ce authored by Quentin De Paoli's avatar Quentin De Paoli
Browse files

*added the re-opening for account_journal_period, bugfix.

bzr revid: qdp-162c13cb256782eb85314841dfcab36de1408d1d
parent 29f74108
Branches
Tags
No related merge requests found
......@@ -23,6 +23,10 @@ def _remove_entries(self, cr, uid, data, context):
raise wizard.except_wizard('UserError', 'The journal must have centralised counterpart')
ids_move = pool.get('account.move').search(cr,uid,[('journal_id','=',period_journal.journal_id.id),('period_id','=',period_journal.period_id.id)])
pool.get('account.move').unlink(cr,uid,ids_move)
cr.execute('UPDATE account_journal_period ' \
'SET state = %s ' \
'WHERE period_id IN (SELECT id FROM account_period WHERE fiscalyear_id = %d)',
('draft',data_fyear))
cr.execute('UPDATE account_period SET state = %s ' \
'WHERE fiscalyear_id = %d', ('draft',data_fyear))
cr.execute('UPDATE account_fiscalyear ' \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment