[FIX] mail: fix _invalidate_documents on updating empty value
Method `_invalidate_documents` is used to invalidate cache on moving message to
a new record. However, it must be skipped if the message wasn't attached to any
record before. Before this commit it gives `KeyError` on reading
`self.pool[False]`.
STEPS:
* install `hr_referral` module
* open `Settings >> Technical >> Messages`
* open a record with empty values in Related Document Model/ID
* set any values in those fields
opw-3056859
closes odoo/odoo#106521
Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
Loading