addons14/document_page/models/document_page_history.py
def _compute_diff(self):
        """Shows a diff between this version and the previous version"""
        history = self.env["document.page.history"]
        for rec in self:
            prev = history.search(
                [
                    ("page_id", "=", rec.page_id.id),
                    ("create_date", "<", rec.create_date),
                ],
                limit=1,
                order="create_date DESC",
            )
            rec.diff = self._get_diff(prev.id, rec.id)
Shows a diff between this version and the previous version
Shows a diff between this version and the previous version
Shows a diff between this version and the previous version
def _compute_diff(self):
        history = self.env["document.page.history"]
        for rec in self:
            prev = history.search(
                [
                    ("page_id", "=", rec.page_id.id),
                    ("create_date", "<", rec.create_date),
                ],
                limit=1,
                order="create_date DESC",
            )
            rec.diff = self._get_diff(prev.id, rec.id)
def _compute_diff ( self ) : history = self . env [ "document.page.history" ] for rec in self : prev = history . search ( [ ( "page_id" , "=" , rec . page_id . id ) , ( "create_date" , "<" , rec . create_date ) , ] , limit = 1 , order = "create_date DESC" , ) rec . diff = self . _get_diff ( prev . id , rec . id )
Shows a diff between this version and the previous version
Shows a diff between this version and the previous version
"""Shows a diff between this version and the previous version"""
self