1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/website_sale_dashboard/models/website.py
2024-12-10 09:04:09 +07:00

19 lines
542 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from odoo import api, models, fields
_logger = logging.getLogger(__name__)
class Website(models.Model):
_inherit = 'website'
@api.model
def action_dashboard_redirect(self):
if self.env.user.has_group('sales_team.group_sale_salesman'):
return self.env["ir.actions.actions"]._for_xml_id("website_sale_dashboard.sale_dashboard")
return super(Website, self).action_dashboard_redirect()