Code review comment for lp:~openerp-dev/openobject-addons/7.0-opw-593169-msh

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello Mohammed,

The fix seems good, but needs a bit improvement in the code. Instead of checking twice for the warehouse we can do it in one go, something like this..

if requisition.warehouse_id:
   location_id = requisition.warehouse_id.lot_input_id.id
else:
    lot_input_stock = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock')
    location_id = lot_input_stock and lot_input_stock.id

Regards,
Naresh Soni,
OpenERP Enterprise Services

review: Needs Fixing

« Back to merge proposal