Review: Needs Fixing
1) - <field name="location_id" ref="stock_location_company"/>
removing parent location of "Output" makes it orphan, this is not acceptable,
please revert this part
2) the fix is not working properly, check both wizards of procurement
3) Conversion from query to orm method is not perfect
23 - cr.execute("select id from procurement_order where state='confirmed'
and procure_method='make_to_order' order by priority,date_planned limit 500
offset %s", (offset,))
24 - ids = map(lambda x: x[0], cr.fetchall())
25 + ids = procurement_obj.search(cr, uid, [('state', '=', 'confirmed'),
('procure_method', '=', 'make_to_order')], order='priority,date_planned')
also pass offset and limit in search
4) 81 + 'warehouse_id': wharehouse_obj.search(cr, uid,
[('company_id','=',procurement.company_id.id or company)])[0],
this will break if you don't get any ids also its better to put it outside
create
5) get "self.pool.get('ir.sequence')" outside loop
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-802322-ron/+merge/66237
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-802322-ron.
_______________________________________________
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