Files
odoo_source/addons/website_forum/models/res_users.py
T
dane@odoo.com fc66f54ed4 [IMP] website_forum: multi forum pending
This change introduces ability for users (who don't have enough karma)
to create one pending post per forum.
Previously users could only do it in all of forums.

ticket-3354435

closes odoo/odoo#124112

Related: odoo/upgrade#4841
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-06-28 17:41:35 +02:00

23 lines
630 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import _, fields, models
class Users(models.Model):
_inherit = 'res.users'
create_date = fields.Datetime('Create Date', readonly=True, index=True)
# Wrapper for call_kw with inherits
def open_website_url(self):
return self.mapped('partner_id').open_website_url()
def get_gamification_redirection_data(self):
res = super().get_gamification_redirection_data()
res.append({
'label': _('See our Forum'),
'url': '/forum',
})
return res