Merge lp:~unifield-team/unifield-addons/UF_1003 into lp:unifield-addons

Proposed by jftempo
Status: Merged
Merged at revision: 4541
Proposed branch: lp:~unifield-team/unifield-addons/UF_1003
Merge into: lp:unifield-addons
Diff against target: 30 lines (+11/-3)
1 file modified
account/account_move_line.py (+11/-3)
To merge this branch: bzr merge lp:~unifield-team/unifield-addons/UF_1003
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+110739@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/account_move_line.py'
--- account/account_move_line.py 2011-06-22 20:05:58 +0000
+++ account/account_move_line.py 2012-06-18 07:17:13 +0000
@@ -1174,15 +1174,23 @@
1174 move_obj.write(cr, uid, [line.move_id.id], {'date': todo_date}, context=context)1174 move_obj.write(cr, uid, [line.move_id.id], {'date': todo_date}, context=context)
1175 return result1175 return result
11761176
1177 def _hook_check_period_state(self, cr, uid, result=False, context=None, *args, **kargs):
1178 """
1179 Check period state
1180 """
1181 if not result:
1182 return False
1183 for (state,) in result:
1184 if state == 'done':
1185 raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed journal.'))
1186
1177 def _update_journal_check(self, cr, uid, journal_id, period_id, context=None):1187 def _update_journal_check(self, cr, uid, journal_id, period_id, context=None):
1178 journal_obj = self.pool.get('account.journal')1188 journal_obj = self.pool.get('account.journal')
1179 period_obj = self.pool.get('account.period')1189 period_obj = self.pool.get('account.period')
1180 jour_period_obj = self.pool.get('account.journal.period')1190 jour_period_obj = self.pool.get('account.journal.period')
1181 cr.execute('SELECT state FROM account_journal_period WHERE journal_id = %s AND period_id = %s', (journal_id, period_id))1191 cr.execute('SELECT state FROM account_journal_period WHERE journal_id = %s AND period_id = %s', (journal_id, period_id))
1182 result = cr.fetchall()1192 result = cr.fetchall()
1183 for (state,) in result:1193 self._hook_check_period_state(cr, uid, result, context=context)
1184 if state == 'done':
1185 raise osv.except_osv(_('Error !'), _('You can not add/modify entries in a closed journal.'))
1186 if not result:1194 if not result:
1187 journal = journal_obj.browse(cr, uid, journal_id, context=context)1195 journal = journal_obj.browse(cr, uid, journal_id, context=context)
1188 period = period_obj.browse(cr, uid, period_id, context=context)1196 period = period_obj.browse(cr, uid, period_id, context=context)

Subscribers

People subscribed via source and target branches

to all changes: