跳至內容
選單
此問題已被標幟
1 回覆
5168 瀏覽次數

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)

頭像
捨棄
最佳答案

Hi

Try the below solution to inherit the mail.thread in the existing model of ODOO.

class Website(models.Model):

  _name = 'website'

 _inherit = ['website', 'mail.thread', 'mail.activity.mixin']

the above solution will work.

Thanks & Regards,

Sunny Sheth


頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
4
5月 24
12704
1
4月 24
3317
4
3月 24
3423
0
11月 23
2038
1
10月 23
5374