fix china account level,上下级结构处理

This commit is contained in:
ivan deng
2023-03-01 23:39:49 +08:00
parent 811646c30d
commit 4aa36c65e0
35 changed files with 351 additions and 40 deletions

View File

@@ -3,6 +3,6 @@
from . import mail_channel
from . import res_config_settings
from . import gpt_robot
from . import ai_robot
from . import res_users
from . import mail_message

View File

@@ -4,8 +4,8 @@ import requests
from odoo import api, fields, models, _
class GptRobot(models.Model):
_name = 'gpt.robot'
class AiRobot(models.Model):
_name = 'ai.robot'
_description = 'Gpt Robot'
_order = 'sequence, name'

View File

@@ -85,7 +85,7 @@ class Channel(models.Model):
to_partner_id = self.env['res.partner']
user_id = self.env['res.users']
author_id = msg_vals.get('author_id')
gpt_id = self.env['gpt.robot']
gpt_id = self.env['ai.robot']
channel_type = self.channel_type
if channel_type == 'chat':
channel_partner_ids = self.channel_partner_ids

View File

@@ -6,7 +6,7 @@ from odoo import fields, models
class ResUsers(models.Model):
_inherit = "res.users"
gpt_id = fields.Many2one('gpt.robot', string='Bind to ChatGpt')
gpt_id = fields.Many2one('ai.robot', string='Bind to ChatGpt')
gpt_policy = fields.Selection([
('all', 'All Users'),
('limit', 'Selected Users')