[MIG] document_page: Migration to 12.0

This commit is contained in:
mreficent
2019-03-12 13:23:37 +01:00
committed by Justine Doutreloux
parent fc22ca50fb
commit 792991fba3
25 changed files with 51 additions and 60 deletions

View File

@@ -1,4 +1,3 @@
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import document_page_create_menu

View File

@@ -14,7 +14,6 @@ class DocumentPageCreateMenu(models.TransientModel):
'Menu Name',
required=True
)
menu_parent_id = fields.Many2one(
'ir.ui.menu',
'Parent Menu',
@@ -53,7 +52,7 @@ class DocumentPageCreateMenu(models.TransientModel):
'type': 'ir.actions.act_window',
'target': 'current',
}
value['domain'] = "[('parent_id','=',%d)]" % (page.id)
value['domain'] = "[('parent_id','=',%d)]" % page.id
value['res_id'] = page.id
# only the super user is allowed to create menu due to security rules

View File

@@ -10,6 +10,7 @@ class DocumentPageShowDiff(models.TransientModel):
"""Display Difference for History."""
_name = 'wizard.document.page.history.show_diff'
_description = 'Document Page Show Diff'
def _get_diff(self):
"""Return the Difference between two document."""
@@ -18,9 +19,9 @@ class DocumentPageShowDiff(models.TransientModel):
diff = False
if len(ids) == 2:
if ids[0] > ids[1]:
diff = history.getDiff(ids[1], ids[0])
diff = history._get_diff(ids[1], ids[0])
else:
diff = history.getDiff(ids[0], ids[1])
diff = history._get_diff(ids[0], ids[1])
elif len(ids) == 1:
diff = history.browse(ids[0]).diff
else: