mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-14 01:41:26 -06:00
[MIG] document_page: Migration to 11.0
continue migration
This commit is contained in:
parent
0c214239fe
commit
612e1235b7
@ -30,7 +30,7 @@ To use this module, you need to:
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/118/10.0
|
||||
:target: https://runbot.odoo-community.org/runbot/118/11.0
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
@ -54,13 +54,6 @@ class DocumentPage(models.Model):
|
||||
"for all new page of this category.",
|
||||
)
|
||||
|
||||
# deprecated - should be removed on 11.0
|
||||
# left here because some modules might still need it
|
||||
display_content = fields.Text(
|
||||
string='Displayed Content',
|
||||
compute='_compute_display_content'
|
||||
)
|
||||
|
||||
history_head = fields.Many2one(
|
||||
'document.page.history',
|
||||
'HEAD',
|
||||
@ -116,14 +109,7 @@ class DocumentPage(models.Model):
|
||||
return r
|
||||
|
||||
@api.multi
|
||||
@api.depends('content')
|
||||
def _compute_display_content(self):
|
||||
# @deprecated, simply use content
|
||||
for rec in self:
|
||||
rec.display_content = rec.content
|
||||
|
||||
@api.multi
|
||||
@api.depends('history_head', 'history_ids')
|
||||
@api.depends('history_head')
|
||||
def _compute_content(self):
|
||||
for rec in self:
|
||||
if rec.type == 'category':
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tests import common
|
||||
from odoo import _
|
||||
|
||||
|
||||
class TestDocumentPageShowDiff(common.TransactionCase):
|
||||
@ -26,10 +25,7 @@ class TestDocumentPageShowDiff(common.TransactionCase):
|
||||
|
||||
history_pages = history_document.search([('page_id', '=', page.id)])
|
||||
|
||||
with self.assertRaises(Exception) as context:
|
||||
with self.assertRaises(UserError):
|
||||
show_diff_object.with_context(
|
||||
active_ids=[i.id for i in history_pages]
|
||||
)._get_diff()
|
||||
|
||||
self.assertTrue(_("Select one or maximum two history revisions!")
|
||||
in context.exception)
|
||||
|
@ -64,7 +64,6 @@ class DocumentPageCreateMenu(models.TransientModel):
|
||||
menu_id = obj_menu.sudo().create({
|
||||
'name': data.menu_name,
|
||||
'parent_id': data.menu_parent_id.id,
|
||||
'icon': 'STOCK_DIALOG_QUESTION',
|
||||
'action': 'ir.actions.act_window,' + str(action_id.id),
|
||||
})
|
||||
page.write({'menu_id': menu_id.id})
|
||||
|
Loading…
Reference in New Issue
Block a user