account: Small performance improvement on date computation (issue 620002)

2 views
Skip to first unread message

nicolas...@b2ck.com

unread,
Dec 19, 2012, 10:31:43 AM12/19/12
to nicolas...@b2ck.com, re...@tryton-rietveld-hrd.appspotmail.com, tryto...@googlegroups.com
Reviewers: ,



Please review this at http://codereview.tryton.org/620002/

Affected files:
M move.py


Index: move.py
===================================================================

--- a/move.py
+++ b/move.py
@@ -1192,6 +1192,10 @@
'journal': journal_id,
'date': vals.get('date'),
}).id
+ else:
+ if 'date' not in vals:
+ # prevent computation of default date
+ vals['date'] = None
line = super(Line, cls).create(vals)
cls.check_journal_period_modify(line.period, line.journal)
Move.validate([line.move])



Reply all
Reply to author
Forward
0 new messages