mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix china account level,上下级结构处理
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user