Merge lp:~openerp-dev/openobject-addons/trunk-bug-1180941-mahendra into lp:openobject-addons

Proposed by Mahendra Barad(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1180941-mahendra
Merge into: lp:openobject-addons
Diff against target: 15 lines (+3/-2)
1 file modified
account/account.py (+3/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1180941-mahendra
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+166660@code.launchpad.net

Description of the change

Hello,
I fix the Following account_period doesn't update log Problem.

Problem :
-account_period doesn't update log.
now, it will update the werite_date and write_uid.

thanks,
Mahendra

To post a comment you must log in.

Unmerged revisions

8731. By Mahendra Barad(OpenERP)

[FIX] account: account_period doesn't update log so i update the log use orm method instead of query

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account.py'
2--- account/account.py 2013-04-29 15:14:10 +0000
3+++ account/account.py 2013-05-31 06:40:39 +0000
4@@ -1023,8 +1023,9 @@
5 for period in self.browse(cr, uid, ids):
6 if period.fiscalyear_id.state == 'done':
7 raise osv.except_osv(_('Warning !'), _('You can not re-open a period which belongs to closed fiscal year'))
8- cr.execute('update account_journal_period set state=%s where period_id in %s', (mode, tuple(ids),))
9- cr.execute('update account_period set state=%s where id in %s', (mode, tuple(ids),))
10+ self.write(cr, uid, ids, {'state':mode}, context=None);
11+ #using write method it will override the write method of account_journal_period so it is updated directly through query.
12+ cr.execute("update account_journal_period set write_date=(now() at time zone 'UTC'),write_uid=%s,state=%s where period_id in %s", (uid,mode, tuple(ids),))
13 return True
14
15 def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):

Subscribers

People subscribed via source and target branches

to all changes: