初始提交
This commit is contained in:
13
ai/models/res_partner.py
Normal file
13
ai/models/res_partner.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
agent_ids = fields.One2many("ai.agent", inverse_name="partner_id")
|
||||
|
||||
def _store_im_status_fields(self, res):
|
||||
super()._store_im_status_fields(res)
|
||||
# sudo: ai.agent - knowing if a partner is an AI agent is acceptable
|
||||
res.many("agent_ids", [], sudo=True)
|
||||
Reference in New Issue
Block a user