mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
add gpt
This commit is contained in:
15
app_chatgpt/models/res_users.py
Normal file
15
app_chatgpt/models/res_users.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResUsers(models.Model):
|
||||
_inherit = "res.users"
|
||||
|
||||
gpt_id = fields.Many2one('ai.robot', string='Bind to ChatGpt')
|
||||
gpt_policy = fields.Selection([
|
||||
('all', 'All Users'),
|
||||
('limit', 'Selected Users')
|
||||
], string='Allowed Conversation Mode', default='all', ondelete='set default')
|
||||
gpt_wl_users = fields.Many2many('res.users', 'res_users_res_users_rel', 'robot_id', 'user_id', string='Allowed Users', domain="[('id', '!=', id)]")
|
||||
gpt_demo_time = fields.Integer('Default Demo Time', default=0)
|
||||
Reference in New Issue
Block a user