Messages in offers module

Since one line above we have `record.id`, I guess that `record` always evaluates to true. Therefore `record_name or (record and record.name)` is the same as `record.name`. On the other hand, `record` in this function is `None` by default, so `record.id` will crash if no other value is provided.