I would like to suggest one thing here.
You could have optimized the code by removing one for loop of picking_id:
I meant, self.read and sale.picking_ids would be always same!
Similar logic should have been applied for invoice_ids as well.
Additionally:
1. To reach to procurements, you may also reach by sale order lines!
2. wf_service = netsvc.LocalService("workflow") has been used twice. You could
have opted to optimize that as well.
3. Based on the suggestion of reducing loops, you can improve v6 as well.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/5.0-opw-17363-skh/+merge/74421
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/5.0-opw-17363-skh.
_______________________________________________
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