Review: Needs Fixing
In the diff line 9, you correctly changed period.date_stop to
period.date_start. But you also changed the comparisons: '>=' becomes '>' and
'<=' becomes '<'. This doesn't seem correct to me. (Please tell me if I am
wrong.)
Second, I don't like the 'if' statement you introduced. The statements inside
are essentially the same. The only difference is the arguments order. If that
is the case, why don't you simply order the arguments? See:
date1, date2 = sorted([val.period_id.date_start,
day_before_calculated_period])
outgoing_before = self._get_outgoing_before(cr, uid, val, date1, date2,
context=context),
This minimizes the risk that future patches make the 'if' branches diverge,
don't you think?
Thanks,
Raphael
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-802569-aag/+merge/68049
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-802569-aag.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp