From a125c0bf5d2729269baae5d515bfb49afba9bc92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Todorovich?= Date: Thu, 12 Apr 2018 19:05:49 -0300 Subject: [PATCH] Add api.depends on computed diff --- document_page/models/document_page_history.py | 1 + 1 file changed, 1 insertion(+) diff --git a/document_page/models/document_page_history.py b/document_page/models/document_page_history.py index 5ce1dd49..71535701 100644 --- a/document_page/models/document_page_history.py +++ b/document_page/models/document_page_history.py @@ -35,6 +35,7 @@ class DocumentPageHistory(models.Model): diff = fields.Text(compute='_compute_diff') @api.multi + @api.depends('content', 'page_id.history_ids') def _compute_diff(self): """Shows a diff between this version and the previous version""" history = self.env['document.page.history']