[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 FernandoRomera
parent 9a0bc0f970
commit a2eb66d3f3
7 changed files with 56 additions and 30 deletions

View File

@@ -51,7 +51,7 @@ class DocumentPageCreateMenu(models.TransientModel):
'res_model': 'document.page',
'view_id': view_id,
'type': 'ir.actions.act_window',
'target': 'inline',
'target': 'current',
}
value['domain'] = "[('parent_id','=',%d)]" % (page.id)
value['res_id'] = page.id
@@ -66,6 +66,8 @@ class DocumentPageCreateMenu(models.TransientModel):
'parent_id': data.menu_parent_id.id,
'action': 'ir.actions.act_window,' + str(action_id.id),
})
if page.menu_id:
page.menu_id.unlink()
page.write({'menu_id': menu_id.id})
return {
'type': 'ir.actions.client',