[FIX] mrp_repair:Hardcoded stock name location in mrp_repair are removed

lp bug: https://launchpad.net/bugs/831543 fixed

bzr revid: aag@tinyerp.com-20110829093308-zy30ntoek58l1oyl
This commit is contained in:
Atik Agewan (OpenERP)
2011-08-29 15:03:08 +05:30
parent 5c5fc434dc
commit 873b0b206e
+3 -1
View File
@@ -692,6 +692,7 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
@param guarantee_limit: Guarantee limit of current record.
@return: Dictionary of values.
"""
wrehouse_obj = self.pool.get('stock.warehouse')
if not type:
return {'value': {
'location_id': False,
@@ -709,7 +710,8 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
}
if ids:
stock_id = self.browse(cr, uid, ids[0]).repair_id.company_id.partner_id.property_stock_customer.id
company_id = self.browse(cr, uid, ids[0]).repair_id.company_id.id
stock_id = wrehouse_obj.browse(cr, uid, company_id).lot_input_id.id
to_invoice = (guarantee_limit and
datetime.strptime(guarantee_limit, '%Y-%m-%d') < datetime.now())
return {'value': {