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
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user