When you create an addon you will pass the ID of the record to that addon. Check your criteria - your query does not take this ID into account.
Example:
https://github.com/Telaxus/EPESI/blob/master/modules/CRM/PhoneCall/PhoneCall_0.php
public function addon($r, $rb_parent) {
$rb = $this->init_module(Utils_RecordBrowser::module_name(), 'phonecall');
$params = array(
array(
'related' => $rb_parent->tab . '/' . $r['id'],
),
array(
'related' => false,
),
array(
'date_and_time' => 'DESC'
),
);
This is what binds them together:
'related' => $rb_parent->tab . '/' . $r['id']