Skip to Content
Menu
This question has been flagged
2 Replies
5024 Views

 I'm trying to add a new field in mail.thread in order to have tags in it.

I've created a new module, named myTaggedMailThread :

from openerp.osv import osv

from openerp import api, fields, models

class myTaggedMailThread(models.Model):

   _inherit = 'mail.thread'

   _name='mail.thread'

   _columns = {

       'current_tags': fields.Text('current_tags', help="Tags", default='test current tags')

   }

   #current_tags = fields.Text('current_tags', help="Tags", default=' test current tag ')

myTaggedMailThread ()

But I get an error when lauching my odoo instance :

File "/opt/myOdoo/app/openerp/field.py", line 343, in __getattr__

    return self._attrs[name].

RuntimeError : maximum recursion depth exceeded

Can someone explain what I'm doing wrong please ?

Avatar
Discard
Best Answer

Hi,

You have mixed the api's in field definition. I think, that could be the problem.

Try like this in your py file:

from openerp import models, fields, api

class myTaggedMailThread(models.Model):

    _inherit = 'mail.thread'

current_tags = fields.Text(string= 'current_tags', help="Tags", default='test current tag')

Hope this helps

Avatar
Discard

Hello Nat, I tried akhil's code, It work for me. Thanks @ Akhil +1

Best Answer

hi

i try to add followers on mail_thread body

can you ecplain me module method ?

odoo13


thanks

Avatar
Discard