[FIX] delivery:avoid a crash when editing a delivery.carrier

opw:626603
This commit is contained in:
Guewen Baconnier 2015-01-27 14:13:20 +01:00 committed by Goffin Simon
parent 4b3522936f
commit dd23586e16
1 changed files with 1 additions and 0 deletions

View File

@ -127,6 +127,7 @@ class delivery_carrier(osv.osv):
grid_id = grid_pool.search(cr, uid, [('carrier_id', '=', record.id)], context=context)
if grid_id and not (record.normal_price or record.free_if_more_than):
grid_pool.unlink(cr, uid, grid_id, context=context)
grid_id = None
# Check that float, else 0.0 is False
if not (isinstance(record.normal_price,float) or record.free_if_more_than):