openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #00430
Re: [Merge] lp:~camptocamp/ocb-addons/7.0-fix-1238508-nbi into lp:ocb-addons
The removed code is outside the for loop:
if todo:
19 - self.action_confirm(cr, uid, todo, context=context)
20 -
21 - self.write(cr, uid, move_ids, {'state': 'done', 'date': time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)}, context=context)
So the moves pass to state done at the end of the loop.
But the in the loop they do this search:
other_upstream_move_ids = self.search(cr, uid, [('id','!=',move.id),('state','not in',['done','cancel']),
('move_dest_id','=',move.move_dest_id.id)], context=context)
that has for finality to check that the current move is the last one in state confirmed/assigned.
But as the confirmation and the write is done after the loop this will never happen.
I just put the removed code inside the current loop.
Regards
Nicolas
--
https://code.launchpad.net/~camptocamp/ocb-addons/7.0-fix-1238508-nbi/+merge/190558
Your team OpenERP Community Backports Team is subscribed to branch lp:ocb-addons.
References