[FIX] ir.values: re-binding of actions should properly delete the previous one

bzr revid: odo@openerp.com-20110902125648-x0cir5m7818h9ba6
This commit is contained in:
Olivier Dony
2011-09-02 14:56:48 +02:00
parent e0624cbc95
commit 32020e1353
+2 -2
View File
@@ -309,7 +309,7 @@ class ir_values(osv.osv):
('key', '=', 'action'),
('key2', '=', action_slot),
('model', '=', model),
('res_id', '=', res_id),
('res_id', '=', res_id or 0), # int field -> NULL == 0
('value', '=', action),
]
self.unlink(cr, uid, self.search(cr, uid, search_criteria))
@@ -319,7 +319,7 @@ class ir_values(osv.osv):
'key2': action_slot,
'object': True,
'model': model,
'res_id': res_id or False,
'res_id': res_id,
'name': name,
'value': action,
})