Skip to Content
Menu
This question has been flagged
219 Views

how can i _inherit = ['mail\.thread\.cc',\ 'mail\.activity\.mixin',\] \ in\ this\ model\?

class\ Website\(models\.Model\):
\ \ \ \ _inherit\ =\ \['website'\]

\ \ \ \ def\ child_menus\(self,\ active_path\):
\ \ \ \ \ \ \ \ website_menu\ =\ self\.env\['website\.menu'\]
\ \ \ \ \ \ \ \ existing_menu\ =\ website_menu\.sudo\(\)\.search\(\[\('url',\ '=',\ active_path\)\],\ limit=1\)
\ \ \ \ \ \ \ \ main_menu\ =\ self\.env\['ir\.model\.data'\]\.sudo\(\)\.get_object_reference\('website',\ 'main_menu'\)
\ \ \ \ \ \ \ \ _logger\.info\('\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-'\)
\ \ \ \ \ \ \ \ _logger\.info\(active_path\)
\ \ \ \ \ \ \ \ _logger\.info\(existing_menu\)
\ \ \ \ \ \ \ \ _logger\.info\(main_menu\)

\ \ \ \ \ \ \ \ wiki_menu_id\ =\ website_menu\.sudo\(\)\.search\(\[\('wiki_menu',\ '=',\ True\)\],\ limit=1\)
\ \ \ \ \ \ \ \ main_menu\ =\ \('website\.menu',\ wiki_menu_id.parent_id.id)
_logger.info(wiki_menu_id)
_logger.info(main_menu)
_logger.info('------------------------')

Avatar
Discard
Related Posts Replies Views Activity
4
May 24
10079
1
Apr 24
1566
0
Nov 23
525
1
Sep 23
572
2
Aug 23
2429