[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:
Lois Rilo
2019-02-28 10:55:23 +01:00
committed by Justine Doutreloux
parent 9b33f6d8d3
commit 729913c1f1
7 changed files with 56 additions and 30 deletions

View File

@@ -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