Review: Needs Fixing

Shouldn't you extend the distinction to the invoice state? the backorder could 
be 2binvoiced" but the delivered one is "invoiced" already.

If I'm not mistaken:
- if there is a backorder: partial.picking_id.backorder_id is the delivered 
picking, partial.picking_id is the back order
- if there is no backorder, partial.picking_id.backorder_id=None, and 
partial.picking_id is delivered picking
So I suggest you start testing this at the top of the function to make the code 
clearer, for example :
   if partial.picking_id.backorder_id:
       picking_done = partial.picking_id.backorder_id
   else:
       picking_done = partial.picking_id
>From then down on, you can simply replace partial.picking_id with picking_done.

Lionel Sausin.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1092211-sejal/+merge/151180
Your team OpenERP Community is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1092211-sejal.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp

Reply via email to