mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-19 03:42:19 -06:00
[11.0][IMP] document_page:
* move menus to a higher level. * fix categories search view. * fix create menu action not being accessible in any way. * reorder form view, focusing in the content, not in secondary fields.
This commit is contained in:
committed by
FernandoRomera
parent
9a0bc0f970
commit
a2eb66d3f3
@@ -85,7 +85,7 @@ class DocumentPage(models.Model):
|
||||
menu_id = fields.Many2one(
|
||||
'ir.ui.menu',
|
||||
"Menu",
|
||||
readonly=True
|
||||
readonly=True,
|
||||
)
|
||||
|
||||
content_date = fields.Datetime(
|
||||
@@ -181,3 +181,10 @@ class DocumentPage(models.Model):
|
||||
if not self.content or self.content == '<p><br></p>':
|
||||
if self.parent_id and self.parent_id.type == "category":
|
||||
self.content = self.parent_id.template
|
||||
|
||||
@api.multi
|
||||
def unlink(self):
|
||||
menus = self.mapped('menu_id')
|
||||
res = super().unlink()
|
||||
menus.unlink()
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user